Skip to content

minor: Add alias of some SQL types (string, binary, uint64) - #24398

Open
nuno-faria wants to merge 6 commits into
apache:mainfrom
nuno-faria:sql_type_alias
Open

minor: Add alias of some SQL types (string, binary, uint64)#24398
nuno-faria wants to merge 6 commits into
apache:mainfrom
nuno-faria:sql_type_alias

Conversation

@nuno-faria

@nuno-faria nuno-faria commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • N/A.

Rationale for this change

Some sql-parser types were not being processed in DataFusion. This makes it so they map to existing types, as is done in other systems.

What changes are included in this PR?

  • Nvarchar/CharacterVarying/CharVarying -> string.
  • UBigInt -> uint64.
  • Blob/Binary/Varbinary/Bytes -> binary.
  • UTinyInt -> uint8.
  • USmallInt -> uint16.

I left Blob(n), Varbinary(n). and Bytes(n) to return an error, since in arrow the limits can't be ensured. We could also accept them, just like Varchar(n), but we would need probably need a support_varchar_with_length type config for binary types.

Are these changes tested?

Yes.

Are there any user-facing changes?

New SQL type alias, but no new types are added.

@github-actions github-actions Bot added sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels Aug 15, 2026
@codecov-commenter

codecov-commenter commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.22%. Comparing base (19f2e85) to head (1bea0c3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24398      +/-   ##
==========================================
- Coverage   81.22%   81.22%   -0.01%     
==========================================
  Files        1113     1113              
  Lines      392250   392252       +2     
  Branches   392250   392252       +2     
==========================================
- Hits       318596   318589       -7     
- Misses      54910    54914       +4     
- Partials    18744    18749       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nuno-faria

Copy link
Copy Markdown
Contributor Author

I have also added UTinyInt -> uint8 and USmallInt -> uint16, as well as some more tests.

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

Labels

sql SQL Planner sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants