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


##########
fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java:
##########
@@ -2156,8 +2156,8 @@ public static int 
analyzeVariantSparseHashShardCount(Map<String, String> propert
             String bucketNumStr = 
properties.get(PROPERTIES_VARIANT_SPARSE_HASH_SHARD_COUNT);
             try {
                 bucketNum = Integer.parseInt(bucketNumStr);
-                if (bucketNum < 1 || bucketNum > 1024) {
-                    throw new 
AnalysisException("variant_sparse_hash_shard_count must between 1 and 1024 ");
+                if (bucketNum < 0 || bucketNum > 1024) {
+                    throw new 
AnalysisException("variant_sparse_hash_shard_count must between 0 and 1024 ");

Review Comment:
   Error message grammar/formatting: use "must be between" (and avoid the 
trailing space) for consistency and clarity.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/types/VariantType.java:
##########
@@ -185,6 +185,11 @@ public String toSql() {
                                     
.append(String.valueOf(variantSparseHashShardCount))
                                     .append("\"");
         }
+        if (enableNestedGroup) {
+            sb.append(",");
+            sb.append("\"variant_enable_nested_group\" = \"")
+                    .append(String.valueOf(enableNestedGroup)).append("\"");
+        }

Review Comment:
   VariantType.toSql() now serializes "variant_enable_nested_group" when 
enableNestedGroup is true, but the Nereids DDL parser currently rejects this 
property (LogicalPlanBuilder throws NotSupportedException). This makes 
type-to-SQL roundtrips / SHOW CREATE outputs potentially non-executable. 
Consider omitting this property from toSql() until it’s supported in DDL (or 
alternatively, support parsing it).
   ```suggestion
   
   ```



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