Skip to content
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

Merged
merged 11 commits into from
May 11, 2024

Conversation

vinlee19
Copy link
Contributor

@vinlee19 vinlee19 commented May 9, 2024

Proposed changes

Issue 376: close #xxx

Problem Summary:

Describe the overview of changes.

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

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...

@vinlee19 vinlee19 marked this pull request as ready for review May 9, 2024 09:02
@vinlee19 vinlee19 changed the title [fix] fix cast function can not pushdown [fix](source) fix issues with projection and function pushdown not functioning correctly May 10, 2024
Comment on lines 203 to 214
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(", ")));
}
Copy link
Member

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?

Copy link
Contributor Author

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.

@vinlee19 vinlee19 changed the title [fix](source) fix issues with projection and function pushdown not functioning correctly [fix](source) fix projection and function pushdown not functioning correctly May 10, 2024
Copy link
Member

@JNSimba JNSimba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JNSimba JNSimba merged commit 9b49bc4 into apache:master May 11, 2024
6 checks passed
@JNSimba JNSimba mentioned this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants