Hi.
I'm trying to use Calcite to optimize queries rewriting the queries to use
materialized views.
First, I found the following doc page about materialization in Calcite website
by googling but I coudn't find a link to it in Calcite's website. Anyway, it
does not explain how to add
I'd like to share the following link that I came across sime time ago about a
product that uses Calcite to optimize Spark queries.
https://www.datascience.com/blog/grunion-data-science-tools-query-optimizer-apache-spark
Luis Fernando Kauer created CALCITE-2081:
Summary: NPE in join of 2 subqueries using window functions
Key: CALCITE-2081
URL: https://issues.apache.org/jira/browse/CALCITE-2081
Project: Calcite
cause it was recently
refactored.
It's usually easier for other people to test the problem if you create runnable
test cases to show the problem. Em sexta-feira, 17 de novembro de 2017
14:29:09 BRST, Enrico Olivelli <eolive...@gmail.com> escreveu:
In the RowType I have 'k1' and not &
Did you execute the query?
ProjectRemoveRule removes the Project when it is "trivial". Since the only
used project was pushed to BindableTableScan, the Project would only set the
alias, but that can be done in row type.
The result is correct because RowType is preserved with the alias. It
t reduces the
> number of columns (as most Projects do) then the Sort will have lower cost
> if performed after the Project, because it is handling fewer bytes.
>
>
> > On Nov 10, 2017, at 10:32 AM, Luis Fernando Kauer
> <lfka...@yahoo.com.br.INVALID> wrote:
> >
> &
Hi,
FrameworkConfig has getDefaultSchema(), from javadoc "Returns the default
schema that should be checked before looking at the root schema. Returns null
to only consult the root schema".
So, if you are using Frameworks.newConfigBuilder(), you can set it using
".defaultSchema(
I'm trying to fix https://issues.apache.org/jira/browse/CALCITE-1906 and I'm
facing a similar problem.
After managing to make JdbcSort to work, sometimes the JdbcProject is above
JdbcSort and the generated SQL is wrong because RelToSqlConverter uses
SqlImplementator.Clause enum to decide when
Sorry,
My knowledge hasn't reached that far.
Currently the tutorial and example code is mostly for creating new adapters.
I think we need tutorial, documentation and example code to work directly with
the planner, because it is a lot harder.
Regards,
Luis Fernando
Em quinta-feira, 9 de
If you intend to run a query then you should follow the tutorial and try to
change the csv adapter. You can add the table to the schema at runtime using
something like:
-
Class.forName("org.apache.calcite.jdbc.Driver");
Luis Fernando Kauer created CALCITE-2044:
Summary: Tweak cost of BindableTableScan to make sure Project is
pushed through Aggregate
Key: CALCITE-2044
URL: https://issues.apache.org/jira/browse/CALCITE
CnSmzU2hPgGoBHx67hhcdFfWo4OSoQob6udt6lpA=wxCJy0-IChQRB53y7qCSONbcgJj24vGDvV1P8DylhMg=LBpaGzJP6rHVxjUmLc_MXY_w4P_jkJSIx5QhtdXGuiw=>
> ? There I suggested adding a new kind of metadata called
> ExpressionComplexity. You could write your own handler that takes into
> account SqlTypeName or wh
outubro de 2017 13:38:05 BRST, Alexey Roytman
<alexey.royt...@oracle.com> escreveu:
Sorry for the delay, Luis Fernando.
Please see below, as there are a number of answers.
On 10/26/2017 09:37 PM, Luis Fernando Kauer wrote:
> I'm sorry, but I have no idea what you are talk
:38:14 BRST, Luis Fernando Kauer
<lfka...@yahoo.com.br.INVALID> escreveu:
I'm sorry, but I have no idea what you are talking about.
Cassandra Adapter has code to translate the plan to run the query in Cassandra
Server.
If you are only interested in querying CSV files I don't see how c
I'm sorry, but I have no idea what you are talking about.
Cassandra Adapter has code to translate the plan to run the query in Cassandra
Server.
If you are only interested in querying CSV files I don't see how copying that
code without understanding it will help you.
First of all, you need to
Hi,
Can you give us some examples of the queries you tested? Include the the query
plan Calcite generated. (Use EXPLAIN PLAN FOR you query)
Currently, aggregates with no column reference, like count(*), generates a plan
that scans all projects when using ProjectableFilterableTable. I'm not
Your problem, again, is about the names being case sensitive.
Try using double quotes around column and table names to make sure they are
interpreted correctly or use them all in uppercase, both in the json model and
in the query.
You can also set a different lex property for the
Did you take a look in the test cases for some examples of use?
https://github.com/apache/calcite/blob/master/elasticsearch5/src/test/java/org/apache/calcite/test/Elasticsearch5AdapterIT.java
What have you tried?
Julian
> On Oct 4, 2017, at 12:07 PM, Luis Fernando Kauer
> <lfka...@yahoo.com.br.INVALID> wrote:
>
>
>
> Hi Joel.
>
> Nice to hear someone else is also concerned about this.
> I'm more concerned about nested structures than unnesting simple arrays.What
&
Luis Fernando Kauer created CALCITE-2000:
Summary: UNNEST a collection that has a field with nested data
generates an Exception
Key: CALCITE-2000
URL: https://issues.apache.org/jira/browse/CALCITE-2000
Luis Fernando Kauer created CALCITE-1999:
Summary: UNNEST generates a NPE when the parameter is null
Key: CALCITE-1999
URL: https://issues.apache.org/jira/browse/CALCITE-1999
Project: Calcite
quarta-feira, 4 de outubro de 2017 11:26:38 BRT, Joel Pfaff
<joel.pf...@gmail.com> escreveu:
Hello,
Sorry I was not registered in the mailing list when Luis Fernando Kauer
sent the mail, so I cannot reply directly to his.
But we share a similar concern with ability to implement more
Hi,
We have many data in complex formats, similar to a json file, with nested
collections and I would like to know what is the best approach to implement an
adapter to read it efficiently.Users will probably end up joining the top level
struct with the nested collections of struct when they
Hi,
I'll try to answer your questions since nobody else did.
But I'm still fairly new to Calcite and I'm still learning it.
I'll answer your questions in reverse order because the answer to the second
question is important to answer the first question.
2. ConverterRules: how Calcite knows
At first I was using TranslatableTable for my adapters (read files in different
formats), but I realized that many rules apply only to
ProjectableFilterableTable, so I started using it to take advantage of all
these builtin rules.
Restricting the projects that need to be scanned is very
e it would be wrong to fire the rule.
If you intend to contribute this at some point, please file a JIRA
case. You can attach a PR later.
Julian
On Fri, Jul 28, 2017 at 7:53 AM, Luis Fernando Kauer
<lfka...@yahoo.com.br.invalid> wrote:
> I'm still learning Calcite and how to conv
to (Project A).
I don't recall how to add rules. Some people use Frameworks or Planner.
Julian
On Fri, Jul 21, 2017 at 12:42 PM, Luis Fernando Kauer
<lfka...@yahoo.com.br.invalid> wrote:
> Hi,
>
> I have a schema with a lot of normalized tables, which makes it hard for
> us
Luis Fernando Kauer created CALCITE-1906:
Summary: JdbcSortRule has a bug and it is chosen
Key: CALCITE-1906
URL: https://issues.apache.org/jira/browse/CALCITE-1906
Project: Calcite
Hi,
I have a schema with a lot of normalized tables, which makes it hard for users
to build the queries.
I would like to create views with all the joins already included so that users
could just select the fields without worrying with multiple tables and join
conditions.
But the optimizer
ES, EMPS]], fields=[[1]])\n";
+sql("smart", "explain plan for " + sql).returns(plan).ok();
+ }
+
@Test public void testFilterableSelect() throws SQLException {
sql("filterable-model", "select name from EMPS").ok();
}
Julian
> O
30 matches
Mail list logo