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

ASF GitHub Bot commented on BEAM-2442:
--------------------------------------

GitHub user xumingming opened a pull request:

    https://github.com/apache/beam/pull/3357

    [BEAM-2442] BeamSql api surface test

    Summary:
    
    * The surface api of BeamSql includes the following:
      * BeamSql
      * BeamSqlCli
      * BeamSqlEnv
      * All the classes in package `org.apache.beam.dsls.sql.schema`
    * Now `BeamSql` and `BeamSqlCli` both extends from `BeamSqlEnv` to avoid 
expose `SchemaPlus` and `BeamQueryPlanner`.
    * Calcite realted methods are encapsulated into `CalciteUtils`(which is not 
part of surface api) to avoid exposure.
    * Created a new `BeamSqlTable` which abstracts the beam `table` concept.
    * `RelDataType`, `RelProtoDataType` are all removed from surface api, 
`BeamSqlRecordType` is the only class which represents the schema of a table.
      * java.sql.Types is used to represent sql type instead of Calcite 
`SqlTypeName`.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/xumingming/beam BEAM-2442-api-surface-test

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/beam/pull/3357.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3357
    
----
commit 507e0451584d20bd7d2fe59a5ee410cc8959f5d8
Author: James Xu <[email protected]>
Date:   2017-06-14T15:47:10Z

    [BEAM-2442] BeamSql surface api test.

----


> DSL SQL: Public classes/methods should not expose/use calcite types
> -------------------------------------------------------------------
>
>                 Key: BEAM-2442
>                 URL: https://issues.apache.org/jira/browse/BEAM-2442
>             Project: Beam
>          Issue Type: Improvement
>          Components: dsl-sql
>            Reporter: Luke Cwik
>            Assignee: James Xu
>              Labels: dsl_sql_merge
>
> Calcite is an internal implementation detail of how Beam SQL is operating. To 
> prevent a hard dependence on Calcite, public methods and classes should not 
> rely on consuming/producing Calcite types.
> For example, BeamSqlRecordType uses org.apache.calcite.sql.type.SqlTypeName 
> instead of using the Java SQL types 
> (https://docs.oracle.com/javase/8/docs/api/java/sql/Types.html).
> This task is to create an ApiSurfaceTest to help find, fix, and prevent 
> org.apache.calcite.* from being exposed. Example ApiSurfaceTest: 
> https://github.com/apache/beam/blob/367fcb28d544934797d25cb34d54136b2d7d6e99/sdks/java/core/src/test/java/org/apache/beam/SdkCoreApiSurfaceTest.java



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

Reply via email to