kgyrtkirk commented on code in PR #16306:
URL: https://github.com/apache/druid/pull/16306#discussion_r1570138247
##########
docs/querying/math-expr.md:
##########
@@ -176,24 +176,25 @@ See javadoc of java.lang.Math for detailed explanation
for each function.
## Array functions
-| function | description |
-| --- | --- |
-| array(expr1,expr ...) | constructs an array from the expression arguments,
using the type of the first argument as the output array type |
-| array_length(arr) | returns length of array expression |
-| array_offset(arr,long) | returns the array element at the 0 based index
supplied, or null for an out of range index|
-| array_ordinal(arr,long) | returns the array element at the 1 based index
supplied, or null for an out of range index |
-| array_contains(arr,expr) | returns 1 if the array contains the element
specified by expr, or contains all elements specified by expr if expr is an
array, else 0 |
-| array_overlap(arr1,arr2) | returns 1 if arr1 and arr2 have any elements in
common, else 0 |
-| array_offset_of(arr,expr) | returns the 0 based index of the first
occurrence of expr in the array, or `null` or `-1` if
`druid.generic.useDefaultValueForNull=true` (deprecated legacy mode) if no
matching elements exist in the array. |
-| array_ordinal_of(arr,expr) | returns the 1 based index of the first
occurrence of expr in the array, or `null` or `-1` if
`druid.generic.useDefaultValueForNull=true` (deprecated legacy mode) if no
matching elements exist in the array. |
-| array_prepend(expr,arr) | adds expr to arr at the beginning, the resulting
array type determined by the type of the array |
-| array_append(arr,expr) | appends expr to arr, the resulting array type
determined by the type of the first array |
-| array_concat(arr1,arr2) | concatenates 2 arrays, the resulting array type
determined by the type of the first array |
-| array_set_add(arr,expr) | adds expr to arr and converts the array to a new
array composed of the unique set of elements. The resulting array type
determined by the type of the array |
-| array_set_add_all(arr1,arr2) | combines the unique set of elements of 2
arrays, the resulting array type determined by the type of the first array |
-| array_slice(arr,start,end) | return the subarray of arr from the 0 based
index start(inclusive) to end(exclusive), or `null`, if start is less than 0,
greater than length of arr or less than end|
-| array_to_string(arr,str) | joins all elements of arr by the delimiter
specified by str |
-| string_to_array(str1,str2) | splits str1 into an array on the delimiter
specified by str2, which is a regular expression |
+| function | description
|
+|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Review Comment:
I believe `.md` files are processed and rendered during page generation - is
it really needed to add whitespace change to to unrelated lines - to make it a
nice ascii table?
even the preious version was not caring at all if its a nice ascii or not by
using `| --- | --- |`
##########
processing/src/main/java/org/apache/druid/math/expr/Function.java:
##########
@@ -3724,6 +3724,44 @@ ExprEval doApply(ExprEval arrayExpr, ExprEval scalarExpr)
}
}
+ class ArrayScalarInFunction extends ArrayScalarFunction
Review Comment:
I wonder if it would be possible to instead of adding a new native function
- delegate all this work to the new type-aware native in filter @clintropolis
have added?
--
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]