Skip to content

Commit

Permalink
[pipelineX](filescan) Support parallel executing for external table s…
Browse files Browse the repository at this point in the history
…canning (apache#30121)
  • Loading branch information
Gabriel39 authored Jan 19, 2024
1 parent 1321c92 commit ff9c1df
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,11 @@ public boolean pushDownAggNoGroupingCheckCol(FunctionCallExpr aggExpr, Column co

return true;
}

@Override
public int getScanRangeNum() {
return getScanTabletIds().size();
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,11 @@ public boolean ignoreStorageDataDistribution(ConnectContext context) {
&& context.getSessionVariable().isIgnoreStorageDataDistribution()
&& context.getSessionVariable().getEnablePipelineXEngine()
&& !fragment.isHasNullAwareLeftAntiJoin()
&& ((this instanceof OlapScanNode) && ((OlapScanNode) this).getScanTabletIds().size()
< ConnectContext.get().getSessionVariable().getParallelExecInstanceNum());
&& getScanRangeNum() < ConnectContext.get().getSessionVariable().getParallelExecInstanceNum();
}

public int getScanRangeNum() {
return Integer.MAX_VALUE;
}

public boolean haveLimitAndConjunts() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,18 @@ protected void genSlotToSchemaIdMapForOrc() {
params.setSlotNameToSchemaPos(columnNameToPosition);
}

@Override
public int getScanRangeNum() {
Preconditions.checkNotNull(scanRangeLocations);
int i = 0;
for (TScanRangeLocations tScanRangeLocations : scanRangeLocations) {
TScanRange tScanRange = tScanRangeLocations.getScanRange();
TFileScanRange tFileScanRange = tScanRange.getExtScanRange().getFileScanRange();
i += tFileScanRange.getRangesSize();
}
return i;
}

protected abstract TFileType getLocationType() throws UserException;

protected abstract TFileType getLocationType(String location) throws UserException;
Expand Down

0 comments on commit ff9c1df

Please sign in to comment.