Skip to content

Enable validating SqlCreateView and SqlCreateMaterializedView #144

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

Merged
merged 2 commits into from
May 29, 2025

Conversation

nguyent8
Copy link
Collaborator

@nguyent8 nguyent8 commented May 29, 2025

Problem and Solution

Currently HoptimatorDdlExecutor only do validation in a later stage against the planned deployable objects created from validates SqlCreateView and SqlCreateMaterializedView.

The ValidationService doesn't validate create view commands directly.

This PR is to make ValidationService validate create view commands early. No validators are registered for those commands by default. They can be extended by users of hoptimator-jdbc library.

Testing Done

Add new quidem test cases with a test validator to verify that create view commands are validated.

@nguyent8 nguyent8 requested review from ryannedolan and jogrogan May 29, 2025 18:34
Copy link
Collaborator

@ryannedolan ryannedolan left a comment

Choose a reason for hiding this comment

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

Neat!

Files.writeString(servicesDir.resolve("com.linkedin.hoptimator.ValidatorProvider"),
"com.linkedin.hoptimator.jdbc.TestSqlScripts$CreateViewValidatorProvider\n");

URLClassLoader cl = new URLClassLoader(new URL[]{tempDir.toUri().toURL()}, getClass().getClassLoader());
Copy link
Collaborator

Choose a reason for hiding this comment

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

neat!

@nguyent8 nguyent8 enabled auto-merge (squash) May 29, 2025 21:34
@nguyent8 nguyent8 merged commit 9ac5da6 into main May 29, 2025
1 check passed
@nguyent8 nguyent8 deleted the trung/enable-create-view-validator branch May 29, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants