Skip to content
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-35198][table] Support the execution of refresh materialized table #24760

Merged
merged 5 commits into from May 11, 2024

Conversation

xuyangzhong
Copy link
Contributor

What is the purpose of the change

Support the execution of refresh materialized table.

Brief change log

  • Add execution in sql gateway
  • Add operation in table-api&table-planner
  • Add tests

Verifying this change

Some tests are added.

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): no
  • 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? no
  • If yes, how is the feature documented?

@flinkbot
Copy link
Collaborator

flinkbot commented May 7, 2024

CI report:

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

Copy link
Contributor

@lsyldliu lsyldliu left a comment

Choose a reason for hiding this comment

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

@xuyangzhong Thanks for your contribution, I left some comments.

@xuyangzhong xuyangzhong changed the title [FLINK-35193][table] Support the execution of refresh materialized table [FLINK-35198][table] Support the execution of refresh materialized table May 8, 2024
@xuyangzhong
Copy link
Contributor Author

Hi, @lsyldliu all comments have been addressed. Can you take a look again?

if (!nonStringPartitionKeys.isEmpty()) {
throw new ValidationException(
String.format(
"Currently, specifying non-char or non-string type partition fields"
Copy link
Contributor

Choose a reason for hiding this comment

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

What about using the following exception msg:
"Currently, manual refreshing materialized table only supports specifying char and string type partition keys. All specific partition keys with unsupported types are:\n\n %s."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what about "Currently, manually refreshing materialized table only supports specifying char and string type partition keys. All specific partition keys with unsupported types are:\n\n%s."?

throw new ValidationException(
String.format(
"The partition spec contains unknown partition keys: [%s]. All known partition keys are: [%s].",
unknownPartitionKeys.stream()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can refer to the following logic, util stringifyOption method.

options.entrySet().stream()
                                        .map(
                                                optionEntry ->
                                                        stringifyOption(
                                                                optionEntry.getKey(),
                                                                optionEntry.getValue()))
                                        .sorted()
                                        .collect(Collectors.joining("\n")))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need to use the util because the var here is Set<String>, not Map

@lsyldliu lsyldliu merged commit 9fe8d7b into apache:master May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants