Re: Pluggable JDBC types

2019-06-06 Thread Muhammad Gelbana
You're absolutely right. User-defined types should be the way to go. I believe it needs enhancement though, only to customize the returned column type name as I mentioned here[1] [1]

is there CHARINDEX function?

2019-06-06 Thread Jess Balint
Is there a function which searches for a substring? Thanks. Jess

[jira] [Created] (CALCITE-3118) VolcanoRuleCall match parent child ordinal not properly checked

2019-06-06 Thread Botong Huang (JIRA)
Botong Huang created CALCITE-3118: - Summary: VolcanoRuleCall match parent child ordinal not properly checked Key: CALCITE-3118 URL: https://issues.apache.org/jira/browse/CALCITE-3118 Project: Calcite

[jira] [Created] (CALCITE-3117) Distinguish Calcite's public APIs

2019-06-06 Thread Stamatis Zampetakis (JIRA)
Stamatis Zampetakis created CALCITE-3117: Summary: Distinguish Calcite's public APIs Key: CALCITE-3117 URL: https://issues.apache.org/jira/browse/CALCITE-3117 Project: Calcite Issue

[jira] [Created] (CALCITE-3116) Upgrade to Avatica 1.15

2019-06-06 Thread Stamatis Zampetakis (JIRA)
Stamatis Zampetakis created CALCITE-3116: Summary: Upgrade to Avatica 1.15 Key: CALCITE-3116 URL: https://issues.apache.org/jira/browse/CALCITE-3116 Project: Calcite Issue Type: Task

Re: Pluggable JDBC types

2019-06-06 Thread Stamatis Zampetakis
I see but I am not sure SqlTypeName is the way to go. Postgres has many built-in types [1] which do not appear in this enumeration. Other DBMS have also their own built-in types. Adding every possible type in SqlTypeName does not seem right. Unfortunately, I don't know what's the best way to

Re: Parsing DB2 sql statements

2019-06-06 Thread Andrew O
Thanks for the replies. @Yuzhao unfortunately I won't be able to change the input sql to add the quotes, so as you point out the UDF may have issues with the reserved word. @Hongze, Yes, I'm only interested in parsing. I had tried the Babel parser without success (on v1.19.0). However that's

Re: Parsing DB2 sql statements

2019-06-06 Thread Yuzhao Chen
Another choice is just like you said, you can add Date as UDF but because Date is a reserved word, you may need to quote the function name like `Date`(col1) based on what quoting character you use. Andrew O 于2019年6月6日周四 下午7:07写道: > I'm doing a project trying to parse some IBM DB2 sql

Re: Parsing DB2 sql statements

2019-06-06 Thread Hongze Zhang
Hi Andrew, If you are focusing parsing only, I believe you can just use the babel parser - in babel we have added support for DATE function via CALCITE-3022. The thing is you need to compile Calcite's code by yourself - 1.20.0 hasn't been released yet. Hongze > On Jun 6, 2019, at 19:06,

Parsing DB2 sql statements

2019-06-06 Thread Andrew O
I'm doing a project trying to parse some IBM DB2 sql expressions (to analyze table / column usages). To note, 1) these are existing ad-hoc user queries so I can't change their syntax 2) I don't have a connection / schema for the database, but my understanding is that this shouldn't be required

[jira] [Created] (CALCITE-3115) Cannot add JdbcRules which have different JdbcConvention to same VolcanoPlanner's RuleSet.

2019-06-06 Thread TANG Wen-hui (JIRA)
TANG Wen-hui created CALCITE-3115: - Summary: Cannot add JdbcRules which have different JdbcConvention to same VolcanoPlanner's RuleSet. Key: CALCITE-3115 URL: https://issues.apache.org/jira/browse/CALCITE-3115

[jira] [Created] (CALCITE-3114) Support websocket transport

2019-06-06 Thread Leo Tu (JIRA)
Leo Tu created CALCITE-3114: --- Summary: Support websocket transport Key: CALCITE-3114 URL: https://issues.apache.org/jira/browse/CALCITE-3114 Project: Calcite Issue Type: Wish Reporter:

[jira] [Created] (CALCITE-3113) Equivalent MutableAggregates with different row types fail with AssertionError

2019-06-06 Thread Feng Zhu (JIRA)
Feng Zhu created CALCITE-3113: - Summary: Equivalent MutableAggregates with different row types fail with AssertionError Key: CALCITE-3113 URL: https://issues.apache.org/jira/browse/CALCITE-3113 Project: