@@ -18595,6 +18595,10 @@ FROM
18595
18595
JSON_TABLE (
18596
18596
context_item , path_expression PASSING { value AS varname } , ...
18597
18597
COLUMNS ( json_table_column , ... )
18598
+
18599
+ PLAN DEFAULT ( { INNER | OUTER } , { CROSS | UNION }
18600
+ | { CROSS | UNION } , { INNER | OUTER } )
18601
+
18598
18602
)
18599
18603
18600
18604
where json_table_column is:
@@ -18656,7 +18660,8 @@ where json_table_column is:
18656
18660
The rows produced by JSON_TABLE are laterally
18657
18661
joined to the row that generated them, so you do not have to explicitly join
18658
18662
the constructed view with the original table holding
JSON
18659
- data.
18663
+ data. Optionally, you can specify how to join the columns returned
18664
+ by NESTED PATH using the PLAN DEFAULT clause.
18660
18665
18661
18666
18662
18667
@@ -18669,22 +18674,6 @@ where json_table_column is:
18669
18674
the resulting rows are joined to the parent row.
18670
18675
18671
18676
18672
-
18673
- Columns with parent/child relationship are joined using
18674
- LEFT OUTER JOIN , so that the parent row
18675
- is always included into the output even if it does not have any child rows
18676
- after joining the data returned by NESTED PATH ,
18677
- with NULL values inserted into the child columns if the corresponding
18678
- values are missing.
18679
-
18680
-
18681
-
18682
- Sibling columns are joined using
18683
- FULL OUTER JOIN ON FALSE , so that both parent and child
18684
- rows are included into the output, with NULL values inserted
18685
- into both child and parrent columns for all missing values.
18686
-
18687
-
18688
18677
18689
18678
18690
18679
Parameters
@@ -18856,6 +18845,10 @@ where json_table_column is:
18856
18845
JSON_TABLE expressions in an SQL statement.
18857
18846
18858
18847
18848
+
18849
+ You can use the PLAN DEFAULT clause to define how
18850
+ to join the columns returned by NESTED PATH clauses.
18851
+
18859
18852
18860
18853
18861
18854
@@ -18878,8 +18871,99 @@ where json_table_column is:
18878
18871
18879
18872
18880
18873
18874
+
18875
+
18876
+ PLAN DEFAULT ( option [, ... ] )
18877
+
18878
+
18879
+
18880
+ Defines how to join the data returned by NESTED PATH
18881
+ clauses to the constructed view. The INNER and
18882
+ OUTER options define the joining plan for parent/child
18883
+ columns, while UNION and CROSS
18884
+ affect the sibling columns. You can override the default plans for all
18885
+ columns at once.
18886
+
18887
+
18888
+
18889
+ To join columns with parent/child relationship, you can use:
18890
+
18891
+
18892
+
18893
+
18894
+ INNER
18895
+
18896
+
18897
+
18898
+
18899
+ Use INNER JOIN , so that the parent row
18900
+ is omitted from the output if it does not have any child rows
18901
+ after joining the data returned by NESTED PATH .
18902
+
18903
+
18904
+
18905
+
18906
+
18907
+
18908
+ OUTER
18909
+
18910
+
18911
+
18912
+
18913
+ Use LEFT OUTER JOIN , so that the parent row
18914
+ is always included into the output even if it does not have any child rows
18915
+ after joining the data returned by NESTED PATH , with NULL values
18916
+ inserted into the child columns if the corresponding
18917
+ values are missing.
18918
+
18919
+
18920
+ This is the default option for joining columns with parent/child relationship.
18921
+
18922
+
18923
+
18924
+
18925
+
18926
+
18927
+ To join sibling columns, you can use:
18928
+
18929
+
18930
+
18931
+
18932
+
18933
+ UNION
18934
+
18935
+
18936
+
18937
+
18938
+ Use FULL OUTER JOIN ON FALSE , so that both parent and child
18939
+ rows are included into the output, with NULL values inserted
18940
+ into both child and parrent columns for all missing values.
18941
+
18942
+
18943
+ This is the default option for joining sibling columns.
18944
+
18945
+
18946
+
18947
+
18948
+
18949
+
18950
+ CROSS
18951
+
18952
+
18953
+
18954
+
18955
+ Use CROSS JOIN , so that the output includes
18956
+ a row for every possible combination of rows from the left-hand
18957
+ and the right-hand columns.
18958
+
18959
+
18960
+
18961
+
18881
18962
18882
18963
18964
+
18965
+
18966
+
18883
18967
18884
18968
18885
18969
0 commit comments