Skip to content

Explain plan for custom insert syntax#12243

Merged
gianm merged 3 commits intoapache:masterfrom
LakshSingla:explain-plan-custom-insert
Feb 16, 2022
Merged

Explain plan for custom insert syntax#12243
gianm merged 3 commits intoapache:masterfrom
LakshSingla:explain-plan-custom-insert

Conversation

@LakshSingla
Copy link
Copy Markdown
Contributor

@LakshSingla LakshSingla commented Feb 9, 2022

Follow up to #12163.

Description

This PR adds the capability of running EXPLAIN PLAN FOR queries for statements with syntax having PARTITIONED BY and CLUSTERED BY clauses. Also, as a result, it disallows parsing insert statements that do not have a PARTITIONED BY.

explain.ftl encapsulates the logic to do so.

Code cleanup is also done since after this change, there is no need to handle SqlInsert and DruidSqlInsert separately in DruidPlanner's ParsedNodes.


Key changed/added classes in this PR
  • explain.ftl

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@LakshSingla LakshSingla changed the title Initial commit, explain plan for custom insert syntax working Explain plan for custom insert syntax Feb 9, 2022
@gianm gianm merged commit 8fc0e5c into apache:master Feb 16, 2022
@abhishekagarwal87 abhishekagarwal87 added this to the 0.23.0 milestone May 11, 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.

4 participants