Skip to content

add SQL support for tinyint and unsigned versions of all INTs #3307

@kmitchener

Description

@kmitchener

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)

Currently there is no SQL support for TINYINT, or the unsigned versions of TINYINT, SMALLINT, INT, and BIGINT.

$ echo "1" > tmp.txt
$ ./target/debug/datafusion-cli.exe
DataFusion CLI v11.0.0
create external table t (c1 tinyint) stored as csv location 'tmp.txt';
NotImplemented("The SQL data type TinyInt(None) is not implemented")
select 1::tinyint;
NotImplemented("Unsupported SQL type TinyInt(None)")
-- or unsigned versions of ints
select 1::int unsigned;
NotImplemented("Unsupported SQL type UnsignedInt(None)")

Describe the solution you'd like
A clear and concise description of what you want to happen.

I'd like SQL support for TINYINT at least. Does DataFusion want SQL support for the unsigned versions of the rest of the INTs? Postgres doesn't support unsigned ints, but sqlparser-rs already has syntax support for it and there are matching Arrow types.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions