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

Feat: Support parsing Oracle CREATE MATERIALIZED sql #27994

Merged
merged 7 commits into from
Sep 19, 2023

Conversation

zhangfengcdt
Copy link
Contributor

Fixes #27031.

Changes proposed in this pull request:

  • Add CREATE MATERIALIZED VIEW to Oracle .g4
  • Add OracleCreateMaterializedViewStatement
  • Add OracleCreateMaterializedViewLogStatement
  • Add test cases

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.

@zhangfengcdt
Copy link
Contributor Author

@strongduanmu I've merged the master to fix the failing CI tests. Could you please review this again? Thanks!

AS selectSubquery
;

rowLimitingClause
Copy link
Member

Choose a reason for hiding this comment

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

Hi @zhangfengcdt , can you take a look at DMLStatement? I think rowLimitingClause and selectSubquery already exist in DMLStatement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@strongduanmu I was trying to import the "DMLStatement" in the DDL g4 statement, however, this causes a circular import since DML also imports DDL g4 file.

I think the circular dependency could be removed by moving some of the definitions into the base g4 file, but that seems to be out of scope for this change.

Could you advise how to proceed? Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

Which DDL statements will DML statements depend on? This seems unreasonable.

@github-actions
Copy link

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale.

@github-actions github-actions bot added the stale label Sep 17, 2023
@strongduanmu
Copy link
Member

strongduanmu commented Sep 17, 2023

Hi @zhangfengcdt, does this pr has any update?

@github-actions github-actions bot removed the stale label Sep 18, 2023
@zhangfengcdt
Copy link
Contributor Author

Hi @zhangfengcdt, does this pr has any update?

@strongduanmu I have removed the duplicated parsing rules in the DDLStatement.g4 as you suggested and use dependency on DMLStatement.g4 instead. And it is ready for review.

Could you please review again? Thanks!

@strongduanmu strongduanmu merged commit 2a8cc40 into apache:master Sep 19, 2023
127 checks passed
@strongduanmu
Copy link
Member

Hi @zhangfengcdt, does this pr has any update?

@strongduanmu I have removed the duplicated parsing rules in the DDLStatement.g4 as you suggested and use dependency on DMLStatement.g4 instead. And it is ready for review.

Could you please review again? Thanks!

Thank you @zhangfengcdt, the latest changes are great.

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.

Support parsing Oracle CREATE MATERIALIZED sql
2 participants