Skip to content

Conversation

zjuwangg
Copy link
Contributor

What is the purpose of the change

Support USE CATALOG catalogName through sqlUpdate() method in TableEnvironment

Brief change log

  • c2375e0 Add useCatalogOperation and support it both in flink/blink planner
  • 442d683 add converter test and make sqlUseCatalog sql kind to other ddl to s
  • ea05725 add related ITcase in CatalogTableITCase to both planner

Verifying this change

This change added tests and can be verified as follows:

  • CatalogTableITCase#testUseCatalog
  • SqlToOperationConverterTest#testUseCatalog

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, Yarn/Mesos, 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? (not applicable )

@zjuwangg
Copy link
Contributor Author

cc @bowenli86 @xuefuz @lirui-apache @KurtYoung to have a review.

@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 ea05725 (Wed Nov 20 18:07:42 UTC 2019)

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.


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 Nov 20, 2019

CI report:

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

Copy link
Member

@bowenli86 bowenli86 left a comment

Choose a reason for hiding this comment

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

LGTM mostly with some questions left

public class SqlUseCatalog extends SqlCall {

public static final SqlSpecialOperator OPERATOR = new SqlSpecialOperator("USE CATALOG", SqlKind.OTHER);
public static final SqlSpecialOperator OPERATOR = new SqlSpecialOperator("USE CATALOG", SqlKind.OTHER_DDL);
Copy link
Member

Choose a reason for hiding this comment

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

why is this required?

Copy link
Contributor Author

@zjuwangg zjuwangg Nov 21, 2019

Choose a reason for hiding this comment

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

Both validate(sqlNode: SqlNode) methods in FlinkPlannerImpl in flink-planner/blink-planner will validate row type, SqlKind.OTHER kind will fail the validation.

    1.Update exception info
    2.Revert unrelated change of style
@bowenli86
Copy link
Member

bowenli86 commented Nov 21, 2019

sorry for the late comment, but I happened to notice that UseCatalogOperation and UseOperation reside in package /table/operations/ddl/. Since they are not ddl, should they be relocated to /table/operations/?

@zjuwangg
Copy link
Contributor Author

sorry for the late comment, but I happened to notice that UseCatalogOperation and UseOperation reside in package /table/operations/ddl/. Since they are not ddl, should they be relocated to /table/operations/?

Make sense, addressed.

@bowenli86 bowenli86 closed this in ec85f82 Nov 22, 2019
@zjuwangg zjuwangg deleted the m_catalog_support branch November 23, 2019 02:32
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.

4 participants