Fwd: ElasticSearch5 not working

2017-09-26 Thread Kunwar Deep Singh Toor
-- Forwarded message -- From: Kunwar Deep Singh Toor Date: Mon, Sep 25, 2017 at 8:16 PM Subject: ElasticSearch5 not working To: dev-i...@calcite.apache.org Hi, I have been trying to connect to the ElasticSearch suing ES adapter through sqlline. I was able

Re: not in on sub query not working as expected.(calcite version 1.13.0)

2017-09-26 Thread Nuwan Abeysiriwardana
i have updated the test case with multiple columns table. still issue exist. i'll try to debug more and give you more detail on that. thanks a lot. nuwan On Wed, Sep 27, 2017 at 2:01 AM, Julian Hyde wrote: > Thanks for the test case. Run with -Dcalcite.debug, take a look at

Re: not in on sub query not working as expected.(calcite version 1.13.0)

2017-09-26 Thread Julian Hyde
Thanks for the test case. Run with -Dcalcite.debug, take a look at the generated code and see whether == and .equals are being used correctly. Also see what happens if each table has two columns rather than one. Some of our “optimizations” for single-column tables may be suspect. Julian > On

Re: not in on sub query not working as expected.(calcite version 1.13.0)

2017-09-26 Thread Nuwan Abeysiriwardana
Hi Julian, i'm sorry if I'm mislead with this CSV thing. this CSV table not the calcite inbuilt csv table. this table i have tested, created by me by just implementing ScannableTable . test case created. please check below link. https://github.com/nuwansa/CalcitePlayGround thanks nuwan On

Re: not in on sub query not working as expected.(calcite version 1.13.0)

2017-09-26 Thread Julian Hyde
It works fine for me: $ cat file/src/test/resources/sales/ORDERS.csv Q:string $ cat file/src/test/resources/sales/TRADES.csv A:string $ ./sqlline -u

Re: not in on sub query not working as expected.(calcite version 1.13.0)

2017-09-26 Thread Nuwan Abeysiriwardana
Hi Julian, thanks for the quick reply.i have check the leading and trailing spaces,it looks good. execution plan as follows. EnumerableCalc(expr#0..4=[{inputs}], expr#5=[0], expr#6=[=($t1, $t5)], expr#7=[false], expr#8=[IS NOT NULL($t4)], expr#9=[true], expr#10=[IS NULL($t0)], expr#11=[null],

Re: Starting with Apache Calcite as SQLPlanner

2017-09-26 Thread Enrico Olivelli
Thank you all very much! You gave me good ideas and pointers! I hope I will find my way for indexes... I will be back with news Enrico On mar 26 set 2017, 19:50 Julian Hyde wrote: > On the subject of indexes. There are a couple of threads on this list > about how to

Re: not in on sub query not working as expected.(calcite version 1.13.0)

2017-09-26 Thread Julian Hyde
Sounds like it might be a bug. Can you do ‘explain plan’ and send the result? Also check for leading and trailing spaces in your data. > On Sep 26, 2017, at 11:11 AM, Nuwan Abeysiriwardana > wrote: > > Hi All, > i have following csv tables. > > TableA TableB

not in on sub query not working as expected.(calcite version 1.13.0)

2017-09-26 Thread Nuwan Abeysiriwardana
Hi All, i have following csv tables. TableA TableB +--+ +---+ | Q | | A | +--+ +---+ | | | | | || | | 555 || 2 | +--+ +---+ 'select Q,Q not

Re: Starting with Apache Calcite as SQLPlanner

2017-09-26 Thread Julian Hyde
On the subject of indexes. There are a couple of threads on this list about how to represent indexes as materialized views (sorted projections) so that the planner can consider using them. Phoenix has used this technique. I think you could find them if you search. Julian > On Sep 26, 2017,

Re: Starting with Apache Calcite as SQLPlanner

2017-09-26 Thread Michael Mior
Yes, using Planner does abstract away some of the details for you which could be a good way to get started. The code snippet you posted would be a good start. core/src/test/java/org/apache/calcite/tools/PlannerTest.java has a lot of examples of the use of the planner interface. If you're looking

Re: Starting with Apache Calcite as SQLPlanner

2017-09-26 Thread Gian Merlino
Druid uses Calcite for SQL parsing and planning. The code is all in https://github.com/druid-io/druid/tree/master/sql/src/main/java/io/druid/sql if you want to take a look. The user-facing docs are at http://druid.io/docs/latest/querying/sql.html if you want to see how users interact with it. The

Re: Starting with Apache Calcite as SQLPlanner

2017-09-26 Thread Enrico Olivelli
Thank you for your Quick response Michael. I will try to follow your suggestions I will be back soon with my results There is another API Frameworks.getPlanner() which does something similar Planner planner = Frameworks.getPlanner(config); SqlNode parsed = planner.parse("SELECT * FROM MYTABLE");

Re: Starting with Apache Calcite as SQLPlanner

2017-09-26 Thread Michael Mior
That's definitely possible and is definitely the kind of use case Calcite is designed for. In terms of Calcite APIs, the approach would be something like the following: Use SqlParser to get a SqlNode representing the query Implement CatalogReader to provide access to the schema Convert the

Starting with Apache Calcite as SQLPlanner

2017-09-26 Thread Enrico Olivelli
Hi, I would like to use Calcite as SQLPlanner in my open source project HerdDB https://github.com/diennea/herddb HerdDB is a distributed database built in Java, it is essentially a distributed key-value store but is has an SQL layer which is the entrypoint for JDBC clients. Currently we have a