jonvex commented on code in PR #10677:
URL: https://github.com/apache/hudi/pull/10677#discussion_r1506412035
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTable.java:
##########
@@ -859,8 +860,10 @@ private void validateSchema() throws
HoodieUpsertException, HoodieInsertExceptio
Schema writerSchema =
HoodieAvroUtils.createHoodieWriteSchema(config.getSchema());
Schema tableSchema =
HoodieAvroUtils.createHoodieWriteSchema(existingTableSchema.get());
AvroSchemaUtils.checkSchemaCompatible(tableSchema, writerSchema,
shouldValidate, allowProjection, getDropPartitionColNames());
+ } catch (SchemaCompatibilityException e) {
+ throw e;
} catch (Exception e) {
- throw new HoodieException("Failed to read schema/check compatibility for
base path " + metaClient.getBasePath(), e);
+ throw new SchemaCompatibilityException("Failed to read schema/check
compatibility for base path " + metaClient.getBasePath(), e);
Review Comment:
Yes, SchemaException extends HoodieException. I also made
SchemaCompatibilityException extend SchemaException. So we can have all schema
related exceptions extend from a single type
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]