Re: How can I convert a BindableTableScan with projects and Fitlers back to a Rel Tree with a project node, a filter node and a tablescan node?

2022-08-23 Thread Jiajun Xie
Pranav, there are `QueryExecution` that holding logicalPlan, optimizedPlan and sparkPlan(physical) in Spark: https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala In fact, my code is similar to it. I have an object holding

Re: Additional parameters to be passed with model json

2022-08-23 Thread Julian Hyde
The general idea is that schemas are created before connections, look the same to everyone, and continue to live after connections close. You’d be breaking that principle, so you should be careful. Maybe you can write a SchemaFactory that can see some of the connection parameters, maybe via a

Additional parameters to be passed with model json

2022-08-23 Thread Kartik Kudada
Hi Developers , Hope you are well . I would like to modify model.json so that I can pass additional key - value parameters . I am able to pass additional parameters with connection URL . Is it right to modify JsonRoot class ? Or any other way around? Regards, Kartik

Re: How are custom UDFs, operators and their implementations provided to Calcite when using JdbcMeta?

2022-08-23 Thread Julian Hyde
Ian, When you say ‘our approach’ and ‘our users’, I guess you are talking about your organization as opposed to the Calcite community in general. You say you are ‘using JdbcMeta’ but I don’t really understand what that means. Can you expand on your use case/environment? I think of Java UDFs

How are custom UDFs, operators and their implementations provided to Calcite when using JdbcMeta?

2022-08-23 Thread Ian Bertolacci
Hello, Our current approach to defining custom UDFs and their implementations works by… 1. Defining the udf and its implementation in a class member function 2. Creating a Calcite definitions in the form of `schema.Function`s via `ScalarFunctionImpl.create` or

Re: How can I convert a BindableTableScan with projects and Fitlers back to a Rel Tree with a project node, a filter node and a tablescan node?

2022-08-23 Thread Benchao Li
Pranav, There is a doc[1] which talks about how to write a rule. You can also take a look at existing rules such as FilterTableScanRule[2], ProjectTableScanRule[3] for reference. [1] https://calcite.apache.org/docs/howto.html#create-a-planner-rule [2]

Re: validation for multiple statements

2022-08-23 Thread Benchao Li
Egor, Calcite's `SqlValidatorImpl` does not support to validate a statement list now. You can loop over the list by yourself, and validate one query at a time. Egor Ryashin 于2022年8月23日周二 17:23写道: > Hi all, > > I try to use validation with multi-statement AST but it fails when I call >

validation for multiple statements

2022-08-23 Thread Egor Ryashin
Hi all, I try to use validation with multi-statement AST but it fails when I call validate() with NPE about namespace, I wonder how should I set this namespace: NlsString ';' BigDecimal 1 Exception in thread "main" java.lang.NullPointerException: namespace for SELECT ';', scope