Skip to content

KYLIN-4791 Fix exception 'UnsupportedOperationException: empty.reduceLeft' when there are cast expressions in the filters of FilePruner#1454

Closed
zzcclp wants to merge 1 commit intoapache:kylin-on-parquet-v2from
zzcclp:KYLIN-4791
Closed

KYLIN-4791 Fix exception 'UnsupportedOperationException: empty.reduceLeft' when there are cast expressions in the filters of FilePruner#1454
zzcclp wants to merge 1 commit intoapache:kylin-on-parquet-v2from
zzcclp:KYLIN-4791

Conversation

@zzcclp
Copy link
Contributor

@zzcclp zzcclp commented Oct 19, 2020

When execute function 'pruneSegments' of FilePruner, if there are some cast expressions in filter, it will throw exception 'UnsupportedOperationException: empty.reduceLeft'.

Solution:
Convert cast expressions in filter to attribute before translating filter.

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to Kylin?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on Kylin's jira, and have described the bug/feature there in detail
  • Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If this change need a document change, I will prepare another pr against the document branch
  • Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at user@kylin or dev@kylin by explaining why you chose the solution you did and what alternatives you considered, etc...

…Left' when there are cast expressions in the filters of FilePruner

When execute function 'pruneSegments' of FilePruner, if there are some cast expressions in filter, it will throw exception 'UnsupportedOperationException: empty.reduceLeft'.

Solution:
Convert cast expressions in filter to attribute before translating filter.
@zzcclp
Copy link
Contributor Author

zzcclp commented Oct 20, 2020

Raise another pr

@zzcclp zzcclp closed this Oct 20, 2020
@zzcclp zzcclp deleted the KYLIN-4791 branch October 20, 2020 02:02
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.

1 participant