-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix](source) fix projection and function pushdown not functioning correctly #383
Conversation
if (StringUtils.isNullOrWhitespaceOnly(readOptions.getFilterQuery())) { | ||
String filterQuery = resolvedFilterQuery.stream().collect(Collectors.joining(" AND ")); | ||
this.readOptions.setFilterQuery(filterQuery); | ||
} | ||
if (StringUtils.isNullOrWhitespaceOnly(readOptions.getReadFields())) { | ||
String[] selectFields = | ||
DataType.getFieldNames(physicalRowDataType).toArray(new String[0]); | ||
this.readOptions.setReadFields( | ||
Arrays.stream(selectFields) | ||
.map(item -> String.format("`%s`", item.trim().replace("`", ""))) | ||
.collect(Collectors.joining(", "))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the benefits of putting it below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method getScanRuntimeProvider
is executed before applyProjection
. Therefore, initializing readFields
in getScanRuntimeProvider
will result in querying all fields in Doris, leading to type conversion errors.
flink-doris-connector/src/main/java/org/apache/doris/flink/table/DorisDynamicTableSource.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Proposed changes
Issue 376: close #xxx
Problem Summary:
Describe the overview of changes.
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...