github-actions[bot] commented on code in PR #67471:
URL: https://github.com/apache/doris/pull/67471#discussion_r3922696069


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -7268,6 +7269,13 @@ public LogicalPlan 
visitAlterCatalogComment(AlterCatalogCommentContext ctx) {
         return new AlterCatalogCommentCommand(catalogName, comment);
     }
 
+    @Override
+    public LogicalPlan 
visitAlterStreamComment(DorisParser.AlterStreamCommentContext ctx) {
+        TableNameInfo streamName = new 
TableNameInfo(visitMultipartIdentifier(ctx.name));
+        String comment = stripQuotes(ctx.comment.getText());

Review Comment:
   Please decode the token as a SQL literal here. `stripQuotes` only removes 
delimiters, so a legal `ALTER STREAM s SET COMMENT 'a''b'` stores `a''b` 
instead of `a'b`; with default SQL mode, `COMMENT '\n'` stores a backslash plus 
`n` instead of a newline. `information_schema.table_streams` then exposes the 
wrong metadata, and `SHOW CREATE STREAM` can recreate a different value because 
the CREATE path unescapes it. Use the mode-aware 
`SqlLiteralUtils.parseStringLiteral` decoder, make the SHOW/CREATE quoting path 
round-trip the decoded value, and cover doubled quotes and backslash escapes 
including `NO_BACKSLASH_ESCAPES`.



##########
regression-test/suites/table_stream_p0/test_table_stream_alter_comment.groovy:
##########
@@ -0,0 +1,94 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+// ALTER STREAM ... SET/MODIFY COMMENT updates the comment of a table stream.
+suite("test_table_stream_alter_comment") {
+    if (isCloudMode()) {
+        logger.info("skip test_table_stream_alter_comment in cloud mode")
+        return
+    }
+
+    def baseTable = "test_stream_alter_comment_base"

Review Comment:
   These new regression suites do not follow the repository's required fixture 
and oracle conventions: ordinary names are indirected through `def`, 
deterministic SHOW and metadata values use ad-hoc assertions instead of 
generated `qt` output, and both suites drop fixtures again at the end. Please 
hardcode the simple names, use generated ordered query-test output for 
deterministic results, and keep only the pre-test cleanup so failures leave 
state available for debugging.



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