问题标签 [apache-calcite]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
858 浏览

druid - 没有已知的驱动程序来处理“jdbc:calcite:model=druid/src/test/resources/druid-wiki-model.json

我正在尝试用德鲁伊运行方解石和 sqlline。我从方解石下载网站下载了 ZIP,并将其放在 druid 文件夹中。当我尝试运行 sqlline 命令时

从方解石文件夹中它会引​​发驱动程序错误 No known driver to handle "jdbc:calcite:model=druid/src/test/resources/druid-wiki-model.json"。我是否缺少一些驱动程序或安装?

0 投票
1 回答
187 浏览

apache-calcite - 有没有一种方法可以从连接过滤器和其他过滤器中导出等效过滤器?

Q1:

相当于follow query。

Q2:

现在,我使用 Apache Calcites 为 Q1 生成计划,并使用FilterJoinRule.FILTER_ON_JOINFilterJoinRule.JOIN优化它。但是这些规则并没有派生出额外的过滤器t2.b = 2

是否有任何规则或方法可以在 Calcite 导出等效过滤器?谢谢。

如果没有,我想支持它。有什么建议吗?

0 投票
3 回答
3221 浏览

java - Adding a User-Defined Function to Calcite

I need to add a user-defined function to Calcite that takes an integer as a parameter and returns an integer.

and the relevant code that creates a schema and adds the function is

But a simple SQL like

fails during the validation with the following message:

The stack trace is:

I followed the Calcite's UdfTest.testUserDefinedFunctionInView implementation but still couldn't make it work. What am I doing wrong?

0 投票
1 回答
226 浏览

apache-calcite - 加入条件=true的计划节点遇到错误

上面的代码来自 RelBuilderTest.java 。为什么calcite会生成LogicalJoin(condition=[true], joinType=[inner])Node?当我使用RelToSqlConverter将 RelNode 转换为 SQL 时,遇到关于filter 'condition=[true]'

为什么会这样?

0 投票
1 回答
1184 浏览

apache-calcite - 如何更改 Calcite 的默认 sql 语法?”

如何更改Calcite默认的sql语法,支持“select func(id) as (a, b, c) from xx;”这样的sql语句

0 投票
2 回答
3637 浏览

java - Apache Calcite 在 SQL 字符串中查找选定的列

我有一个用例,我想知道在 SQL 字符串中选择的列。例如,如果 SQL 是这样的:
SELECT name, age*5 as intelligence FROM bla WHERE bla=bla
然后,在解析上述字符串后,我只想输出为:name, intelligence
首先,可以通过方解石吗?
也欢迎任何其他选择。

PS:在实际对数据库运行查询之前,我想知道这一点。

0 投票
1 回答
344 浏览

apache-calcite - 如何添加一个参数是表名的udf

我想在方解石中添加一个 udf。udf的参数是一个表名,它会返回一个varchar值。有这方面的样本吗?谢谢。

我的测试sql是:

max_dt是我要添加的功能。

0 投票
1 回答
922 浏览

apache-calcite - 使用关系代数插入、更新、删除、删除示例代码

我是新的 Apache Calcite,能够使用关系代数从数据库中获取数据,但无法进行插入、更新、删除、删除操作。如果可以分享示例代码将更有帮助。

0 投票
2 回答
1267 浏览

apache-calcite - Apache Calcite | Querying data from MongoDB by using Relational algebra

I am able to get a MongoDB connection and able to get a node

But when I execute the node, I am getting null pointer exception.

Complete code:

Getting following exception from an above code,there is schema getting null values,while execute relnode of Mongo DB collection

0 投票
0 回答
258 浏览

apache-calcite - How to Apache Calcite query mongo DB by using Relational Algebra

Can any one share sample code for Apache Calcite querying MongoDB by using relational algebra.