Jackie-Jiang commented on code in PR #19501:
URL: https://github.com/apache/pinot/pull/19501#discussion_r4253120870
##########
pinot-core/src/main/java/org/apache/pinot/core/common/datablock/DataBlockBuilder.java:
##########
@@ -149,6 +149,7 @@ public static RowDataBlock buildFromRows(List<Object[]>
rows, DataSchema dataSch
fixedSize.putInt(dictId);
break;
case BYTES:
+ value = value instanceof ByteArray ? value : new
ByteArray((byte[]) value);
Review Comment:
You're right: my earlier quoted-string example was incorrect. The validator
casts the BYTES operand to VARCHAR, and the updated `toExternal()` handles that
path.
Please add the same LEFT JOIN case with a binary literal:
```sql
AND dim_tbl.bytes_value < X'a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d'
```
I checked the planned expressions and evaluated the residual predicate using
the reviewed conversion/operand sources:
- Quoted string: `LESS_THAN(CAST($1 AS STRING), STRING literal)` succeeds
with either representation.
- Binary literal: `LESS_THAN($1, BYTES literal)` throws `ClassCastException:
byte[] cannot be cast to Comparable` with the raw lookup value, and succeeds
with `ByteArray`.
The binary case keeps both operands as BYTES, so `FilterOperand.Predicate`
reaches its direct `Comparable` cast before serialization. This confirms the
remaining issue with `disablePreload=true`: normalize the lookup result before
MSE predicate evaluation, and cover the binary-literal case in both modes. The
existing expected rows can stay the same.
Validation was a focused planner/operand probe with the reviewed
`DataSchema`, `RexExpressionUtils`, and operand sources compiled against cached
dependencies; it was not a full PR build or end-to-end query run.
--
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]