|
117 | 117 | %nonterm export_csv_path String |
118 | 118 | %nonterm export_csv_source transactions.ExportCSVSource |
119 | 119 | %nonterm export_iceberg_column transactions.ExportIcebergColumn |
120 | | -%nonterm export_iceberg_column_source transactions.ExportIcebergColumns |
121 | 120 | %nonterm export_iceberg_columns transactions.ExportIcebergColumns |
122 | 121 | %nonterm export_iceberg_config transactions.ExportIcebergConfig |
123 | 122 | %nonterm iceberg_catalog_config logic.IcebergCatalogConfig |
@@ -1177,21 +1176,11 @@ export_iceberg_column |
1177 | 1176 | $4: logic.Type = $$.type |
1178 | 1177 | $5: Boolean = $$.nullable |
1179 | 1178 |
|
1180 | | -export_iceberg_column_source |
1181 | | - : "(" "source_gnf_defs" relation_id* ")" |
1182 | | - construct: $$ = transactions.ExportIcebergColumns(source_gnf_defs=transactions.ExportIcebergGnfDefs(defs=$3), target_columns=list[transactions.ExportIcebergColumn]()) |
1183 | | - deconstruct if builtin.has_proto_field($$, 'source_gnf_defs'): |
1184 | | - $3: Sequence[logic.RelationId] = $$.source_gnf_defs.defs |
1185 | | - | "(" "source_table_def" relation_id ")" |
1186 | | - construct: $$ = transactions.ExportIcebergColumns(source_table_def=$3, target_columns=list[transactions.ExportIcebergColumn]()) |
1187 | | - deconstruct if builtin.has_proto_field($$, 'source_table_def'): |
1188 | | - $3: logic.RelationId = $$.source_table_def |
1189 | | - |
1190 | 1179 | export_iceberg_columns |
1191 | | - : "(" "columns" export_iceberg_column_source "(" "target_columns" export_iceberg_column* ")" ")" |
1192 | | - construct: $$ = merge_export_iceberg_columns($3, $6) |
| 1180 | + : "(" "columns" relation_id "(" "target_columns" export_iceberg_column* ")" ")" |
| 1181 | + construct: $$ = transactions.ExportIcebergColumns(source_table_def=$3, target_columns=$6) |
1193 | 1182 | deconstruct: |
1194 | | - $3: transactions.ExportIcebergColumns = $$ |
| 1183 | + $3: logic.RelationId = $$.source_table_def |
1195 | 1184 | $6: Sequence[transactions.ExportIcebergColumn] = $$.target_columns |
1196 | 1185 |
|
1197 | 1186 | iceberg_to_snapshot |
@@ -1706,15 +1695,6 @@ def construct_export_iceberg_config_full( |
1706 | 1695 | ) |
1707 | 1696 |
|
1708 | 1697 |
|
1709 | | -def merge_export_iceberg_columns( |
1710 | | - source: transactions.ExportIcebergColumns, |
1711 | | - target_columns: Sequence[transactions.ExportIcebergColumn], |
1712 | | -) -> transactions.ExportIcebergColumns: |
1713 | | - if builtin.has_proto_field(source, 'source_gnf_defs'): |
1714 | | - return transactions.ExportIcebergColumns(source_gnf_defs=transactions.ExportIcebergGnfDefs(defs=source.source_gnf_defs.defs), target_columns=target_columns) |
1715 | | - return transactions.ExportIcebergColumns(source_table_def=source.source_table_def, target_columns=target_columns) |
1716 | | - |
1717 | | - |
1718 | 1698 | def deconstruct_export_iceberg_config_optional( |
1719 | 1699 | msg: transactions.ExportIcebergConfig, |
1720 | 1700 | ) -> Optional[Sequence[Tuple[String, logic.Value]]]: |
|
0 commit comments