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/02/10 21:46:25 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #8167: Optimize geometry serializer usage when literal is available

Jackie-Jiang commented on a change in pull request #8167:
URL: https://github.com/apache/pinot/pull/8167#discussion_r804100191



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/geospatial/transform/function/BaseBinaryGeoTransformFunction.java
##########
@@ -0,0 +1,144 @@
+/**
+ * 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.geospatial.transform.function;
+
+import com.google.common.base.Preconditions;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.core.operator.blocks.ProjectionBlock;
+import org.apache.pinot.core.operator.transform.TransformResultMetadata;
+import org.apache.pinot.core.operator.transform.function.BaseTransformFunction;
+import org.apache.pinot.core.operator.transform.function.LiteralTransformFunction;
+import org.apache.pinot.core.operator.transform.function.TransformFunction;
+import org.apache.pinot.core.plan.DocIdSetPlanNode;
+import org.apache.pinot.segment.local.utils.GeometrySerializer;
+import org.apache.pinot.segment.spi.datasource.DataSource;
+import org.apache.pinot.spi.data.FieldSpec;
+import org.apache.pinot.spi.utils.BytesUtils;
+import org.locationtech.jts.geom.Geometry;
+
+
+/**
+ * Base Binary geo transform functions that can take either one of the arguments as literal.
+ */
+public abstract class BaseBinaryGeoTransformFunction extends BaseTransformFunction {
+  private TransformFunction _firstArgument;
+  private TransformFunction _secondArgument;
+  private Geometry _firstLiteral;
+  private Geometry _secondLiteral;
+  private int[] _intResults;
+  private double[] _doubleResults;
+
+  @Override
+  public void init(List<TransformFunction> arguments, Map<String, DataSource> dataSourceMap) {
+    Preconditions
+        .checkArgument(arguments.size() == 2, "2 arguments are required for transform function: %s", getName());
+    TransformFunction transformFunction = arguments.get(0);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "First argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The first argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _firstLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _firstArgument = transformFunction;
+    }
+    transformFunction = arguments.get(1);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "Second argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The second argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _secondLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _secondArgument = transformFunction;
+    }
+  }
+
+  @Override
+  public TransformResultMetadata getResultMetadata() {
+    return INT_SV_NO_DICTIONARY_METADATA;
+  }
+
+  @Override
+  public int[] transformToIntValuesSV(ProjectionBlock projectionBlock) {
+    if (_intResults == null) {
+      _intResults = new int[DocIdSetPlanNode.MAX_DOC_PER_CALL];
+    }
+    final byte[][] firstValues;

Review comment:
       (minor) We don't usually put `final` for local variable, and it is not honored by the JIT

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/geospatial/transform/function/BaseBinaryGeoTransformFunction.java
##########
@@ -0,0 +1,144 @@
+/**
+ * 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.geospatial.transform.function;
+
+import com.google.common.base.Preconditions;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.core.operator.blocks.ProjectionBlock;
+import org.apache.pinot.core.operator.transform.TransformResultMetadata;
+import org.apache.pinot.core.operator.transform.function.BaseTransformFunction;
+import org.apache.pinot.core.operator.transform.function.LiteralTransformFunction;
+import org.apache.pinot.core.operator.transform.function.TransformFunction;
+import org.apache.pinot.core.plan.DocIdSetPlanNode;
+import org.apache.pinot.segment.local.utils.GeometrySerializer;
+import org.apache.pinot.segment.spi.datasource.DataSource;
+import org.apache.pinot.spi.data.FieldSpec;
+import org.apache.pinot.spi.utils.BytesUtils;
+import org.locationtech.jts.geom.Geometry;
+
+
+/**
+ * Base Binary geo transform functions that can take either one of the arguments as literal.
+ */
+public abstract class BaseBinaryGeoTransformFunction extends BaseTransformFunction {
+  private TransformFunction _firstArgument;
+  private TransformFunction _secondArgument;
+  private Geometry _firstLiteral;
+  private Geometry _secondLiteral;
+  private int[] _intResults;
+  private double[] _doubleResults;
+
+  @Override
+  public void init(List<TransformFunction> arguments, Map<String, DataSource> dataSourceMap) {
+    Preconditions
+        .checkArgument(arguments.size() == 2, "2 arguments are required for transform function: %s", getName());
+    TransformFunction transformFunction = arguments.get(0);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "First argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The first argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _firstLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _firstArgument = transformFunction;
+    }
+    transformFunction = arguments.get(1);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "Second argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The second argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _secondLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _secondArgument = transformFunction;
+    }
+  }
+
+  @Override
+  public TransformResultMetadata getResultMetadata() {
+    return INT_SV_NO_DICTIONARY_METADATA;
+  }
+
+  @Override
+  public int[] transformToIntValuesSV(ProjectionBlock projectionBlock) {
+    if (_intResults == null) {
+      _intResults = new int[DocIdSetPlanNode.MAX_DOC_PER_CALL];
+    }
+    final byte[][] firstValues;
+    final byte[][] secondValues;
+    if (_firstArgument != null) {
+      firstValues = _firstArgument.transformToBytesValuesSV(projectionBlock);
+    } else {
+      firstValues = null;
+    }
+    if (_secondArgument != null) {
+      secondValues = _secondArgument.transformToBytesValuesSV(projectionBlock);
+    } else {
+      secondValues = null;
+    }
+    for (int i = 0; i < projectionBlock.getNumDocs(); i++) {
+      Geometry firstGeometry = firstValues == null ? _firstLiteral : GeometrySerializer.deserialize(firstValues[i]);

Review comment:
       We can move the null check out of the loop to avoid per-value null check

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/geospatial/transform/function/BaseBinaryGeoTransformFunction.java
##########
@@ -0,0 +1,144 @@
+/**
+ * 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.geospatial.transform.function;
+
+import com.google.common.base.Preconditions;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.core.operator.blocks.ProjectionBlock;
+import org.apache.pinot.core.operator.transform.TransformResultMetadata;
+import org.apache.pinot.core.operator.transform.function.BaseTransformFunction;
+import org.apache.pinot.core.operator.transform.function.LiteralTransformFunction;
+import org.apache.pinot.core.operator.transform.function.TransformFunction;
+import org.apache.pinot.core.plan.DocIdSetPlanNode;
+import org.apache.pinot.segment.local.utils.GeometrySerializer;
+import org.apache.pinot.segment.spi.datasource.DataSource;
+import org.apache.pinot.spi.data.FieldSpec;
+import org.apache.pinot.spi.utils.BytesUtils;
+import org.locationtech.jts.geom.Geometry;
+
+
+/**
+ * Base Binary geo transform functions that can take either one of the arguments as literal.
+ */
+public abstract class BaseBinaryGeoTransformFunction extends BaseTransformFunction {
+  private TransformFunction _firstArgument;
+  private TransformFunction _secondArgument;
+  private Geometry _firstLiteral;
+  private Geometry _secondLiteral;
+  private int[] _intResults;
+  private double[] _doubleResults;
+
+  @Override
+  public void init(List<TransformFunction> arguments, Map<String, DataSource> dataSourceMap) {
+    Preconditions
+        .checkArgument(arguments.size() == 2, "2 arguments are required for transform function: %s", getName());
+    TransformFunction transformFunction = arguments.get(0);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "First argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The first argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _firstLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _firstArgument = transformFunction;
+    }
+    transformFunction = arguments.get(1);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "Second argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The second argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _secondLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _secondArgument = transformFunction;
+    }
+  }
+
+  @Override
+  public TransformResultMetadata getResultMetadata() {

Review comment:
       Let's not overriding this method. The sub-class should override it

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/geospatial/transform/function/BaseBinaryGeoTransformFunction.java
##########
@@ -0,0 +1,144 @@
+/**
+ * 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.geospatial.transform.function;
+
+import com.google.common.base.Preconditions;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.core.operator.blocks.ProjectionBlock;
+import org.apache.pinot.core.operator.transform.TransformResultMetadata;
+import org.apache.pinot.core.operator.transform.function.BaseTransformFunction;
+import org.apache.pinot.core.operator.transform.function.LiteralTransformFunction;
+import org.apache.pinot.core.operator.transform.function.TransformFunction;
+import org.apache.pinot.core.plan.DocIdSetPlanNode;
+import org.apache.pinot.segment.local.utils.GeometrySerializer;
+import org.apache.pinot.segment.spi.datasource.DataSource;
+import org.apache.pinot.spi.data.FieldSpec;
+import org.apache.pinot.spi.utils.BytesUtils;
+import org.locationtech.jts.geom.Geometry;
+
+
+/**
+ * Base Binary geo transform functions that can take either one of the arguments as literal.
+ */
+public abstract class BaseBinaryGeoTransformFunction extends BaseTransformFunction {
+  private TransformFunction _firstArgument;
+  private TransformFunction _secondArgument;
+  private Geometry _firstLiteral;
+  private Geometry _secondLiteral;
+  private int[] _intResults;
+  private double[] _doubleResults;
+
+  @Override
+  public void init(List<TransformFunction> arguments, Map<String, DataSource> dataSourceMap) {
+    Preconditions
+        .checkArgument(arguments.size() == 2, "2 arguments are required for transform function: %s", getName());
+    TransformFunction transformFunction = arguments.get(0);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "First argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The first argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _firstLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _firstArgument = transformFunction;
+    }
+    transformFunction = arguments.get(1);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "Second argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The second argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _secondLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _secondArgument = transformFunction;
+    }
+  }
+
+  @Override
+  public TransformResultMetadata getResultMetadata() {
+    return INT_SV_NO_DICTIONARY_METADATA;
+  }
+
+  @Override
+  public int[] transformToIntValuesSV(ProjectionBlock projectionBlock) {
+    if (_intResults == null) {
+      _intResults = new int[DocIdSetPlanNode.MAX_DOC_PER_CALL];
+    }
+    final byte[][] firstValues;
+    final byte[][] secondValues;
+    if (_firstArgument != null) {
+      firstValues = _firstArgument.transformToBytesValuesSV(projectionBlock);
+    } else {
+      firstValues = null;
+    }
+    if (_secondArgument != null) {
+      secondValues = _secondArgument.transformToBytesValuesSV(projectionBlock);
+    } else {
+      secondValues = null;
+    }
+    for (int i = 0; i < projectionBlock.getNumDocs(); i++) {
+      Geometry firstGeometry = firstValues == null ? _firstLiteral : GeometrySerializer.deserialize(firstValues[i]);
+      Geometry secondGeometry = secondValues == null ? _secondLiteral : GeometrySerializer.deserialize(secondValues[i]);
+      _intResults[i] = transformGeometryToInt(firstGeometry, secondGeometry);
+    }
+    return _intResults;
+  }
+
+  @Override
+  public double[] transformToDoubleValuesSV(ProjectionBlock projectionBlock) {
+    if (_doubleResults == null) {
+      _doubleResults = new double[DocIdSetPlanNode.MAX_DOC_PER_CALL];
+    }
+    final byte[][] firstValues;
+    final byte[][] secondValues;
+    if (_firstArgument != null) {
+      firstValues = _firstArgument.transformToBytesValuesSV(projectionBlock);
+    } else {
+      firstValues = null;
+    }
+    if (_secondArgument != null) {
+      secondValues = _secondArgument.transformToBytesValuesSV(projectionBlock);
+    } else {
+      secondValues = null;
+    }
+    for (int i = 0; i < projectionBlock.getNumDocs(); i++) {
+      Geometry firstGeometry = firstValues == null ? _firstLiteral : GeometrySerializer.deserialize(firstValues[i]);
+      Geometry secondGeometry = secondValues == null ? _secondLiteral : GeometrySerializer.deserialize(secondValues[i]);
+      _doubleResults[i] = transformGeometryToDouble(firstGeometry, secondGeometry);
+    }
+    return _doubleResults;
+  }
+
+  public int transformGeometryToInt(Geometry firstGeometry, Geometry secondGeometry) {
+    throw new UnsupportedOperationException("Unsupported!");

Review comment:
       (minor) No need to put message for `UnsupportedOperationException`
   ```suggestion
       throw new UnsupportedOperationException();
   ```

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/geospatial/transform/function/BaseBinaryGeoTransformFunction.java
##########
@@ -0,0 +1,144 @@
+/**
+ * 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.geospatial.transform.function;
+
+import com.google.common.base.Preconditions;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.core.operator.blocks.ProjectionBlock;
+import org.apache.pinot.core.operator.transform.TransformResultMetadata;
+import org.apache.pinot.core.operator.transform.function.BaseTransformFunction;
+import org.apache.pinot.core.operator.transform.function.LiteralTransformFunction;
+import org.apache.pinot.core.operator.transform.function.TransformFunction;
+import org.apache.pinot.core.plan.DocIdSetPlanNode;
+import org.apache.pinot.segment.local.utils.GeometrySerializer;
+import org.apache.pinot.segment.spi.datasource.DataSource;
+import org.apache.pinot.spi.data.FieldSpec;
+import org.apache.pinot.spi.utils.BytesUtils;
+import org.locationtech.jts.geom.Geometry;
+
+
+/**
+ * Base Binary geo transform functions that can take either one of the arguments as literal.
+ */
+public abstract class BaseBinaryGeoTransformFunction extends BaseTransformFunction {
+  private TransformFunction _firstArgument;
+  private TransformFunction _secondArgument;
+  private Geometry _firstLiteral;
+  private Geometry _secondLiteral;
+  private int[] _intResults;
+  private double[] _doubleResults;
+
+  @Override
+  public void init(List<TransformFunction> arguments, Map<String, DataSource> dataSourceMap) {
+    Preconditions
+        .checkArgument(arguments.size() == 2, "2 arguments are required for transform function: %s", getName());
+    TransformFunction transformFunction = arguments.get(0);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "First argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The first argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _firstLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _firstArgument = transformFunction;
+    }
+    transformFunction = arguments.get(1);
+    Preconditions.checkArgument(transformFunction.getResultMetadata().isSingleValue(),
+        "Second argument must be single-valued for transform function: %s", getName());
+    Preconditions.checkArgument(transformFunction.getResultMetadata().getDataType() == FieldSpec.DataType.BYTES
+            || transformFunction instanceof LiteralTransformFunction,
+        "The second argument must be of type BYTES , but was %s",
+            transformFunction.getResultMetadata().getDataType()
+        );
+    if (transformFunction instanceof LiteralTransformFunction) {
+      _secondLiteral = GeometrySerializer.deserialize(
+          BytesUtils.toBytes(((LiteralTransformFunction) transformFunction).getLiteral()));
+    } else {
+      _secondArgument = transformFunction;
+    }
+  }
+
+  @Override
+  public TransformResultMetadata getResultMetadata() {
+    return INT_SV_NO_DICTIONARY_METADATA;
+  }
+
+  @Override
+  public int[] transformToIntValuesSV(ProjectionBlock projectionBlock) {

Review comment:
       (major) Need to first check the result metadata, and only perform the following operations if the metadata is `INT`. Call `super.transformToIntValuesSV(projectionBlock)` if not




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