Questions tagged [apache-calcite]

Apache Calcite is a data management framework. Not to be confused with Apache (HTTP Server).

Apache Calcite is a data management framework. It has an implementation of relational algebra, an extensible cost-based optimizer, and an optional SQL parser and JDBC driver.

Calcite is used by Apache Hive and Apache Drill as their query optimizers, and you can use it as a framework to build your own data engine.

Calcite was previously known as Optiq.

255 questions
1
vote
1 answer

Why does Elasticsearch2 Adapter gives a 'cannot connect to any node' while trying to connect to elasticsearch

I am using elasticsearch version-6.1.1.I have downloaded the calcite framework project and build it in my machine following the tutorial at (https://calcite.apache.org/docs/tutorial.html) and when i tried to connect to elasticsearch using the…
D vignesh
  • 97
  • 1
  • 7
1
vote
1 answer

Calcite doing full table scan

I'm using Calcite to query from both MySql and Vertica. When running this query: statement.executeQuery( "SELECT a.name, b.name " + "FROM mysqlschema.tableA as a " + "INNER JOIN verticaschema.tableB as b ON a.id = b.id " + …
1
vote
1 answer

Calcite schema around jdbc with per user fitlered tables

I need to expose for users an SQL like engine on top of specific jdbc datasource. Each user should only see a specific filtered data from this jdbc datasource. So when a specific user runs his SQL against datasource, like: select * from table where…
1
vote
1 answer

Join plan node with condition=true encounter an error

final RelBuilder builder = RelBuilder.create(config().build()); RelNode root = builder.scan("EMP") .as("e") .scan("EMP") .as("m") .scan("DEPT") .join(JoinRelType.INNER) …
fei.chen
  • 13
  • 5
1
vote
1 answer

No known driver to handle "jdbc:calcite:model=druid/src/test/resources/druid-wiki-model.json

I am trying to run calcite and sqlline with druid. I downloaded the ZIP from calcite downloads website and put it inside the druid folder. When i try to run sqlline command !connect jdbc:calcite:model=druid/src/test/resources/druid-wiki-model.json…
Akshat G
  • 214
  • 2
  • 14
1
vote
1 answer

Apache Calcite - ReflectiveSchema StackoverflowError

I'm trying to create a simple schema using ReflectiveSchema and then trying to project an Employee "table" using Groovy as my programming language. Code below. class CalciteDemo { String doDemo() { RelNode node = new…
Abbas Gadhia
  • 14,532
  • 10
  • 61
  • 73
1
vote
1 answer

Integrating Kafka with Apache Calcite

I'm trying to integrate calcite with Kafka, I refrenced CsvStreamableTable. Each ConsumerRecord is convert to Object[] using the fowlloing code: static class ArrayRowConverter extends RowConverter { private List fields; …
user2283216
  • 81
  • 1
  • 3
1
vote
1 answer

How to Build Apache calcite Excel Adaptor

where i can get Excel Adaptor for Apache calcite. class ExcelEnumerator implements Enumerator { } I'm trying to created ExcelEmumarator Class.
Prasad V S
  • 262
  • 4
  • 17
1
vote
2 answers

Calcite connecting to sql server

I am trying out Calcite to connect to SQL server. trying to run very simple example to just pull data from person table. Here is the code i am using Schema: public static class PersonSchema { public final Person[] persons; public…
1
vote
2 answers

Create a streaming example with Calcite using CSV

I am trying to create a basic stream program with Calcite using CSV for data source.I can run queries with sqlline, but I can't do it programmatically. My code is: example.json { version: '1.0', defaultSchema: 'STREAM', schemas: [ { …
grtheod
  • 11
  • 7
1
vote
1 answer

How can i convert SqlNode expression(not query!) to RelNode?

I recently start learning Calcite(1.8.0) and i have following use case: i need to transform a list of strings like "SUM(x) / SUM(y) as myRatio", "MAX(z) as maxZ" or "CASE WHEN …” to AggCalls and use it in RelBuilder later. So seems like i should…
1
vote
1 answer

org.apache.calcite.sql.validate.SqlValidatorException

I'm using Apache Calcite to parse a simple SQL statement and return its relational tree. I obtain a database schema using a JDBC connection to a simple SQLite database. The schema is then added using FrameworkConfig. The parser configuration is then…
David Holland
  • 11
  • 1
  • 3
1
vote
1 answer

Apache Calcite query parser - Unexpected character double quotes

I am using Apache Calcite to execute queries on different data sources. The model file that I am using is inline: { version: '1.0', defaultSchema: 'sakila', schemas: [ { name: 'sakila', type: 'custom', factory:…
phoenix
  • 985
  • 3
  • 17
  • 38
1
vote
1 answer

Apache Calcite Data Federation Usecase

Just want to check if the Apache Calcite can be used for the use case "Data Federation"(query with multiple databases). The idea is I have a master query (5 tables) that has tables from one database (say Hive) and 3 tables from another database…
Sathish
  • 73
  • 7
0
votes
1 answer

How to serialize a Calcite RelNode with a BETWEEN FILTER?

I want to build Calcite RelNode with RelBuilder, and serialize it, send to another system. But I found, if I build a filter node, the condition will be simplified as a SEARCH RexCall, and the value is Sarg, as shown in the following picture. If I…
lulijun
  • 415
  • 3
  • 22