Skip to content

Commit 2402caa

Browse files
committed
recursive cte be part
1 parent 680a52e commit 2402caa

File tree

10 files changed

+1803
-1
lines changed

10 files changed

+1803
-1
lines changed

fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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);

gensrc/thrift/PaloInternalService.thrift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ struct TQueryOptions {
410410

411411
175: optional bool enable_fuzzy_blockable_task = false;
412412
176: optional list<i32> shuffled_agg_ids;
413+
177: optional i32 cte_max_recursion_depth;
413414

414415
177: optional bool enable_extended_regex = false;
415416
// Target file size in bytes for Iceberg write operations

0 commit comments

Comments
 (0)