Re: Provide model.json file from Resources in Jar

2018-10-29 Thread Shashwat Kumar
Thank you everyone for the suggestions. For now I have been able to use "inline" method to do the job. I'll try to try other methods and see if they are working or not.

Access SELECT and WHERE Clause column names in SQL Query

2018-10-29 Thread Shashwat Kumar
Hi, My backend gets the SQL query from the user. I want to modify SQL statement before executing it. How can I get the SELECT column names and WHERE column names from the SQL query. I know that probably SqlParser is to be used but I am not able to make it work. Please advise. -- Regards Shashwat

[jira] [Created] (CALCITE-2647) In RelBuilder, add a groupKey method that assumes only one grouping set

2018-10-29 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-2647: Summary: In RelBuilder, add a groupKey method that assumes only one grouping set Key: CALCITE-2647 URL: https://issues.apache.org/jira/browse/CALCITE-2647 Project: Ca

Re: Calcite on Traces / Industry 4.0 data

2018-10-29 Thread Julian Hyde
I’ve been thinking a bit more about this use case. It’s tricky because signal processing and SQL have a different model of “event”. EE folks talk about “edge triggering” and “level triggering”, which are really just two different data models for the same physical phenomenon. Consider an example

Re: Provide model.json file from Resources in Jar

2018-10-29 Thread Andrei Sereda
Agree about long URIs. I was referring to this use case : String model = ...; Properties props = new Properties(); prop.put("model", "inline:" +model); Connection connection = DriverManager.getConnection("jdbc:calcite:", props); But first check why default resource loading with calcite doesn’t wo

Re: Provide model.json file from Resources in Jar

2018-10-29 Thread Julian Hyde
Yes, Calcite does support “inline:” But some folks might not want to generate huge URIs. So IIRC we also have ways to read from files in the file system, http resources, and files in the classpath (e.g. in jars). > On Oct 29, 2018, at 12:09 PM, Andrei Sereda wrote: > > I think calcite support

Re: Provide model.json file from Resources in Jar

2018-10-29 Thread Andrei Sereda
I think calcite supports inline: prefix in properties (for models). Try to add the following to properties: Properties props = new Properties(); prop.put("model", "inline:" + longString); On Mon, Oct 29, 2018 at 3:00 PM Julian Hyde wrote: > I thought there was a way to read models from jars. I

Re: Provide model.json file from Resources in Jar

2018-10-29 Thread Julian Hyde
I thought there was a way to read models from jars. I don’t think we have a “resource:” prefix. I think you need to use the path within the jar, e.g. “model=/resources/model.json”. Look at the tests, there are probably some clues there. > On Oct 26, 2018, at 4:51 AM, ptr.bo...@gmail.com wrote:

Re: VolcanoPlanner changes Joins structure only once

2018-10-29 Thread Julian Hyde
There’s nothing intrinsic in VolcanoPlanner that prevents a rule from firing more than once. (HepPlanner is a different story.) It would be useful to see the relational algebra. (E.g. are these right-deep trees? What column is used for “X.id ” in each case? Those are important det

Re: Unable to pass authentication parameters using calcite for jdbc to gemfire.

2018-10-29 Thread Andrei Sereda
Hi Kotak, I think currently geode adapter doesn't support [client credentials]( https://geode.apache.org/docs/guide/16/managing/security/implementing_authentication.html#how-a-cache-client-sets-its-credential) for authentication (aka `AuthInitialize`). Please log a JIRA and I'd be happy to take a

Re: Timestamp as a parameter of UDF

2018-10-29 Thread ptr.bo...@gmail.com
Hello, I have submitted https://issues.apache.org/jira/browse/CALCITE-2641 . I've proposed a path there in a comment but I think it would be best to accept the approach first - then I can contribute the patch. Thanks for help and support Pete On Thu, Oct 25, 2018 at 7:15 PM Julian Hyde wrote:

[jira] [Created] (CALCITE-2646) Support nullable struct type

2018-10-29 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-2646: --- Summary: Support nullable struct type Key: CALCITE-2646 URL: https://issues.apache.org/jira/browse/CALCITE-2646 Project: Calcite Issue Type: Improvement Re

VolcanoPlanner changes Joins structure only once

2018-10-29 Thread Anton Haidai
Hello! I have the following problem. Sample SQL input is the following: SELECT * FROM X INNER JOIN A ON X.id = A.id INNER JOIN X2 ON X.id = X2.id INNER JOIN X3 ON X.id = X3.id According to a custom cost model used, it would beneficial to move the select from the table "A" as high as possible in Lo