[pipelineX](filescan) Support parallel executing for external table scanning (#30121)
This commit is contained in:
@ -1736,6 +1736,11 @@ public class OlapScanNode extends ScanNode {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getScanRangeNum() {
|
||||
return getScanTabletIds().size();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -725,8 +725,11 @@ public abstract class ScanNode extends PlanNode {
|
||||
&& 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() {
|
||||
|
||||
@ -485,6 +485,18 @@ public abstract class FileQueryScanNode extends FileScanNode {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user