waterWang opened a new pull request, #17840:
URL: https://github.com/apache/iceberg/pull/17840

   ## Summary
   
   `ExpressionUtil.sanitize` redacts predicate constants (hashed strings, 
digit-count for numbers, coarse dates). For Variant objects it was formatting 
keys as `(hash-%s)` **with the original field name** while hashing only the 
value. Variant object keys are query literals (they can hold the same secrets 
people put in string literals), and leaked into `SnapshotScan` 
`ScanReport.filter` (REST catalog metrics) and logs.
   
   ## Fix
   
   Run object keys through `sanitizeSimpleString` (the same hashing used for 
string values), and update the unit test expectations to match.
   
   - `api/.../ExpressionUtil.java`: `sanitizeVariantObject` now emits 
`(hash-<hash-of-key>): <value>`
   - `api/.../TestExpressionUtil.java`: update `testSanitizeVariantObject` / 
`testSanitizeVariantArray` expectations
   
   Closes #17836


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