Copilot commented on code in PR #63480:
URL: https://github.com/apache/doris/pull/63480#discussion_r3279820792
##########
fe/fe-core/src/main/java/org/apache/doris/tablefunction/CdcStreamTableValuedFunction.java:
##########
@@ -118,6 +118,26 @@ private void validate(Map<String, String> properties)
throws AnalysisException {
if (!properties.containsKey(DataSourceConfigKeys.OFFSET)) {
throw new AnalysisException("offset is required");
}
Review Comment:
`validate()` currently treats required TVF properties as present if the key
exists, even when the value is an empty string (e.g. `"type"=""`,
`"jdbc_url"=""`, etc.). That means validation can pass and later fail deeper in
execution with less-clear errors (and for empty `type` it becomes `Unsupported
type: ` rather than `type is required`). Consider changing the required-field
checks to validate non-empty values (e.g.
`StringUtils.isEmpty(properties.get(...))`) for `jdbc_url`, `type`, `table`,
and `offset` (and optionally trimming).
--
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]