Skip to content

Commit

Permalink
support batch merge source
Browse files Browse the repository at this point in the history
Signed-off-by: fphantam <[email protected]>
  • Loading branch information
F-PHantam authored and dmetasoul01 committed Nov 13, 2024
1 parent 54e7198 commit 2071415
Showing 1 changed file with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,55 @@ public static LakeSoulArrowSource create(
);
}

public static LakeSoulArrowSource create(
String tableNamespace,
String tableName,
Configuration conf,
List<Map<String, String>> remainingPartitions
) throws IOException {
TableId tableId = new TableId(LakeSoulCatalog.CATALOG_NAME, tableNamespace, tableName);
TableInfo tableInfo = DataOperation.dbManager().getTableInfoByNameAndNamespace(tableName, tableNamespace);
RowType tableRowType = ArrowUtils.fromArrowSchema(Schema.fromJSON(tableInfo.getTableSchema()));
DBUtil.TablePartitionKeys tablePartitionKeys = DBUtil.parseTableInfoPartitions(tableInfo.getPartitions());
boolean isBounded = conf.getBoolean("IS_BOUNDED", false);
return new LakeSoulArrowSource(
tableInfo,
tableId,
conf.toMap(),
tableRowType,
isBounded,
tablePartitionKeys.primaryKeys,
tablePartitionKeys.rangeKeys,
remainingPartitions
);
}

LakeSoulArrowSource(
TableInfo tableInfo,
TableId tableId,
Map<String, String> optionParams,
RowType tableRowType,
boolean isBounded,
List<String> pkColumns,
List<String> partitionColumns,
List<Map<String, String>> remainingPartitions
) {
super(
tableId,
tableRowType,
tableRowType,
tableRowType,
isBounded,
pkColumns,
partitionColumns,
optionParams,
remainingPartitions,
null,
null
);
this.encodedTableInfo = tableInfo.toByteArray();
}

LakeSoulArrowSource(
TableInfo tableInfo,
TableId tableId,
Expand Down

0 comments on commit 2071415

Please sign in to comment.