Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwenchi committed Sep 23, 2024
1 parent 5b9388d commit 1e4d795
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public class IcebergScanNode extends FileQueryScanNode {
private Table icebergTable;
private List<String> pushdownIcebergPredicates = Lists.newArrayList();
private boolean pushDownCount = false;
private static final long COUNT_WITH_PARALLEL_SPLITS = 10000;

/**
* External file scan node for Query iceberg table
Expand Down Expand Up @@ -269,7 +270,7 @@ private List<Split> doGetSplits() throws UserException {
if (countFromSnapshot >= 0) {
pushDownCount = true;
List<Split> pushDownCountSplits;
if (countFromSnapshot > 10000) {
if (countFromSnapshot > COUNT_WITH_PARALLEL_SPLITS) {
int parallelNum = ConnectContext.get().getSessionVariable().getParallelExecInstanceNum();
pushDownCountSplits = splits.subList(0, Math.min(splits.size(), parallelNum));
} else {
Expand Down

0 comments on commit 1e4d795

Please sign in to comment.