You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2023/07/21 07:59:50 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #11117: [multistage] bridge v2 query engine for leaf stage v1 multi-value column

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


##########
pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java:
##########
@@ -216,5 +216,10 @@ public static Object clpDecode(String logtypeFieldName, String dictVarsFieldName
         String defaultValue) {
       throw new UnsupportedOperationException("Placeholder scalar function, should not reach here");
     }
+
+    @ScalarFunction(names = {"arrayToMultiValue", "array_to_multi_value"}, isPlaceholder = true)
+    public static String arrayToMultiValue(Object multiValue) {

Review Comment:
   (minor) Personally prefer `arrayToMV` to be consistent with other MV functions such as `sumMV`



##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/ArrayToMultiValueTransformFunction.java:
##########
@@ -0,0 +1,153 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.core.operator.transform.function;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Nullable;
+import org.apache.pinot.core.operator.ColumnContext;
+import org.apache.pinot.core.operator.blocks.ValueBlock;
+import org.apache.pinot.core.operator.transform.TransformResultMetadata;
+import org.apache.pinot.segment.spi.index.reader.Dictionary;
+import org.roaringbitmap.RoaringBitmap;
+
+
+/**
+ * <code>ArrayToMultiValueTransformFunction</code> is the bridge for leaf stage Group By Multi-Value column.
+ */
+public class ArrayToMultiValueTransformFunction implements TransformFunction {

Review Comment:
   Is this used in v1 or v2? Is it possible to just remove this function on the leaf?
   With the current approach, filter will be very inefficient even if it works



-- 
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