JingsongLi commented on a change in pull request #13605:
URL: https://github.com/apache/flink/pull/13605#discussion_r513200486



##########
File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/filesystem/AbstractFileSystemTable.java
##########
@@ -53,15 +62,75 @@
                
context.getCatalogTable().getOptions().forEach(tableOptions::setString);
                this.schema = 
TableSchemaUtils.getPhysicalSchema(context.getCatalogTable().getSchema());
                this.partitionKeys = 
context.getCatalogTable().getPartitionKeys();
-               this.path = new 
Path(context.getCatalogTable().getOptions().getOrDefault(PATH.key(), 
PATH.defaultValue()));
-               this.defaultPartName = 
context.getCatalogTable().getOptions().getOrDefault(
-                               PARTITION_DEFAULT_NAME.key(), 
PARTITION_DEFAULT_NAME.defaultValue());
+               this.path = new Path(tableOptions.get(PATH));
+               this.defaultPartName = tableOptions.get(PARTITION_DEFAULT_NAME);
        }
 
-       static FileSystemFormatFactory createFormatFactory(ReadableConfig 
tableOptions) {
+       ReadableConfig formatOptions(String identifier) {
+               return new DelegatingConfiguration(tableOptions, identifier + 
".");
+       }
+
+       FileSystemFormatFactory createFormatFactory() {
                return FactoryUtil.discoverFactory(
                                Thread.currentThread().getContextClassLoader(),
                                FileSystemFormatFactory.class,
                                tableOptions.get(FactoryUtil.FORMAT));
        }
+
+       @SuppressWarnings("rawtypes")
+       <F extends EncodingFormatFactory<?>> Optional<EncodingFormat> 
discoverOptionalEncodingFormat(

Review comment:
       See below comments:
   ```
        /**
         * Unlike {@link FactoryUtil#discoverFactory}, it will not throw an 
exception if it cannot
         * find the factory.
         */
   ```
   Do you think we should modify 
`FactoryUtil.TableFactoryHelper#discoverOptionalEncodingFormat`?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to