[Impala-ASF-CR] WIP: IMPALA-13552: Add CollectionVal support to UDF interface and implement size()/length()

2025-11-24 Thread Arnab Karmakar (Code Review)
Arnab Karmakar has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23709 )

Change subject: WIP: IMPALA-13552: Add CollectionVal support to UDF interface 
and implement size()/length()
..


Patch Set 1:

Pre-review tests: https://jenkins.impala.io/job/pre-review-test/1958/
No failures


--
To view, visit http://gerrit.cloudera.org:8080/23709
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I85b50386790657ea035addb35eed959d71810ab2
Gerrit-Change-Number: 23709
Gerrit-PatchSet: 1
Gerrit-Owner: Arnab Karmakar 
Gerrit-Reviewer: Arnab Karmakar 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Peter Rozsa 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Xuebin Su 
Gerrit-Comment-Date: Tue, 25 Nov 2025 04:23:27 +
Gerrit-HasComments: No


[Impala-ASF-CR] WIP: IMPALA-13552: Add CollectionVal support to UDF interface and implement size()/length()

2025-11-24 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23709 )

Change subject: WIP: IMPALA-13552: Add CollectionVal support to UDF interface 
and implement size()/length()
..


Patch Set 1:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/21017/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/23709
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I85b50386790657ea035addb35eed959d71810ab2
Gerrit-Change-Number: 23709
Gerrit-PatchSet: 1
Gerrit-Owner: Arnab Karmakar 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Peter Rozsa 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Mon, 24 Nov 2025 11:36:23 +
Gerrit-HasComments: No


[Impala-ASF-CR] WIP: IMPALA-13552: Add CollectionVal support to UDF interface and implement size()/length()

2025-11-24 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23709 )

Change subject: WIP: IMPALA-13552: Add CollectionVal support to UDF interface 
and implement size()/length()
..


Patch Set 1:

(13 comments)

gerrit-auto-critic failed. You can reproduce it locally using command:

  python3 bin/jenkins/critique-gerrit-review.py --dryrun

To run it, you might need a virtual env with Python3's venv installed.

http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc
File be/src/exprs/collection-functions-test.cc:

http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@110
PS1, Line 110:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@116
PS1, Line 116:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@122
PS1, Line 122:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@128
PS1, Line 128:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@132
PS1, Line 132:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@141
PS1, Line 141:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@145
PS1, Line 145:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@149
PS1, Line 149:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@152
PS1, Line 152:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/be/src/exprs/collection-functions-test.cc@155
PS1, Line 155:
line has trailing whitespace


http://gerrit.cloudera.org:8080/#/c/23709/1/tests/query_test/test_collection_functions.py
File tests/query_test/test_collection_functions.py:

http://gerrit.cloudera.org:8080/#/c/23709/1/tests/query_test/test_collection_functions.py@21
PS1, Line 21: import pytest
flake8: F401 'pytest' imported but unused


http://gerrit.cloudera.org:8080/#/c/23709/1/tests/query_test/test_collection_functions.py@24
PS1, Line 24: from tests.common.test_dimensions import (
flake8: F401 'tests.common.test_dimensions.create_exec_option_dimension' 
imported but unused


http://gerrit.cloudera.org:8080/#/c/23709/1/tests/query_test/test_collection_functions.py@24
PS1, Line 24: from tests.common.test_dimensions import (
flake8: F401 'tests.common.test_dimensions.create_uncompressed_text_dimension' 
imported but unused



--
To view, visit http://gerrit.cloudera.org:8080/23709
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I85b50386790657ea035addb35eed959d71810ab2
Gerrit-Change-Number: 23709
Gerrit-PatchSet: 1
Gerrit-Owner: Arnab Karmakar 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Peter Rozsa 
Gerrit-Reviewer: Quanlong Huang 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Mon, 24 Nov 2025 11:12:13 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] WIP: IMPALA-13552: Add CollectionVal support to UDF interface and implement size()/length()

2025-11-24 Thread Arnab Karmakar (Code Review)
Arnab Karmakar has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23709


Change subject: WIP: IMPALA-13552: Add CollectionVal support to UDF interface 
and implement size()/length()
..

WIP: IMPALA-13552: Add CollectionVal support to UDF interface and implement 
size()/length()

This patch enables the UDF interface to accept CollectionVal arguments
by extending the symbol mangling code to handle ARRAY and MAP types.
This architectural improvement allows all collection functions to be
implemented as regular UDFs rather than special expression types.

Changes:
- Extended symbols-util.cc to mangle TYPE_ARRAY and TYPE_MAP as
  CollectionVal in function signatures
- Implemented size() and length() as UDFs in collection-functions.{h,cc}
- Registered functions in CollectionFunctionsBuiltins.java
- Both functions return the number of elements in a collection or NULL

This work is a child task of IMPALA-9519. While IMPALA-9519 focuses on
enabling complex types to flow through the UDF interface, this patch goes
further by actually implementing collection-aware UDFs (size()/length())
on top of the new CollectionVal support.

Testing:
- Backend unit tests for NULL, empty, and non-empty collections
- Integration tests covering SELECT, WHERE, HAVING, aggregations
- Tests for both size() and length() (aliases)
- Tests for nested arrays and maps

Change-Id: I85b50386790657ea035addb35eed959d71810ab2
---
M be/src/codegen/impala-ir.cc
M be/src/exprs/CMakeLists.txt
M be/src/exprs/anyval-util.cc
M be/src/exprs/anyval-util.h
A be/src/exprs/collection-functions-ir.cc
A be/src/exprs/collection-functions-test.cc
A be/src/exprs/collection-functions.cc
A be/src/exprs/collection-functions.h
M be/src/exprs/scalar-expr-evaluator.cc
M be/src/util/symbols-util.cc
A fe/src/main/java/org/apache/impala/analysis/CollectionFunctionsBuiltins.java
M fe/src/main/java/org/apache/impala/catalog/ArrayType.java
M fe/src/main/java/org/apache/impala/catalog/BuiltinsDb.java
M fe/src/main/java/org/apache/impala/catalog/MapType.java
M fe/src/main/java/org/apache/impala/util/FunctionUtils.java
A 
testdata/workloads/functional-query/queries/QueryTest/collection-functions.test
A tests/query_test/test_collection_functions.py
17 files changed, 847 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/09/23709/1
--
To view, visit http://gerrit.cloudera.org:8080/23709
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I85b50386790657ea035addb35eed959d71810ab2
Gerrit-Change-Number: 23709
Gerrit-PatchSet: 1
Gerrit-Owner: Arnab Karmakar