mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-11 07:42:54 +00:00
* feat(vector): add conversion between vector and string Signed-off-by: Zhenchi <zhongzc_arch@outlook.com> * fix sqlness Signed-off-by: Zhenchi <zhongzc_arch@outlook.com> * address comments Signed-off-by: Zhenchi <zhongzc_arch@outlook.com> --------- Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
25 lines
864 B
Plaintext
25 lines
864 B
Plaintext
SELECT vec_to_string(parse_vec('[1.0, 2.0]'));
|
|
|
|
+----------------------------------------------+
|
|
| vec_to_string(parse_vec(Utf8("[1.0, 2.0]"))) |
|
|
+----------------------------------------------+
|
|
| [1,2] |
|
|
+----------------------------------------------+
|
|
|
|
SELECT vec_to_string(parse_vec('[1.0, 2.0, 3.0]'));
|
|
|
|
+---------------------------------------------------+
|
|
| vec_to_string(parse_vec(Utf8("[1.0, 2.0, 3.0]"))) |
|
|
+---------------------------------------------------+
|
|
| [1,2,3] |
|
|
+---------------------------------------------------+
|
|
|
|
SELECT vec_to_string(parse_vec('[]'));
|
|
|
|
+--------------------------------------+
|
|
| vec_to_string(parse_vec(Utf8("[]"))) |
|
|
+--------------------------------------+
|
|
| [] |
|
|
+--------------------------------------+
|
|
|