Skip to content

ParquetImporter: DECIMAL columns are rejected, or imported as plain integers without their scale #628

Closed

Description

@dfa1

ParquetImporter does not support Parquet DECIMAL columns:

  • FIXED_LEN_BYTE_ARRAY + DECIMAL throws UnsupportedOperationException: unsupported Parquet physical type: FIXED_LEN_BYTE_ARRAY without the FLOAT16 annotation (column: l_quantity).
  • BYTE_ARRAY + DECIMAL throws (unsupported logical type annotation).
  • INT32/INT64 + DECIMAL fall through mapInt32/mapInt64 to plain I32/I64, silently dropping the scale (17.00 imports as 1700).

Vortex has DType.Decimal(precision, scale, nullable) and the writer encodes it (vortex.decimal, vortex.decimal_byte_parts), so all four physical encodings should map to DType.Decimal with the annotation's precision and scale — matching what pyarrow + the Vortex Python bindings write for the same table (decimal128(15, 2) → Vortex decimal).

Found by the Raincloud corpus (#205): duckdb-tpch-sf1-lineitem (l_quantity, l_extendedprice, l_discount, l_tax: DECIMAL(15,2) stored as 7-byte FIXED_LEN_BYTE_ARRAY, written by parquet-cpp-arrow 26.0.0). The corpus .vortex sibling reads correctly; only the import fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions