@@ -49,6 +49,7 @@ public class IcebergTableHandle
49
49
private final int formatVersion ;
50
50
private final String tableLocation ;
51
51
private final Map <String , String > storageProperties ;
52
+ private final Optional <String > branch ;
52
53
53
54
// Filter used during split generation and table scan, but not required to be strictly enforced by Iceberg Connector
54
55
private final TupleDomain <IcebergColumnHandle > unenforcedPredicate ;
@@ -92,7 +93,8 @@ public static IcebergTableHandle fromJsonForDeserializationOnly(
92
93
@ JsonProperty ("projectedColumns" ) Set <IcebergColumnHandle > projectedColumns ,
93
94
@ JsonProperty ("nameMappingJson" ) Optional <String > nameMappingJson ,
94
95
@ JsonProperty ("tableLocation" ) String tableLocation ,
95
- @ JsonProperty ("storageProperties" ) Map <String , String > storageProperties )
96
+ @ JsonProperty ("storageProperties" ) Map <String , String > storageProperties ,
97
+ @ JsonProperty ("branch" ) Optional <String > branch )
96
98
{
97
99
return new IcebergTableHandle (
98
100
catalog ,
@@ -111,6 +113,7 @@ public static IcebergTableHandle fromJsonForDeserializationOnly(
111
113
tableLocation ,
112
114
storageProperties ,
113
115
Optional .empty (),
116
+ branch ,
114
117
false ,
115
118
Optional .empty (),
116
119
ImmutableSet .of (),
@@ -134,6 +137,7 @@ public IcebergTableHandle(
134
137
String tableLocation ,
135
138
Map <String , String > storageProperties ,
136
139
Optional <IcebergTablePartitioning > tablePartitioning ,
140
+ Optional <String > branch ,
137
141
boolean recordScannedFiles ,
138
142
Optional <DataSize > maxScannedFileSize ,
139
143
Set <IcebergColumnHandle > constraintColumns ,
@@ -155,6 +159,7 @@ public IcebergTableHandle(
155
159
this .tableLocation = requireNonNull (tableLocation , "tableLocation is null" );
156
160
this .storageProperties = ImmutableMap .copyOf (requireNonNull (storageProperties , "storageProperties is null" ));
157
161
this .tablePartitioning = requireNonNull (tablePartitioning , "tablePartitioning is null" );
162
+ this .branch = requireNonNull (branch , "branch is null" );
158
163
this .recordScannedFiles = recordScannedFiles ;
159
164
this .maxScannedFileSize = requireNonNull (maxScannedFileSize , "maxScannedFileSize is null" );
160
165
this .constraintColumns = ImmutableSet .copyOf (requireNonNull (constraintColumns , "constraintColumns is null" ));
@@ -261,6 +266,12 @@ public Optional<IcebergTablePartitioning> getTablePartitioning()
261
266
return tablePartitioning ;
262
267
}
263
268
269
+ @ JsonProperty
270
+ public Optional <String > getBranch ()
271
+ {
272
+ return branch ;
273
+ }
274
+
264
275
@ JsonIgnore
265
276
public boolean isRecordScannedFiles ()
266
277
{
@@ -314,6 +325,7 @@ public IcebergTableHandle withProjectedColumns(Set<IcebergColumnHandle> projecte
314
325
tableLocation ,
315
326
storageProperties ,
316
327
tablePartitioning ,
328
+ branch ,
317
329
recordScannedFiles ,
318
330
maxScannedFileSize ,
319
331
constraintColumns ,
@@ -339,6 +351,7 @@ public IcebergTableHandle forAnalyze()
339
351
tableLocation ,
340
352
storageProperties ,
341
353
tablePartitioning ,
354
+ branch ,
342
355
recordScannedFiles ,
343
356
maxScannedFileSize ,
344
357
constraintColumns ,
@@ -364,6 +377,7 @@ public IcebergTableHandle forOptimize(boolean recordScannedFiles, DataSize maxSc
364
377
tableLocation ,
365
378
storageProperties ,
366
379
tablePartitioning ,
380
+ branch ,
367
381
recordScannedFiles ,
368
382
Optional .of (maxScannedFileSize ),
369
383
constraintColumns ,
@@ -389,6 +403,7 @@ public IcebergTableHandle withTablePartitioning(Optional<IcebergTablePartitionin
389
403
tableLocation ,
390
404
storageProperties ,
391
405
requiredTablePartitioning ,
406
+ branch ,
392
407
recordScannedFiles ,
393
408
maxScannedFileSize ,
394
409
constraintColumns ,
@@ -422,6 +437,7 @@ public boolean equals(Object o)
422
437
Objects .equals (nameMappingJson , that .nameMappingJson ) &&
423
438
Objects .equals (tableLocation , that .tableLocation ) &&
424
439
Objects .equals (storageProperties , that .storageProperties ) &&
440
+ Objects .equals (branch , that .branch ) &&
425
441
Objects .equals (maxScannedFileSize , that .maxScannedFileSize ) &&
426
442
Objects .equals (constraintColumns , that .constraintColumns ) &&
427
443
Objects .equals (forAnalyze , that .forAnalyze );
@@ -446,6 +462,7 @@ public int hashCode()
446
462
nameMappingJson ,
447
463
tableLocation ,
448
464
storageProperties ,
465
+ branch ,
449
466
recordScannedFiles ,
450
467
maxScannedFileSize ,
451
468
constraintColumns ,
0 commit comments