Skip to content

Commit

Permalink
[Fix](multi-catalog) Fix NPE when file cache is enabled. (#23165)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaka11chen authored Aug 20, 2023
1 parent 4bf055c commit 3d980ae
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ public void createScanRangeLocations() throws UserException {
HudiScanNode.setHudiParams(rangeDesc, (HudiSplit) fileSplit);
}

curLocations.getScanRange().getExtScanRange().getFileScanRange().addToRanges(rangeDesc);
TScanRangeLocation location = new TScanRangeLocation();
Backend selectedBackend;
if (enableSqlCache) {
// Use consistent hash to assign the same scan range into the same backend among different queries
Expand All @@ -336,9 +338,6 @@ public void createScanRangeLocations() throws UserException {
} else {
selectedBackend = backendPolicy.getNextBe();
}

curLocations.getScanRange().getExtScanRange().getFileScanRange().addToRanges(rangeDesc);
TScanRangeLocation location = new TScanRangeLocation();
location.setBackendId(selectedBackend.getId());
location.setServer(new TNetworkAddress(selectedBackend.getHost(), selectedBackend.getBePort()));
curLocations.addToLocations(location);
Expand Down

0 comments on commit 3d980ae

Please sign in to comment.