[ 
https://issues.apache.org/jira/browse/CALCITE-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15043712#comment-15043712
 ] 

Milinda Lakmal Pathirage commented on CALCITE-968:
--------------------------------------------------

[~julianhyde], fixes looks okay to me. I am getting following exception when I 
ran StreamTest. 

Running org.apache.calcite.test.StreamTest
Tests run: 7, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 8.753 sec <<< 
FAILURE! - in org.apache.calcite.test.StreamTest
testStreamToRelationJoin(org.apache.calcite.test.StreamTest)  Time elapsed: 
0.104 sec  <<< ERROR!
java.lang.RuntimeException: exception while preparing [select stream 
orders.rowtime as rowtime, orders.id as orderId, products.supplier as 
supplierId from orders join products on orders.product = products.id]
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.junit.Assert.assertThat(Assert.java:865)
        at org.junit.Assert.assertThat(Assert.java:832)
        at org.apache.calcite.test.CalciteAssert$2.apply(CalciteAssert.java:225)
        at org.apache.calcite.test.CalciteAssert$2.apply(CalciteAssert.java:219)
        at 
org.apache.calcite.test.CalciteAssert$13.apply(CalciteAssert.java:523)
        at 
org.apache.calcite.test.CalciteAssert$13.apply(CalciteAssert.java:521)
        at org.apache.calcite.runtime.Hook.run(Hook.java:128)
        at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:266)
        at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:190)
        at 
org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:727)
        at 
org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:586)
        at 
org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:556)
        at 
org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:214)
        at 
org.apache.calcite.jdbc.CalciteConnectionImpl.prepareStatement_(CalciteConnectionImpl.java:194)
        at 
org.apache.calcite.jdbc.CalciteConnectionImpl.prepareStatement(CalciteConnectionImpl.java:184)
        at 
org.apache.calcite.jdbc.CalciteConnectionImpl.prepareStatement(CalciteConnectionImpl.java:85)
        at 
org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:153)
        at 
org.apache.calcite.test.CalciteAssert.assertPrepare(CalciteAssert.java:544)
        at 
org.apache.calcite.test.CalciteAssert$AssertQuery.convertMatches(CalciteAssert.java:1257)
        at 
org.apache.calcite.test.CalciteAssert$AssertQuery.convertContains(CalciteAssert.java:1252)
        at 
org.apache.calcite.test.StreamTest.testStreamToRelationJoin(StreamTest.java:238)

According to IntelliJ IDEA MatcherAssert#20 looks like following:

{code:java}
if(!matcher.matches(actual)) {
{code}

Can the above exception be a NullPointerException? But if {{convertContains}} 
works for other tests, this should work for testStreamToRelationJoin as well. 
May be I am missing something obvious in the code.

> Support stream joins
> --------------------
>
>                 Key: CALCITE-968
>                 URL: https://issues.apache.org/jira/browse/CALCITE-968
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core, stream
>            Reporter: Milinda Lakmal Pathirage
>            Assignee: Julian Hyde
>         Attachments: CALCITE-968-0.patch
>
>
> Stream joins are used to relate information from different streams or stream 
> and relation combinations. Calcite lacks (proper) support for 
> stream-to-relation joins and stream-to-stream joins.
> stream-to-relation join like below fails at the SQL validation stage.
> select stream orders.orderId, orders.productId, products.name from orders 
> join products on orders.productId = products.id
> But if 'products' is a stream, the query is valid according to Calcite, even 
> though the stream-to-stream join in above query is not valid due to unbounded 
> nature of streams.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to