[pipelineX](file scan) Improve parallel tasks if ignore data distribution (#31328)
This commit is contained in:
@ -503,6 +503,16 @@ public abstract class FileQueryScanNode extends FileScanNode {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumInstances() {
|
||||
if (ConnectContext.get() != null
|
||||
&& ConnectContext.get().getSessionVariable().getEnablePipelineXEngine()
|
||||
&& ConnectContext.get().getSessionVariable().isIgnoreStorageDataDistribution()) {
|
||||
return ConnectContext.get().getSessionVariable().getParallelExecInstanceNum();
|
||||
}
|
||||
return scanRangeLocations.size();
|
||||
}
|
||||
|
||||
protected abstract TFileType getLocationType() throws UserException;
|
||||
|
||||
protected abstract TFileType getLocationType(String location) throws UserException;
|
||||
|
||||
@ -143,4 +143,9 @@ public class TVFScanNode extends FileQueryScanNode {
|
||||
}
|
||||
return splits;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumInstances() {
|
||||
return scanRangeLocations.size();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user