Skip to content

[FLINK-37778][1/N] introduce MODEL keyword for model as argument #26530

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

Merged
merged 2 commits into from
May 14, 2025

Conversation

lihaosky
Copy link
Contributor

@lihaosky lihaosky commented May 6, 2025

What is the purpose of the change

Parse MODEL keyword in function argument and convert it to SqlExplicitModelCall with SqlExplicitModelOperator.

Brief change log

  • Parser changes to support MODEL keyword in function argument.
  • SqlExplicitModelCall sql node for model argument
  • SqlExplicitModelOperator sql operator

Verifying this change

Added unit test for parser changes

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (JavaDocs)

@lihaosky lihaosky changed the title [FLINK-xxx][1/N] introduce MODEL keyword for model as argument in fun… [FLINK-xxx][1/N] introduce MODEL keyword for model as argument May 6, 2025
@flinkbot
Copy link
Collaborator

flinkbot commented May 6, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@lihaosky lihaosky changed the title [FLINK-xxx][1/N] introduce MODEL keyword for model as argument [FLINK-37778][1/N] introduce MODEL keyword for model as argument May 12, 2025
@lihaosky lihaosky marked this pull request as ready for review May 13, 2025 18:11
Copy link
Member

@fsk119 fsk119 left a 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 just have one question.

import java.util.List;

/** SqlExplicitModelCall is a SQL call that represents an explicit model. */
public class SqlExplicitModelCall extends SqlBasicCall {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? We can use SqlOperator#createCall to build the SqlCall.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm planning to use this to get and store the model based on functionQualifier later in SqlValidatorImpl. It won't be possible with just SqlBasicCall

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I think we can discuss more implement details when validating sql node.

@fsk119 fsk119 merged commit 4a77e9d into apache:master May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants