Skip to content

Conversation

@xiangtao
Copy link

What is the purpose of the change

this change is to Improve support "RESET key" statement in the SQL Client

Brief change log

  • Add a method resetSessionProperty(String sessionId, String key) in Executor
  • Add a method reset(String key) in SessionContext
  • RESET command pattern change to RESET(\s+(\S+)\s)? *

Verifying this change

This change added tests and can be verified as follows:

  • *Added grammar test in *
  • Add single statement test in SessionContextTest
  • Added integration tests for reset statement in resources/sql/set.q

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

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

Documentation

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

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit c5dbec4 (Mon Mar 22 18:15:30 UTC 2021)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!
  • This pull request references an unassigned Jira ticket. According to the code contribution guide, tickets need to be assigned before starting with the implementation work.

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.

Details
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Mar 22, 2021

CI report:

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

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 left comments.

@fsk119
Copy link
Member

fsk119 commented Mar 23, 2021

The title is a little strange? What about Extend the "RESET" syntax in the SQL Client or Support "RESET key" statement in the SQL Client?

@xiangtao xiangtao changed the title [FLINK-21701][sql-client] Improve support "RESET key" statement in the SQL Client [FLINK-21701][sql-client] Extend the "RESET" syntax in the SQL Client Mar 23, 2021
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 update. Look good to me in general. I left some minor problems.

Comment on lines 430 to 434
if (isRemovedKey || isDeprecatedKey) {
printRemovedAndDeprecatedKeyMessage(key);
}
// it's not removedKey, need to print info message
if (!isRemovedKey) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: Why don't use

if (...) {

} else {
...
}

It seems deprecated key will also get into this if-block.

Copy link
Author

Choose a reason for hiding this comment

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

because when isDeprecatedKey is true , it need to print a deprecated message in addition to the normal message.

@fsk119
Copy link
Member

fsk119 commented Mar 24, 2021

It looks good to me. CC @wuchong

Copy link
Member

@wuchong wuchong 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 the contribution. I only left some minor comments.

Copy link
Member

@wuchong wuchong left a comment

Choose a reason for hiding this comment

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

LGTM.

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.

5 participants