Styxis
Company
Knowledge

Check Trino unsigned Parquet decoding beyond the signed boundary

Reading a Parquet unsigned integer into bigint does not establish value preservation. Reconcile keys against independently decoded annotations to detect sign changes at the signed boundary.

A wide destination is insufficient

A wide enough bigint destination does not prove that a Parquet unsigned annotation is decoded correctly. Truthound Core can compare exported integers with an independently decoded unsigned reference at each key. [1, 2, 3]

Values above the signed boundary

Trino issue #31908 reports 485-SNAPSHOT reading unsigned INT32 values into Hive bigint as negatives above 2147483647. Ignoring statistics avoids a separate filter problem but does not correct the reported value decoding. The reference must come from the source representation. [1]

Keep source annotation and key

Record Parquet INT(32,false), row keys, independent uint32 values, and Trino output. Include both sides of the signed boundary. Stop the affected extraction if the decoded integer changes; taking an absolute value is not a general inverse. [1, 3]

Unsigned 0x80000000

Define raw bits 0x80000000 with the unsigned annotation. They mean 2147483648, which bigint can represent. Output 2147483648 passes; -2147483648 fails because the same bits were interpreted as signed. The expected value follows from the annotation, not from the destination dtype name. [1, 3]

Decode and align externally

ColumnPairValidator in Truthound Core Python SDK 3.3.2 compares prepared non-null integer columns with ==. The operator independently decodes Parquet and aligns keys. The SDK does not reconfigure Trino’s reader or repair annotation handling. [1, 2, 3]

Test the replacement reader

Use a verified alternative reader over the same file and check the full uint32 boundary domain before accepting a replacement path. Matching row counts do not establish value preservation. [1, 3]

Internal joins can hide wrong IDs

Preserve signedness and width with the observed value. An internal join can remain consistent if both sides are misdecoded, while an external identifier contract is still broken. [1, 3]

Application conditions

Independently decode the Parquet unsigned annotation and align by key.

Alternatives

Verify an alternative reader on the same file across the uint32 boundary.

Limitations

  • Bigint capacity or an internal join success does not prove unsigned-value preservation.

Evidence

Event checked
Subject checked
Modified