BePPPower commented on code in PR #33050:
URL: https://github.com/apache/doris/pull/33050#discussion_r1544540541
##########
fe/fe-core/src/main/java/org/apache/doris/tablefunction/LocalTableValuedFunction.java:
##########
@@ -66,14 +75,37 @@ public LocalTableValuedFunction(Map<String, String>
properties) throws AnalysisE
}
}
filePath = otherProps.get(PROP_FILE_PATH);
- backendId = Long.parseLong(otherProps.get(PROP_BACKEND_ID));
+ backendId = Long.parseLong(otherProps.getOrDefault(PROP_BACKEND_ID,
"-1"));
+ sharedStorage =
Boolean.parseBoolean(otherProps.getOrDefault(PROP_SHARED_STORAGE, "false"));
+
+ // If not shared storage, backend_id is required
+ // If is shared storage, backend_id can still be set, so that we can
query data on single BE node.
+ // Otherwise, if shared storage is true, we may use multi BE nodes.
+ if (backendId == -1 && !sharedStorage) {
+ throw new AnalysisException("'backend_id' is required when
'shared_storage' is false.");
+ } else if (backendId != -1 && sharedStorage) {
+ throw new AnalysisException("'shared_storage' should be false when
'backend_id' is set.");
+ }
Review Comment:
This else-if logic is inconsistent with the pr description?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]