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
Add support for "Unalias case" described here #7242 (comment)
Unalias case
SELECT * FROM t AS t LATERAL VIEW json_tuple(jsonstr, "name", "surname", "user_id") x;
+----------------------------------------------------+----------+-----------+-------+
| t.jsonstr | x.c0 | x.c1 | x.c2 |
+----------------------------------------------------+----------+-----------+-------+
| {"user_id": 1000, "name": "Mateusz", "surname": "Gajewski"} | Mateusz | Gajewski | 1000 |
+----------------------------------------------------+----------+-----------+-------+
This introduces a relation x with fields c0, c1 and c2.
As with any relation, the fields can be accssed using qualified or unqualified
names:
SELECT c0, x.c1 FROM t AS t LATERAL VIEW json_tuple(jsonstr, "name", "surname", "user_id") x;
+----------+-----------+
| c0 | x.c1 |
+----------+-----------+
| Mateusz | Gajewski |
+----------+-----------+
The unaliased case is easy to support -- we know number of columns statically,
so we can enumerate c0, c1, ... and fold that into the aliased case below.
The text was updated successfully, but these errors were encountered:
Follow up to #7242
Add support for "Unalias case" described here #7242 (comment)
The text was updated successfully, but these errors were encountered: