8989%nonterm gnf_columns Sequence[logic.GNFColumn]
9090%nonterm named_column logic.NamedColumn
9191%nonterm relation_keys Sequence[logic.NamedColumn]
92- %nonterm output_relation logic.OutputRelation
93- %nonterm non_cdc_relations Sequence[logic.OutputRelation ]
94- %nonterm cdc_inserts Sequence[logic.OutputRelation ]
95- %nonterm cdc_deletes Sequence[logic.OutputRelation ]
96- %nonterm relation_body logic.Relations
97- %nonterm relations logic.Relations
92+ %nonterm target_relation logic.TargetRelation
93+ %nonterm non_cdc_relations Sequence[logic.TargetRelation ]
94+ %nonterm cdc_inserts Sequence[logic.TargetRelation ]
95+ %nonterm cdc_deletes Sequence[logic.TargetRelation ]
96+ %nonterm relation_body logic.TargetRelations
97+ %nonterm target_relations logic.TargetRelations
9898%nonterm csv_config logic.CSVConfig
9999%nonterm csv_data logic.CSVData
100100%nonterm csv_locator_inline_data String
@@ -1115,13 +1115,13 @@ csv_asof
11151115 : " (" " asof" STRING " )"
11161116
11171117csv_data
1118- : " (" " csv_data" csvlocator csv_config gnf_columns? relations ? csv_asof " )"
1118+ : " (" " csv_data" csvlocator csv_config gnf_columns? target_relations ? csv_asof " )"
11191119 construct: $$ = construct_csv_data($3 , $4 , $5 , $6 , $7 )
11201120 deconstruct:
11211121 $3 : logic.CSVLocator = $$.locator
11221122 $4 : logic.CSVConfig = $$.config
11231123 $5 : Optional[Sequence[logic.GNFColumn]] = deconstruct_csv_data_columns_optional($$)
1124- $6 : Optional[logic.Relations ] = deconstruct_csv_data_relations_optional($$)
1124+ $6 : Optional[logic.TargetRelations ] = deconstruct_csv_data_relations_optional($$)
11251125 $7 : String = $$.asof
11261126
11271127named_column
@@ -1134,39 +1134,39 @@ named_column
11341134relation_keys
11351135 : " (" " keys" named_column* " )"
11361136
1137- output_relation
1137+ target_relation
11381138 : " (" " relation" relation_id named_column* " )"
1139- construct: $$ = logic.OutputRelation (target_id=$3 , values=$4 )
1139+ construct: $$ = logic.TargetRelation (target_id=$3 , values=$4 )
11401140 deconstruct:
11411141 $3 : logic.RelationId = $$.target_id
11421142 $4 : Sequence[logic.NamedColumn] = $$.values
11431143
11441144non_cdc_relations
1145- : output_relation *
1145+ : target_relation *
11461146
11471147cdc_inserts
1148- : " (" " inserts" output_relation * " )"
1148+ : " (" " inserts" target_relation * " )"
11491149
11501150cdc_deletes
1151- : " (" " deletes" output_relation * " )"
1151+ : " (" " deletes" target_relation * " )"
11521152
11531153relation_body
11541154 : non_cdc_relations
11551155 construct: $$ = construct_non_cdc_relations($1 )
11561156 deconstruct if builtin.is_empty($$.inserts) and builtin.is_empty($$.deletes):
1157- $1 : Sequence[logic.OutputRelation ] = $$.relations
1157+ $1 : Sequence[logic.TargetRelation ] = $$.relations
11581158 | cdc_inserts cdc_deletes
11591159 construct: $$ = construct_cdc_relations($1 , $2 )
11601160 deconstruct if not (builtin.is_empty($$.inserts) and builtin.is_empty($$.deletes)):
1161- $1: Sequence[logic.OutputRelation ] = $$.inserts
1162- $2: Sequence[logic.OutputRelation ] = $$.deletes
1161+ $1: Sequence[logic.TargetRelation ] = $$.inserts
1162+ $2: Sequence[logic.TargetRelation ] = $$.deletes
11631163
1164- relations
1164+ target_relations
11651165 : "(" " relations" relation_keys relation_body " )"
11661166 construct: $$ = construct_relations($3 , $4 )
11671167 deconstruct:
11681168 $3: Sequence[logic.NamedColumn] = $$.keys
1169- $4: logic.Relations = $$
1169+ $4: logic.TargetRelations = $$
11701170
11711171csv_locator_paths
11721172 : "(" " paths" STRING* " )"
@@ -1527,33 +1527,33 @@ def _try_extract_value_string_list(value: Optional[logic.Value]) -> Optional[Seq
15271527
15281528
15291529def construct_non_cdc_relations(
1530- relations: Sequence[logic.OutputRelation ],
1531- ) -> logic.Relations :
1532- return logic.Relations (
1530+ relations: Sequence[logic.TargetRelation ],
1531+ ) -> logic.TargetRelations :
1532+ return logic.TargetRelations (
15331533 keys=list[logic.NamedColumn](),
15341534 relations=relations,
1535- inserts=list[logic.OutputRelation ](),
1536- deletes=list[logic.OutputRelation ](),
1535+ inserts=list[logic.TargetRelation ](),
1536+ deletes=list[logic.TargetRelation ](),
15371537 )
15381538
15391539
15401540def construct_cdc_relations(
1541- inserts: Sequence[logic.OutputRelation ],
1542- deletes: Sequence[logic.OutputRelation ],
1543- ) -> logic.Relations :
1544- return logic.Relations (
1541+ inserts: Sequence[logic.TargetRelation ],
1542+ deletes: Sequence[logic.TargetRelation ],
1543+ ) -> logic.TargetRelations :
1544+ return logic.TargetRelations (
15451545 keys=list[logic.NamedColumn](),
1546- relations=list[logic.OutputRelation ](),
1546+ relations=list[logic.TargetRelation ](),
15471547 inserts=inserts,
15481548 deletes=deletes,
15491549 )
15501550
15511551
15521552def construct_relations(
15531553 keys: Sequence[logic.NamedColumn],
1554- body: logic.Relations ,
1555- ) -> logic.Relations :
1556- return logic.Relations (
1554+ body: logic.TargetRelations ,
1555+ ) -> logic.TargetRelations :
1556+ return logic.TargetRelations (
15571557 keys=keys,
15581558 relations=body.relations,
15591559 inserts=body.inserts,
@@ -1565,7 +1565,7 @@ def construct_csv_data(
15651565 locator: logic.CSVLocator,
15661566 config: logic.CSVConfig,
15671567 columns_opt: Optional[Sequence[logic.GNFColumn]],
1568- relations_opt: Optional[logic.Relations ],
1568+ relations_opt: Optional[logic.TargetRelations ],
15691569 asof: String,
15701570) -> logic.CSVData:
15711571 return logic.CSVData(
@@ -1583,7 +1583,7 @@ def deconstruct_csv_data_columns_optional(msg: logic.CSVData) -> Optional[Sequen
15831583 return builtin.some(msg.columns)
15841584
15851585
1586- def deconstruct_csv_data_relations_optional(msg: logic.CSVData) -> Optional[logic.Relations ]:
1586+ def deconstruct_csv_data_relations_optional(msg: logic.CSVData) -> Optional[logic.TargetRelations ]:
15871587 if builtin.has_proto_field(msg, " relations" ):
15881588 return builtin.some(builtin.unwrap_option(msg.relations))
15891589 return builtin.none()
0 commit comments