Hi Kunal,

wow I never thought of that with the comments but it makes perfect sense. 
Thanks! I looked for a similar setting in intellij but couldn't find one so 
have filed a bug. I think it would be helpful to others to put the info below 
onto the page https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/

Regards and thanks again,
David


-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:[email protected]] 
Gesendet: Mittwoch, 3. Mai 2017 22:54
An: [email protected]
Betreff: Re: Quoting queries

Hi David


Just got back a reply from SQuirreL developers. The truncation occurs due to 
the '/*..*/ being treated as multi-line comments.


The steps to enable SQuirreL to submit such queries without truncation is to 
disable the comments being submitted.

------------------------------------------------------------------------------

Reference: https://sourceforge.net/p/squirrel-sql/bugs/1300/


Please got to menu File -> New Session Properties -> Tab SQL ->

Uncheck the "Remove multi line comment (/.../) from SQL before sending to 
database" checkbox in the lower part of the panel.
------------------------------------------------------------------------------

This worked for me. I'm presuming there *might* be something similar for other 
tools as well.

I'll close the ticket with SQuirreL in the meanwhile.

Kunal

________________________________
From: Kunal Khatua <[email protected]>
Sent: Wednesday, May 3, 2017 10:05:21 AM
To: [email protected]
Subject: Re: Quoting queries


Excellent!


We'd really appreciate it if you can open the ticket with IntelliJ. I'm hoping 
that the query text truncation is just a bug and not intentional.


I'll try to reach out to the developers behind the other two tools.


Thanks, David!


Kunal


P.S: On a side, were the errors with SQL-Workbench and Jetbrains the exact same 
truncation?

________________________________
From: Lane David (ST-ESS/MKP3.2) <[email protected]>
Sent: Wednesday, May 3, 2017 2:11:00 AM
To: [email protected]
Subject: AW: Quoting queries

Hi Kunal,

I tried dbeaver and it works thanks! I see what you say that everything is grey 
after the wildcard, but the query is executed and the results presented.

BTW, it's not just squirrel but also
http://www.sql-workbench.net/
SQL Workbench/J - Home<http://www.sql-workbench.net/>
www.sql-workbench.net<http://www.sql-workbench.net>
Please note that SQL Workbench/J has no relation to the product MySQL Workbench 
which is maintained and owned by Oracle. If you are looking for MySQL Workbench 
...



https://www.jetbrains.com/idea/
IntelliJ IDEA the Java IDE<https://www.jetbrains.com/idea/>
www.jetbrains.com<http://www.jetbrains.com>
Every aspect of IntelliJ IDEA is specifically designed to maximize developer 
productivity. Together, powerful static code analysis and ergonomic design make 
...




that don't work. Maybe it would be useful to contact somebody on the team of 
either. I can open a ticket at intellij if you want as we have paid support.

Regards,
David

-----Ursprüngliche Nachricht-----
Von: Kunal Khatua [mailto:[email protected]]
Gesendet: Dienstag, 2. Mai 2017 20:02
An: [email protected]
Betreff: Re: Quoting queries

Hi David


I tried the queries on SQuirreL and everything following the asterisk in the 
'table' name is truncated when the query is submitted by it.


However, when I tried another tool: DBeaver (http://dbeaver.jkiss.org/)

it worked!

Like SQuirreL, the DBeaver client's SQL Editor also shows the part following 
the asterisk in a grey color (indicating that it interprets the text as a 
comment). But, the client does submit the query.

So, this is not a bug in Drill, but a limitation within SQuirreL.

It is possible that the SQuirreL parser is limited in its ability to interpret 
the SQL, or that it is explicitly limiting this to avoid any SQL Injection 
(that's my guess).

I'd recommend you try working with DBeaver in the meanwhile. The tool actually 
has Drill drivers available (under Hadoop), so setup should be a breeze!

~ Kunal



________________________________
From: Lane David (ST-ESS/MKP3.2) <[email protected]>
Sent: Monday, May 1, 2017 11:31:47 PM
To: [email protected]
Subject: AW: Quoting queries

Hi Ted,

I think the steps were included: see the next few lines. But in re-reading the 
emails I saw that Kunal said to file a bug which I somehow missed on first 
reading. I'll do that then.

> > > The following doesn't work:
> > > select * from `a/*/c.json`;
> > >
> > > Error: PARSE ERROR: Lexical error at line 1, column 44.  Encountered:
> > > <EOF> after : "`a"
> > >
> > > I tried the following:
> > > select * from `a/\*/c.json`;
> > > Error: VALIDATION ERROR: From line 1, column 33 to line 1, column 60:
> > > Table 'a/\*/c.json' not found
> > > And various other combinations of \, /, ', etc.

-----Ursprüngliche Nachricht-----
Von: Ted Dunning [mailto:[email protected]]
Gesendet: Montag, 1. Mai 2017 18:13
An: user <[email protected]>
Betreff: Re: Quoting queries

On Fri, Apr 28, 2017 at 2:50 AM, Lane David (ST-ESS/MKP3.2) < 
[email protected]> wrote:

> but even it does work with a self-written java program how does this 
> help me or what does it mean? I have tried 3 "off the shelf" java 
> clients and they all don't work with: in my opinion it would be 
> worthwhile finding out why. There is even a help page that details how 
> to get drill working with
> squirrel:
> https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/
>

The issue is that it helps the community figure out what is happening.

>From my reading of the email record, I don't see a clear replication of the 
>problem. You clearly have it with squirrel. Kunal seems to have partially 
>replicated the problem, but it isn't clear that the problem he sees is the 
>same as what you see. In particular, in debugging a problem, it is really 
>important to get something that works and something that doesn't. IF you can 
>verify that what works for Kunal works for you, then the guys have something 
>to munch on.

I will check with him off-line.

Reply via email to