zclllyybb commented on issue #65865:
URL: https://github.com/apache/doris/issues/65865#issuecomment-5041482190

   Breakwater-GitHub-Analysis-Slot: slot_d3817c3c4dc3
   This content is generated by AI for reference only.
   
   Initial triage from the reported commit 
`a78b707ed040c3206df99cf43ea3101ab2ba5b90` and refreshed `upstream/master`:
   
   This looks like a real BE ROW-binlog conversion bug, not invalid SQL. The 
table creation path accepts this schema: when FE builds the hidden ROW-binlog 
index, `OlapTable.generateTableRowBinlogSchema()` only rejects VARIANT and 
AUTO_INCREMENT. For non-key value columns it uses 
`Column.generateAfterValueColumn()`, and for historical values it also uses 
`Column.generateBeforeValueColumn()`; both helpers copy the original column and 
then set the ROW-binlog column nullable. Therefore a `NOT NULL HLL` base value 
can still be written through a nullable ROW-binlog column shape.
   
   The failing insert matches the BE path: 
`RowBinlogSegmentWriter::append_block()` calls 
`RowBinlogSourceDataWriter::prepare_by_source_block()`, which invokes 
`OlapBlockDataConvertor::convert_column_data()` for the source column. For 
`OLAP_FIELD_TYPE_HLL`, the converter is `OlapColumnDataConvertorHLL`. In that 
converter, any present `_nullmap` immediately returns 
`Status::NotSupported("QuantileState column does not support nullable")`. So 
the observed message is a copy/paste error in the HLL branch, and the failure 
is triggered by the column nullable-wrapper shape, not by QuantileState.
   
   Bitmap's converter already handles the nullable-wrapper case by unwrapping 
`ColumnNullable`, serializing non-null rows, and returning `nullptr`/`0` slices 
for null rows. HLL has compatible serialized-slice behavior in the non-null 
branch, so the likely product fix is to make `OlapColumnDataConvertorHLL` 
handle nullable HLL like bitmap, including the all-non-null wrapper case used 
by this repro. If Doris intentionally does not want to support HLL in ROW 
binlog, the support boundary should instead be enforced in FE create/alter 
validation before generating the ROW-binlog index, with an HLL-specific message.
   
   Suggested next steps:
   1. Add a regression case for ROW binlog + `NOT NULL HLL` insert using 
`HLL_HASH`, and check row-binlog consumption if possible.
   2. Fix the HLL converter to unwrap nullable HLL and serialize non-null rows, 
or add explicit FE validation rejecting HLL with ROW binlog.
   3. Correct the error text in the HLL and AggState paths so unsupported 
complex types do not report QuantileState.
   
   No additional user data is needed to confirm the primary code path. Runtime 
logs would only be useful if maintainers want to confirm whether the failing 
block contains an all-zero nullmap or an actual nullable HLL value.
   


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

Reply via email to