fix(writer): spark 38811 insert alter table add columns#3479
Open
Shekharrajak wants to merge 4 commits intoapache:mainfrom
Open
fix(writer): spark 38811 insert alter table add columns#3479Shekharrajak wants to merge 4 commits intoapache:mainfrom
Shekharrajak wants to merge 4 commits intoapache:mainfrom
Conversation
Shekharrajak
commented
Feb 10, 2026
| } | ||
|
|
||
| // Refresh the catalog table cache so subsequent reads see the new data | ||
| catalogTable.foreach { ct => |
Contributor
Author
There was a problem hiding this comment.
this was different issue - while running the test, realised table needs to be refreshed to get the new data.
Shekharrajak
commented
Feb 10, 2026
| .setOutputPath(outputPath) | ||
| .setCompression(codec) | ||
| .addAllColumnNames(cmd.query.output.map(_.name).asJava) | ||
| .addAllColumnNames(cmd.outputColumnNames.asJava) |
Contributor
Author
There was a problem hiding this comment.
Operator {
plan_id: 42
parquet_writer: ParquetWriter {
output_path: "file:/.../spark-warehouse/t"
compression: SNAPPY
column_names: ["i", "s"]
}
......
andygrove
reviewed
Feb 13, 2026
spark/src/test/scala/org/apache/comet/parquet/CometParquetWriterSuite.scala
Show resolved
Hide resolved
andygrove
reviewed
Feb 13, 2026
Member
andygrove
left a comment
There was a problem hiding this comment.
Thanks @Shekharrajak this is looking good overall. Would it be possible to add assertions to the new tests to assert that the plan (or the key part of the plan) is actually using Comet operators?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #3422
Rationale for this change
Comet bypasses Spark's logicalPlanOutputWithNames() entirely. It must explicitly use cmd.outputColumnNames (the table's actual column names) to achieve the same result.
What changes are included in this PR?
renames attributes in the logical plan (outputColumns) before passing to FileFormatWriter
How are these changes tested?
unit tests