bvaradar commented on a change in pull request #1566:
URL: https://github.com/apache/incubator-hudi/pull/1566#discussion_r428209317
##########
File path:
hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/SchemaRegistryProvider.java
##########
@@ -81,11 +66,22 @@ private static Schema getSchema(String registryUrl) throws
IOException {
@Override
public Schema getSourceSchema() {
- return schema;
+ String registryUrl = config.getString(Config.SRC_SCHEMA_REGISTRY_URL_PROP);
+ try {
+ return getSchema(registryUrl);
+ } catch (IOException ioe) {
+ throw new HoodieIOException("Error reading source schema from registry
:" + registryUrl, ioe);
+ }
}
@Override
public Schema getTargetSchema() {
- return targetSchema;
+ String registryUrl = config.getString(Config.SRC_SCHEMA_REGISTRY_URL_PROP);
+ String targetRegistryUrl =
config.getString(Config.TARGET_SCHEMA_REGISTRY_URL_PROP, registryUrl);
+ try {
+ return getSchema(targetRegistryUrl);
Review comment:
yes, target schema is allowed to be different than source schema due to
transformations and this is fine.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]