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

Julian Hyde commented on APEXMALHAR-1818:
-----------------------------------------

In SQL#1, the algebra is not represented as JSON, but by a tree of Java objects 
that are sub-classes of RelNode. It is produced by SqlToRelTranslator and is 
operated on by query-transformation rules RelOptRule.

In #2, the schema is provided by implementing the SchemaFactory interface (a 
"schema adapter"). Examples of this can be found in calcite/example/csv and 
calcite/cassandra.

In testing, there are two tracks. The streaming TCK (see CALCITE-1114) can be 
used to verify the runtime behavior of an engine that claims to be streaming 
SQL compliant. It is not complete and will be fairly complex. I don't think we 
should use it in phase 1.

The other track is simpler: a schema (as JSON) plus a SQL query in, and a DAG 
(as JSON) out. Since the inputs and outputs are text, and we don't need a 
connection to Kafka or Apex, this is a good basis for simple, fast unit tests. 
I suggest that we hand-write maybe 5 SQL queries and their expected DAGs, 
testing SELECT, WHERE, and perhaps OVER and GROUP BY.

> Integrate Calcite to support SQL
> --------------------------------
>
>                 Key: APEXMALHAR-1818
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-1818
>             Project: Apache Apex Malhar
>          Issue Type: New Feature
>          Components: query operators
>            Reporter: Amol
>            Assignee: Amol
>              Labels: roadmap
>
> Once we have ability to generate a subdag, we should take a look at 
> integrating Calcite into Apex. The operator that enables populate DAG, should 
> use Calcite to generate the DAG, given a SQL query.



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

Reply via email to