JNSimba commented on code in PR #383:
URL: 
https://github.com/apache/doris-flink-connector/pull/383#discussion_r1596289802


##########
flink-doris-connector/src/main/java/org/apache/doris/flink/table/DorisDynamicTableSource.java:
##########
@@ -212,5 +200,17 @@ public boolean supportsNestedProjection() {
     @Override
     public void applyProjection(int[][] projectedFields, DataType 
producedDataType) {
         this.physicalRowDataType = 
Projection.of(projectedFields).project(physicalRowDataType);
+        if (StringUtils.isNullOrWhitespaceOnly(readOptions.getFilterQuery())) {
+            String filterQuery = 
resolvedFilterQuery.stream().collect(Collectors.joining(" AND "));
+            this.readOptions.setFilterQuery(filterQuery);
+        }
+        if (StringUtils.isNullOrWhitespaceOnly(readOptions.getReadFields())) {
+            String[] selectFields =
+                    DataType.getFieldNames(physicalRowDataType).toArray(new 
String[0]);
+            this.readOptions.setReadFields(
+                    Arrays.stream(selectFields)
+                            .map(item -> String.format("`%s`", 
item.trim().replace("`", "")))
+                            .collect(Collectors.joining(", ")));
+        }

Review Comment:
   What are the benefits of putting it below?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to