Embedding Calcite, adjusting convertlets

2016-11-17 Thread Gian Merlino
Hey Calcites, I'm working on embedding Calcite into Druid (http://druid.io/, https://github.com/druid-io/druid/pull/3682) and am running into a problem that is making me wonder if the approach I'm using makes sense. Consider the expression EXTRACT(YEAR FROM __time). Calcite has a standard convert

Unable to Instantiate Java Compiler

2016-11-17 Thread Meehan, Kevin M
Hello, I wanted to return to a question that was asked a few weeks back regarding failure of the java compiler to instantiate when executing a SQL query. It seems to be having issues with janino compiler, but the .jar is within the classpath and there doesn't appear to be any conflicts. The dr

Re: Moderators

2016-11-17 Thread Julian Hyde
Josh, If you still want to be a moderator, can you please enroll by emailing apm...@apache.org, per https://www.apache.org/dev/infra-contact . Julian > On Nov 8, 2016, at 4:28 PM, Julian Hyde wrote: > > Thanks for offering, Ashutosh. I suspect the mo

Re: Unable to Instantiate Java Compiler

2016-11-17 Thread Julian Hyde
The most likely explanation, by far, is that you have multiple versions of Janino on your class path. In janino-2.7.6, which is what Calcite uses, org.codehaus.janino.CompilerFactory extends org.codehaus.commons.compiler.AbstractCompilerFactory, which implements org.codehaus.commons.compiler.I

Re: Unable to Instantiate Java Compiler

2016-11-17 Thread Julian Hyde
By the way, here is the original thread: http://mail-archives.apache.org/mod_mbox/calcite-dev/201611.mbox/%3CD440C726.2432E%25Eunsil.Recksiek%40ca.com%3E The original error message w

Re: Embedding Calcite, adjusting convertlets

2016-11-17 Thread Julian Hyde
Convertlets have a similar effect to planner rules (albeit they act on scalar expressions, not relational expressions) so people should be able to change the set of active convertlets. Would you like to propose a change that makes the convertlet table pluggable? Maybe as part of FrameworkConfig

Re: Embedding Calcite, adjusting convertlets

2016-11-17 Thread herman...@teeupdata.com
I have been trying to access Druid from Spark via Calcite JDBC, but somehow sql statement generated by Spark causes exceptions. Not sure if it is Calcite JDBC or Druid related. Have you see, or do you think Spark -> Calcite JDBC -> Druid is a right way to connect Spark and Druid? Thanks Herman

Re: Embedding Calcite, adjusting convertlets

2016-11-17 Thread Gian Merlino
Hey Julian, If the convertlets were customizable with a FrameworkConfig, how would I use that configure the JDBC driver (given that I'm doing it with the code upthread)? Or would that suggest using a different approach to embedding Calcite? Gian On Thu, Nov 17, 2016 at 4:02 PM, Julian Hyde wrot

Re: Spark with Calcite JDBC and Druid adapter

2016-11-17 Thread Julian Hyde
I see that in one place hashTagId is quoted, and in another it is not. So, whoever is generating the SQL (Spark?) is not being consistent, which is a worry. In the default lexical convention, unquoted columns are converted to upper case. But your column is mixed case. So you need to fix Spark t

Re: Embedding Calcite, adjusting convertlets

2016-11-17 Thread Julian Hyde
I was wrong earlier… FrameworkConfig already has a getConvertletTable method. But regarding using FrameworkConfig from within the JDBC driver, It’s complicated. FrameworkConfig only works if you are “outside” Calcite, whereas CalcitePrepare is when you are customizing from the inside, and sadly