Closed tiboun closed 4 months ago
Given the following queries
SELECT ARRAY(SELECT AS STRUCT 1 a, 2 b)
SELECT AS VALUE STRUCT(1 AS a, 2 AS b) xyz
We may be translated them respectively to :
SELECT array_value({'a': 1, 'b': 2});
and
SELECT {'a': 1, 'b': 2} AS xyz
A more complex version of the first query would be
SELECT ARRAY(SELECT AS STRUCT 1 a, 2 b union all SELECT AS STRUCT 3 a, 4 b)
which get translated into
SELECT array_value({'a': 1, 'b': 2}, {'a': 3, 'b': 4});
Fixed via d5352cfd8214e8a70e14ffec4cce7332bfafb218 though it depends on cutting edge JSQLParser version.
Given the following queries
We may be translated them respectively to :
and
A more complex version of the first query would be
which get translated into