jiacai2050 commented on code in PR #1594:
URL: https://github.com/apache/horaedb/pull/1594#discussion_r1849779333


##########
src/df_engine_extensions/src/dist_sql_query/resolver.rs:
##########
@@ -135,10 +135,17 @@ impl Resolver {
             let sub_tables = unresolved.sub_tables.clone();
             let remote_plans = sub_tables
                 .into_iter()
-                .map(|table| {
+                .enumerate()
+                .map(|(idx, table)| {
                     let plan = Arc::new(UnresolvedSubTableScan {
                         table: table.clone(),
-                        table_scan_ctx: unresolved.table_scan_ctx.clone(),
+                        table_scan_ctx: if let Some(ref predicates) = 
unresolved.predicates {
+                            let mut ctx = unresolved.table_scan_ctx.clone();
+                            ctx.predicate = Arc::new(predicates[idx].clone());

Review Comment:
   Add comments why we need to overwrite old predicate.



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