dawidwys commented on a change in pull request #9382: [FLINK-13600][table] 
Rework TableEnvironment.connect() class hierarchy
URL: https://github.com/apache/flink/pull/9382#discussion_r311902796
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java
 ##########
 @@ -80,51 +87,23 @@ public void registerTableSink(String name) {
         *
         * @param name table name to be registered in the table environment
         */
-       @Override
        public void registerTableSourceAndSink(String name) {
                registerTableSource(name);
                registerTableSink(name);
        }
 
-       /**
-        * Specifies the format that defines how to read data from a connector.
-        */
-       @Override
-       public D withFormat(FormatDescriptor format) {
-               formatDescriptor = 
Optional.of(Preconditions.checkNotNull(format));
-               return (D) this;
-       }
-
-       /**
-        * Specifies the resulting table schema.
-        */
-       @Override
-       public D withSchema(Schema schema) {
-               schemaDescriptor = 
Optional.of(Preconditions.checkNotNull(schema));
-               return (D) this;
-       }
-
        /**
         * Converts this descriptor into a set of properties.
         */
        @Override
        public Map<String, String> toProperties() {
 
 Review comment:
   How about we make this method a bit safer to extend. Right now it adds 
implicit contract that you have to call `super.toProperties` in a child class.
   
   Maybe we could change it to:
   ```
   public final Map<String, String> toProperties() {
     ...
     properties.asMap().putAll(extraProperties());
   }
   
   protected abstract Map<String, String> extraProperties();
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to