Cosette - A tool for checking whether SQL statements are equivalent

2017-08-04 Thread Julian Hyde
Cosette is a tool that proves that two SQL statements are equivalent, or tries to find a counter-example. https://medium.com/@uwdb/introducing-cosette-527898504bd6 I wonder whether we can use it to make Calcite better? After all, our rules are supposed to preserve semantics, right? Julian

Re: How to add user defined operator in Calcite?

2017-08-04 Thread Junwei Li
Thank you so much for your reply, Julian. I will try adding user-defined function first. Sincerely, Junwei Li On Fri, Aug 4, 2017 at 1:30 PM, Julian Hyde wrote: > "<>" is a built-in operator in standard SQL and in Calcite, so that > might be tricky. > > If you were to add a

[jira] [Created] (CALCITE-1928) Calling previous() on a ResultSet that came from an Array gives NullPointerException

2017-08-04 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-1928: Summary: Calling previous() on a ResultSet that came from an Array gives NullPointerException Key: CALCITE-1928 URL: https://issues.apache.org/jira/browse/CALCITE-1928

Re: How to add user defined operator in Calcite?

2017-08-04 Thread Julian Hyde
"<>" is a built-in operator in standard SQL and in Calcite, so that might be tricky. If you were to add a new operator, say "<=>", you'd have to change the parser, and also add an entry to the operator table (SqlStdOperatorTable or similar). If you can live with function syntax (as opposed to

How to add user defined operator in Calcite?

2017-08-04 Thread Junwei Li
Hi, I am a newbie to Calcite and SQL. Recently, I am trying to develop a calcite adapter for a new kind of data source. This data source has some different operators compared to SQL. For example, in SQL, if we want to find all rows that don't contain a certain keyword: select * from table where

[jira] [Created] (CALCITE-1927) Mapping for Types.BIT: boolean or BitSet?

2017-08-04 Thread Vladimir Sitnikov (JIRA)
Vladimir Sitnikov created CALCITE-1927: -- Summary: Mapping for Types.BIT: boolean or BitSet? Key: CALCITE-1927 URL: https://issues.apache.org/jira/browse/CALCITE-1927 Project: Calcite

[jira] [Created] (CALCITE-1926) Function names are unparsed quoted while PostgreSQL can only handle unquoted function names

2017-08-04 Thread Muhammad Gelbana (JIRA)
Muhammad Gelbana created CALCITE-1926: - Summary: Function names are unparsed quoted while PostgreSQL can only handle unquoted function names Key: CALCITE-1926 URL:

Re: Does Calcite intentionally quote unparsed method names ?

2017-08-04 Thread Muhammad Gelbana
I've only tried that for built-in functions and PostgreSQL fails to parse it. I'll try custom functions when I have access to the DB again. Thanks, Gelbana On Thu, Aug 3, 2017 at 8:51 PM, Julian Hyde wrote: > Quoting functions seems to be the safest thing to do, so that the

[jira] [Created] (CALCITE-1925) JaninoRelMetadataProvider to cache null value

2017-08-04 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-1925: --- Summary: JaninoRelMetadataProvider to cache null value Key: CALCITE-1925 URL: https://issues.apache.org/jira/browse/CALCITE-1925 Project: Calcite Issue Type: