Re: Can’t seem to parse DDL staements

2018-12-16 Thread Ted Xu
Hi Dilip, DDL related code including statement parse and data structures are located in calcite-server sub-project. The unit test 'ServerParserTest' may be a good starting point to look into. You can find it here

[jira] [Created] (CALCITE-2694) Improve type conversion with respect to charset and collation

2018-11-22 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-2694: --- Summary: Improve type conversion with respect to charset and collation Key: CALCITE-2694 URL: https://issues.apache.org/jira/browse/CALCITE-2694 Project: Calcite

[jira] [Created] (CALCITE-2693) Allow literal creation with charsets other than LATIN1 and UTF16

2018-11-22 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-2693: --- Summary: Allow literal creation with charsets other than LATIN1 and UTF16 Key: CALCITE-2693 URL: https://issues.apache.org/jira/browse/CALCITE-2693 Project: Calcite

[jira] [Created] (CALCITE-2692) Introduce default charset and collate to type system interface

2018-11-22 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-2692: --- Summary: Introduce default charset and collate to type system interface Key: CALCITE-2692 URL: https://issues.apache.org/jira/browse/CALCITE-2692 Project: Calcite

[jira] [Created] (CALCITE-2691) Improve character set and collate support

2018-11-22 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-2691: --- Summary: Improve character set and collate support Key: CALCITE-2691 URL: https://issues.apache.org/jira/browse/CALCITE-2691 Project: Calcite Issue Type: Improvement

Re: Charset support proposal

2018-11-17 Thread Ted Xu
on, using CONVERT.) Are there concerns about > this? > > Are the rules well-defined if, say we compare a UTF8 with a UTF16 string, > > or concatenate a UTF8 with a UTF16 string? > > > > I saw that MySQL has problems with 3-byte utf8 (aka utf8mb3) and 4-byte > > ut

Re: Charset support proposal

2018-11-17 Thread Ted Xu
> I saw that MySQL has problems with 3-byte utf8 (aka utf8mb3) and 4-byte > utf8mb4[1]. Are we going to avoid those problems? > I'm not sure but Java UTF-8 encoder/decoder look good. > > Julian > > [1] https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html > &

Charset support proposal

2018-11-15 Thread Ted Xu
Hi folks, I created a design doc https://docs.google.com/document/d/1wo5byn_6K_YOKiPdXNav1zgzt9IBC3SbPvpPnIShtXk/edit?usp=sharing for supporting charset in calcite, per previous discussions on this topic. One thing I'm not sure is runtime (Codegen on Enumerable and RelExecutor etc) change. Since

Re: does calcite support chinese?

2018-11-09 Thread Ted Xu
+1 for full charset support. There may be multiple changes to make, not only related to literals but also to type system, casts, (jdbc) binary protocols etc. I'd like to propose some design ideas since I'm from a CJK country and we've already tackled most of Calcite's charset issues. On Thu,

Re: Does calcite support chinese?

2018-11-09 Thread Ted Xu
Hi, You could use optional charset literal here. E.g., > upsert into t1(c1,c2,c3) values(_UTF16'中文',2,2); For some reason Calcite currently only support UTF-16 for Unicode. Here CALCITE-2619 is an on going work to support more charsets like UTF-8, GB2312 and GBK. On Wed, Nov 7, 2018 at 5:30

Re: Looking for help on query optimization statistics

2018-11-05 Thread Ted Xu
Hi Tian, To inject statistics, you need to implement your own RelMetadataProvider and register it into your runtime environment. I'm not able to find a valid example in Calcite, but there is a good example you can find in Drill

[jira] [Created] (CALCITE-2646) Support nullable struct type

2018-10-29 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-2646: --- Summary: Support nullable struct type Key: CALCITE-2646 URL: https://issues.apache.org/jira/browse/CALCITE-2646 Project: Calcite Issue Type: Improvement

Re: 'Spool' Node support

2018-10-22 Thread Ted Xu
k to ensure that nodes that are shared are only > counted in the overall cost once. > > > On Oct 22, 2018, at 8:26 PM, Ted Xu wrote: > > > > Hi folks, > > > > I'm not sure if there is a recommended way to represent diverged > (multiple > > parents) plan in Cal

'Spool' Node support

2018-10-22 Thread Ted Xu
Hi folks, I'm not sure if there is a recommended way to represent diverged (multiple parents) plan in Calcite. It’s true that RelNode data structure is compatible with multiple parents, but it is not working in optimizer. For example, if we have query as follows, FROM (SELECT c1, random() as

[jira] [Created] (CALCITE-2619) Reduce string literal creation cost by removing charset check

2018-10-10 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-2619: --- Summary: Reduce string literal creation cost by removing charset check Key: CALCITE-2619 URL: https://issues.apache.org/jira/browse/CALCITE-2619 Project: Calcite

Re: Usage of RelTrait and RelTraitDef

2017-08-09 Thread Ted Xu
Hi Renjie, RelTraitDef is the definition or template of RelTrait, while the RelTrait concept corresponds to the concept of 'physical property' in *The Volcano Optimizer Generator: Extensibility and Efficient Search*, by G Graefe. Regards, Ted Xu On Wed, Aug 9, 2017 at 5:02 PM Renjie Liu

[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

[jira] [Created] (CALCITE-1920) Add IS_NOT_NULL predicate on not-nullable equi-join keys

2017-08-02 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-1920: --- Summary: Add IS_NOT_NULL predicate on not-nullable equi-join keys Key: CALCITE-1920 URL: https://issues.apache.org/jira/browse/CALCITE-1920 Project: Calcite Issue

[jira] [Created] (CALCITE-1883) HepPlanner should force garbage collect whenever a root registered

2017-07-10 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-1883: --- Summary: HepPlanner should force garbage collect whenever a root registered Key: CALCITE-1883 URL: https://issues.apache.org/jira/browse/CALCITE-1883 Project: Calcite

[jira] [Created] (CALCITE-1337) Lazy evaluate RexCall digests

2016-08-01 Thread Ted Xu (JIRA)
Ted Xu created CALCITE-1337: --- Summary: Lazy evaluate RexCall digests Key: CALCITE-1337 URL: https://issues.apache.org/jira/browse/CALCITE-1337 Project: Calcite Issue Type: Improvement

Re: RelMetadataQuery is not pluggable?

2016-03-29 Thread Ted Xu
is deprecated? On Tue, Mar 29, 2016 at 12:26 PM Julian Hyde <jh...@apache.org> wrote: > Did you take a look at https://issues.apache.org/jira/browse/CALCITE-1147 > <https://issues.apache.org/jira/browse/CALCITE-1147>? It helps make > RelMetadataQuery pluggable. > > > On Ma

RelMetadataQuery is not pluggable?

2016-03-28 Thread Ted Xu
tadata? I'm not sure if I'm using it in the right way, please correct me if I'm wrong. Thanks! Regards, Ted Xu.