walterddr commented on code in PR #11731:
URL: https://github.com/apache/pinot/pull/11731#discussion_r1344860446
##########
pinot-core/src/main/java/org/apache/pinot/core/geospatial/transform/function/StPointFunction.java:
##########
@@ -79,8 +83,16 @@ public byte[][] transformToBytesValuesSV(ValueBlock
valueBlock) {
double[] firstValues =
_firstArgument.transformToDoubleValuesSV(valueBlock);
double[] secondValues =
_secondArgument.transformToDoubleValuesSV(valueBlock);
for (int i = 0; i < valueBlock.getNumDocs(); i++) {
- _results[i] = ScalarFunctions.stPoint(firstValues[i], secondValues[i],
_isGeography);
+ _results[i] = stPoint(firstValues[i], secondValues[i], _isGeography);
}
return _results;
}
+
+ static byte[] stPoint(double x, double y, boolean isGeography) {
Review Comment:
we can inline this IMO
##########
pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java:
##########
@@ -213,7 +213,7 @@ public enum TransformFunctionType {
ST_GEOG_FROM_WKB("ST_GeogFromWKB",
ReturnTypes.explicit(SqlTypeName.VARBINARY), OperandTypes.BINARY),
ST_GEOM_FROM_WKB("ST_GeomFromWKB",
ReturnTypes.explicit(SqlTypeName.VARBINARY), OperandTypes.BINARY),
ST_POINT("ST_Point", ReturnTypes.explicit(SqlTypeName.VARBINARY),
- OperandTypes.family(ImmutableList.of(SqlTypeFamily.NUMERIC,
SqlTypeFamily.NUMERIC, SqlTypeFamily.NUMERIC),
+ OperandTypes.family(ImmutableList.of(SqlTypeFamily.NUMERIC,
SqlTypeFamily.NUMERIC, SqlTypeFamily.ANY),
Review Comment:
```suggestion
OperandTypes.or(
OperandTypes.family(ImmutableList.of(SqlTypeFamily.NUMERIC,
SqlTypeFamily.NUMERIC, SqlTypeFamily.NUMERIC)),
OperandTypes.family(ImmutableList.of(SqlTypeFamily.NUMERIC,
SqlTypeFamily.NUMERIC, SqlTypeFamily.BOOLEAN))
),
```
--
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]