Skip to content

MySQL unparser emits SMALLINT and unsigned cast types, which MySQL rejects #26887

Closed

Description

@hozan23

Describe the bug

Follow-up to #26882. arrow_dtype_to_ast_dtype hard-codes the cast types for Int16 and the unsigned integers, so MySqlDialect cannot override them:

Arrow type Unparsed as
Int16 SMALLINT
UInt8 TINYINT UNSIGNED
UInt16 SMALLINT UNSIGNED
UInt32 INTEGER UNSIGNED
UInt64 BIGINT UNSIGNED

MySQL's CAST accepts none of these (see the permitted types), so the generated SQL fails with ERROR 1064.

To Reproduce

No response

Expected behavior

No response

Additional context

No response

Willingness to contribute

I plan to contribute a fix for this bug independently

Activity

  1. added theissue type on Oct 29, 2026
  2. added a commit that references this issue on Nov 4, 2026
    39ad685
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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions