rahil-c commented on code in PR #14355:
URL: https://github.com/apache/hudi/pull/14355#discussion_r2591032736


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/schema/FilebasedSchemaProvider.java:
##########
@@ -61,20 +62,23 @@ public static class Config {
         .withDocumentation("The schema of the target you are writing to");
   }
 
-  private final Schema sourceSchema;
+  private final HoodieSchema sourceSchema;
 
-  private Schema targetSchema;
+  private HoodieSchema targetSchema;
 
   @Deprecated
   public FilebasedSchemaProvider(TypedProperties props) {
     checkRequiredConfigProperties(props, 
Collections.singletonList(Config.SOURCE_SCHEMA_FILE));
     String sourceSchemaFile = getStringWithAltKeys(props, 
Config.SOURCE_SCHEMA_FILE);
     FileSystem fs = HadoopFSUtils.getFs(sourceSchemaFile, 
HadoopConfigurations.getHadoopConf(new Configuration()));
     try {
-      this.sourceSchema = new Schema.Parser().parse(fs.open(new 
Path(sourceSchemaFile)));
+      try (InputStream stream = fs.open(new Path(sourceSchemaFile))) {
+        this.sourceSchema = new HoodieSchema.Parser().parse(stream);

Review Comment:
   Will add a util for `HoodieSchema.parse` to read input stream since 
currently it only accepts string



-- 
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]

Reply via email to