Skip to content

[Native Writer] INSERT INTO ... SELECT fails due to stale catalog cache after write #3521

Closed

Description

@Shekharrajak

Describe the bug

When using the native Parquet writer with INSERT INTO ... SELECT syntax, subsequent reads return empty results even though the file is written successfully. This could be due to Spark caching .

Ref https://github.com/apache/datafusion-comet/pull/3479/changes#r2804765579

withSQLConf(
  CometConf.COMET_NATIVE_PARQUET_WRITE_ENABLED.key -> "true",
  CometConf.COMET_EXEC_ENABLED.key -> "true",
  CometConf.getOperatorAllowIncompatConfigKey(classOf[DataWritingCommandExec]) -> "true") {
  
  sql("create table t(i boolean) using parquet")
  sql("alter table t add column s bigint default 42")
  sql("insert into t select false, default")
  spark.table("t").show()  // Returns empty!
}

expected : false, 42

actual: (0 rows)

Note: This issue does NOT affect INSERT INTO ... VALUES syntax, only INSERT INTO ... SELECT.

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

Activity

  1. comphead commented on Feb 16, 2026

    @comphead
    Contributor

    Thanks @Shekharrajak I'm tracking writer issues here #2967

  2. added
    priority:mediumFunctional bugs, performance regressions, broken features
    on Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:writerNative Parquet writerbugSomething isn't workingpriority:mediumFunctional bugs, performance regressions, broken features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions