Skip to content

Commit

Permalink
Spark 3.3, 3.4: Fix file clobbering when Spark reuses query IDs (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
amogh-jahagirdar authored and geruh committed Jan 25, 2024
1 parent e8c3b5d commit 249ac10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,11 @@ public DataWriter<InternalRow> createWriter(int partitionId, long taskId, long e
Table table = tableBroadcast.value();
PartitionSpec spec = table.specs().get(outputSpecId);
FileIO io = table.io();

String operationId = queryId + "-" + epochId;
OutputFileFactory fileFactory =
OutputFileFactory.builderFor(table, partitionId, taskId)
.format(format)
.operationId(queryId)
.operationId(operationId)
.build();
SparkFileWriterFactory writerFactory =
SparkFileWriterFactory.builderFor(table)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,11 @@ public DataWriter<InternalRow> createWriter(int partitionId, long taskId, long e
Table table = tableBroadcast.value();
PartitionSpec spec = table.specs().get(outputSpecId);
FileIO io = table.io();

String operationId = queryId + "-" + epochId;
OutputFileFactory fileFactory =
OutputFileFactory.builderFor(table, partitionId, taskId)
.format(format)
.operationId(queryId)
.operationId(operationId)
.build();
SparkFileWriterFactory writerFactory =
SparkFileWriterFactory.builderFor(table)
Expand Down

0 comments on commit 249ac10

Please sign in to comment.