kumarUjjawal commented on code in PR #25807:
URL: https://github.com/apache/datafusion/pull/25807#discussion_r4171500448


##########
datafusion-cli/src/exec.rs:
##########
@@ -183,10 +186,12 @@ pub async fn exec_from_repl(
                             continue
                         },
                     }
-                    // dialect might have changed
-                    rl.helper_mut().unwrap().set_dialect(
-                        
&ctx.task_ctx().session_config().options().sql_parser.dialect,
-                    );
+                    // dialect or recursion limit might have changed
+                    let task_ctx = ctx.task_ctx();
+                    let sql_parser = 
&task_ctx.session_config().options().sql_parser;
+                    let helper = rl.helper_mut().unwrap();
+                    helper.set_dialect(&sql_parser.dialect);
+                    
helper.set_recursion_limit(sql_parser.recursion_limit.get());

Review Comment:
   If a file run with `\i` changes the recursion limit, the REPL helper keeps 
its previous limit. `Command::Include` runs SQL through `exec_from_lines`, but 
this refresh runs only in the SQL-input branch. After an included file raises 
the limit to 100, the validator still rejects a 60-deep query at the old limit 
of 51. Refresh the helper after backslash commands too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to