JingsongLi commented on code in PR #86:
URL: https://github.com/apache/flink-table-store/pull/86#discussion_r846903121
##########
flink-table-store-format/src/main/java/org/apache/flink/table/store/format/orc/OrcFileFormatFactory.java:
##########
@@ -31,7 +32,19 @@ public String identifier() {
}
@Override
- public FileFormat create(ReadableConfig formatOptions) {
- return new OrcFileFormat(formatOptions);
+ public OrcFileFormat create(Configuration formatOptions) {
+ return new OrcFileFormat(supplyDefaultOptions(formatOptions));
+ }
+
+ private Configuration supplyDefaultOptions(Configuration options) {
+ if (!options.containsKey("compress")) {
+ Properties properties = new Properties();
+ options.addAllToProperties(properties);
+ properties.setProperty("compress", "lz4");
+ Configuration newOptions = new Configuration();
+ properties.forEach((k, v) -> newOptions.setString(k.toString(),
v.toString()));
+ return newOptions;
Review Comment:
orc will use `addAllToProperties`, so here must returns a `Configuration`.
--
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]