Re: Calcite on Traces / Industry 4.0 data

2018-10-25 Thread Julian Feinauer
I just noted that I forgot to comment on Flinks Implementation, sorry. I went through the patch which implemented basic functionality in the master[1] and I think that we cannot learn much from their approach directly as they reduce it to a CEP Pattern which is then forwarded to CEP where m

Re: Calcite on Traces / Industry 4.0 data

2018-10-25 Thread Julian Feinauer
Hi Julian, I filed a Jira form y general suggestion about "Timeseries SQL" (CALCITE-2640). For the discussion in the other thread, I had a look into the present state of the code (from you and Zhiqiang He) for parsing and the logical node. I also thought about the necessary implementation for th

[jira] [Created] (CALCITE-2642) Checkstyle complains that maven-wrapper.properties is missing a header

2018-10-25 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-2642: Summary: Checkstyle complains that maven-wrapper.properties is missing a header Key: CALCITE-2642 URL: https://issues.apache.org/jira/browse/CALCITE-2642 Project: Cal

Re: scrolling in ElasticSearch adapter

2018-10-25 Thread Andrei Sereda
There is new Composite Aggregation (still in beta) which allows pagination with aggregates. It is available on versions >= 5.6 (unfortunately we have to support 2.6+). To sum up:

Re: scrolling in ElasticSearch adapter

2018-10-25 Thread Kevin Risden
What I was saying is that scrolling is the only way to ensure you get correct results coming back from Elasticsearch if you are going to do more processing. https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html As long as you delete the scroll at the end its n

[jira] [Created] (CALCITE-2641) DATE and TIMESTAMP arguments to user-defined table function

2018-10-25 Thread Piotr Bojko (JIRA)
Piotr Bojko created CALCITE-2641: Summary: DATE and TIMESTAMP arguments to user-defined table function Key: CALCITE-2641 URL: https://issues.apache.org/jira/browse/CALCITE-2641 Project: Calcite

Re: scrolling in ElasticSearch adapter

2018-10-25 Thread Andrei Sereda
Julian, > Do you need to generate a different plan (i.e. a different tree of RelNodes) > for scrolling vs non-scrolling? The plan is same. I just need to construct a different ES query and batching Enumerator On Thu, Oct 25, 2018 at 1:31 PM Julian Hyde wrote: > > Do you need to generate a diffe

Re: scrolling in ElasticSearch adapter

2018-10-25 Thread Andrei Sereda
Hi Kevin, You suggest to use scrolling for all elastic queries ? Even when there are predicates ? Some questions : 1) Scrolling has a runtime overhead for elastic cluster. Having it enabled by default (against vendor recommendation) is risky. Does it (not) cause issues in Solr ? 2) Scrolling doe

Calcite-Master - Build # 947 - Still Failing

2018-10-25 Thread Apache Jenkins Server
The Apache Jenkins build system has built Calcite-Master (build #947) Status: Still Failing Check console output at https://builds.apache.org/job/Calcite-Master/947/ to view the results.

Re: scrolling in ElasticSearch adapter

2018-10-25 Thread Kevin Risden
> > There is one more “issue”. Currently select * from elastic returns at most > 10 rows (in calcite). This is consistent with elastic behaviour which > limits result set to 10 documents (unless size is specified). In Solr land for the Calcite integration it uses the /export handler or streaming

Calcite-Master - Build # 946 - Still Failing

2018-10-25 Thread Apache Jenkins Server
The Apache Jenkins build system has built Calcite-Master (build #946) Status: Still Failing Check console output at https://builds.apache.org/job/Calcite-Master/946/ to view the results.

Calcite-Master - Build # 945 - Still Failing

2018-10-25 Thread Apache Jenkins Server
The Apache Jenkins build system has built Calcite-Master (build #945) Status: Still Failing Check console output at https://builds.apache.org/job/Calcite-Master/945/ to view the results.

Re: scrolling in ElasticSearch adapter

2018-10-25 Thread Julian Hyde
Do you need to generate a different plan (i.e. a different tree of RelNodes) for scrolling vs non-scrolling? If so, it’s certainly inconvenient that you don’t know until execute time whether they want scrolling. A possible solution would be to generate TWO plans - one scrolling, one non-scrollin

Re: Timestamp as a parameter of UDF

2018-10-25 Thread Julian Hyde
Two existing JIRA cases that relate to this are https://issues.apache.org/jira/browse/CALCITE-1041 and https://issues.apache.org/jira/browse/CALCITE-986 . This case seems different because i

Re: Timestamp as a parameter of UDF

2018-10-25 Thread ptr.bo...@gmail.com
Will try, thanks. On Thu, Oct 25, 2018 at 2:16 PM Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > Then it might be a bug > in org/apache/calcite/linq4j/tree/OptimizeShuttle.java:277 > Have you tried to comment that branch out for test purposes? > > Vladimir > -- Piotr Bojko http://ab

Re: Timestamp as a parameter of UDF

2018-10-25 Thread Vladimir Sitnikov
Then it might be a bug in org/apache/calcite/linq4j/tree/OptimizeShuttle.java:277 Have you tried to comment that branch out for test purposes? Vladimir

Re: Timestamp as a parameter of UDF

2018-10-25 Thread ptr.bo...@gmail.com
Vladimir, TimestampString with toString = 2013-01-01 01:01:01 On Thu, Oct 25, 2018 at 1:58 PM Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > Piotr>I've got following exception and wondering whether I am missing > something > > It sounds like a bug. > > Piotr>value 2013-01-0101:01:01 d

[jira] [Created] (CALCITE-2640) Support for SQL on Timeseries / Traces

2018-10-25 Thread Julian Feinauer (JIRA)
Julian Feinauer created CALCITE-2640: Summary: Support for SQL on Timeseries / Traces Key: CALCITE-2640 URL: https://issues.apache.org/jira/browse/CALCITE-2640 Project: Calcite Issue Type

Re: Timestamp as a parameter of UDF

2018-10-25 Thread Vladimir Sitnikov
Piotr>I've got following exception and wondering whether I am missing something It sounds like a bug. Piotr>value 2013-01-0101:01:01 does not match type class java.sql.Timestamp Would you please set a breakpoint and/or just print the class of "value" at ConstantExpression.java:49 ? Vladimir

Timestamp as a parameter of UDF

2018-10-25 Thread ptr.bo...@gmail.com
Hello, I am trying to create UDF with java.sql.Timestamp as a parameter: public static QueryableTable getTable( @Parameter(name = "Projection") String projection, @Parameter(name = "Query") String query, @Parameter(name = "Test Timestamp") Timestamp timestamp) But when using following UDF like t

Fwd: How to pass model.json location in jar packaging

2018-10-25 Thread Shashwat Kumar
I am trying to connect to calcite using java via following statement. connection = DriverManager.getConnection("jdbc:calcite:model=model.json", "admin", "admin"); Its working fine when running main class directly. However when I am packaging it inside jar and keeping model.json in resource folder

Re: scrolling in ElasticSearch adapter

2018-10-25 Thread Christian Beikov
Hey Andrei, I don't have an answer for how you can access these settings from within the adapter nor how one could do that via RelNodes but the suggestion to use DataContext for that purpose sounds reasonable. Maybe someone else has an idea? Anyway, since these are settings that don't affect

Re: scrolling in ElasticSearch adapter

2018-10-25 Thread Stamatis Zampetakis
For the sake of the discussion, I outline below a few ideas which may be of some use. Andrei>..elastic doesn't natively supports transactions. Scrollable results are "serializable" only for single query not for multiple (which might confuse users using transactions on the client side). One option