-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[FLINK-37791][6/N] model sql to rel converter #26603
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
Conversation
21e25a0
to
c560613
Compare
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.
Thanks for your contribution. I left some comments.
...e/flink-table-planner/src/main/java/org/apache/flink/table/planner/calcite/RexModelCall.java
Outdated
Show resolved
Hide resolved
...e/flink-table-planner/src/main/java/org/apache/flink/table/planner/calcite/RexModelCall.java
Show resolved
Hide resolved
...e/flink-table-planner/src/main/java/org/apache/flink/table/planner/calcite/RexModelCall.java
Show resolved
Hide resolved
ModelProviderModel modelProviderModel, RelDataType inputType, RelDataType outputType) { | ||
super( | ||
outputType, | ||
new SqlSpecialOperator("RexModelCall", SqlKind.OTHER_FUNCTION), |
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.
Do we need to introduce a new operator here? It's better we can reuse the SqlModelOperator
.
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.
Just found SqlModelOperator
needs CatalogSchemaModel
as argument which we don't have inside ModelProviderModel
...e/flink-table-planner/src/main/java/org/apache/flink/table/planner/calcite/RexModelCall.java
Outdated
Show resolved
Hide resolved
72a9f54
to
86e2ec3
Compare
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 messed up the commits somehow and squashed the commits and force pushed...
It's ok. The change in the PR is not very large. |
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.
Thanks for your update.
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
Outdated
Show resolved
Hide resolved
...e/flink-table-planner/src/main/java/org/apache/flink/table/planner/calcite/RexModelCall.java
Show resolved
Hide resolved
...e/flink-table-planner/src/main/java/org/apache/flink/table/planner/calcite/RexModelCall.java
Outdated
Show resolved
Hide resolved
...e/flink-table-planner/src/main/java/org/apache/flink/table/planner/calcite/RexModelCall.java
Outdated
Show resolved
Hide resolved
...e/flink-table-planner/src/main/java/org/apache/flink/table/planner/calcite/RexModelCall.java
Show resolved
Hide resolved
I write my idea here. You can take a look 0.0 https://github.com/apache/flink/compare/master...fsk119:flink:converter2?expand=1 |
I made most of the changes except reusing |
...k-table-planner/src/main/java/org/apache/flink/table/planner/catalog/CatalogSchemaModel.java
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.
Thanks for your update. I left some comments.
...che/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalMLPredictTableFunction.java
Outdated
Show resolved
Hide resolved
...flink/table/planner/plan/nodes/physical/stream/StreamPhysicalMLPredictTableFunctionRule.java
Show resolved
Hide resolved
...flink/table/planner/plan/nodes/physical/stream/StreamPhysicalMLPredictTableFunctionRule.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.
Thanks for your update. I left some minor suggestions.
...flink/table/planner/plan/nodes/physical/stream/StreamPhysicalMLPredictTableFunctionRule.java
Outdated
Show resolved
Hide resolved
...flink/table/planner/plan/nodes/physical/stream/StreamPhysicalMLPredictTableFunctionRule.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. Merging when CI passes...
What is the purpose of the change
Update rel converter to handle
SqlModelCall
.Brief change log
SqlModelCall
ModelProvider
and wrap it insideRexModelCall
for optimizerml_predict
callVerifying this change
unit test
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation