avamingli commented on code in PR #705:
URL: https://github.com/apache/cloudberry/pull/705#discussion_r1879378612
##########
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:
After a consideration, I think there is need to alloc it on heap.
There are just several pointers in fields. Done that at
[35c6dbc](https://github.com/apache/cloudberry/pull/705/commits/35c6dbc7593f2c007402191548bfd1f6e766d093)
--
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]