Skip to content

Conversation

@waywtdcc
Copy link

@waywtdcc waywtdcc commented Oct 17, 2022

What is the purpose of the change

At present, to create a table based on table like, you can only use the table type table, not the view type.




create table <tableName> like <viewName>;

Only like table type can be used before. This is similar to create table as < querysql >, but some scenarios use views more flexibly and can reuse a single view in multiple places.

Brief change log

  • create table like statement support create table like

Verifying this change

test function

This change is already covered by existing tests, such as org.apache.flink.table.planner.operations.SqlToOperationConverterTest#testCreateTableLikeViewWithFullPath.

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? (not applicable )

@flinkbot
Copy link
Collaborator

flinkbot commented Oct 17, 2022

CI report:

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

@waywtdcc
Copy link
Author

Hello, I hope you can review the code when you are free. Thank you very much! @gyfora @mbalassi @JingsongLi

@waywtdcc
Copy link
Author

@MartijnVisser

Copy link
Contributor

@MartijnVisser MartijnVisser left a comment

Choose a reason for hiding this comment

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

Please check the https://flink.apache.org/contributing/code-style-and-quality-preamble.html in detail; your PR doesn't meet these requirements (in terms of commits, commits messages etc).

Please also don't ping random people: if there's time and capacity for people to review, it will be picked up

@waywtdcc waywtdcc closed this Oct 26, 2022
@waywtdcc waywtdcc changed the title [FLINK-28985][planner]sql like statement supports views [planner]sql like statement supports views Oct 26, 2022
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