yjhjstz commented on code in PR #705:
URL: https://github.com/apache/cloudberry/pull/705#discussion_r1879210500


##########
src/backend/optimizer/plan/planner.c:
##########
@@ -1890,7 +1906,14 @@ grouping_planner(PlannerInfo *root, double 
tuple_fraction)
                if (Gp_role == GP_ROLE_DISPATCH &&
                        enable_answer_query_using_materialized_views)
                {
-                       current_rel = 
answer_query_using_materialized_views(root, current_rel, standard_qp_callback, 
&qp_extra);
+                       /* Now it's ok to set other fields. */
+                       aqumv_context->current_rel = current_rel;
+                       aqumv_context->qp_callback = standard_qp_callback;
+                       aqumv_context->qp_extra = &qp_extra;
+
+                       /* Do the real work. */
+                       current_rel = 
answer_query_using_materialized_views(root, aqumv_context);
+                       /* parse tree may be rewriten. */

Review Comment:
   here can deep free aqumv_context ?



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