Skip to content

Compose transform schema entries for Decimal values, rather than infer - #2489

Merged
rolandwalker merged 1 commit into
mainfrom
RW/transform-decimal-precision-schema
Dec 2, 2026
Merged

rolandwalker merged 1 commit into
mainfrom
RW/transform-decimal-precision-schema

Conversation

@rolandwalker

Copy link
Copy Markdown
Contributor

Description

Read Decimal field metadata from MySQL, setting a Polars DataType for the field before a transform, saving an inference step for Decimal results.

MySQL's Decimals can be larger than Polars allows. In this case, we fall back to inference, which leads to an error being sent to the REPL:

BindingsError: "Decimal is too large to fit in Decimal128"

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the mycli/AUTHORS.txt file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker rolandwalker self-assigned this Dec 2, 2026
rather than infer.

Read Decimal field metadata from MySQL, setting a Polars DataType for
the field before a transform, saving an inference step for Decimal
results.

MySQL's Decimals can be larger than Polars allows.  In this case, we
fall back to inference, which leads to an error being sent to the REPL:

    BindingsError: "Decimal is too large to fit in Decimal128"
@rolandwalker
rolandwalker force-pushed the RW/transform-decimal-precision-schema branch from 91b7d65 to 5d2c53d Compare December 2, 2026 16:20
@rolandwalker
rolandwalker merged commit cb2b0a0 into main Dec 2, 2026
@rolandwalker
rolandwalker deleted the RW/transform-decimal-precision-schema branch December 2, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant