Hi Josh, Here is Z eppelin 's JDBC Interpreter forcefull auto-commit implementation : http://bit.ly/2zrykP9
So if the connection is not auto-commit = true the JDBC interpreter will forcefully call commit. But Avatica's connection defaults to auto-commit = true and there is no way to configure it from the properties! I can not call Connection#setAutoCommit(boolean) without the Zeppelin's generic JDBC interpret implementation. There is ZEPPELIN-2451 issue that tries to address this but i'm not sure the approach is right (see my comment in https://github.com/apache/zeppelin/pull/2396) The connection.commit() called by Zeppelin hits the CalciteMetaImpl#commit (). Later throws an explicit UnsupportedOperationException . E.g. @Override public void commit(ConnectionHandle ch) { throw new UnsupportedOperationException(); } On 22 November 2017 at 17:11, Josh Elser <els...@apache.org> wrote: > Hey Christian, > > Thanks for sharing this. Sounds cool. > > I'm curious what you mean when you say that the Avatica connection doesn't > support commit. This was implemented in CALCITE-767. > > Also, is there a reason that Zeppelin needs a property 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. >> >> Here are my results of plug-in the Geode-Calcite adapter: >> https://www.linkedin.com/pulse/advanced-apache-geode-data- >> analytics-zeppelin-over-sqljdbc-tzolov/ >> >> Although i've been testing with particular adapter i believe the approach >> and the findings would be applicable for any Avatica JDBC adapter too. >> >> The only minor but blocking !!! issue is related to the fact that >> Zeppelin's JDBC interpreter tries to 'commit' the jdbc connection if later >> is not set as 'auto-commit=true'. But the Avatica connection does NOT >> support commits. >> >> At the moment there is no way to switch this behavior off on the Zeppelin >> side. The ZEPPELIN-2451 issue and PR hopefully will resolve this. >> >> Unfortunately Avatica doesn't provide properties to set the auto-commit to >> true (default is hardcoded to false). >> >> 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/> | ctzo...@pivotal.io |+31610285517