Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions go/validation/queries/ingest/uint16.txtcase
Original file line number Diff line number Diff line change
@@ -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 😬

//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata

[tags]
sql-type-name = "SMALLINT UNSIGNED"

// part: input_schema

{
"format": "+s",
"children": [
{
"name": "idx",
"format": "l",
"flags": ["nullable"]
},
{
"name": "value",
"format": "S",
"flags": ["nullable"]
}
]
}

// part: input

{"idx": 0, "value": 65535}
{"idx": 1, "value": 0}
{"idx": 2, "value": null}
{"idx": 3, "value": 32768}
43 changes: 43 additions & 0 deletions go/validation/queries/ingest/uint32.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) 2025 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata

[tags]
sql-type-name = "INT UNSIGNED"

// part: input_schema

{
"format": "+s",
"children": [
{
"name": "idx",
"format": "l",
"flags": ["nullable"]
},
{
"name": "value",
"format": "I",
"flags": ["nullable"]
}
]
}

// part: input

{"idx": 0, "value": 4294967295}
{"idx": 1, "value": 0}
{"idx": 2, "value": null}
{"idx": 3, "value": 2147483648}
43 changes: 43 additions & 0 deletions go/validation/queries/ingest/uint64.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) 2025 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata

[tags]
sql-type-name = "BIGINT UNSIGNED"

// part: input_schema

{
"format": "+s",
"children": [
{
"name": "idx",
"format": "l",
"flags": ["nullable"]
},
{
"name": "value",
"format": "L",
"flags": ["nullable"]
}
]
}

// part: input

{"idx": 0, "value": 18446744073709551615}
{"idx": 1, "value": 0}
{"idx": 2, "value": null}
{"idx": 3, "value": 9223372036854775808}
43 changes: 43 additions & 0 deletions go/validation/queries/ingest/uint8.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) 2025 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata

[tags]
sql-type-name = "TINYINT UNSIGNED"

// part: input_schema

{
"format": "+s",
"children": [
{
"name": "idx",
"format": "l",
"flags": ["nullable"]
},
{
"name": "value",
"format": "C",
"flags": ["nullable"]
}
]
}

// part: input

{"idx": 0, "value": 255}
{"idx": 1, "value": 0}
{"idx": 2, "value": null}
{"idx": 3, "value": 128}
81 changes: 81 additions & 0 deletions go/validation/queries/type/bind/uint16.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Copyright (c) 2025 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata

[setup]
drop = "test_uint16"

[tags]
sql-type-name = "SMALLINT UNSIGNED"

// part: setup_query

CREATE TABLE test_uint16 (
idx INT,
res SMALLINT UNSIGNED
);

// part: bind_query

INSERT INTO test_uint16 VALUES ($1, $2)

// part: bind_schema

{
"format": "+s",
"children": [
{
"name": "idx",
"format": "i",
"flags": ["nullable"]
},
{
"name": "res",
"format": "S",
"flags": ["nullable"]
}
]
}

// part: bind

{"idx": 3, "res": 32768}
{"idx": 2, "res": 65535}
{"idx": 1, "res": 0}
{"idx": 0, "res": null}

// part: query

SELECT res FROM test_uint16 ORDER BY idx

// part: expected_schema

{
"format": "+s",
"children": [
{
"name": "res",
"format": "S",
"flags": ["nullable"]
}
]
}

// part: expected

{"res": null}
{"res": 0}
{"res": 65535}
{"res": 32768}
81 changes: 81 additions & 0 deletions go/validation/queries/type/bind/uint32.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Copyright (c) 2025 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata

[setup]
drop = "test_uint32"

[tags]
sql-type-name = "INT UNSIGNED"

// part: setup_query

CREATE TABLE test_uint32 (
idx INT,
res INT UNSIGNED
);

// part: bind_query

INSERT INTO test_uint32 VALUES ($1, $2)

// part: bind_schema

{
"format": "+s",
"children": [
{
"name": "idx",
"format": "i",
"flags": ["nullable"]
},
{
"name": "res",
"format": "I",
"flags": ["nullable"]
}
]
}

// part: bind

{"idx": 3, "res": 2147483648}
{"idx": 2, "res": 4294967295}
{"idx": 1, "res": 0}
{"idx": 0, "res": null}

// part: query

SELECT res FROM test_uint32 ORDER BY idx

// part: expected_schema

{
"format": "+s",
"children": [
{
"name": "res",
"format": "I",
"flags": ["nullable"]
}
]
}

// part: expected

{"res": null}
{"res": 0}
{"res": 4294967295}
{"res": 2147483648}
Loading
Loading