Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure when submitting file with empty strings after ; #232

Closed
vvysotskyi opened this issue Nov 30, 2018 · 6 comments
Closed

Failure when submitting file with empty strings after ; #232

vvysotskyi opened this issue Nov 30, 2018 · 6 comments

Comments

@vvysotskyi
Copy link
Contributor

When a file has queries (or single query) which have semicolons and empty strings after it, SQLLine 1.6 fails when it is submitted, but previous versions work fine.

For example, content of query.sql file:

select * from sys.version;

When submitting it using the next command:

sqlline -u "jdbc:drill:zk=local" --run=/tmp/query.sql

it fails alter executing the query with error:

PARSE ERROR: Encountered "<EOF>" at line 0, column 0.

It was caused by adding multiline support.

@arina-ielchiieva
Copy link
Collaborator

@snuyanzin looks like this is a regression after multiline support feature.

@snuyanzin
Copy link
Collaborator

could you please check with property value useLineContinuation==false which should turn off multiline support

@vvysotskyi
Copy link
Contributor Author

I tried with useLineContinuation=false:

 bin/sqlline -u "jdbc:drill:zk=local" --useLineContinuation=false --run=/tmp/query.sql

but it also fails with the same error.

I tried different attempts including two = to avoid the case when I incorrectly set this option

@snuyanzin
Copy link
Collaborator

snuyanzin commented Nov 30, 2018

Thank you for checking.
yes I see that it will not take effect here.

Here is the solution which could satisfy mentioned case f34cec6. However I found several more cases which also fail in SQLLine 1.5.0 e.g. file with

select 'multiline;
string;
value;
'
;

so will try to manage them within this issue

@snuyanzin
Copy link
Collaborator

Here https://github.com/snuyanzin/sqlline/tree/SQLLINE_232 I was able to start using the only one parser for both files and interactive mode.
After such approach all the issues started being looked like fixed.
Still testing, I will make a PR in case of all tests get to success.

@julianhyde
Copy link
Owner

Fixed in 10335b4, PR #233.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants