Re: SqlImplementer doesn't handle RexOver when converting Rel into SQL

2016-11-22 Thread Christian Tzolov
doesn’t support window functions, so you’ll need to add > some tests that use postgres. > > Julian > > > > On Nov 22, 2016, at 10:01 AM, Christian Tzolov <ctzo...@pivotal.io> > wrote: > > > > Hi there, > > > > Using jdbc adapter in the latest cal

SqlImplementer doesn't handle RexOver when converting Rel into SQL

2016-11-22 Thread Christian Tzolov
ance and the RexOver#window is completely ignored. This looks like a problem to me. Shall i open a Jira ticket for it? Also what should be the right way to include the RexWindow attribute in the SQL generation? Cheers, Christian -- Christian Tzolov <http://www.linkedin.com/in/tzolov> | Solution Architect, EMEA Practice Team | Pivotal <http://pivotal.io/> ctzo...@pivotal.io|+31610285517

Re: SqlImplementer doesn't handle RexOver when converting Rel into SQL

2016-11-24 Thread Christian Tzolov
November 2016 at 04:59, Julian Hyde <jh...@apache.org> wrote: > Yes, you won’t need to add “visit(Window)”. Just make SqlImplementor.toSql > handle RexOver within its expressions. > > > On Nov 22, 2016, at 12:02 PM, Christian Tzolov <ctzo...@pivotal.io> > wrote: &g

Re: Calcite jdbc driver dependencies

2016-11-21 Thread Christian Tzolov
at https://issues.apache.org/jira/browse/CALCITE-1461 > ? The fix version is 1.11.0. > > Best regards, > Gethin. > > From: Christian Tzolov <ctzo...@pivotal.io> > Sent: 21 November 2016 09:23:51 > To: dev@calcite.apache.org > Subject: Re

Calcite jdbc driver dependencies

2016-11-20 Thread Christian Tzolov
Hi, I've been working on Calcite adapter for a nosql datastore. The prototype works fine when i test it with the Sqlline command line tool. But it is not entirely clear how to use it through a jdbc driver from 3rd party tools. I've read the avatica docs but not sure if i'm getting it right. For

Re: Calcite jdbc driver dependencies

2016-11-20 Thread Christian Tzolov
dency (via the calcite-core). Could this be related to the maven-shade-plugin configuration? On 20 November 2016 at 23:52, Christian Tzolov <ctzo...@pivotal.io> wrote: > FYI, the uber jar jdbc did the job > > On 20 November 2016 at 22:34, Christian Tzolov <ctzo...@pivotal.io>

Re: Calcite jdbc driver dependencies

2016-11-20 Thread Christian Tzolov
FYI, the uber jar jdbc did the job On 20 November 2016 at 22:34, Christian Tzolov <ctzo...@pivotal.io> wrote: > Hi, > > I've been working on Calcite adapter for a nosql datastore. > > The prototype works fine when i test it with the Sqlline command line > tool. But it i

Re: Calcite jdbc driver dependencies

2016-11-20 Thread Christian Tzolov
s-compiler-jdk.jar' jars as well as excluding them from the uber jdbc jar. But the error is still there On 21 November 2016 at 00:18, Christian Tzolov <ctzo...@pivotal.io> wrote: > The uberized jdbc adapter fails with "Unable to instantiate java compiler" > when i try it with too

Re: Calcite jdbc driver dependencies

2016-11-21 Thread Christian Tzolov
something else but the root classpath. Any suggestions will be appreciated :) I've noticed similar issues reported on the Phoenix project. Cheers, Christian On 21 November 2016 at 00:44, Christian Tzolov <ctzo...@pivotal.io> wrote: > The underlying exception causing the "Un

Modifying the AST (SqlNode) on the fly

2016-11-01 Thread Christian Tzolov
be based on tables from a single JDBC database. Thanks, Christian -- Christian Tzolov <http://www.linkedin.com/in/tzolov> | Solution Architect, EMEA Practice Team | Pivotal <http://pivotal.io/> ctzo...@pivotal.io|+31610285517

Re: Modifying the AST (SqlNode) on the fly

2016-11-01 Thread Christian Tzolov
ormations is on the relational algebra (RelNode) rather than AST > (SqlNode). > > Of course, you’re welcome to use just Calcite’s SQL parser, work on the > AST, and then convert the AST back to SQL. It may be sufficient for your > task - it’s your call. > > Julian > >

Re: Modifying the AST (SqlNode) on the fly

2016-11-01 Thread Christian Tzolov
t; > > On Nov 1, 2016, at 2:38 PM, Christian Tzolov <ctzo...@pivotal.io> wrote: > > > > Thanks Julian! > > > > So i can override the whole RelNode tree from UPDATE to INSERT for > example? > > Was not sure if this is allowed in the RelNode phase. > >

