aokolnychyi commented on code in PR #10311: URL: https://github.com/apache/iceberg/pull/10311#discussion_r1599002997
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/SparkReadConf.java: ########## @@ -302,14 +302,12 @@ public PlanningMode dataPlanningMode() { return LOCAL; } - String modeName = - confParser - .stringConf() - .sessionConf(SparkSQLProperties.DATA_PLANNING_MODE) - .tableProperty(TableProperties.DATA_PLANNING_MODE) - .defaultValue(TableProperties.PLANNING_MODE_DEFAULT) - .parse(); - return PlanningMode.fromName(modeName); + return confParser + .enumConf(PlanningMode::fromName) + .sessionConf(SparkSQLProperties.DATA_PLANNING_MODE) + .tableProperty(TableProperties.DATA_PLANNING_MODE) + .defaultValue(PlanningMode.fromName(TableProperties.PLANNING_MODE_DEFAULT)) Review Comment: We can also offer `defaultValue(String value)` in addition to `defaultValue(T value)` and call `toEnum(value)` internally. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org