-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-37902] batch support for ml_predict #27310
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
794dcda to
3a23af4
Compare
fsk119
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.
Thanks for your contribution. I left some comments
| FlinkLogicalTableFunctionScan.class, | ||
| FlinkConventions.LOGICAL(), | ||
| FlinkConventions.BATCH_PHYSICAL(), | ||
| "PhysicalMLPredictTableFunctionRule:Batch")); |
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.
how about using the same name as vector search? BatchPhysicalMLPredictTableFunctionRule.
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.flink.table.planner.runtime.batch.table; |
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.
it's better we move this class to org.apache.flink.table.planner.runtime.batch.sql. Here is used for table api tests.
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.flink.table.planner.runtime.batch.table; |
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.
ditto
|
|
||
| private void createScanTable(String tableName, List<Row> data) { | ||
| String dataId = TestValuesTableFactory.registerData(data); | ||
| String bounded = tEnv instanceof StreamExecutionEnvironment ? "false" : "true"; |
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.
tEnv.getConfig().get(ExecutionOptions.RUNTIME_MODE) == RuntimeExecutionMode.BATCH
| } | ||
|
|
||
| @Parameters(name = "backend = {0}, objectReuse = {1}, asyncOutputMode = {2}") | ||
| public static Collection<Object[]> parameters() { |
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.
Before change, we run tests with different statebackend. I prefer to keep the origin behaviour.
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'm following VectorSearchITCaseBase which doesn't have these. Probably because there's no BatchWithStateTestBase
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.
In batch mode, operator doesn't need state 0.0
| @Override | ||
| public List<TableTestProgram> programs() { | ||
| return List.of( | ||
| SYNC_ML_PREDICT, ASYNC_UNORDERED_ML_PREDICT, SYNC_ML_PREDICT_WITH_RUNTIME_CONFIG); |
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.
Why don't add SYNC_ML_PREDICT_TABLE_API, SYNC_ML_PREDICT_TABLE_API...
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.
These are in semantic test. I'll add a batch semantic test
3a23af4 to
06eacc5
Compare
fsk119
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.
LGTM
What is the purpose of the change
Add batch support for ml_predict function
Brief change log
Verifying this change
unit/it/restore test for stream/batch
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation