Skip to content

Commit 6484c76

Browse files
authored
Remove columns from iceberg export (#249)
* Remove columns from iceberg export * Update artifacts * Remove export column from equality * Add reserved field * Scope buf.yaml
1 parent b2cd2d8 commit 6484c76

24 files changed

Lines changed: 13721 additions & 14156 deletions

File tree

‎buf.yaml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ modules:
44
breaking:
55
use:
66
- FILE
7-
except:
8-
- FIELD_NO_DELETE
7+
ignore_only:
8+
FIELD_NO_DELETE:
9+
- proto/relationalai/lqp/v1/transactions.proto
10+
MESSAGE_NO_DELETE:
11+
- proto/relationalai/lqp/v1/transactions.proto

‎meta/src/meta/grammar.y‎

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@
116116
%nonterm export_csv_config transactions.ExportCSVConfig
117117
%nonterm export_csv_path String
118118
%nonterm export_csv_source transactions.ExportCSVSource
119-
%nonterm export_iceberg_column transactions.ExportColumn
120-
%nonterm export_iceberg_columns Sequence[transactions.ExportColumn]
121119
%nonterm export_iceberg_config transactions.ExportIcebergConfig
122120
%nonterm export_iceberg_table_def logic.RelationId
123121
%nonterm iceberg_auth_properties Sequence[Tuple[String, String]]
@@ -1222,13 +1220,6 @@ iceberg_catalog_config
12221220
$5: Sequence[Tuple[String, String]] = builtin.dict_to_pairs($$.properties)
12231221
$6: Sequence[Tuple[String, String]] = builtin.dict_to_pairs($$.auth_properties)
12241222

1225-
export_iceberg_column
1226-
: "(" "column" STRING boolean_value ")"
1227-
construct: $$ = transactions.ExportColumn(name=$3, nullable=$4)
1228-
deconstruct:
1229-
$3: String = $$.name
1230-
$4: Boolean = $$.nullable
1231-
12321223
iceberg_to_snapshot
12331224
: "(" "to_snapshot" STRING ")"
12341225
construct: $$ = $3
@@ -1372,26 +1363,20 @@ export_iceberg_table_def
13721363
construct: $$ = $3
13731364
deconstruct: $3: logic.RelationId = $$
13741365

1375-
export_iceberg_columns
1376-
: "(" "columns" export_iceberg_column* ")"
1377-
construct: $$ = $3
1378-
deconstruct: $3: Sequence[transactions.ExportColumn] = $$
1379-
13801366
iceberg_table_properties
13811367
: "(" "table_properties" iceberg_property_entry* ")"
13821368
construct: $$ = $3
13831369
deconstruct: $3: Sequence[Tuple[String, String]] = $$
13841370

13851371
export_iceberg_config
1386-
: "(" "export_iceberg_config" iceberg_locator iceberg_catalog_config export_iceberg_table_def export_iceberg_columns iceberg_table_properties config_dict? ")"
1387-
construct: $$ = construct_export_iceberg_config_full($3, $4, $5, $6, $7, $8)
1372+
: "(" "export_iceberg_config" iceberg_locator iceberg_catalog_config export_iceberg_table_def iceberg_table_properties config_dict? ")"
1373+
construct: $$ = construct_export_iceberg_config_full($3, $4, $5, $6, $7)
13881374
deconstruct:
13891375
$3: logic.IcebergLocator = $$.locator
13901376
$4: logic.IcebergCatalogConfig = $$.config
13911377
$5: logic.RelationId = $$.table_def
1392-
$6: Sequence[transactions.ExportColumn] = $$.columns
1393-
$7: Sequence[Tuple[String, String]] = builtin.dict_to_pairs($$.table_properties)
1394-
$8: Optional[Sequence[Tuple[String, logic.Value]]] = deconstruct_export_iceberg_config_optional($$)
1378+
$6: Sequence[Tuple[String, String]] = builtin.dict_to_pairs($$.table_properties)
1379+
$7: Optional[Sequence[Tuple[String, logic.Value]]] = deconstruct_export_iceberg_config_optional($$)
13951380

13961381

13971382
%%
@@ -1770,7 +1755,6 @@ def construct_export_iceberg_config_full(
17701755
locator: logic.IcebergLocator,
17711756
config: logic.IcebergCatalogConfig,
17721757
table_def: logic.RelationId,
1773-
columns: Sequence[transactions.ExportColumn],
17741758
table_property_pairs: Sequence[Tuple[String, String]],
17751759
config_dict: Optional[Sequence[Tuple[String, logic.Value]]],
17761760
) -> transactions.ExportIcebergConfig:
@@ -1783,7 +1767,6 @@ def construct_export_iceberg_config_full(
17831767
locator=locator,
17841768
config=config,
17851769
table_def=table_def,
1786-
columns=columns,
17871770
prefix=builtin.some(prefix),
17881771
target_file_size_bytes=builtin.some(target_file_size_bytes),
17891772
compression=compression,

‎proto/relationalai/lqp/v1/transactions.proto‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,11 @@ message ExportCSVSource {
122122

123123
// Iceberg Export config
124124

125-
message ExportColumn {
126-
string name = 1;
127-
bool nullable = 2;
128-
}
129-
130125
message ExportIcebergConfig {
131126
IcebergLocator locator = 1;
132127
IcebergCatalogConfig config = 2;
133128
RelationId table_def = 3; // Which definition to export as a table.
134-
repeated ExportColumn columns = 4;
129+
reserved 4; // was: repeated ExportColumn columns
135130
optional string prefix = 5; // File name prefix for parquet files that are produced.
136131
optional int64 target_file_size_bytes = 6;
137132
string compression = 7;

0 commit comments

Comments
 (0)