We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL [(none)]> select version(); +--------------------------------------------------------------------------+ | @@Version() | +--------------------------------------------------------------------------+ | 8.0.26--b97c58f-simd(rust-1.61.0-nightly-2022-05-16T16:18:55.377071526Z) | +--------------------------------------------------------------------------+ 1 row in set (0.003 sec)
read: https://databend.rs/doc/reference/data-types/data-type-array-types
MySQL [(none)]> CREATE TABLE array_int64_table(arr ARRAY(INT64) NULL); Query OK, 0 rows affected (0.016 sec) Read 0 rows, 0.00 B in 0.012 sec., 0 rows/sec., 0.00 B/sec.
MySQL [(none)]> INSERT INTO array_int64_table VALUES([1,2,3,4]),([5,6,7,8]); Query OK, 0 rows affected (0.019 sec) Read 2 rows, 88.00 B in 0.015 sec., 136.05 rows/sec., 5.85 KiB/sec.
MySQL [(none)]> select arr[0] from array_int64_table; +--------+ | arr[0] | +--------+ | 1 | | NULL | +--------+ 2 rows in set (0.010 sec)
MySQL [(none)]> select arr from array_int64_table; +--------------+ | arr | +--------------+ | [1, 2, 3, 4] | | NULL | +--------------+ 2 rows in set (0.007 sec)
MySQL [(none)]> INSERT INTO array_int64_table VALUES([1,2,3,4]),([5,6,7,8]); Query OK, 0 rows affected (0.014 sec) Read 2 rows, 88.00 B in 0.011 sec., 188.71 rows/sec., 8.11 KiB/sec.
MySQL [(none)]> select arr from array_int64_table; +--------------+ | arr | +--------------+ | [1, 2, 3, 4] | | NULL | | [1, 2, 3, 4] | | NULL | +--------------+ 4 rows in set (0.009 sec)
MySQL [(none)]> INSERT INTO array_int64_table VALUES([5,6,7,8]); Query OK, 0 rows affected (0.013 sec) Read 1 rows, 48.00 B in 0.010 sec., 102.7 rows/sec., 4.81 KiB/sec.
MySQL [(none)]> select arr from array_int64_table; +--------------+ | arr | +--------------+ | [1, 2, 3, 4] | | NULL | | [1, 2, 3, 4] | | NULL | | [5, 6] | +--------------+ 5 rows in set (0.007 sec)
above
The text was updated successfully, but these errors were encountered:
b41sh
Successfully merging a pull request may close this issue.
Search before asking
Version
MySQL [(none)]> select version();
+--------------------------------------------------------------------------+
| @@Version() |
+--------------------------------------------------------------------------+
| 8.0.26--b97c58f-simd(rust-1.61.0-nightly-2022-05-16T16:18:55.377071526Z) |
+--------------------------------------------------------------------------+
1 row in set (0.003 sec)
What's Wrong?
read: https://databend.rs/doc/reference/data-types/data-type-array-types
MySQL [(none)]> CREATE TABLE array_int64_table(arr ARRAY(INT64) NULL);
Query OK, 0 rows affected (0.016 sec)
Read 0 rows, 0.00 B in 0.012 sec., 0 rows/sec., 0.00 B/sec.
MySQL [(none)]> INSERT INTO array_int64_table VALUES([1,2,3,4]),([5,6,7,8]);
Query OK, 0 rows affected (0.019 sec)
Read 2 rows, 88.00 B in 0.015 sec., 136.05 rows/sec., 5.85 KiB/sec.
MySQL [(none)]> select arr[0] from array_int64_table;
+--------+
| arr[0] |
+--------+
| 1 |
| NULL |
+--------+
2 rows in set (0.010 sec)
MySQL [(none)]> select arr from array_int64_table;
+--------------+
| arr |
+--------------+
| [1, 2, 3, 4] |
| NULL |
+--------------+
2 rows in set (0.007 sec)
MySQL [(none)]> INSERT INTO array_int64_table VALUES([1,2,3,4]),([5,6,7,8]);
Query OK, 0 rows affected (0.014 sec)
Read 2 rows, 88.00 B in 0.011 sec., 188.71 rows/sec., 8.11 KiB/sec.
MySQL [(none)]> select arr from array_int64_table;
+--------------+
| arr |
+--------------+
| [1, 2, 3, 4] |
| NULL |
| [1, 2, 3, 4] |
| NULL |
+--------------+
4 rows in set (0.009 sec)
MySQL [(none)]> INSERT INTO array_int64_table VALUES([5,6,7,8]);
Query OK, 0 rows affected (0.013 sec)
Read 1 rows, 48.00 B in 0.010 sec., 102.7 rows/sec., 4.81 KiB/sec.
MySQL [(none)]> select arr from array_int64_table;
+--------------+
| arr |
+--------------+
| [1, 2, 3, 4] |
| NULL |
| [1, 2, 3, 4] |
| NULL |
| [5, 6] |
+--------------+
5 rows in set (0.007 sec)
How to Reproduce?
above
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: