voonhous commented on code in PR #19810:
URL: https://github.com/apache/hudi/pull/19810#discussion_r3932393742
##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchemaCompatibilityChecker.java:
##########
@@ -357,24 +357,24 @@ private SchemaCompatibilityResult
calculateCompatibility(final HoodieSchema read
case DATE:
case DECIMAL:
return result.mergedWith(typeMismatch(reader, writer, locations));
+ // TIMESTAMP over LONG and UUID over STRING are reader/writer
compatibility rules only. They are deliberately
+ // absent from HoodieSchemaTypePromotion: the projection checker
must not treat a bare long as a compatible
Review Comment:
Right, the sentence had it backwards. Fixed in c803cdca6c03: both the
checker comment and the `HoodieSchemaTypePromotion` javadoc now say the entry
kept out is the one that would make a timestamp a compatible projection of a
bare long, and they spell out `isCompatibleProjectionOf(source, target)` ->
`canPromote(target, source)` so the direction is checkable from the text. The
consequence is unchanged: `reconcileSchemasLegacy` would keep the table's long
as the writer schema and the logical type would go.
--
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]