Skip to content

[fix](function) fix bug that array_max&min( array<Complex Type> ) function.#23718

Closed
hubgeter wants to merge 1 commit intoapache:masterfrom
hubgeter:fix_array_maxmin_function
Closed

[fix](function) fix bug that array_max&min( array<Complex Type> ) function.#23718
hubgeter wants to merge 1 commit intoapache:masterfrom
hubgeter:fix_array_maxmin_function

Conversation

@hubgeter
Copy link
Contributor

@hubgeter hubgeter commented Aug 31, 2023

Proposed changes

Fix the bug that causes be to hang when col in array_max(col) and array_min(col) functions is array.

example :
col : array<array<map<int,boolean>>>

mysql> select array_max(col) from hive_text_complex_type2;
ERROR 1105 (HY000): errCode = 2, detailMessage = No matching function with signature: array_max(array<array<MAP<int(11),boolean>>>).

All the correct cases are covered in the regression-test/suites/nereids_function_p0/scalar_function folder .

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@hubgeter
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.3 seconds
stream load tsv: 549 seconds loaded 74807831229 Bytes, about 129 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.9 seconds inserted 10000000 Rows, about 346K ops/s
storage size: 17162028026 Bytes

@hubgeter hubgeter force-pushed the fix_array_maxmin_function branch from b9c3331 to f26e7f8 Compare August 31, 2023 15:12
@hubgeter
Copy link
Contributor Author

run buildall

UnaryExpression, AlwaysNullable {

public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(new FollowToAnyDataType(0)).args(ArrayType.of(new AnyDataType(0)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is a generated class, so I think we can not modify it directly?

/**
 * ScalarFunction 'array_max'. This class is generated by GenerateFunction.
 */

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See: #22851

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.98 seconds
stream load tsv: 534 seconds loaded 74807831229 Bytes, about 133 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17161964047 Bytes

@morrySnow morrySnow closed this Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants