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
0
votes
1 answer

Retrieve parameters in a servlet with a JDBC client

I have a JDBC client calling a servlet. Here's my client : String query = "select * FROM Table"; int port = 8080; String user = "user"; String password = "passwd"; String jdbcAvaticaURL =…
Didi
  • 248
  • 2
  • 18
0
votes
1 answer

Apache Calcite | HSQLDB - Table Not Found Exception

I am trying to learn Apache Calcite by following the RelBuilderExample with the storage layer being HSQLDB. Unfortunately, I keep getting "Table Not Found exception" when i call builder.scan(tableName) API of Apache Calcite. When I query the data in…
Anuj
  • 170
  • 2
  • 9
0
votes
1 answer

How to use Apache Beam DSL APIs?

I am trying to implement the DSL API example from the Apache Beam documentation. I am using the newest versions of the apache beam libraries (2.4.0) The code I am running is the same as in the docs: @Rule public final transient TestPipeline p =…
safyia
  • 190
  • 2
  • 11
0
votes
1 answer

Error while connecting to druid using SQL interface

I am trying to connect to druid database using avatica jar Following is the code. String url = "jdbc:avatica:remote:url=http://localhost:8082/druid/v2/sql/avatica"; Properties connectionProperties = new Properties(); try (Connection connection =…
Bankelaal
  • 408
  • 1
  • 9
  • 24
0
votes
2 answers

Apache calcite geode JDBC adapte not working with Gemfire 8.x and 9.X

I am trying to connect Gemfire 8.2 using apache calcite geode adopter. As per following logs its connectied properly but while try to execute query getting exception . Note : http://calcite.apache.org/news/2018/03/19/release-1.16.0/ Moreover, a new…
vaquar khan
  • 10,864
  • 5
  • 72
  • 96
0
votes
2 answers

Calcite for VSAM

I am trying to expose Mainframe files for more dynamic use from both COBOL programs and external programs in Java. My reading shows that I can configure COBOL to use a JDBC connection. This may be just configuration in the JCL but I assume it is…
Mr-H
  • 21
  • 1
0
votes
0 answers

Would calcite work on Scala case classes

I didn't find any first hand info on this, would Calcite be able to work on general Scala case classes in a way similar to this one https://devth.com/2017/compiled-queries-in-scala?
schrepfler
  • 107
  • 2
  • 7
0
votes
1 answer

Calcite over MySql, tries to convert the id column to bigint

I'm trying to use Calcite to query MySql and Vertica in the same query: MySql table: CREATE TABLE tableA (id INT(11), name VARCHAR(5), PRIMARY KEY(id)); Vertica table: CREATE TABLE tableB (id INTEGER NOT NULL, name VARCHAR(20), PRIMARY KEY…
0
votes
1 answer

Calcite LogicalAggregate

What is a proper way to associate an AggregateCall that is part of a HAVING expression with a corresponding field in a RelRecordType for the LogicalAggregate? If the AggregateCall is not part of the SELECT clause, the LogicalAggregate's…
0
votes
0 answers

Does Apache/Calcite support HashMap type of data in terms of storage and query?

Let's say we have 10 records as following in a table name "TEST": Record<"ID":Integer, "Name":String, "MapRelation":HashMap> Does Calcite support SQL on these records? For example: select MapRelation from TEST where ID = ...
0
votes
1 answer

NPE when using Apache Calcite with H2 on JIRA Database

I've receiving NPE When using Calcite. My code is as follows @Autowired public CalciteBootstrap(DatasourceProvider datasourceProvider) throws SQLException { this.datasource = datasourceProvider.fetchDatasource(); log.debug("Datasource…
0
votes
1 answer

timezone issue on query druid data with avatica sql

I'm using avatica as DB Driver of druid. I inserted one row with 'time' column "2017-09-28T18:00:00.000.Z", but the data stored in druid is "2017-09-28T10:00:00.000.Z" (in UTC time), my question is how can i query out this record with UTC+8…
rellocs wood
  • 1,381
  • 4
  • 21
  • 36
0
votes
1 answer

sql issue of 'IN' syntax in Avatica calcite

I'm using Avatica calcite as a JDBC driver to query Druid DB. I found the 'IN' syntax CAN NOT followed by more than 19 elements. e.g SELECT * FROM ds1 WHERE city_id IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19) this works, but this…
rellocs wood
  • 1,381
  • 4
  • 21
  • 36
0
votes
1 answer

how to translate normal sql to calcite avatica sql

I'm using Avatica as a JDBC driver to query a Druid DB but I found it doesn't support MYSQL-like paging syntax: SELECT * FROM tableA limit 4, 5 It only supports syntax like SELECT * FROM tableA limit 2 How do I write the paging SQL with…
rellocs wood
  • 1,381
  • 4
  • 21
  • 36
0
votes
1 answer

How to parse nested SQL statement using calcite?

Select a,b,c from d where d.id in (select id from (select id from e)) Above is the sample query I want to parse using calcite.
1 2 3
16
17