Copilot commented on code in PR #61211:
URL: https://github.com/apache/doris/pull/61211#discussion_r2915830796


##########
regression-test/suites/search/test_search_variant_scalar_leaf_analyzer.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.
+
+suite("test_search_variant_scalar_leaf_analyzer", "p0") {
+    sql """ set enable_match_without_inverted_index = false """
+    sql """ set enable_common_expr_pushdown = true """
+    sql """ set default_variant_enable_typed_paths_to_sparse = false """
+    sql """ set default_variant_enable_doc_mode = false """
+    sql """ set enable_variant_flatten_nested = true """
+
+    sql """ DROP TABLE IF EXISTS test_search_variant_scalar_leaf_analyzer """
+

Review Comment:
   In this suite the table name is hard-coded in multiple places 
(DROP/CREATE/INSERT/SELECT). Most other search regression suites define a 
`tableName` variable and interpolate it, which reduces the chance of typos and 
makes future renames safer. Consider introducing a `def tableName = ...` and 
using it consistently throughout the test.



##########
be/src/exprs/function/function_search.cpp:
##########
@@ -380,6 +383,8 @@ Status 
FunctionSearch::evaluate_inverted_index_with_search_param(
         const std::unordered_map<std::string, int>& field_name_to_column_id) 
const {
     const bool is_nested_query = search_param.root.clause_type == "NESTED";
     if (is_nested_query && !is_nested_group_search_supported()) {
+        // CE contract for NestedGroup fallback:
+        // example: SEARCH(col, "NESTED(data.items, msg=hello)") -> 
NotSupported.

Review Comment:
   The example in this comment shows `SEARCH(col, "NESTED(...)")`, but in 
regression tests SEARCH/search is invoked as `SEARCH('...')` (optionally with a 
JSON options arg) and does not take a column parameter. Updating the example to 
match the actual SQL function signature would avoid confusion for future 
maintainers.
   ```suggestion
           // example: SEARCH('NESTED(data.items, msg=hello)') -> NotSupported.
   ```



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