@@ -794,6 +794,8 @@ public class SessionVariable implements Serializable, Writable {
794794
795795 public static final String READ_HIVE_JSON_IN_ONE_COLUMN = "read_hive_json_in_one_column" ;
796796
797+ public static final String CTE_MAX_RECURSION_DEPTH = "cte_max_recursion_depth" ;
798+
797799 /**
798800 * Inserting overwrite for auto partition table allows creating partition for
799801 * datas which cannot find partition to overwrite.
@@ -1012,6 +1014,11 @@ public static double getHotValueThreshold() {
10121014 }, varType = VariableAnnotation .DEPRECATED )
10131015 public int minScanSchedulerConcurrency = 0 ;
10141016
1017+ @ VariableMgr .VarAttr (name = CTE_MAX_RECURSION_DEPTH , needForward = true , description = {
1018+ "CTE递归的最大深度,默认值100" ,
1019+ "The maximum depth of CTE recursion. Default is 100" })
1020+ public int cteMaxRecursionDepth = 100 ;
1021+
10151022 // By default, the number of Limit items after OrderBy is changed from 65535 items
10161023 // before v1.2.0 (not included), to return all items by default
10171024 @ VariableMgr .VarAttr (name = DEFAULT_ORDER_BY_LIMIT , affectQueryResultInExecution = true )
@@ -4883,7 +4890,7 @@ public TQueryOptions toThrift() {
48834890 tResult .setInvertedIndexSkipThreshold (invertedIndexSkipThreshold );
48844891
48854892 tResult .setInvertedIndexCompatibleRead (invertedIndexCompatibleRead );
4886-
4893+ tResult . setCteMaxRecursionDepth ( cteMaxRecursionDepth );
48874894 tResult .setEnableParallelScan (enableParallelScan );
48884895 tResult .setParallelScanMaxScannersCount (parallelScanMaxScannersCount );
48894896 tResult .setParallelScanMinRowsPerScanner (parallelScanMinRowsPerScanner );
0 commit comments