Re: Rule to expand tha JdbcTableScan expression

2016-11-29 Thread Christian Tzolov
cases where planner rules don't cut it. One is field > trimming, because when you visit each node, you want to return a node > that has fewer fields.) > > On Tue, Nov 29, 2016 at 2:07 PM, Christian Tzolov <ctzo...@pivotal.io> > wrote: > > We're working on a JDBC wrapper for HA

Re: INSERT with the JdbcAdapter

2016-11-30 Thread Christian Tzolov
" \"store_id\", \"account_id\", \"exp_date\", \"time_id\"," + " \"category_id\", \"currency_id\", \"amount\")\n" + " VALUES (666, 666, TIMESTAMP '1997-01-01 00:00:00', 666, '666'

Re: Rule to expand tha JdbcTableScan expression

2016-11-30 Thread Christian Tzolov
; > > On Nov 29, 2016, at 2:07 PM, Christian Tzolov <ctzo...@pivotal.io> > wrote: > > > > We're working on a JDBC wrapper for HAWQ (SQL-on-HADOOP) that hopefully > > would allow us "emulate" UPDATE and DELETE operations while using only > > append-onl

Re: INSERT with the JdbcAdapter

2016-11-30 Thread Christian Tzolov
2016 at 19:23, Julian Hyde <jh...@apache.org> wrote: > It’s a missing feature. The JDBC adapter does not currently do DML. Can > you please log a JIRA case to track. > > Julian > > > > On Nov 30, 2016, at 7:56 AM, Christian Tzolov <ctzo...@pivotal.io>

Re: About the Spatial functionality

2017-11-28 Thread Christian Tzolov
[1] AS DOUBLE)) FROM "geode"."Zips"LIMIT 10": From line 1, column 16 to line 1, column 79: No match found for function signature ST_Point(, ) (state=,code=0) On 28 November 2017 at 09:32, Christian Tzolov <ctzo...@pivotal.io> wrote: > @Julian are there some tests

Re: About the Spatial functionality

2017-11-28 Thread Christian Tzolov
oot schema, the following should be sufficient: > > ModelHandler.addFunctions(rootSchema, null, ImmutableList.of(), > GeoFunctions.class.getName(), "*", true); > > -- > Michael Mior > mm...@apache.org > > 2017-11-28 4:27 GMT-05:00 Christian Tzolov <c

Re: About the Spatial functionality

2017-11-28 Thread Christian Tzolov
017 at 18:33, Michael Mior <mm...@uwaterloo.ca> wrote: > I believe that should work. I'll let others correct me if I'm missing the > boat here. > > -- > Michael Mior > mm...@apache.org > > 2017-11-28 12:31 GMT-05:00 Christian Tzolo

Re: About the Spatial functionality

2017-11-28 Thread Christian Tzolov
is related with my adapter implementation. Thanks for the support! On 28 November 2017 at 18:43, Christian Tzolov <ctzo...@pivotal.io> wrote: > Unfortunately it didn't help still get " No match found for function > signature ST_Point(, )" > ​. > > ​Could it be that i ne

Handling Functions in custom adapter implementations?

