github-actions[bot] commented on code in PR #68853:
URL: https://github.com/apache/doris/pull/68853#discussion_r4675080702
##########
be/src/exprs/aggregate/aggregate_function_min_max_impl.h:
##########
@@ -145,6 +145,13 @@ AggregateFunctionPtr
create_aggregate_function_single_value(const String& name,
return creator_without_type::create_unary_arguments<
AggregateFunctionsSingleValue<Data<SingleValueDataColumn>>>(
argument_types, result_is_nullable, attr);
+ case PrimitiveType::TYPE_FILE:
+ if constexpr (Data<SingleValueDataColumn>::IS_ANY) {
+ return creator_without_type::create_unary_arguments<
+
AggregateFunctionsSingleValue<Data<SingleValueDataColumn>>>(
Review Comment:
[P2] Frame FILE aggregate states with their actual serialized size
This routes `ANY_VALUE(FILE)` through `SingleValueDataColumn::write`, which
assumes `get_uncompressed_serialized_bytes` equals the bytes actually written.
`DataTypeFile` sums STRING child bounds: above 256 bytes those use
`LZ4_compressBound`, while `DataTypeString::serialize` advances by the actual
compressed length. A FILE with URI `s3://bucket/` plus a 300-byte repetitive
key therefore trips the exact-end DCHECK when a partial ANY_VALUE state is
serialized for exchange; `read()` repeats the same assumption. RELEASE frames
the unused reserved tail instead. Reserve the bound but frame/advance by the
actual size, preserving wire compatibility, and add a partial-state round trip
with long URI/checksum text. The new test's 4KB VARBINARY with short text does
not cover this.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/MinBy.java:
##########
@@ -38,7 +38,7 @@ public class MinBy extends NullableAggregateFunction
implements BinaryExpression, ExplicitlyCastableSignature,
NullIgnoringAggregateFunction {
public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
-
FunctionSignature.retArgType(0).args(AnyDataType.INSTANCE_WITHOUT_INDEX,
AnyDataType.INSTANCE_WITHOUT_INDEX)
+
FunctionSignature.retArgType(0).args(AnyDataType.INSTANCE_WITHOUT_INDEX,
AnyDataType.ORDERING_WITHOUT_INDEX)
Review Comment:
[P2] Support FILE values in the MIN_BY/MAX_BY state factory
`SELECT MIN_BY(file, size) FROM list_files(...)` is admitted here
(`Aggregate(MIN_BY(file, size)) -> LIST_FILES`), but
`AggregateFunctionMinMaxByBaseData` constructs its value with
`create_max_min_value(argument_types[0])`. That switch in
`aggregate_function_min_max_by.cpp` handles ARRAY/MAP/STRUCT and has no
TYPE_FILE case, so execution fails with `Illegal type File of argument of
aggregate function min/max_by`. MAX_BY has the same path. Add FILE to the BE
value carrier and cover non-NULL FILE values in execution/state round-trip
tests for both functions. The new FE admission tests only exercise analysis.
--
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]