JNSimba commented on code in PR #427: URL: https://github.com/apache/doris-flink-connector/pull/427#discussion_r1677578265
########## flink-doris-connector/src/main/java/org/apache/doris/flink/source/reader/DorisSourceSplitReader.java: ########## @@ -69,8 +84,41 @@ private void checkSplitOrStartNext() throws IOException { throw new IOException("Cannot fetch from another split - no split remaining"); } currentSplitId = nextSplit.splitId(); - valueReader = - new DorisValueReader(nextSplit.getPartitionDefinition(), options, readOptions); + if (readOptions.getUseFlightSql()) { + valueReader = + new DorisFlightValueReader( + nextSplit.getPartitionDefinition(), + options, + readOptions, + backendClient(), + RestService.getSchema(options, readOptions, LOG)); + } else { + valueReader = + new DorisValueReader(nextSplit.getPartitionDefinition(), options, readOptions); + } + } + + private AdbcConnection backendClient() { Review Comment: Would it be better to change the function name to openConnection? -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org