Skip to content

Commit

Permalink
[Lake] Support export table (#9307)
Browse files Browse the repository at this point in the history
  • Loading branch information
TszKitLo40 authored Aug 2, 2022
1 parent a272ac8 commit c6d468f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ private void checkTable(GlobalStateMgr globalStateMgr) throws AnalysisException
switch (tblType) {
case MYSQL:
case OLAP:
case LAKE:
break;
case BROKER:
case SCHEMA:
Expand Down
7 changes: 7 additions & 0 deletions fe/fe-core/src/main/java/com/starrocks/load/ExportJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ public void setJob(ExportStmt stmt) throws UserException {
}

this.sql = stmt.toSql();

// TODO Support snapshot of lake table
if (exportTable.isLakeTable()) {
this.state = JobState.EXPORTING;
}
}

private void genExecFragment(ExportStmt stmt) throws UserException {
Expand Down Expand Up @@ -306,6 +311,7 @@ private ScanNode genScanNode() throws UserException {
ScanNode scanNode = null;
switch (exportTable.getType()) {
case OLAP:
case LAKE:
scanNode = new OlapScanNode(new PlanNodeId(0), exportTupleDesc, "OlapScanNodeForExport");
scanNode.setColumnFilters(Maps.newHashMap());
((OlapScanNode) scanNode).setIsPreAggregation(false, "This an export operation");
Expand Down Expand Up @@ -336,6 +342,7 @@ private PlanFragment genPlanFragment(Table.TableType type, ScanNode scanNode, in
PlanFragment fragment = null;
switch (exportTable.getType()) {
case OLAP:
case LAKE:
fragment = new PlanFragment(
new PlanFragmentId(nextId.getAndIncrement()), scanNode, DataPartition.RANDOM);
break;
Expand Down

0 comments on commit c6d468f

Please sign in to comment.