You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/07/24 19:42:06 UTC
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #7076: Ignore blank lines and comments at the end of query files for datafusion-cli
alamb commented on code in PR #7076:
URL: https://github.com/apache/arrow-datafusion/pull/7076#discussion_r1272677484
##########
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:
maybe we could also check for spaces?
```suggestion
if query.contains(|c| c != '\n' && c != ' ') {
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org