You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/10/07 22:02:25 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #9554: add array element at function

Jackie-Jiang commented on code in PR #9554:
URL: https://github.com/apache/pinot/pull/9554#discussion_r990523326


##########
pinot-core/src/test/java/org/apache/pinot/core/operator/transform/function/BaseTransformFunctionTest.java:
##########
@@ -109,6 +109,7 @@ public abstract class BaseTransformFunctionTest {
 
   protected Map<String, DataSource> _dataSourceMap;
   protected ProjectionBlock _projectionBlock;
+  protected int _mvColumnLength;

Review Comment:
   (minor) `_numMVValues`



##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/ArrayFunctions.java:
##########
@@ -151,4 +151,29 @@ public static double[] arrayConcatDouble(double[] values1, double[] values2) {
   public static String[] arrayConcatString(String[] values1, String[] values2) {
     return ArrayUtils.addAll(values1, values2);
   }
+
+  @ScalarFunction
+  public static int arrayElementAtInt(int[] arr, int idx) {

Review Comment:
   We might want to support negative index (from the last element)



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org