These settings are available in system.settings and are autogenerated from the ClickHouse snapshot.
max_ast_depth
TypeUInt64Default1000
The maximum nesting depth of a query syntactic tree. If exceeded, an exception is thrown.
max_ast_elements
TypeUInt64Default50000
The maximum number of elements in a query syntactic tree. If exceeded, an exception is thrown.