You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Semi-structured accessor functions return incorrect value #1907
Here is the difference between Snowflake and embucket:
CREATE OR REPLACETABLEvariant_test_embucket (
id INT,
data VARIANT
);
INSERT INTO variant_test_embucket SELECT1, PARSE_JSON('{"name": "test", "id": "1d110fd7-0f54-4452-8dc6-c4a3eac02024"}');
>select data:name as n, length(n), data:id as i, length(i) from variant_test;
+-------------------------------------------------------------------------+
| N | LENGTH(N) | I | LENGTH(I) |
|--------+-----------+----------------------------------------+-----------|
| "test" | 4 | "1d110fd7-0f54-4452-8dc6-c4a3eac02024" | 36 |
+-------------------------------------------------------------------------+
CREATE OR REPLACE TEMPORARY TABLE variant_test (
id INT,
data VARIANT
);
INSERT INTO variant_test SELECT1, PARSE_JSON('{"name": "test", "id": "1d110fd7-0f54-4452-8dc6-c4a3eac02024"}');
+-------+
| count |
|-------|
| 0 |
+-------++-------+
| count |
|-------|
| 1 |
+-------+>select data:name as n, length(n), data:id as i, length(i) from variant_test;
+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | length(variant_element(embucket.public.variant_test | | length(variant_element(embucket.public.variant_test |
| n | .data,Utf8("$.name"),Boolean(true))) | i | .data,Utf8("$.id"),Boolean(true))) |
|--------+-----------------------------------------------------+----------------------------------------+-----------------------------------------------------|
| "test" | 6 | "1d110fd7-0f54-4452-8dc6-c4a3eac02024" | 38 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
Activity
DanCodedThis commentedon Nov 6, 2025
is this related to #1911? cc @rampage644 @osipovartem