[jira] [Created] (CALCITE-2066) RelOptUtil.splitJoinCondition() could not split condition with case after applying FilterReduceExpressionsRule

2017-11-27 Thread Volodymyr Vysotskyi (JIRA)
Volodymyr Vysotskyi created CALCITE-2066:


 Summary: RelOptUtil.splitJoinCondition() could not split condition 
with case after applying FilterReduceExpressionsRule
 Key: CALCITE-2066
 URL: https://issues.apache.org/jira/browse/CALCITE-2066
 Project: Calcite
  Issue Type: Bug
  Components: core
Reporter: Volodymyr Vysotskyi
Assignee: Julian Hyde


Query 
{code:sql}
select * from emp a emp b where coalesce(a.mgr, -1) = coalesce(b.mgr, -1)
{code}
has logical plan
{noformat}
LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4], 
SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8], EMPNO0=[$9], ENAME0=[$10], 
JOB0=[$11], MGR0=[$12], HIREDATE0=[$13], SAL0=[$14], COMM0=[$15], 
DEPTNO0=[$16], SLACKER0=[$17])
  LogicalFilter(condition=[=(CASE(IS NOT NULL($3), $3, -1), CASE(IS NOT 
NULL($12), $12, -1))])
LogicalJoin(condition=[true], joinType=[inner])
  LogicalTableScan(table=[[CATALOG, SALES, EMP]])
  LogicalTableScan(table=[[CATALOG, SALES, EMP]])
{noformat}
After applying {{FilterReduceExpressionsRule}} condition in filter is changed to
{noformat}
CASE(IS NOT NULL($12), CASE(IS NOT NULL($3), =($3, $12), =(-1, $12)), CASE(IS 
NOT NULL($3), =($3, -1), CAST(true):BOOLEAN))
{noformat}

When this condition is passed into {{RelOptUtil.splitJoinCondition()}} method, 
{{leftJoinKeys}} and  {{rightJoinKeys}} lists are left empty and passed 
condition is returned.

