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

HIVE-22557 Break up DDLSemanticAnalyzer - extract Table constraints analyzers #859

Closed
wants to merge 1 commit into from

Conversation

miklosgergely
Copy link
Contributor

@miklosgergely miklosgergely commented Nov 30, 2019

DDLSemanticAnalyzer is a huge class, more than 4000 lines long. The goal is to refactor it in order to have everything cut into more handleable classes under the package org.apache.hadoop.hive.ql.exec.ddl:

  • have a separate class for each analyzers
  • have a package for each operation, containing an analyzer, a description, and an operation, so the amount of classes under a package is more manageable

Step #10: extract the table constraints related analyzers from DDLSemanticAnalyzer, and move them under the new package.

Also modified the framework to be able to handle alter table ... statements.
Also moved some of the Constraint related utility functions from BaseSemanticAnalyzer to the ddl.table.constraint package, into a new ConstraintUtils class.
Also fixed the typo in the package name: constaint -> constraint

/**
* Reveals the actual type of an ASTTree that has a category as main element.
*/
public interface DDLSematnicAnalyzerCategory {
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

@miklosgergely miklosgergely deleted the HIVE-22557 branch December 13, 2019 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants