Skip to content

test(go): add tests for unsigned types#91

Merged
Mandukhai-Alimaa merged 3 commits intoadbc-drivers:mainfrom
Mandukhai-Alimaa:test/add-test-for-unsigned
Apr 7, 2026
Merged

test(go): add tests for unsigned types#91
Mandukhai-Alimaa merged 3 commits intoadbc-drivers:mainfrom
Mandukhai-Alimaa:test/add-test-for-unsigned

Conversation

@Mandukhai-Alimaa
Copy link
Copy Markdown
Contributor

What's Changed

Add unsigned integer tests and enable int16/int32 literal tests

Closes #82 .

@@ -0,0 +1 @@
SELECT 16384 AS res
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(1) is this actually SMALLINT without the cast?
(2) can we use txtcase instead of a bunch of files?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Yes. MySQL dont support casting to specific integer sizes like SMALLINT or INT. When we use plain integer literals in SELECT queries without CAST, MySQL infers all integer values as int64, regardless of whether the value would fit in a smaller integer type or not.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case there's not much point having a literal test for these types if you can't actually get a literal of that type (the select tests are the main important ones, literal isn't required for every type)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, i will hide them.

@@ -0,0 +1,43 @@
// Copyright (c) 2025 ADBC Drivers Contributors
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it's 2026 😬

@Mandukhai-Alimaa Mandukhai-Alimaa merged commit c089900 into adbc-drivers:main Apr 7, 2026
11 checks passed
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.

[Go] Add cases for unsigned types to validation suite

2 participants