Jackie-Jiang commented on code in PR #14619:
URL: https://github.com/apache/pinot/pull/14619#discussion_r1880821432
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/BinaryOperatorTransformFunction.java:
##########
@@ -48,6 +59,9 @@ public abstract class BinaryOperatorTransformFunction extends
BaseTransformFunct
protected TransformFunction _rightTransformFunction;
protected DataType _leftStoredType;
protected DataType _rightStoredType;
+ protected boolean _useDictionary = false;
Review Comment:
Seems this is never updated
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/BinaryOperatorTransformFunction.java:
##########
@@ -91,6 +105,91 @@ public void init(List<TransformFunction> arguments,
Map<String, ColumnContext> c
_rightTransformFunction = arguments.get(1);
_leftStoredType =
_leftTransformFunction.getResultMetadata().getDataType().getStoredType();
_rightStoredType =
_rightTransformFunction.getResultMetadata().getDataType().getStoredType();
+
+ if (_leftTransformFunction instanceof IdentifierTransformFunction
+ && _rightTransformFunction instanceof LiteralTransformFunction) {
+ IdentifierTransformFunction leftTransformFunction =
(IdentifierTransformFunction) _leftTransformFunction;
+ if (leftTransformFunction.getDictionary() != null) {
+ LiteralTransformFunction rightTransformFunction =
(LiteralTransformFunction) _rightTransformFunction;
+ if (rightTransformFunction.isNull()) {
+ _isNull = true;
+ }
+ String rightLiteralStr;
+ switch (_leftStoredType) {
+ case INT:
+ rightLiteralStr = Integer.toString(_isNull ?
CommonConstants.NullValuePlaceHolder.INT
Review Comment:
You can use `LiteralTransformFunction.getIntLiteral()` to get the value.
Same for other types
--
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]