Skip to content

Conversation

@apstndb
Copy link
Collaborator

@apstndb apstndb commented Jan 30, 2026

This PR implements INTERVAL type decoding.

I understand that this project is currently in maintenance mode, but I believe that unsupported types represent a noteworthy issue that cannot be ignored for some users.

Before

$ go run github.com/cloudspannerecosystem/spanner-cli@v0.11.1 -v -e 'SELECT INTERVAL 1 DAY, [INTERVAL "8 20 17" MONTH TO HOUR]'
+--------------------+-----------------+
|                    |                 |
| INTERVAL           | ARRAY<INTERVAL> |
+--------------------+-----------------+
| string_value:"P1D" | []              |
+--------------------+-----------------+
1 rows in set (0.2 msecs)
timestamp:            2026-01-31T04:01:32.949479+09:00
cpu time:             0.18 msecs
rows scanned:         0 rows
deleted rows scanned: 0 rows
optimizer version:    8
optimizer statistics: auto_20260129_12_27_00UTC

After

$ go run ./ -v -e 'SELECT INTERVAL 1 DAY, [INTERVAL "8 20 17" MONTH TO HOUR]'
+----------+-----------------+
|          |                 |
| INTERVAL | ARRAY<INTERVAL> |
+----------+-----------------+
| P1D      | [P8M20DT17H]    |
+----------+-----------------+
1 rows in set (2.55 msecs)
timestamp:            2026-01-31T03:37:19.656654+09:00
cpu time:             2.52 msecs
rows scanned:         0 rows
deleted rows scanned: 0 rows
optimizer version:    8
optimizer statistics: auto_20260129_12_27_00UTC

@yfuruyama
Copy link
Collaborator

@apstndb Could you resolve the conflicts?

@apstndb apstndb requested a review from yfuruyama February 5, 2026 04:34
@yfuruyama
Copy link
Collaborator

Thanks!

@yfuruyama yfuruyama merged commit 90f26f4 into cloudspannerecosystem:master Feb 5, 2026
3 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.

Support INTERVAL type

2 participants