Runtime Exception while using SqlParse.

2021-08-16 Thread Jariv Narup
Hi Team, I am getting the following exception while trying to parse a SQL statement into its tokens. Is this expected behavior? If not, what would you suggest to work around this problem. The particulars are given below: *Issue:* *Method threw 'java.lang.RuntimeException' exception. Cannot eval

Re: Runtime Exception while using SqlParse.

2021-08-17 Thread Thomas Rebele
Hi Jariv, are you sure you want to join two columns of Purchase: *Purchase.Product_ID = Purchase.ID*? If that's the cause of the exception, the error message could be improved. Cordialement / Best Regards, *Thomas Rebele, PhD* | R&D Developer | Germany | www.tibco.com On Mon, Aug 16, 2021 at 10

Re: Runtime Exception while using SqlParse.

2021-08-18 Thread Jariv Narup
Hi Thomas, That is my bad - a carry over from the debugging. However the error still persists even with the following query: *SELECT Purchase.Purchase_Date, Products.Product_Name FROM Purchase JOIN Products ON Purchase.Product_ID = Products.ID WHERE Purchase.Quantity > 10* This is what I see:

Re: Runtime Exception while using SqlParse.

2021-08-18 Thread Julian Hyde
Yes, the error message is not good enough. Can you please log a bug? The error comes from org.apache.calcite.linq4j.tree.BinaryExpression, which I very much doubt happens at parse time. If you can add a test case, or a complete error stack, that would be appreciated. > On Aug 18, 2021, at 9:30

Re: Runtime Exception while using SqlParse.

2021-08-18 Thread Yanjing Wang
Further, you may try sqlNode.toSqlString().getSql(). Julian Hyde 于2021年8月19日周四 上午5:48写道: > Yes, the error message is not good enough. Can you please log a bug? The > error comes from org.apache.calcite.linq4j.tree.BinaryExpression, which I > very much doubt happens at parse time. If you can add