sarutak commented on code in PR #7076:
URL: https://github.com/apache/arrow-datafusion/pull/7076#discussion_r1272890594


##########
datafusion-cli/src/exec.rs:
##########
@@ -88,7 +88,8 @@ pub async fn exec_from_lines(
     }
 
     // run the left over query if the last statement doesn't contain ‘;’
-    if !query.is_empty() {
+    // ignore if it only consists of '\n'
+    if query.contains(|c| c != '\n') {

Review Comment:
   @alamb Thank you for looking into this PR!
   I don't think we need to checn `' '` here because lines are 
[trimmed](https://github.com/apache/arrow-datafusion/pull/7076/files#diff-00370e7628c93a0c9da5107fa0d065240ff09d0425d9559b8662fb0b2e10feebL72).
   Actually, `' '` and any other whitespaces like `U+3000` are ignored even 
though they are at the end of a file.



-- 
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]

Reply via email to