2017-11-28 Thread Christian Tzolov
Hey there, I have another question related to ​ ​ handling ​​ spatial ( ​or​ any) functions in custom adapter implementations. For e ​ ​ example the ​ ​ ​rel . plan for the following query ​(​ with ​​ spatial function ​)​ EXPLAIN PLAN FOR SELECT "city", ST_Point( cast("loc" [0] AS

Apache Zeppelin with Calcite JDBC adapters

2017-11-22 Thread Christian Tzolov
). As a temporal solution you can build Zeppelin from my fork ( https://github.com/tzolov/zeppelin/tree/calcite) and play with Zeppelin and Calcite adapters. Cheers, Christian -- Christian Tzolov <http://www.linkedin.com/in/tzolov> | Principle Software Engineer | Pivotal <http://pivotal.io

Re: Apache Zeppelin with Calcite JDBC adapters

2017-11-22 Thread Christian Tzolov
operty to control > autoCommit and can't use the Connection#setAutoCommit(boolean) method? > > > On 11/22/17 8:09 AM, Christian Tzolov wrote: > >> FYI, >> >> you can use the Apache Zeppelin's generic JDBC interpreter to plug a >> Calcite based JDBC adapter. >

Re: Apache Zeppelin with Calcite JDBC adapters

2017-11-23 Thread Christian Tzolov
utoCommit” an accepted parameter in > the JDBC URL? I think it would solve this problem. > > > On Nov 22, 2017, at 8:52 AM, Christian Tzolov <ctzo...@pivotal.io> > wrote: > > > > Hi Josh, > > > > Here > > ​is > > ​Z > > eppelin >

Re: Handling Functions in custom adapter implementations?

2017-11-28 Thread Christian Tzolov
GeodeTableScanRel(table=[[geode, Zips]]) > > > > ​Given that my ​GeodeProjectRel implementation doesn't know about the > > *ST_POIN*T this should fail? Or somehow get ignored in my case. > > > > What is the correct way to handle such cases? > > > > Perhaps in my Project rule i should make sure that projection with > function > > expression should not be matched so it falls back to the the > > EnumerableProjection? > > > > Thanks, > > Christian > > > -- Christian Tzolov <http://www.linkedin.com/in/tzolov> | Principle Software Engineer | Spring <https://spring.io/>.io | Pivotal <http://pivotal.io/> | ctzo...@pivotal.io

About the Spatial functionality

2017-11-27 Thread Christian Tzolov
Hey there, I'm exploring the new Spatial (https://calcite.apache.org/docs/spatial.html) functionality and i've been trying to figure out what are the minimal requirements for using it with my custom adapter. Following the guidelines i've set LENIENT conformance in my jdbc URL (

Re: About the Spatial functionality

2017-11-28 Thread Christian Tzolov
. > > Julian > > > On Nov 27, 2017, at 2:59 AM, Christian Tzolov <ctzo...@pivotal.io> > wrote: > > > > Hey there, > > > > I'm exploring the new Spatial (https://calcite.apache.org/ > docs/spatial.html) > > functionality and i've been trying to

Re: About the Spatial functionality

2017-12-02 Thread Christian Tzolov
l join of polygons (cities) to polygons (countries). > I have in mind a materialized view where polygons are sliced into bounding > “tiles” and I think it should speed up this kind of query. > > Julian > > > > On Dec 1, 2017, at 9:09 AM, Christian Tzolov <ctzo...@piv

"Streaming aggregation requires at least one monotonic expression"

2017-12-03 Thread Christian Tzolov
ost") AS "retailCost" FROM "BookMaster" GROUP BY FLOOR("rowtime" TO HOUR) It ​ complains of a missing monotonic expression: ​ >From line 5, column 1 to line 5, column 33: Streaming aggregation requires at least one monotonic expression in GROUP BY claus

Setting connection's auto-commit property from the configuration files?

2017-11-18 Thread Christian Tzolov
Is there a way to set the ConnectionProperties#setAutoCommit(boolean val) from the model.json or perhaps via the jdbc URL attributes? E.g. i'm looking for any configuration option that wouldn't require writing code such as Connection.setAutoCommit(...) -- Christian Tzolov <h

Network access to /vlsi/calcite-test-dataset VM

2017-11-11 Thread Christian Tzolov
I'm adding Apache Geode provisioning to the /vlsi/calcite-test-dataset test VM I can build and start the Vagrant environment, i can "vagrant ssh" and verify that all the services are running that the required ports are forwarded. But i can't access those services from the host (MacOSX) machine.

Re: Project + Sort on single and on multiple columns

2017-11-11 Thread Christian Tzolov
fter > the > > sort will result in the same estimated cost. One approach would be to > scale > > the cost of the projection based on the fraction of columns projected. > > > > -- > > Michael Mior > > mm...@apache.org > > > > 2017-11-10 12:

Project + Sort on single and on multiple columns

2017-11-10 Thread Christian Tzolov
​I've observed in my no-sql adapter ​ implementation that for q ueries with ​P roject ​ + ​S ort by ​ONE column ​t​ he ​Project ​is pushed (as expected) ​ before the Sort but for Sort ​on MULTIPLE columns ​the Sort is before the Project. For example ​for a query with one sort column: SELECT

Re: Project + Sort on single and on multiple columns

2017-11-10 Thread Christian Tzolov
r the > sort will result in the same estimated cost. One approach would be to scale > the cost of the projection based on the fraction of columns projected. > > -- > Michael Mior > mm...@apache.org > > 2017-11-10 12:42 GMT-05:00 Christian Tzolov <ctzo...@pivotal.io>: >

Re: Network access to /vlsi/calcite-test-dataset VM

2017-11-12 Thread Christian Tzolov
:01 ​ ​ inet *10.211.55.1* netmask 0xff00 broadcast 10.211.55.255 Using the IP I can connect to ​ and access the services on the VM. ​ B ut i guess you have another way to do this without private_network definitions? ​ On 11 November 2017 at 12:52, Christian Tzolov <ctzo...@pivotal.io

Re: COUNT returns Integer while Calcite expects Long

2017-11-09 Thread Christian Tzolov
r code for the adapter? This would be helpful in > understanding the problem. In short however, if you're pushing down > aggregations, you should just make sure that you convert the result your > adapter returns to a Long. (e.g. Long.valueOf(count.longValue())) > > -- > Mic

COUNT returns Integer while Calcite expects Long

2017-11-09 Thread Christian Tzolov
​(Calcite 1.15.0-SNASHOT and Avalitca 1.10.0)​ ​I'm workin on an adapter for in-memory NoSql ​data ​ system ​. The implementations tries to push down all supported aggregation operations, such as AVG, MAX and COUNT. It works for most of them but fails for COUNT: 0: jdbc:calcite:model= ​... >

Re: COUNT returns Integer while Calcite expects Long

2017-11-09 Thread Christian Tzolov
able to share your code for the adapter? This would be helpful in >> understanding the problem. In short however, if you're pushing down >> aggregations, you should just make sure that you convert the result your >> adapter returns to a Long. (e.g. Long.valueOf(count.longVal

Re: COUNT returns Integer while Calcite expects Long

2017-11-09 Thread Christian Tzolov
r.current needs to have > the correct type. It's hard to follow exactly what's going on with the > reflection that's happening, but you probably need to make some changes to > GeodeUtils.handleJavaObjectEntry. > > -- > Michael Mior > mm...@apache.org > > 2017-11-09 11

Re: About the Spatial functionality

2017-12-07 Thread Christian Tzolov
the below error: > No match found for function signature ST_MAKEPOINT(, , > ) > > Do we have to register these functions manually similar to > OracleSqlOperatorTable or is there another way out for this ? > > > Thanks, > Vamshi. > > > > > On Sat, Dec 2, 2017

Re: "Streaming aggregation requires at least one monotonic expression"

2017-12-03 Thread Christian Tzolov
e if there are some other (undocumented) insides i need to set. Thanks, Christian ​ On 3 December 2017 at 23:04, Christian Tzolov <ctzo...@pivotal.io> wrote: > > I have implemented a StreamingTable with monotonic > ​ ​ > rowtime > ​ ​ > column: > > 1: jdbc:calc

Re: query about avatica odbc

2017-12-04 Thread Christian Tzolov
er for avatica, do you have some plan for odbc driver >> developing, please let me know as soon as possible, >> thanks a lot, >> >> >> yours best regards >> >> >> victor lv >> >> -- Christian Tzolov <http://www.linkedin.com/in/tzolov> | Principle Software Engineer | Spring <https://spring.io/>.io | Pivotal <http://pivotal.io/> | ctzo...@pivotal.io

Re: "Streaming aggregation requires at least one monotonic expression"

2017-12-04 Thread Christian Tzolov
i am emitting new data in the mean time) On 4 December 2017 at 05:05, Julian Hyde <jh...@apache.org> wrote: > If you change > > > AS "rowtime”, > > to > > > AS "rowtime2", > > is the behavior any different? I am concerned that the “rowtime

GroupBy for Indefinite SQL Streams

2017-12-09 Thread Christian Tzolov
egation instead of simple scan in the CsvTest.java#758 example. I am really stuck here and would appreciate an advise. Thanks, Christian [1] https://github.com/tzolov/calcite/tree/geode-1.3-stream/geode/src/main/java/org/apache/calcite/adapter/geode/stream -- Christian Tzolov <http://www.li

Re: Calcite class diagram

2018-03-19 Thread Christian Tzolov
l.com > > > > > wrote: > > > > > > > Has anyone generated a decent class diagram representing Calcite's > core > > > > classes and their relations ? > > > > > > > > I've just tried to create one using *code2uml* and in a

[jira] [Created] (CALCITE-1506) Push OVER Clause to underlying SQL via JDBC adapter

2016-11-23 Thread Christian Tzolov (JIRA)
Christian Tzolov created CALCITE-1506: - Summary: Push OVER Clause to underlying SQL via JDBC adapter Key: CALCITE-1506 URL: https://issues.apache.org/jira/browse/CALCITE-1506 Project: Calcite

[jira] [Created] (CALCITE-1527) Add DML support in the JDBC adapter

2016-12-04 Thread Christian Tzolov (JIRA)
Christian Tzolov created CALCITE-1527: - Summary: Add DML support in the JDBC adapter Key: CALCITE-1527 URL: https://issues.apache.org/jira/browse/CALCITE-1527 Project: Calcite Issue Type

[jira] [Created] (CALCITE-2065) Make “autoCommit” an accepted parameter in the JDBC URL

2017-11-23 Thread Christian Tzolov (JIRA)
Christian Tzolov created CALCITE-2065: - Summary: Make “autoCommit” an accepted parameter in the JDBC URL Key: CALCITE-2065 URL: https://issues.apache.org/jira/browse/CALCITE-2065 Project: Calcite

[jira] [Created] (CALCITE-2059) Apache Geode adapter

2017-11-17 Thread Christian Tzolov (JIRA)
Christian Tzolov created CALCITE-2059: - Summary: Apache Geode adapter Key: CALCITE-2059 URL: https://issues.apache.org/jira/browse/CALCITE-2059 Project: Calcite Issue Type: New Feature