Skip to content

Commit

Permalink
adapter: Always set primary export of sources
Browse files Browse the repository at this point in the history
Previously, when `force_source_table_syntax` was enabled, the primary
export of sources was disabled. This feature was never tested and did
not work. This commit reverts this feature so that the primary export
is always created.
  • Loading branch information
jkosh44 committed Jan 7, 2025
1 parent d7581c7 commit 4b3d7ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/sql/src/plan/statement/ddl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,13 +1040,10 @@ pub fn plan_create_source(
// We only define primary-export details for this source if we are still supporting
// the legacy source syntax. Otherwise, we will not output to the primary collection.
// TODO(database-issues#8620): Remove this field once the new syntax is enabled everywhere
primary_export: match force_source_table_syntax {
false => Some(SourceExportDataConfig {
encoding,
envelope: envelope.clone(),
}),
true => None,
},
primary_export: Some(SourceExportDataConfig {
encoding,
envelope: envelope.clone(),
}),
timestamp_interval,
};

Expand Down
2 changes: 2 additions & 0 deletions src/storage-types/src/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,8 @@ pub struct SourceDesc<C: ConnectionAccess = InlinedConnection> {
/// primary collection for this source.
/// TODO(database-issues#8620): This will be removed once sources no longer export
/// to primary collections and only export to explicit SourceExports (tables).
/// The value for this is ALWAYS `Some`, because we couldn't figure out how to get
/// `None` to work.
pub primary_export: Option<SourceExportDataConfig<C>>,
}

Expand Down

0 comments on commit 4b3d7ee

Please sign in to comment.