xiangfu0 commented on code in PR #19101:
URL: https://github.com/apache/pinot/pull/19101#discussion_r3742923641
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/operands/FilterOperand.java:
##########
@@ -193,7 +196,10 @@ public Predicate(List<RexExpression> operands, DataSchema
dataSchema, IntPredica
ColumnDataType lhsType = _lhs.getResultType();
ColumnDataType rhsType = _rhs.getResultType();
- if (lhsType == rhsType) {
+ Preconditions.checkArgument((lhsType == ColumnDataType.UNKNOWN ||
lhsType.supportsOrdering())
+ && (rhsType == ColumnDataType.UNKNOWN ||
rhsType.supportsOrdering()),
+ "Raw VARIANT values do not support comparison; extract a typed path
with variantGet first");
Review Comment:
Fixed in xiangfu0/pinot#236. The comparison/IN/DISTINCT-FROM guards now
reject only raw `VARIANT` (`!= ColumnDataType.VARIANT`) instead of any
non-orderable/non-equatable type, so OBJECT/array/MAP comparisons keep their
prior behavior. Applied to both engines: `FilterOperand` (Predicate, In),
`TransformOperandFactory` (distinct-from), and the single-stage
`BinaryOperatorTransformFunction` / `InTransformFunction`, which had the same
guard. Added
`FilterOperandTest.testNonVariantOpaqueTypesAreNotRejectedAsVariant`.
--
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]