-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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-37269][table] Add new DESCRIPTOR type #26144
base: master
Are you sure you want to change the base?
Conversation
|
||
// ----- FLINK MODIFICATION BEGIN ----- | ||
// COLUMN_LIST is assignable from ... | ||
rules.add(SqlTypeName.COLUMN_LIST, EnumSet.of(SqlTypeName.COLUMN_LIST)); |
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.
@snuyanzin could you contribute this line to Calcite? Should be an easy PR if not just a hotfix commit.
@@ -252,6 +253,12 @@ | |||
* <li>Added in FLINK-34312: Lines 5804 ~ 5813 | |||
* <li>Added in FLINK-34057, FLINK-34058, FLINK-34312: Lines 6263 ~ 6279 | |||
* </ol> |
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 feel like we need to update line numbers here
@@ -335,7 +335,7 @@ private DataType extractDataTypeOrError( | |||
// early and helpful exception for common mistakes | |||
checkForCommonErrors(type); | |||
|
|||
// PREDEFINED | |||
// PREDEFINED and DESCRIPTOR | |||
resultDataType = extractPredefinedType(template, type); |
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.
given the fact that extract method here and for others contains type, should it be also renamed?
What is the purpose of the change
Adds the DESCRIPTOR type to the Flink type system. The DESCRIPTOR type is defined by the SQL standard and necessary for passing a list of column names into PTFs. PTFs will esp. use them for time semantics. Built-in window PTFs already partially supported DESCRIPTORs but were tailored to those window uses cases only. This PR generalizes concepts and cleans up the planner.
Calcite has partial support for DESCRIPTOR but had some bugs in the stack that had to be patched in this PR.
Brief change log
DescriptorType
logical typeDESCRIPTOR
data type in function API incl. annotationsVerifying this change
This change added tests and can be verified as follows:
ProcessTableFunctionSemanticTests
,ProcessTableFunctionTests
,Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: yesDocumentation