Gabriel39 commented on code in PR #68301:
URL: https://github.com/apache/doris/pull/68301#discussion_r4060633560
##########
be/src/core/data_type/data_type_factory.cpp:
##########
@@ -635,6 +635,10 @@ DataTypePtr DataTypeFactory::create_data_type(
} else if (primitive_type == TYPE_AGG_STATE) {
// Do nothing
nested = std::make_shared<DataTypeAggState>();
+ } else if (primitive_type == TYPE_VARBINARY) {
Review Comment:
The normal COALESCE/CASE dispatch omissions and the alternate short-circuit
paths predate this PR. The protobuf datatype reconstruction change does not
introduce those evaluator branches. Adding VARBINARY execution support is
outside this follow-up.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/ArrayFunctionUtils.java:
##########
@@ -0,0 +1,42 @@
+// 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.trees.expressions.functions.scalar;
+
+import org.apache.doris.nereids.exceptions.AnalysisException;
+import org.apache.doris.nereids.trees.expressions.Expression;
+import org.apache.doris.nereids.types.ArrayType;
+import org.apache.doris.nereids.types.DataType;
+
+/** Argument validation shared by array functions. */
+final class ArrayFunctionUtils {
+ private ArrayFunctionUtils() {
+ }
+
+ static void checkNoVarBinaryArguments(ScalarFunction function) {
+ // Inspect original arguments before coercion can hide unsupported
binary comparison/hash inputs.
+ for (Expression argument : function.getArguments()) {
+ DataType type = argument.getDataType();
+ while (type instanceof ArrayType) {
+ type = ((ArrayType) type).getItemType();
+ }
+ if (type.isVarBinaryType()) {
Review Comment:
The multiple-argument VARBINARY ordering dispatcher was already unsupported.
Adding FE validation or preserving the unary compatibility path is outside this
follow-up.
##########
be/src/exprs/aggregate/aggregate_function_min_max_impl.h:
##########
@@ -141,6 +141,10 @@ AggregateFunctionPtr
create_aggregate_function_single_value(const String& name,
return creator_without_type::create_unary_arguments<
AggregateFunctionsSingleValue<Data<SingleValueDataComplexType>>>(
argument_types, result_is_nullable, attr);
+ case PrimitiveType::TYPE_VARBINARY:
+ // Owning binary values for IO must not implicitly enable single-value
aggregates.
Review Comment:
These dispatcher omissions predate this PR. Completing the aggregate/alias
validation inventory or introducing new BE support would broaden the change, so
neither is included.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/ArrayEnumerateUniq.java:
##########
@@ -65,6 +65,7 @@ private ArrayEnumerateUniq(ScalarFunctionParams
functionParams) {
*/
@Override
public void checkLegalityBeforeTypeCoercion() {
+ ArrayFunctionUtils.checkNoVarBinaryArguments(this);
Review Comment:
Preserving the multi-array form is a compatibility request and is not part
of this follow-up. Also, ColumnVarbinary serialization methods already existed
before this PR; they were not introduced by it. The current rejection remains.
--
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]