eskabetxe commented on code in PR #117:
URL: 
https://github.com/apache/flink-connector-jdbc/pull/117#discussion_r1592285942


##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableFactoryTest.java:
##########
@@ -144,7 +146,8 @@ void testJdbcReadProperties() {
                         readOptions,
                         LookupOptions.MAX_RETRIES.defaultValue(),
                         null,
-                        SCHEMA.toPhysicalRowDataType());
+                        SCHEMA.toPhysicalRowDataType(),
+                        FactoryMocks.IDENTIFIER.asSummaryString());

Review Comment:
   could we test in some way the source naming?



##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableSource.java:
##########
@@ -179,13 +205,34 @@ public ScanRuntimeProvider 
getScanRuntimeProvider(ScanContext runtimeProviderCon
 
         LOG.debug("Query generated for JDBC scan: " + query);
 
-        builder.setQuery(query);
+        builder.setSql(query);
         final RowType rowType = (RowType) physicalRowDataType.getLogicalType();
-        builder.setRowConverter(dialect.getRowConverter(rowType));
-        builder.setRowDataTypeInfo(
-                
runtimeProviderContext.createTypeInformation(physicalRowDataType));
+        builder.setResultExtractor(new 
RowDataResultExtractor(dialect.getRowConverter(rowType)));
+        
builder.setTypeInformation(scanContext.createTypeInformation(physicalRowDataType));
+        options.getProperties()
+                .forEach(
+                        (key, value) ->
+                                builder.setConnectionProperty(key.toString(), 
value.toString()));
+        JdbcSource<RowData> source = builder.build();
+        return new DataStreamScanProvider() {

Review Comment:
   should we create a static class (inside this file) for this?



-- 
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...@flink.apache.org

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

Reply via email to