[GitHub] drill pull request: Fix for DRILL-3869

2015-09-30 Thread aleph-zero
GitHub user aleph-zero opened a pull request:

https://github.com/apache/drill/pull/178

Fix for DRILL-3869

Fixes a minor bug in the web UI whereby a query submitted with a
trailing ';' would cause an exception to be thrown.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/aleph-zero/drill issues/DRILL-3869

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/178.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #178


commit 5332efab54578de56d1080734305d26e582a5b1c
Author: aleph-zero 
Date:   2015-09-30T20:56:21Z

Fix for DRILL-3869

Fixes a minor bug in the web UI whereby a query submitted with a
trailing ';' would cause an exception to be thrown.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Fix for DRILL-3869

2015-09-30 Thread jaltekruse
Github user jaltekruse commented on the pull request:

https://github.com/apache/drill/pull/178#issuecomment-144543634
  
This isn't a complete solution, you can put a semi-colon in a string 
literal (and maybe a column name in backticks?), so this might end up chopping 
queries in half. I think this is the real reason why this bug wasn't fixed 
earlier, because it needs to be handled at the parser level. Its possible that 
calciate handles this and we are not making use of it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Fix for DRILL-3869

2015-09-30 Thread adeneche
Github user adeneche commented on the pull request:

https://github.com/apache/drill/pull/178#issuecomment-144545578
  
a quick hack would be to just check if the very last character of the query 
is a semi-colon and remove it from the query. I think this would solve 90% of 
the cases where this could happen


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Fix for DRILL-3869

2015-09-30 Thread vkorukanti
Github user vkorukanti commented on the pull request:

https://github.com/apache/drill/pull/178#issuecomment-144545927
  
I think we can check how SqlLine is trimming the ; at the end and follow 
the same procedure.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Fix for DRILL-3869

2015-09-30 Thread jaltekruse
Github user jaltekruse commented on the pull request:

https://github.com/apache/drill/pull/178#issuecomment-144550151
  
@adeneche agreed, this is a good solution for now. If someone submits 
multiple queries I think it would be fine if they get back a parsing error that 
mentions semi-colon, which is already happening today, just too aggressively.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Fix for DRILL-3869

2015-09-30 Thread jaltekruse
Github user jaltekruse commented on the pull request:

https://github.com/apache/drill/pull/178#issuecomment-144550362
  
One small improvement, I would make sure we run a trim() on the string and 
then check the last character, just to cover the case of a semi-colon followed 
by whitespace.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Fix for DRILL-3869

2015-10-01 Thread aleph-zero
Github user aleph-zero commented on the pull request:

https://github.com/apache/drill/pull/178#issuecomment-144817688
  
Addressed above comments by trimming whitespace from the query string prior 
to trimming any trailing ';' character.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Fix for DRILL-3869

2015-10-01 Thread jaltekruse
Github user jaltekruse commented on the pull request:

https://github.com/apache/drill/pull/178#issuecomment-144819302
  
The change looks good, but thinking about this a little more it might make 
sense to fix this a little higher up the chain. If we fix this where queries 
are actually accepted by the Drill server, then this same fix would also apply 
to the JDBC and C++ interfaces. I believe the only reason this happens to work 
with sqlline is because it is stripping it off on the client before sending the 
query. As long as we're making a change on the server, I think we should put it 
as close to actual execution as possible.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Fix for DRILL-3869

2015-10-01 Thread jaltekruse
Github user jaltekruse commented on the pull request:

https://github.com/apache/drill/pull/178#issuecomment-144823271
  
I just saw that the conversation fragmented on JIRA, Jacques point makes 
sense to me +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Fix for DRILL-3869

2015-10-01 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/drill/pull/178


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---