wsjz commented on code in PR #24911:
URL: https://github.com/apache/doris/pull/24911#discussion_r1360265534


##########
fe/be-java-extensions/max-compute-scanner/src/main/java/org/apache/doris/maxcompute/MaxComputeJniScanner.java:
##########
@@ -139,13 +145,24 @@ public void open() throws IOException {
             return;
         }
         try {
-            TableTunnel.DownloadSession session = curTableScan.getSession();
+            TableTunnel.DownloadSession session;
+            if (partitionSpec != null) {
+                PartitionSpec partSpec = new PartitionSpec(partitionSpec);
+                session = curTableScan.openDownLoadSession(partSpec);
+            } else {
+                session = curTableScan.openDownLoadSession();
+            }
             long start = startOffset == -1L ? 0 : startOffset;
             long recordCount = session.getRecordCount();
             totalRows = splitSize > 0 ? Math.min(splitSize, recordCount) : 
recordCount;
 
             arrowAllocator = new RootAllocator(Long.MAX_VALUE);
-            curReader = session.openArrowRecordReader(start, totalRows, 
readColumns, arrowAllocator);
+            Set<String> partitionColumns = 
session.getSchema().getPartitionColumns().stream()
+                    .map(Column::getName)
+                    .collect(Collectors.toSet());
+            List<Column> maxComputeColumns = new ArrayList<>(readColumns);
+            maxComputeColumns.removeIf(e -> 
partitionColumns.contains(e.getName()));

Review Comment:
   max compute depart the partition columns from common columns
    



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

Reply via email to