diff --git a/adbc_drivers_validation/queries/type/select/timestamp0.txtcase b/adbc_drivers_validation/queries/type/select/timestamp0.txtcase new file mode 100644 index 0000000..44ade4f --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp0.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamp" + +[tags] +sql-type-name = "TIMESTAMP(0)" +field-type-name = "TIMESTAMP(0)" + +// part: setup_query + +CREATE TABLE test_timestamp ( + idx INTEGER, + res TIMESTAMP(0) +); + +INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30'); +INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00'); +INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40'); +INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '0001-01-01 00:00:00'); +INSERT INTO test_timestamp (idx, res) VALUES (5, TIMESTAMP '9999-12-31 23:59:59'); +INSERT INTO test_timestamp (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamp ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tss:", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330} +{"res": 946684800} +{"res": -14182940} +{"res": -62135596800} +{"res": 253402300799} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp0tz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp0tz.txtcase new file mode 100644 index 0000000..113718a --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp0tz.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamptz" + +[tags] +sql-type-name = "TIMESTAMP(0) WITH TIME ZONE" +field-type-name = "TIMESTAMP(0) WITH TIME ZONE" + +// part: setup_query + +CREATE TABLE test_timestamptz ( + idx INTEGER, + res TIMESTAMP(0) WITH TIME ZONE +); + +INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '2000-01-01 00:00:00+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '0001-01-01 00:00:00+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (5, TIMESTAMP WITH TIME ZONE '9999-12-31 23:59:59+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamptz ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tss:UTC", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330} +{"res": 946684800} +{"res": -14182940} +{"res": -62135596800} +{"res": 253402300799} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp1.txtcase b/adbc_drivers_validation/queries/type/select/timestamp1.txtcase new file mode 100644 index 0000000..faf7d3b --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp1.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamp" + +[tags] +sql-type-name = "TIMESTAMP(p) (1 <= p <= 3)" +field-type-name = "TIMESTAMP(1)" + +// part: setup_query + +CREATE TABLE test_timestamp ( + idx INTEGER, + res TIMESTAMP(1) +); + +INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30.1'); +INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00.2'); +INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40.3'); +INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '0001-01-01 00:00:00.0'); +INSERT INTO test_timestamp (idx, res) VALUES (5, TIMESTAMP '9999-12-31 23:59:59.9'); +INSERT INTO test_timestamp (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamp ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsm:", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330100} +{"res": 946684800200} +{"res": -14182939700} +{"res": -62135596800000} +{"res": 253402300799900} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp1tz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp1tz.txtcase new file mode 100644 index 0000000..2bfe589 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp1tz.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamptz" + +[tags] +sql-type-name = "TIMESTAMP(p) (1 <= p <= 3) WITH TIME ZONE" +field-type-name = "TIMESTAMP(1) WITH TIME ZONE" + +// part: setup_query + +CREATE TABLE test_timestamptz ( + idx INTEGER, + res TIMESTAMP(1) WITH TIME ZONE +); + +INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30.1+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '2000-01-01 00:00:00.2+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40.3+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '0001-01-01 00:00:00.0+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (5, TIMESTAMP WITH TIME ZONE '9999-12-31 23:59:59.9+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamptz ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsm:UTC", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330100} +{"res": 946684800200} +{"res": -14182939700} +{"res": -62135596800000} +{"res": 253402300799900} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp2.txtcase b/adbc_drivers_validation/queries/type/select/timestamp2.txtcase new file mode 100644 index 0000000..72db93d --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp2.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamp" + +[tags] +sql-type-name = "TIMESTAMP(p) (1 <= p <= 3)" +field-type-name = "TIMESTAMP(2)" + +// part: setup_query + +CREATE TABLE test_timestamp ( + idx INTEGER, + res TIMESTAMP(2) +); + +INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30.12'); +INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00.23'); +INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40.34'); +INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '0001-01-01 00:00:00.00'); +INSERT INTO test_timestamp (idx, res) VALUES (5, TIMESTAMP '9999-12-31 23:59:59.99'); +INSERT INTO test_timestamp (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamp ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsm:", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330120} +{"res": 946684800230} +{"res": -14182939660} +{"res": -62135596800000} +{"res": 253402300799990} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp2tz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp2tz.txtcase new file mode 100644 index 0000000..a9a6c58 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp2tz.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamptz" + +[tags] +sql-type-name = "TIMESTAMP(p) (1 <= p <= 3) WITH TIME ZONE" +field-type-name = "TIMESTAMP(2) WITH TIME ZONE" + +// part: setup_query + +CREATE TABLE test_timestamptz ( + idx INTEGER, + res TIMESTAMP(2) WITH TIME ZONE +); + +INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30.12+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '2000-01-01 00:00:00.23+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40.34+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '0001-01-01 00:00:00.00+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (5, TIMESTAMP WITH TIME ZONE '9999-12-31 23:59:59.99+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamptz ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsm:UTC", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330120} +{"res": 946684800230} +{"res": -14182939660} +{"res": -62135596800000} +{"res": 253402300799990} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp3.txtcase b/adbc_drivers_validation/queries/type/select/timestamp3.txtcase new file mode 100644 index 0000000..0101594 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp3.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamp" + +[tags] +sql-type-name = "TIMESTAMP(p) (1 <= p <= 3)" +field-type-name = "TIMESTAMP(3)" + +// part: setup_query + +CREATE TABLE test_timestamp ( + idx INTEGER, + res TIMESTAMP(3) +); + +INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30.123'); +INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00.234'); +INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40.345'); +INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '0001-01-01 00:00:00.000'); +INSERT INTO test_timestamp (idx, res) VALUES (5, TIMESTAMP '9999-12-31 23:59:59.999'); +INSERT INTO test_timestamp (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamp ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsm:", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123} +{"res": 946684800234} +{"res": -14182939655} +{"res": -62135596800000} +{"res": 253402300799999} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp3tz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp3tz.txtcase new file mode 100644 index 0000000..8810c61 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp3tz.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamptz" + +[tags] +sql-type-name = "TIMESTAMP(p) (1 <= p <= 3) WITH TIME ZONE" +field-type-name = "TIMESTAMP(3) WITH TIME ZONE" + +// part: setup_query + +CREATE TABLE test_timestamptz ( + idx INTEGER, + res TIMESTAMP(3) WITH TIME ZONE +); + +INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30.123+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '2000-01-01 00:00:00.234+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40.345+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '0001-01-01 00:00:00.000+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (5, TIMESTAMP WITH TIME ZONE '9999-12-31 23:59:59.999+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamptz ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsm:UTC", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123} +{"res": 946684800234} +{"res": -14182939655} +{"res": -62135596800000} +{"res": 253402300799999} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp4.txtcase b/adbc_drivers_validation/queries/type/select/timestamp4.txtcase new file mode 100644 index 0000000..edca023 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp4.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamp" + +[tags] +sql-type-name = "TIMESTAMP(p) (4 <= p <= 6)" +field-type-name = "TIMESTAMP(4)" + +// part: setup_query + +CREATE TABLE test_timestamp ( + idx INTEGER, + res TIMESTAMP(4) +); + +INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30.1234'); +INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00.2345'); +INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40.3456'); +INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '0001-01-01 00:00:00.0000'); +INSERT INTO test_timestamp (idx, res) VALUES (5, TIMESTAMP '9999-12-31 23:59:59.9999'); +INSERT INTO test_timestamp (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamp ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsu:", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123400} +{"res": 946684800234500} +{"res": -14182939654400} +{"res": -62135596800000000} +{"res": 253402300799999900} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp4tz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp4tz.txtcase new file mode 100644 index 0000000..06197da --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp4tz.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamptz" + +[tags] +sql-type-name = "TIMESTAMP(p) (4 <= p <= 6) WITH TIME ZONE" +field-type-name = "TIMESTAMP(4) WITH TIME ZONE" + +// part: setup_query + +CREATE TABLE test_timestamptz ( + idx INTEGER, + res TIMESTAMP(4) WITH TIME ZONE +); + +INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30.1234+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '2000-01-01 00:00:00.2345+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40.3456+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '0001-01-01 00:00:00.0000+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (5, TIMESTAMP WITH TIME ZONE '9999-12-31 23:59:59.9999+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamptz ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsu:UTC", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123400} +{"res": 946684800234500} +{"res": -14182939654400} +{"res": -62135596800000000} +{"res": 253402300799999900} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp5.txtcase b/adbc_drivers_validation/queries/type/select/timestamp5.txtcase new file mode 100644 index 0000000..169cb84 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp5.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamp" + +[tags] +sql-type-name = "TIMESTAMP(p) (4 <= p <= 6)" +field-type-name = "TIMESTAMP(5)" + +// part: setup_query + +CREATE TABLE test_timestamp ( + idx INTEGER, + res TIMESTAMP(5) +); + +INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30.12345'); +INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00.23456'); +INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40.34567'); +INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '0001-01-01 00:00:00.00000'); +INSERT INTO test_timestamp (idx, res) VALUES (5, TIMESTAMP '9999-12-31 23:59:59.99999'); +INSERT INTO test_timestamp (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamp ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsu:", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123450} +{"res": 946684800234560} +{"res": -14182939654330} +{"res": -62135596800000000} +{"res": 253402300799999990} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp5tz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp5tz.txtcase new file mode 100644 index 0000000..ab07201 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp5tz.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamptz" + +[tags] +sql-type-name = "TIMESTAMP(p) (4 <= p <= 6) WITH TIME ZONE" +field-type-name = "TIMESTAMP(5) WITH TIME ZONE" + +// part: setup_query + +CREATE TABLE test_timestamptz ( + idx INTEGER, + res TIMESTAMP(5) WITH TIME ZONE +); + +INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30.12345+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '2000-01-01 00:00:00.23456+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40.34567+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '0001-01-01 00:00:00.00000+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (5, TIMESTAMP WITH TIME ZONE '9999-12-31 23:59:59.99999+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamptz ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsu:UTC", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123450} +{"res": 946684800234560} +{"res": -14182939654330} +{"res": -62135596800000000} +{"res": 253402300799999990} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp.txtcase b/adbc_drivers_validation/queries/type/select/timestamp6.txtcase similarity index 70% rename from adbc_drivers_validation/queries/type/select/timestamp.txtcase rename to adbc_drivers_validation/queries/type/select/timestamp6.txtcase index 70ec0dd..97c520b 100644 --- a/adbc_drivers_validation/queries/type/select/timestamp.txtcase +++ b/adbc_drivers_validation/queries/type/select/timestamp6.txtcase @@ -14,31 +14,18 @@ // part: metadata -# Copyright (c) 2026 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. - [setup] drop = "test_timestamp" [tags] -sql-type-name = "TIMESTAMP" +sql-type-name = "TIMESTAMP(p) (4 <= p <= 6)" +field-type-name = "TIMESTAMP(6)" // part: setup_query CREATE TABLE test_timestamp ( idx INTEGER, - res TIMESTAMP + res TIMESTAMP(6) ); INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30'); @@ -46,6 +33,8 @@ INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00' INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40'); INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '9999-12-31 23:59:59'); INSERT INTO test_timestamp (idx, res) VALUES (5, NULL); +INSERT INTO test_timestamp (idx, res) VALUES (6, TIMESTAMP '0001-01-01 00:00:00.000000'); +INSERT INTO test_timestamp (idx, res) VALUES (7, TIMESTAMP '2023-05-15 13:45:30.123456'); // part: query @@ -71,3 +60,5 @@ SELECT res FROM test_timestamp ORDER BY idx {"res": -14182940000000} {"res": 253402300799000000} {"res": null} +{"res": -62135596800000000} +{"res": 1684158330123456} diff --git a/adbc_drivers_validation/queries/type/select/timestamptz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp6tz.txtcase similarity index 70% rename from adbc_drivers_validation/queries/type/select/timestamptz.txtcase rename to adbc_drivers_validation/queries/type/select/timestamp6tz.txtcase index d100de2..1ce7bd7 100644 --- a/adbc_drivers_validation/queries/type/select/timestamptz.txtcase +++ b/adbc_drivers_validation/queries/type/select/timestamp6tz.txtcase @@ -14,31 +14,18 @@ // part: metadata -# Copyright (c) 2026 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. - [setup] drop = "test_timestamptz" [tags] -sql-type-name = "TIMESTAMP WITH TIME ZONE" +sql-type-name = "TIMESTAMP(p) (4 <= p <= 6) WITH TIME ZONE" +field-type-name = "TIMESTAMP(6) WITH TIME ZONE" // part: setup_query CREATE TABLE test_timestamptz ( idx INTEGER, - res TIMESTAMP WITH TIME ZONE + res TIMESTAMP(6) WITH TIME ZONE ); INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30+00'); @@ -46,6 +33,8 @@ INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '200 INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40+00'); INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '9999-12-31 23:59:59+00'); INSERT INTO test_timestamptz (idx, res) VALUES (5, NULL); +INSERT INTO test_timestamptz (idx, res) VALUES (6, TIMESTAMP WITH TIME ZONE '0001-01-01 00:00:00.000000+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (7, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30.123456+00'); // part: query @@ -71,3 +60,5 @@ SELECT res FROM test_timestamptz ORDER BY idx {"res": -14182940000000} {"res": 253402300799000000} {"res": null} +{"res": -62135596800000000} +{"res": 1684158330123456} diff --git a/adbc_drivers_validation/queries/type/select/timestamp7.txtcase b/adbc_drivers_validation/queries/type/select/timestamp7.txtcase new file mode 100644 index 0000000..1b909e6 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp7.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamp" + +[tags] +sql-type-name = "TIMESTAMP(p) (7 <= p <= 9)" +field-type-name = "TIMESTAMP(7)" + +// part: setup_query + +CREATE TABLE test_timestamp ( + idx INTEGER, + res TIMESTAMP(7) +); + +INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30.1234567'); +INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00.2345678'); +INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40.3456789'); +INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '1677-09-21 00:12:43.2'); +INSERT INTO test_timestamp (idx, res) VALUES (5, TIMESTAMP '2262-04-11 23:47:16.8'); +INSERT INTO test_timestamp (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamp ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsn:", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123456700} +{"res": 946684800234567800} +{"res": -14182939654321100} +{"res": -9223372036800000000} +{"res": 9223372036800000000} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp7tz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp7tz.txtcase new file mode 100644 index 0000000..9f5b5b2 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp7tz.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamptz" + +[tags] +sql-type-name = "TIMESTAMP(p) (7 <= p <= 9) WITH TIME ZONE" +field-type-name = "TIMESTAMP(7) WITH TIME ZONE" + +// part: setup_query + +CREATE TABLE test_timestamptz ( + idx INTEGER, + res TIMESTAMP(7) WITH TIME ZONE +); + +INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30.1234567+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '2000-01-01 00:00:00.2345678+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40.3456789+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '1677-09-21 00:12:43.2+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (5, TIMESTAMP WITH TIME ZONE '2262-04-11 23:47:16.8+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamptz ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsn:UTC", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123456700} +{"res": 946684800234567800} +{"res": -14182939654321100} +{"res": -9223372036800000000} +{"res": 9223372036800000000} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp8.txtcase b/adbc_drivers_validation/queries/type/select/timestamp8.txtcase new file mode 100644 index 0000000..7eec1d1 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp8.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamp" + +[tags] +sql-type-name = "TIMESTAMP(p) (7 <= p <= 9)" +field-type-name = "TIMESTAMP(8)" + +// part: setup_query + +CREATE TABLE test_timestamp ( + idx INTEGER, + res TIMESTAMP(8) +); + +INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30.12345678'); +INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00.23456789'); +INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40.34567890'); +INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '1677-09-21 00:12:43.15'); +INSERT INTO test_timestamp (idx, res) VALUES (5, TIMESTAMP '2262-04-11 23:47:16.85'); +INSERT INTO test_timestamp (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamp ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsn:", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123456780} +{"res": 946684800234567890} +{"res": -14182939654321100} +{"res": -9223372036850000000} +{"res": 9223372036850000000} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp8tz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp8tz.txtcase new file mode 100644 index 0000000..e157132 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp8tz.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamptz" + +[tags] +sql-type-name = "TIMESTAMP(p) (7 <= p <= 9) WITH TIME ZONE" +field-type-name = "TIMESTAMP(8) WITH TIME ZONE" + +// part: setup_query + +CREATE TABLE test_timestamptz ( + idx INTEGER, + res TIMESTAMP(8) WITH TIME ZONE +); + +INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30.12345678+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '2000-01-01 00:00:00.23456789+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40.34567890+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '1677-09-21 00:12:43.15+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (5, TIMESTAMP WITH TIME ZONE '2262-04-11 23:47:16.85+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamptz ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsn:UTC", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123456780} +{"res": 946684800234567890} +{"res": -14182939654321100} +{"res": -9223372036850000000} +{"res": 9223372036850000000} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp9.txtcase b/adbc_drivers_validation/queries/type/select/timestamp9.txtcase new file mode 100644 index 0000000..c0d8d6c --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp9.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamp" + +[tags] +sql-type-name = "TIMESTAMP(p) (7 <= p <= 9)" +field-type-name = "TIMESTAMP(9)" + +// part: setup_query + +CREATE TABLE test_timestamp ( + idx INTEGER, + res TIMESTAMP(9) +); + +INSERT INTO test_timestamp (idx, res) VALUES (1, TIMESTAMP '2023-05-15 13:45:30.123456789'); +INSERT INTO test_timestamp (idx, res) VALUES (2, TIMESTAMP '2000-01-01 00:00:00.234567890'); +INSERT INTO test_timestamp (idx, res) VALUES (3, TIMESTAMP '1969-07-20 20:17:40.345678901'); +INSERT INTO test_timestamp (idx, res) VALUES (4, TIMESTAMP '1677-09-21 00:12:43.145224192'); +INSERT INTO test_timestamp (idx, res) VALUES (5, TIMESTAMP '2262-04-11 23:47:16.854775807'); +INSERT INTO test_timestamp (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamp ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsn:", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123456789} +{"res": 946684800234567890} +{"res": -14182939654321099} +{"res": -9223372036854775808} +{"res": 9223372036854775807} +{"res": null} diff --git a/adbc_drivers_validation/queries/type/select/timestamp9tz.txtcase b/adbc_drivers_validation/queries/type/select/timestamp9tz.txtcase new file mode 100644 index 0000000..7973574 --- /dev/null +++ b/adbc_drivers_validation/queries/type/select/timestamp9tz.txtcase @@ -0,0 +1,62 @@ +// Copyright (c) 2026 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_timestamptz" + +[tags] +sql-type-name = "TIMESTAMP(p) (7 <= p <= 9) WITH TIME ZONE" +field-type-name = "TIMESTAMP(9) WITH TIME ZONE" + +// part: setup_query + +CREATE TABLE test_timestamptz ( + idx INTEGER, + res TIMESTAMP(9) WITH TIME ZONE +); + +INSERT INTO test_timestamptz (idx, res) VALUES (1, TIMESTAMP WITH TIME ZONE '2023-05-15 13:45:30.123456789+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (2, TIMESTAMP WITH TIME ZONE '2000-01-01 00:00:00.234567890+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (3, TIMESTAMP WITH TIME ZONE '1969-07-20 20:17:40.345678901+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (4, TIMESTAMP WITH TIME ZONE '1677-09-21 00:12:43.145224192+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (5, TIMESTAMP WITH TIME ZONE '2262-04-11 23:47:16.854775807+00'); +INSERT INTO test_timestamptz (idx, res) VALUES (6, NULL); + +// part: query + +SELECT res FROM test_timestamptz ORDER BY idx + +// part: expected_schema + +{ + "format": "+s", + "children": [ + { + "name": "res", + "format": "tsn:UTC", + "flags": ["nullable"] + } + ] +} + +// part: expected + +{"res": 1684158330123456789} +{"res": 946684800234567890} +{"res": -14182939654321099} +{"res": -9223372036854775808} +{"res": 9223372036854775807} +{"res": null}