Re: Issue with DDL Parsing - Postgres

2021-05-19 Thread Julian Hyde
The SQL string you posted does not contain the word “PRIMARY”, so the error message is surprising. That said, Calcite’s dialect is different from PostgreSQL, and we do not promise to be able to parse every PostgreSQL query. You might have a better chance with Babel parser, which is more lenient

Issue with DDL Parsing - Postgres

2021-05-19 Thread Meadows, Eric A.
Hello, I am using Calcite's SqlParser, but I am running into a few issues with Postgres queries, namely that `PRIMARY`, `TIME`, and `ZONE` are not being properly parsed (raising an exception, instead). The following code is what I am working with: ```java import org.apache.calcite.sql.parser

Re: Enumerable rules lost hint info

2021-05-19 Thread Julian Hyde
Sure, there’s a slot to hold the hints. But is there a benefit to keeping them in the physical algebra? There is certainly a cost to storing them, propagating them, fixing them up as we apply rules. The main source of hints is formatted comments in the SQL. As we get further from the SQL source

[jira] [Created] (CALCITE-4614) Exasol dialect implementation

2021-05-19 Thread TJ Banghart (Jira)
TJ Banghart created CALCITE-4614: Summary: Exasol dialect implementation Key: CALCITE-4614 URL: https://issues.apache.org/jira/browse/CALCITE-4614 Project: Calcite Issue Type: New Feature

??????Tracking column's origin

2021-05-19 Thread 953396112
Hi James: 1) I guess you want to trace the column's origin in original table. In Calcite, we can use `RelMetadatauery.getColumnOrigin()` to trace the column's origin.The method tracks the origin of columns.Here is a unit test 'org.apache.calcite.test.RelMetadataTest#testCalcColumnOriginsTable' f

Re: AggregateUnionTransposeRule fails when some inputs have unique grouping key

2021-05-19 Thread Julian Hyde
You have definitely found a bug. One solution is to remove some of the rule’s responsibilities - delegating to another rule that presumably doesn’t have the bug. That would be a breaking change. Another solution is to fix the rule. Please log a jira case, and let’s discuss further there. Rea

[jira] [Created] (CALCITE-4613) OWASP dependency-check tasks fail due to missing resources

2021-05-19 Thread Stamatis Zampetakis (Jira)
Stamatis Zampetakis created CALCITE-4613: Summary: OWASP dependency-check tasks fail due to missing resources Key: CALCITE-4613 URL: https://issues.apache.org/jira/browse/CALCITE-4613 Project:

AggregateUnionTransposeRule fails when some inputs have unique grouping key

2021-05-19 Thread Vladimir Ozerov
Hi, The AggregateUnionTransposeRule attempts to push the Aggregate below the Union. Before: Aggregate[group=$0, agg=SUM($1] Union[all] Input1 Input2 After: Aggregate[group=$0, agg=SUM($1] Union[all] Aggregate[group=$0, agg=SUM($1] Input1 Aggregate[group=$0, agg=SUM($1]

[jira] [Created] (CALCITE-4612) Fuzzer for RelBuilder

2021-05-19 Thread Vladimir Sitnikov (Jira)
Vladimir Sitnikov created CALCITE-4612: -- Summary: Fuzzer for RelBuilder Key: CALCITE-4612 URL: https://issues.apache.org/jira/browse/CALCITE-4612 Project: Calcite Issue Type: Test

Re: Tracking column's origin

2021-05-19 Thread JiaTao Tao
Hi org.apache.calcite.rel.metadata.RelMetadataQuery#getColumnOrigins may help Regards! Aron Tao James Daniel 于2021年5月19日周三 上午12:35写道: > Hi, all. > I am trying to rewrite the query plan by removing some nodes but faced with > issues related to manipulating column ref indexes. > > Let's consid