vinothchandar commented on a change in pull request #3306: URL: https://github.com/apache/hudi/pull/3306#discussion_r675266638
########## File path: hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/BaseSparkCommitActionExecutor.java ########## @@ -94,6 +101,18 @@ public BaseSparkCommitActionExecutor(HoodieEngineContext context, WriteOperationType operationType, Option extraMetadata) { super(context, config, table, instantTime, operationType, extraMetadata); + initKeyGenIfNeeded(); + } + + private void initKeyGenIfNeeded() { + this.populateMetaFields = config.populateMetaFields(); + if (!populateMetaFields) { + try { + keyGeneratorOpt = Option.of((BaseKeyGenerator) HoodieSparkKeyGeneratorFactory.createKeyGenerator(new TypedProperties(config.getProps()))); + } catch (IOException e) { + throw new HoodieIOException("Only BaseKeyGenerators are supported when meta columns are disabled ", e); Review comment: >within HoodieSparkKeyGeneratorFactory.createKeyGenerator. yes. within. You can still cast outside right? -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org