Skip to content

Commit cc3d1e6

Browse files
authored
chore: fix misleading comment about CTAS and allow_append_only_skip (#19189)
fix misleading comment about CTAS and `allow_append_only_skip` Previous comments about the behavior of CommitSink::allow_append_only_skip were incorrect. In fact, CTAS operations are allowed to skip the update_table_meta operation inside CommitSink if no data is inserted to the target table.
1 parent 2a231b8 commit cc3d1e6

File tree

1 file changed

+3
-4
lines changed
  • src/query/storages/fuse/src/operations/common/processors

1 file changed

+3
-4
lines changed

src/query/storages/fuse/src/operations/common/processors/sink_commit.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,9 @@ where F: SnapshotGenerator + Send + Sync + 'static
386386
.is_some()
387387
}
388388

389-
/// Append-only inserts (e.g. `INSERT INTO t SELECT ...`) may skip committing if
390-
/// nothing was written. Overwrite/CTAS (`CREATE OR REPLACE TABLE t AS SELECT ...`
391-
/// or `INSERT OVERWRITE ...`) still need a snapshot even when nothing was written,
392-
/// so we disable skipping when `AppendGenerator` is in overwrite mode.
389+
/// Append-only inserts (e.g. `INSERT INTO t SELECT ...`) may skip committing if nothing was
390+
/// written. `INSERT OVERWRITE ...` still need a snapshot even when nothing was written, so we
391+
/// disable skipping when `AppendGenerator` is in overwrite mode.
393392
fn allow_append_only_skip(&self) -> bool {
394393
self.snapshot_gen
395394
.as_any()

0 commit comments

Comments
 (0)