OIiveirra commented on code in PR #69032:
URL: https://github.com/apache/doris/pull/69032#discussion_r4366494413


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckAnalysis.java:
##########
@@ -224,9 +227,23 @@ private void checkGroupingScalarFunction(Plan plan) {
     }
 
     private void checkAggregateFunction(Plan plan) {
+        if (plan instanceof LogicalSetOperation) {
+            LogicalSetOperation set = (LogicalSetOperation) plan;
+            if (!(set instanceof LogicalUnion) || set.getQualifier() != 
Qualifier.ALL) {
+                for (NamedExpression output : set.getOutputs()) {
+                    checkSpatialGroupingType(output);
+                }
+            }
+        }
+        if (plan instanceof LogicalProject && ((LogicalProject<?>) 
plan).isDistinct()) {
+            for (NamedExpression expression : ((LogicalProject<?>) 
plan).getProjects()) {
+                checkSpatialGroupingType(expression);
+            }
+        }
         if (plan instanceof Aggregate) {
             Aggregate<?> aggregate = (Aggregate<?>) plan;
             for (Expression expr : aggregate.getGroupByExpressions()) {
+                checkSpatialGroupingType(expr);

Review Comment:
   Fixed in 124f9807b6b. FE rejects scalar/nested spatial PARTITION BY keys 
while retaining spatial window values with ordinary partition keys. Added 
both-kind/endian regression coverage; FE UT and Iceberg generation/verification 
pass.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/types/GeometryType.java:
##########
@@ -0,0 +1,70 @@
+// 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.
+
+package org.apache.doris.nereids.types;
+
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.catalog.Type;
+import org.apache.doris.nereids.trees.expressions.Expression;
+import org.apache.doris.nereids.types.coercion.PrimitiveType;
+
+import java.util.Objects;
+import java.util.Optional;
+
+/** Parameterized Iceberg geometry type. */
+public final class GeometryType extends PrimitiveType {

Review Comment:
   Fixed in 124f9807b6b. COUNT_AT_MIN/MAX reject spatial inputs in FE, 
including nested and state paths. Added both-kind, NULL and ordinary-type 
controls; FE UT and Iceberg generation/verification pass.



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