avamingli commented on code in PR #1401:
URL: https://github.com/apache/cloudberry/pull/1401#discussion_r2443794186
##########
src/backend/parser/parse_cte.c:
##########
@@ -154,12 +197,17 @@ transformWithClause(ParseState *pstate, WithClause
*withClause)
cte->cterecursive = false;
cte->cterefcount = 0;
+#if 0
if (!IsA(cte->ctequery, SelectStmt))
{
/* must be a data-modifying statement */
Assert(IsA(cte->ctequery, InsertStmt) ||
IsA(cte->ctequery, UpdateStmt) ||
IsA(cte->ctequery, DeleteStmt));
+#else
+ if (isCTEModifying(cte))
+ {
+#endif
Review Comment:
No, this change doesn't practically consider kernel development needs. We
should strive to maintain consistency with PostgreSQL upstream code (which is
generally the default rule). This modification clearly breaks that consistency
and would increase merge conflicts during future upgrades. Moreover, for this
particular case, there's no justification for adding several new functions and
disrupting the upstream code logic just for these few lines of code.
Additionally, these suggestions seem like they were generated by AI without
any practical consideration for actual development.
--
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]