xiangfu0 opened a new pull request, #18952:
URL: https://github.com/apache/pinot/pull/18952

   ## What
   
   Fixes reversed comparison directions when `ColumnMinMaxValueGenerator` 
reconstructs missing min/max metadata for raw BYTES columns. The bug affected 
both single-value and multi-value columns, persisting the largest value as min 
and the smallest value as max.
   
   Adds a real-segment regression test for both forward-index paths and 
unsigned byte ordering.
   
   This is the separate fix requested in 
https://github.com/apache/pinot/pull/18870#discussion_r3553825881.
   
   ## User manual
   
   No configuration migration is required. The correction applies when segment 
preprocessing regenerates missing min/max metadata for a no-dictionary BYTES 
column. Existing segments with incorrectly regenerated metadata should have the 
affected min/max metadata removed and be reprocessed, or be rebuilt, so Pinot 
can persist corrected bounds.
   
   ## Sample table config
   
   ```json
   {
     "tableName": "bytesTable_OFFLINE",
     "tableType": "OFFLINE",
     "segmentsConfig": {
       "schemaName": "bytesTable"
     },
     "tableIndexConfig": {
       "noDictionaryColumns": ["bytesCol"],
       "columnMinMaxValueGeneratorMode": "ALL"
     }
   }
   ```
   
   Example validation query after affected segments are regenerated:
   
   ```sql
   SELECT MIN(bytesCol), MAX(bytesCol)
   FROM bytesTable
   ```
   
   ## Testing
   
   - `./mvnw -pl pinot-segment-local -Dtest=ColumnMinMaxValueGeneratorTest test`
   - `./mvnw spotless:apply -pl pinot-segment-local`
   - `./mvnw license:format -pl pinot-segment-local`
   - `./mvnw checkstyle:check -pl pinot-segment-local`
   - `./mvnw license:check -pl pinot-segment-local`


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