*Note:* {{RelOptUtil.splitJoinCondition()}} works correctly for the initial 
condition without applying {{FilterReduceExpressionsRule}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: Towards Calcite release 1.15

2017-11-27 Thread Julian Hyde
Thanks for reviewing, Michael. Yes, it’s a lot.

Materialized views were a big motivation for doing this. You currently have to 
do some tricky work with APIs to define materialized views (mappings inside the 
planner, predicates, statistics). I wanted to demonstrate it working using a 
few lines of SQL.

I hadn’t really thought of DDL + adapters. Yes, I guess someone could do

  CREATE TABLE MyCassandraSchema.MyTable (int i, date j)

and Calcite would create a table in Cassandra. We’d need to add SPIs to Schema 
to make that work.

Julian



> On Nov 23, 2017, at 9:00 AM, Michael Mior  wrote:
> 
> Reviewed 707. It's a lot of code, so I can't say I did a particularly
> thorough job, but no clear issues stuck out to me and the approach seems
> sound. Glad to see materialized views are included in there. Not suggesting
> this should be part of 707, but looking forward to having some adapters
> implement basic DDL in the future. It won't make sense for all of them, but
> I can certainly see it being useful. Awesome work!
> 
> --
> Michael Mior
> mm...@apache.org
> 
> 2017-11-22 18:28 GMT-05:00 Julian Hyde :
> 
>> An update on release 1.15. We’re still on track for first RC on Monday.
>> 
>> We never seem to do a good job of verifying Calcite’s adapters. Can I have
>> volunteers to validate the Cassandra, Mongo, and Druid adapters? I plan to
>> test Calcite on Windows.
>> 
>> The following issues remain for the release:
>> https://issues.apache.org/jira/browse/CALCITE-707 <
>> https://issues.apache.org/jira/browse/CALCITE-707> Server and DDL (julian)
>> https://issues.apache.org/jira/browse/CALCITE-2018 <
>> https://issues.apache.org/jira/browse/CALCITE-2018> AssertionError: rel
>> has lower cost (julian to review PR #552)
>> https://issues.apache.org/jira/browse/CALCITE-2041 <
>> https://issues.apache.org/jira/browse/CALCITE-2041> Adding the ability to
>> turn off nullability matching (julian to review PR #563 and #570)
>> https://issues.apache.org/jira/browse/CALCITE-2054 <
>> https://issues.apache.org/jira/browse/CALCITE-2054> UPDATE with
>> parameters (julian to review PR #568)
>> https://issues.apache.org/jira/browse/CALCITE-2061 <
>> https://issues.apache.org/jira/browse/CALCITE-2061> Parameters in OFFSET
>> and FETCH (julian to review PR #569)
>> https://issues.apache.org/jira/browse/CALCITE-1861 <
>> https://issues.apache.org/jira/browse/CALCITE-1861> Spatial indexes
>> https://issues.apache.org/jira/browse/CALCITE-1616 <
>> https://issues.apache.org/jira/browse/CALCITE-1616> Data profiler
>> 
>> All are “best effort”; i.e. they may not make it into the release.
>> 
>> Can someone please review 707? It is an important change.
>> 
>> Julian
>> 
>> 
>>> On Nov 14, 2017, at 12:37 PM, Michael Mior  wrote:
>>> 
>>> I looks like there are significant version upgrades available for
>> libraries
>>> in use within adapters. Those would probably be good to include as well.
>>> (The MongoDB driver in particular is three years out of date.)
>>> 
>>> --
>>> Michael Mior
>>> mm...@apache.org
>>> 
>>> 2017-11-14 14:51 GMT-05:00 Julian Hyde :
>>> 
 I have logged https://issues.apache.org/jira/browse/CALCITE-2049 <
 https://issues.apache.org/jira/browse/CALCITE-2049>, “Release Calcite
 1.15.0”. Please follow that to get updates on the state of the release.
 
 Vova, I would like to include https://issues.apache.org/
 jira/browse/CALCITE-2018  too. I will definitely review your pull
 request. Sorry it’s taken me a while.
 
 Everyone, please look at https://issues.apache.org/
 jira/browse/CALCITE-2027 , specifically the list of other technologies I
 would like to upgrade (guava, jetty, jackson, panino, h2, hsqldb,
>> javacc,
 maven) or change the “preferred” version. If there are other libraries
>> we
 should upgrade, let’s discuss. At this stage I would like to be
>> ambitious,
 and upgrade as far as we can.
 
 Julian
 
 
> On Nov 14, 2017, at 7:29 AM, Michael Mior  wrote:
> 
> Sounds good to me. I have nothing in particular I'm hoping to include.
> Looking forward to ditching JDK 7 :)
> 
> --
> Michael Mior
> mm...@apache.org
> 
> 2017-11-13 22:46 GMT-05:00 Julian Hyde :
> 
>> Last release (1.14) was on 2nd October. I think we should aim for a
>> release 1.15 in early December (which means starting an RC vote around
>> November 27), and I volunteer to be release manager.
>> 
>> Does this timing work for everyone?
>> 
>> Any particular features that people would like to include?
>> 
>> I would like to announce that this will be the last release that will
>> support JDK 7[1].
>> 
>> Julian
>> 
>> [1] 

Towards Avatica 1.11 and Avatica-Go version ?.?

2017-11-27 Thread Julian Hyde
It’s been a while since we released Avatica. At the very least we could use a 
new version to upgrade its dependencies.

Also, what about a release of Avatica-Go? I don’t think we have done an Apache 
release yet.

Julian



Re: Towards Calcite release 1.15

2017-11-27 Thread Julian Hyde
I’ve just committed 707 and 2061. That leaves the following:

https://issues.apache.org/jira/browse/CALCITE-2018 AssertionError: rel has 
lower cost (julian to review PR #552)
https://issues.apache.org/jira/browse/CALCITE-2054 UPDATE with parameters 
(julian to review PR #568)
https://issues.apache.org/jira/browse/CALCITE-1861 Spatial indexes
https://issues.apache.org/jira/browse/CALCITE-1616 Data profiler

Also seeing some minor issues in Windows, and possibly a performance regression 
in RelMetadataTest.testPullUpPredicatesForExprsItr.

First RC probably tomorrow. Not all of the above will make the cut.

Has anyone had chance to test any of the adapters?

We’re trying to get to stable, so please don’t make commits without my +1 (I 
have been running exhaustive tests before committing).

Julian



> On Nov 27, 2017, at 11:10 AM, Julian Hyde  wrote:
> 
> Thanks for reviewing, Michael. Yes, it’s a lot.
> 
> Materialized views were a big motivation for doing this. You currently have 
> to do some tricky work with APIs to define materialized views (mappings 
> inside the planner, predicates, statistics). I wanted to demonstrate it 
> working using a few lines of SQL.
> 
> I hadn’t really thought of DDL + adapters. Yes, I guess someone could do
> 
>  CREATE TABLE MyCassandraSchema.MyTable (int i, date j)
> 
> and Calcite would create a table in Cassandra. We’d need to add SPIs to 
> Schema to make that work.
> 
> Julian
> 
> 
> 
>> On Nov 23, 2017, at 9:00 AM, Michael Mior  wrote:
>> 
>> Reviewed 707. It's a lot of code, so I can't say I did a particularly
>> thorough job, but no clear issues stuck out to me and the approach seems
>> sound. Glad to see materialized views are included in there. Not suggesting
>> this should be part of 707, but looking forward to having some adapters
>> implement basic DDL in the future. It won't make sense for all of them, but
>> I can certainly see it being useful. Awesome work!
>> 
>> --
>> Michael Mior
>> mm...@apache.org
>> 
>> 2017-11-22 18:28 GMT-05:00 Julian Hyde :
>> 
>>> An update on release 1.15. We’re still on track for first RC on Monday.
>>> 
>>> We never seem to do a good job of verifying Calcite’s adapters. Can I have
>>> volunteers to validate the Cassandra, Mongo, and Druid adapters? I plan to
>>> test Calcite on Windows.
>>> 
>>> The following issues remain for the release:
>>> https://issues.apache.org/jira/browse/CALCITE-707 <
>>> https://issues.apache.org/jira/browse/CALCITE-707> Server and DDL (julian)
>>> https://issues.apache.org/jira/browse/CALCITE-2018 <
>>> https://issues.apache.org/jira/browse/CALCITE-2018> AssertionError: rel
>>> has lower cost (julian to review PR #552)
>>> https://issues.apache.org/jira/browse/CALCITE-2041 <
>>> https://issues.apache.org/jira/browse/CALCITE-2041> Adding the ability to
>>> turn off nullability matching (julian to review PR #563 and #570)
>>> https://issues.apache.org/jira/browse/CALCITE-2054 <
>>> https://issues.apache.org/jira/browse/CALCITE-2054> UPDATE with
>>> parameters (julian to review PR #568)
>>> https://issues.apache.org/jira/browse/CALCITE-2061 <
>>> https://issues.apache.org/jira/browse/CALCITE-2061> Parameters in OFFSET
>>> and FETCH (julian to review PR #569)
>>> https://issues.apache.org/jira/browse/CALCITE-1861 <
>>> https://issues.apache.org/jira/browse/CALCITE-1861> Spatial indexes
>>> https://issues.apache.org/jira/browse/CALCITE-1616 <
>>> https://issues.apache.org/jira/browse/CALCITE-1616> Data profiler
>>> 
>>> All are “best effort”; i.e. they may not make it into the release.
>>> 
>>> Can someone please review 707? It is an important change.
>>> 
>>> Julian
>>> 
>>> 
 On Nov 14, 2017, at 12:37 PM, Michael Mior  wrote:
 
 I looks like there are significant version upgrades available for
>>> libraries
 in use within adapters. Those would probably be good to include as well.
 (The MongoDB driver in particular is three years out of date.)
 
 --
 Michael Mior
 mm...@apache.org
 
 2017-11-14 14:51 GMT-05:00 Julian Hyde :
 
> I have logged https://issues.apache.org/jira/browse/CALCITE-2049 <
> https://issues.apache.org/jira/browse/CALCITE-2049>, “Release Calcite
> 1.15.0”. Please follow that to get updates on the state of the release.
> 
> Vova, I would like to include https://issues.apache.org/
> jira/browse/CALCITE-2018  jira/browse/CALCITE-2018> too. I will definitely review your pull
> request. Sorry it’s taken me a while.
> 
> Everyone, please look at https://issues.apache.org/
> jira/browse/CALCITE-2027  jira/browse/CALCITE-2027>, specifically the list of other technologies I
> would like to upgrade (guava, jetty, jackson, panino, h2, hsqldb,
>>> javacc,
> maven) or change the “preferred” version. If there are other libraries
>>> we
> 

[jira] [Created] (CALCITE-2067) RexBuilder can't handle NaN,Infinity double constants

2017-11-27 Thread Volodymyr Tkach (JIRA)
Volodymyr Tkach created CALCITE-2067:


 Summary: RexBuilder can't handle NaN,Infinity double constants
 Key: CALCITE-2067
 URL: https://issues.apache.org/jira/browse/CALCITE-2067
 Project: Calcite
  Issue Type: Bug
  Components: core
Affects Versions: 1.13.0
Reporter: Volodymyr Tkach
Assignee: Julian Hyde


Currently we are working in Drill to allow support for Nan an Infinity values . 
When using such values with functions we see the NumberFormatException 
exception. 

Query example: select sin(cast('NaN' as float)) from (values(1)).

RexBuilder#clean and other RexBuilder's methods use BigDecimal for handling 
Double values, that's why we get NumberFormatException for nan,inf values.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


JIRA Github integration

2017-11-27 Thread Enrico Olivelli
Hi,
I see that there is no automatic link between PRs and JIRA.
In Apache BookKeeper (I am committer there) we have such link: if you name
a PR with for instance CALCITE-Xxx and you cite the issue id in commit
messages Apache Github bot is able to copy every comment to JIRA
automatically.
I think this we be very useful.
I think that just an infra ticket can enable it.

Cheers
Enrico
-- 


-- Enrico Olivelli


Re: Towards Avatica 1.11 and Avatica-Go version ?.?

2017-11-27 Thread F21

Here's my update for avatica-go:

I am currently still accepting PRs and pushing fixes to the original 
boostport/avatica repository as there is not a release for Avatica-Go 
yet. Changes to boostport/avatica are currently cherry-picked into 
Avatica-Go.


In regards to the work done on Avatica-Go:
- Most of the pieces are already in place.
- The documentation for the website is in the _site directory on a 
branch, but it might need some updating to bring it up to date.
- Need to make sure the website documentation is in the right format and 
directory structure so that it can be pulled in to calcite-avatica and 
built together.

- The tests are currently passing against Apache Phoenix.
- Unfortunately, the tests against Avatica HSQLDB are still failing due 
to CALCITE-2013, CALCITE-1957, CALCITE-1951 and CALCITE-1950.
- There is some phoenix specific code that parses the error message to 
get the error code and the error constant. This is obviously quite 
brittle and will break against other DBs, so it would be nice if avatica 
could return these pieces to us directly (have not checked if there's a 
JIRA for this).


I don't think I'm ready to release a version of Avatica-Go before we can 
get the tests passing against Avatica HSQLDB, but I think I should be 
able to make significant progress with this once a new Avatica with 
updated deps is released.


Francis

On 28/11/2017 8:14 AM, Julian Hyde wrote:

It’s been a while since we released Avatica. At the very least we could use a 
new version to upgrade its dependencies.

Also, what about a release of Avatica-Go? I don’t think we have done an Apache 
release yet.

Julian





Re: Towards Calcite release 1.15

2017-11-27 Thread Enrico Olivelli
Il lun 27 nov 2017, 20:19 Julian Hyde  ha scritto:

> I’ve just committed 707 and 2061. That leaves the following:
>
> https://issues.apache.org/jira/browse/CALCITE-2018 AssertionError: rel
> has lower cost (julian to review PR #552)
> https://issues.apache.org/jira/browse/CALCITE-2054 UPDATE with parameters
> (julian to review PR #568)
>

Hope this can get in. I will do my best to address comments asap.
This is blocker for me
Thanks

https://issues.apache.org/jira/browse/CALCITE-1861 Spatial indexes
> https://issues.apache.org/jira/browse/CALCITE-1616 Data profiler
>
> Also seeing some minor issues in Windows, and possibly a performance
> regression in RelMetadataTest.testPullUpPredicatesForExprsItr.
>
> First RC probably tomorrow. Not all of the above will make the cut.
>
> Has anyone had chance to test any of the adapters?
>
> We’re trying to get to stable, so please don’t make commits without my +1
> (I have been running exhaustive tests before committing).
>
> Julian
>
>
>
> > On Nov 27, 2017, at 11:10 AM, Julian Hyde  wrote:
> >
> > Thanks for reviewing, Michael. Yes, it’s a lot.
> >
> > Materialized views were a big motivation for doing this. You currently
> have to do some tricky work with APIs to define materialized views
> (mappings inside the planner, predicates, statistics). I wanted to
> demonstrate it working using a few lines of SQL.
> >
> > I hadn’t really thought of DDL + adapters. Yes, I guess someone could do
> >
> >  CREATE TABLE MyCassandraSchema.MyTable (int i, date j)
> >
> > and Calcite would create a table in Cassandra. We’d need to add SPIs to
> Schema to make that work.
> >
> > Julian
> >
> >
> >
> >> On Nov 23, 2017, at 9:00 AM, Michael Mior  wrote:
> >>
> >> Reviewed 707. It's a lot of code, so I can't say I did a particularly
> >> thorough job, but no clear issues stuck out to me and the approach seems
> >> sound. Glad to see materialized views are included in there. Not
> suggesting
> >> this should be part of 707, but looking forward to having some adapters
> >> implement basic DDL in the future. It won't make sense for all of them,
> but
> >> I can certainly see it being useful. Awesome work!
> >>
> >> --
> >> Michael Mior
> >> mm...@apache.org
> >>
> >> 2017-11-22 18:28 GMT-05:00 Julian Hyde :
> >>
> >>> An update on release 1.15. We’re still on track for first RC on Monday.
> >>>
> >>> We never seem to do a good job of verifying Calcite’s adapters. Can I
> have
> >>> volunteers to validate the Cassandra, Mongo, and Druid adapters? I
> plan to
> >>> test Calcite on Windows.
> >>>
> >>> The following issues remain for the release:
> >>> https://issues.apache.org/jira/browse/CALCITE-707 <
> >>> https://issues.apache.org/jira/browse/CALCITE-707> Server and DDL
> (julian)
> >>> https://issues.apache.org/jira/browse/CALCITE-2018 <
> >>> https://issues.apache.org/jira/browse/CALCITE-2018> AssertionError:
> rel
> >>> has lower cost (julian to review PR #552)
> >>> https://issues.apache.org/jira/browse/CALCITE-2041 <
> >>> https://issues.apache.org/jira/browse/CALCITE-2041> Adding the
> ability to
> >>> turn off nullability matching (julian to review PR #563 and #570)
> >>> https://issues.apache.org/jira/browse/CALCITE-2054 <
> >>> https://issues.apache.org/jira/browse/CALCITE-2054> UPDATE with
> >>> parameters (julian to review PR #568)
> >>> https://issues.apache.org/jira/browse/CALCITE-2061 <
> >>> https://issues.apache.org/jira/browse/CALCITE-2061> Parameters in
> OFFSET
> >>> and FETCH (julian to review PR #569)
> >>> https://issues.apache.org/jira/browse/CALCITE-1861 <
> >>> https://issues.apache.org/jira/browse/CALCITE-1861> Spatial indexes
> >>> https://issues.apache.org/jira/browse/CALCITE-1616 <
> >>> https://issues.apache.org/jira/browse/CALCITE-1616> Data profiler
> >>>
> >>> All are “best effort”; i.e. they may not make it into the release.
> >>>
> >>> Can someone please review 707? It is an important change.
> >>>
> >>> Julian
> >>>
> >>>
>  On Nov 14, 2017, at 12:37 PM, Michael Mior 
> wrote:
> 
>  I looks like there are significant version upgrades available for
> >>> libraries
>  in use within adapters. Those would probably be good to include as
> well.
>  (The MongoDB driver in particular is three years out of date.)
> 
>  --
>  Michael Mior
>  mm...@apache.org
> 
>  2017-11-14 14:51 GMT-05:00 Julian Hyde :
> 
> > I have logged https://issues.apache.org/jira/browse/CALCITE-2049 <
> > https://issues.apache.org/jira/browse/CALCITE-2049>, “Release
> Calcite
> > 1.15.0”. Please follow that to get updates on the state of the
> release.
> >
> > Vova, I would like to include https://issues.apache.org/
> > jira/browse/CALCITE-2018  > jira/browse/CALCITE-2018> too. I will definitely review your pull
> > request. Sorry it’s taken me a while.
> >
> 

Re: JIRA Github integration

2017-11-27 Thread Michael Mior
Sounds fine to me personally although perhaps others have some objections
I'm not aware of.

--
Michael Mior
mm...@apache.org

2017-11-27 15:44 GMT-05:00 Enrico Olivelli :

> Hi,
> I see that there is no automatic link between PRs and JIRA.
> In Apache BookKeeper (I am committer there) we have such link: if you name
> a PR with for instance CALCITE-Xxx and you cite the issue id in commit
> messages Apache Github bot is able to copy every comment to JIRA
> automatically.
> I think this we be very useful.
> I think that just an infra ticket can enable it.
>
> Cheers
> Enrico
> --
>
>
> -- Enrico Olivelli
>


Calcite-Master - Build # 154 - Still Failing

2017-11-27 Thread Apache Jenkins Server
The Apache Jenkins build system has built Calcite-Master (build #154)

Status: Still Failing

Check console output at https://builds.apache.org/job/Calcite-Master/154/ to 
view the results.

Re: JIRA Github integration

2017-11-27 Thread Julian Hyde
No objections from me, as long as it doesn’t cause excessive posts to the dev 
list.

As a small project this is an area we have under-invested. Larger projects such 
as Spark seem to have very nice integration between GitHub, JIRA and various 
CIs.

Julian


> On Nov 27, 2017, at 1:15 PM, Michael Mior  wrote:
> 
> Sounds fine to me personally although perhaps others have some objections
> I'm not aware of.
> 
> --
> Michael Mior
> mm...@apache.org
> 
> 2017-11-27 15:44 GMT-05:00 Enrico Olivelli :
> 
>> Hi,
>> I see that there is no automatic link between PRs and JIRA.
>> In Apache BookKeeper (I am committer there) we have such link: if you name
>> a PR with for instance CALCITE-Xxx and you cite the issue id in commit
>> messages Apache Github bot is able to copy every comment to JIRA
>> automatically.
>> I think this we be very useful.
>> I think that just an infra ticket can enable it.
>> 
>> Cheers
>> Enrico
>> --
>> 
>> 
>> -- Enrico Olivelli
>> 



Re: Towards Calcite release 1.15

2017-11-27 Thread Michael Mior
I ran tests for the Cassandra adapter. I'll try to do this for a few others
as well.

--
Michael Mior
mm...@apache.org

2017-11-27 14:19 GMT-05:00 Julian Hyde :

> I’ve just committed 707 and 2061. That leaves the following:
>
> https://issues.apache.org/jira/browse/CALCITE-2018 AssertionError: rel
> has lower cost (julian to review PR #552)
> https://issues.apache.org/jira/browse/CALCITE-2054 UPDATE with parameters
> (julian to review PR #568)
> https://issues.apache.org/jira/browse/CALCITE-1861 Spatial indexes
> https://issues.apache.org/jira/browse/CALCITE-1616 Data profiler
>
> Also seeing some minor issues in Windows, and possibly a performance
> regression in RelMetadataTest.testPullUpPredicatesForExprsItr.
>
> First RC probably tomorrow. Not all of the above will make the cut.
>
> Has anyone had chance to test any of the adapters?
>
> We’re trying to get to stable, so please don’t make commits without my +1
> (I have been running exhaustive tests before committing).
>
> Julian
>
>
>
> > On Nov 27, 2017, at 11:10 AM, Julian Hyde  wrote:
> >
> > Thanks for reviewing, Michael. Yes, it’s a lot.
> >
> > Materialized views were a big motivation for doing this. You currently
> have to do some tricky work with APIs to define materialized views
> (mappings inside the planner, predicates, statistics). I wanted to
> demonstrate it working using a few lines of SQL.
> >
> > I hadn’t really thought of DDL + adapters. Yes, I guess someone could do
> >
> >  CREATE TABLE MyCassandraSchema.MyTable (int i, date j)
> >
> > and Calcite would create a table in Cassandra. We’d need to add SPIs to
> Schema to make that work.
> >
> > Julian
> >
> >
> >
> >> On Nov 23, 2017, at 9:00 AM, Michael Mior  wrote:
> >>
> >> Reviewed 707. It's a lot of code, so I can't say I did a particularly
> >> thorough job, but no clear issues stuck out to me and the approach seems
> >> sound. Glad to see materialized views are included in there. Not
> suggesting
> >> this should be part of 707, but looking forward to having some adapters
> >> implement basic DDL in the future. It won't make sense for all of them,
> but
> >> I can certainly see it being useful. Awesome work!
> >>
> >> --
> >> Michael Mior
> >> mm...@apache.org
> >>
> >> 2017-11-22 18:28 GMT-05:00 Julian Hyde :
> >>
> >>> An update on release 1.15. We’re still on track for first RC on Monday.
> >>>
> >>> We never seem to do a good job of verifying Calcite’s adapters. Can I
> have
> >>> volunteers to validate the Cassandra, Mongo, and Druid adapters? I
> plan to
> >>> test Calcite on Windows.
> >>>
> >>> The following issues remain for the release:
> >>> https://issues.apache.org/jira/browse/CALCITE-707 <
> >>> https://issues.apache.org/jira/browse/CALCITE-707> Server and DDL
> (julian)
> >>> https://issues.apache.org/jira/browse/CALCITE-2018 <
> >>> https://issues.apache.org/jira/browse/CALCITE-2018> AssertionError:
> rel
> >>> has lower cost (julian to review PR #552)
> >>> https://issues.apache.org/jira/browse/CALCITE-2041 <
> >>> https://issues.apache.org/jira/browse/CALCITE-2041> Adding the
> ability to
> >>> turn off nullability matching (julian to review PR #563 and #570)
> >>> https://issues.apache.org/jira/browse/CALCITE-2054 <
> >>> https://issues.apache.org/jira/browse/CALCITE-2054> UPDATE with
> >>> parameters (julian to review PR #568)
> >>> https://issues.apache.org/jira/browse/CALCITE-2061 <
> >>> https://issues.apache.org/jira/browse/CALCITE-2061> Parameters in
> OFFSET
> >>> and FETCH (julian to review PR #569)
> >>> https://issues.apache.org/jira/browse/CALCITE-1861 <
> >>> https://issues.apache.org/jira/browse/CALCITE-1861> Spatial indexes
> >>> https://issues.apache.org/jira/browse/CALCITE-1616 <
> >>> https://issues.apache.org/jira/browse/CALCITE-1616> Data profiler
> >>>
> >>> All are “best effort”; i.e. they may not make it into the release.
> >>>
> >>> Can someone please review 707? It is an important change.
> >>>
> >>> Julian
> >>>
> >>>
>  On Nov 14, 2017, at 12:37 PM, Michael Mior 
> wrote:
> 
>  I looks like there are significant version upgrades available for
> >>> libraries
>  in use within adapters. Those would probably be good to include as
> well.
>  (The MongoDB driver in particular is three years out of date.)
> 
>  --
>  Michael Mior
>  mm...@apache.org
> 
>  2017-11-14 14:51 GMT-05:00 Julian Hyde :
> 
> > I have logged https://issues.apache.org/jira/browse/CALCITE-2049 <
> > https://issues.apache.org/jira/browse/CALCITE-2049>, “Release
> Calcite
> > 1.15.0”. Please follow that to get updates on the state of the
> release.
> >
> > Vova, I would like to include https://issues.apache.org/
> > jira/browse/CALCITE-2018  > jira/browse/CALCITE-2018> too. I will definitely review your pull
> > request. Sorry it’s taken me a while.
> 

About the Spatial functionality

2017-11-27 Thread Christian Tzolov
Hey there,

I'm exploring the new Spatial (https://calcite.apache.org/docs/spatial.html)
functionality and i've been trying to figure out what are the minimal
requirements for using it with my custom adapter.

Following the guidelines i've set LENIENT  conformance in my jdbc URL (
jdbc:calcite:conformance=LENIENT;
​model=...my model​
​
​
​)

But I am not sure how define the GEOMETRY column types?​

Currently my custom Schema/Table factory implementation infers the column
types from the underlaying system's field types.

So it seems that i need to change my implementation and somehow to hint
which fields needs to be mapped to GEOMETRY types?  Or perhaps i can try to
do some expensive casting in SQL?

Are there any guidelines, examples ​for using Spatial functionality on 3rd
party (e.g. custom) adapters?

Thanks,
Christian


Re: About the Spatial functionality

2017-11-27 Thread Julian Hyde
It’s true that you can’t define a GEOMETRY column in a foreign table. But you 
can define a VARCHAR column and apply the ST_GeomFromText to it, or if you want 
a point you can define a pair of DOUBLE columns and apply the ST_Point function.

In essence, our implementation of GEOMETRY is only an in-memory format right 
now, not an on-disk format. It’s a little less efficient than a native GEOMETRY 
data type but hopefully over time we will write optimizer rules that push down 
filters etc. so we don’t literally construct an in-memory geometry object for 
every row, only the rows we are interested in.

Julian

> On Nov 27, 2017, at 2:59 AM, Christian Tzolov  wrote:
> 
> Hey there,
> 
> I'm exploring the new Spatial (https://calcite.apache.org/docs/spatial.html)
> functionality and i've been trying to figure out what are the minimal
> requirements for using it with my custom adapter.
> 
> Following the guidelines i've set LENIENT  conformance in my jdbc URL (
> jdbc:calcite:conformance=LENIENT;
> ​model=...my model​
> ​
> ​
> ​)
> 
> But I am not sure how define the GEOMETRY column types?​
> 
> Currently my custom Schema/Table factory implementation infers the column
> types from the underlaying system's field types.
> 
> So it seems that i need to change my implementation and somehow to hint
> which fields needs to be mapped to GEOMETRY types?  Or perhaps i can try to
> do some expensive casting in SQL?
> 
> Are there any guidelines, examples ​for using Spatial functionality on 3rd
> party (e.g. custom) adapters?
> 
> Thanks,
> Christian