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

SchemaUtils Doesn't Show the Actual Reason for Validation Failure #14787

Open
ankitsultana opened this issue Jan 9, 2025 · 1 comment
Open
Labels
beginner-task Small task for new contributors to ramp up bugfix

Comments

@ankitsultana
Copy link
Contributor

Often when our customers try to deploy, Pinot returns Schema is incompatible with tableConfig with no details about the root-cause. We should try to return the exact reason why the Schema validation had failed.

/**
* Validates that the schema is compatible with the given table config
*/
private static void validateCompatibilityWithTableConfig(Schema schema, TableConfig tableConfig) {
try {
TableConfigUtils.validate(tableConfig, schema);
} catch (Exception e) {
throw new IllegalStateException(
"Schema is incompatible with tableConfig with name: " + tableConfig.getTableName() + " and type: "
+ tableConfig.getTableType(), e);
}
}

@cutiepie-10
Copy link
Contributor

Hi @ankitsultana,
I went through the code. The validation of the schema occurs in the TableConfigUtils.java done by some Preconditions.checkState which is thrown to validateCompatibilityWithTableConfig() and then to validate and then to the PinotSchemaRestletResource.validateInternalSchema, finally this method throws the exception.

According to me, the error and its cause is being provided in the stackTrace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner-task Small task for new contributors to ramp up bugfix
Projects
None yet
Development

No branches or pull requests

2 participants