aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/json/json_query/passing_exception.sql
blob: 151e6dbcd10c2827709a478d40c2c17c13ba5b90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* syntax version 1 */
/* postgres can not */
/* custom error:Expected data or optional of data, but got: Tuple<Int32,Int32>*/

$json = CAST(@@{
    "key": 123
}@@ as Json);

-- Tuple type is not supported for variables
SELECT
    JSON_QUERY(
        $json, "strict $var"
        PASSING
            AsTuple(1, 2) as var
        WITH UNCONDITIONAL ARRAY WRAPPER
    );