-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-16345][table-planner-blink] Fix computed column can not refer row time attribute column #11424
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
[FLINK-16345][table-planner-blink] Fix computed column can not refer row time attribute column #11424
Conversation
…row time attribute column
|
cc @danny0405 |
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit a891d89 (Tue Mar 17 03:48:46 UTC 2020) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
|
||
| // 2. push computed column project | ||
| val fieldNames = rowType.getFieldNames.asScala | ||
| val fieldNames = erasedRowType.getFieldNames.asScala |
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.
I think the right place to fix is the SqlToOperationConverter#createTableSchema, before we make the computed column type inference, the time attribute should be patched up based on the watermark definitions.
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.
After an offline discussion with @danny0405 , we reached an consensus that erasing time indicators in CatalogSourceTable#toRel is the only way to fix this for now. So we will keep the current implementation in PR.
|
I don't fully understand this, if we just throw time indicator information, how to support process time field? Downstream operators how to know this is a process time field? |
We didn't drop the time indicator information. The RelDataType from |
danny0405
left a comment
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.
+1, looks fine from my side.
|
LGTM, +1 for merging. |
|
Thanks for the reviewing @libenchao @danny0405 , will merge this. |
What is the purpose of the change
If a computed column refers a rowtime column (the column has been defined watermark), a query on the table will be failed with the following exception:
Brief change log
CatalogSourceTableintoRelNodes inCatalogSourceTable#toRel.Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation