nsivabalan commented on a change in pull request #3075:
URL: https://github.com/apache/hudi/pull/3075#discussion_r664664333



##########
File path: 
hudi-spark-datasource/hudi-spark2/src/test/java/org/apache/hudi/internal/TestHoodieDataSourceInternalWriter.java
##########
@@ -47,12 +54,18 @@
 
   @Test
   public void testDataSourceWriter() throws Exception {
+    testDataSourceWriterInternal(Collections.EMPTY_MAP, Collections.EMPTY_MAP);
+  }
+
+  private void testDataSourceWriterInternal(Map<String, String> extraMetadata, 
Map<String, String> expectedExtraMetadata) throws Exception {
     // init config and table
     HoodieWriteConfig cfg = getConfigBuilder(basePath).build();
     String instantTime = "001";
     // init writer
+
     HoodieDataSourceInternalWriter dataSourceInternalWriter =
-        new HoodieDataSourceInternalWriter(instantTime, cfg, STRUCT_TYPE, 
sqlContext.sparkSession(), hadoopConf);
+        new HoodieDataSourceInternalWriter(instantTime, cfg, STRUCT_TYPE, 
sqlContext.sparkSession(), hadoopConf,
+            new DataSourceOptions(extraMetadata));

Review comment:
       I could not find a better way to pass user params to our custom data 
source classes. I mean, for those that are not part of HoodieWriteConfig, we 
don't pass any params as such. 




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