[
https://issues.apache.org/jira/browse/GEARPUMP-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16170074#comment-16170074
]
ASF GitHub Bot commented on GEARPUMP-217:
-----------------------------------------
Github user manuzhang commented on a diff in the pull request:
https://github.com/apache/incubator-gearpump/pull/225#discussion_r139435394
--- Diff:
experiments/sql/src/test/java/org/apache/gearpump/sql/planner/CalciteTest.java
---
@@ -291,17 +290,25 @@ void calTest() throws SqlParseException {
cluster,
convertletTable);
RelRoot root = sqlToRelConverter.convertQuery(validatedSqlNode, false,
true);
- System.out.println(RelOptUtil.toString(root.rel));
+ // Check logical plan
+ String expectedResult = "LogicalProject(product_id=[$0],
product_name=[$1], order_id=[$2])" +
+ " LogicalFilter(condition=[>($3, 2)])" +
+ " LogicalProject(id=[$0], name=[$1], id1=[$3], quantity=[$4])" +
+ " LogicalJoin(condition=[=($2, $5)], joinType=[inner])" +
+ " LogicalProject(id=[$0], name=[$1], id0=[CAST($0):VARCHAR
CHARACTER SET \"ISO-8859-1\" COLLATE \"" +
+ "ISO-8859-1$en_US$primary\"])" +
+ " EnumerableTableScan(table=[[t, products]])" +
+ " LogicalProject(id=[$0], quantity=[$1],
id0=[CAST($0):VARCHAR CHARACTER SET \"ISO-8859-1\" COLLATE \"" +
+ "ISO-8859-1$en_US$primary\"])" +
+ " EnumerableTableScan(table=[[t, orders]])";
+ assertEquals(expectedResult,
--- End diff --
What's the usage of codes below this ?
> Add SQL support
> ----------------
>
> Key: GEARPUMP-217
> URL: https://issues.apache.org/jira/browse/GEARPUMP-217
> Project: Apache Gearpump
> Issue Type: New Feature
> Components: streaming
> Affects Versions: 0.8.1
> Reporter: Manu Zhang
> Assignee: Buddhi Ayesha
> Labels: gsoc2017, mentor
>
> SQL support will allow those unfamiliar with Scala/Java to use Gearpump. I
> propose to build SQL layer with Apache Calcite because
> 1. It has done the hard job of parsing, translating logical plan to physical
> plan and optimizing.
> 2. It is under active development and has a great community.
> 3. It's proved to be a good solution since Apache Storm, Apache Flink and
> Apache Samza all build their Streaming SQL with Apache Calcite
> Note SQL here actually means Streaming SQL dialects supported by Calcite
> (check reference 1 and 2). Please checkout reference 3 for an example
> implementation.
> The physical plan will be translated to Gearpump high level DSL.
> References:
> 1. http://www.slideshare.net/julianhyde/streaming-sql
> 2. https://calcite.apache.org/docs/stream.html
> 3. https://github.com/milinda/samza-sql
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)