github-actions[bot] commented on code in PR #63480:
URL: https://github.com/apache/doris/pull/63480#discussion_r3286334159
##########
fe/fe-core/src/main/java/org/apache/doris/tablefunction/CdcStreamTableValuedFunction.java:
##########
@@ -106,18 +106,38 @@ private String generateParams(Map<String, String>
properties) throws AnalysisExc
}
private void validate(Map<String, String> properties) throws
AnalysisException {
- if (!properties.containsKey(DataSourceConfigKeys.JDBC_URL)) {
+ if
(StringUtils.isEmpty(properties.get(DataSourceConfigKeys.JDBC_URL))) {
throw new AnalysisException("jdbc_url is required");
}
- if (!properties.containsKey(DataSourceConfigKeys.TYPE)) {
+ if (StringUtils.isEmpty(properties.get(DataSourceConfigKeys.TYPE))) {
throw new AnalysisException("type is required");
}
- if (!properties.containsKey(DataSourceConfigKeys.TABLE)) {
+ if (StringUtils.isEmpty(properties.get(DataSourceConfigKeys.TABLE))) {
throw new AnalysisException("table is required");
}
- if (!properties.containsKey(DataSourceConfigKeys.OFFSET)) {
+ if (StringUtils.isEmpty(properties.get(DataSourceConfigKeys.OFFSET))) {
throw new AnalysisException("offset is required");
}
+ DataSourceType sourceType;
Review Comment:
The new numeric checks in `DataSourceConfigValidator` are not applied on the
`cdc_stream(...)` TVF path. `CreateJobCommand.validate()` only calls that
validator when `sourceType` is present, while TVF-backed streaming jobs go
through `CdcStreamTableValuedFunction.validate()` /
`JdbcTvfSourceOffsetProvider.ensureInitialized()`. As a result, a TVF like
`cdc_stream(..., "snapshot_parallelism"="0")` or `"snapshot_split_size"="abc"`
still passes analysis here and then fails later in `Integer.parseInt` or
cdc-client initialization with a lower-level runtime error. Please reuse
`DataSourceConfigValidator.validateSource()` here or add equivalent validation
for these allowed TVF source properties, with TVF coverage.
--
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]