You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by walterddr <gi...@git.apache.org> on 2017/10/31 18:16:18 UTC

[GitHub] flink pull request #4929: [FLINK-7922][Table API]make FlinkTypeFactory overr...

GitHub user walterddr opened a pull request:

    https://github.com/apache/flink/pull/4929

    [FLINK-7922][Table API]make FlinkTypeFactory override leastRestrictive to work with Nullable composite types while using super class method to handle basic type 

    
    ## What is the purpose of the change
    
    This pull request address usage of multiple composite type operation such as UNION or CASE WHEN where incorrect output RelDataType was generated due to the fact that Calcite automatically resolve result into basic type or Generic Relation Data Type with false nullability.
    
    ## Brief change log
    Changed leastRestrictive function to resolve types with all identical typeinfomation directly instead of calling the super class method. 
    Throw exception on ANY as we only support ANY with exact same types across all operands.
    Invoke super class if not correctly resolved.
    
    
    ## Verifying this change
    Integration test and unit test included to address UNION ALL and CASE WHEN.
    
    
    ## Does this pull request potentially affect one of the following parts:
    no
    
    ## Documentation
    no


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

    $ git pull https://github.com/walterddr/flink FLINK-7922

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

    https://github.com/apache/flink/pull/4929.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 #4929
    
----
commit 1f6a452be6233f5d18a80802f58b78baa708d15c
Author: Rong Rong <ro...@uber.com>
Date:   2017-10-31T18:05:38Z

    make FlinkTypeFactory override leastRestrictive to work with composite but all equivalent types, include Nullable and Any typaes.

----


---

[GitHub] flink issue #4929: [FLINK-7922][Table API]make FlinkTypeFactory override lea...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the issue:

    https://github.com/apache/flink/pull/4929
  
    Thanks for the PR @walterddr. 
    I'll add the test for the Streaming API and merge it.
    
    Thanks, Fabian


---

[GitHub] flink pull request #4929: [FLINK-7922][Table API]make FlinkTypeFactory overr...

Posted by walterddr <gi...@git.apache.org>.
Github user walterddr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4929#discussion_r148083555
  
    --- Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/batch/sql/SetOperatorsTest.scala ---
    @@ -178,4 +182,54 @@ class SetOperatorsTest extends TableTestBase {
           expected
         )
       }
    +
    +  @Test
    +  def testUnionNullableTypes(): Unit = {
    --- End diff --
    
    I think this should also be added to stream API as well but I am not sure which test category it falls into.


---

[GitHub] flink pull request #4929: [FLINK-7922][Table API]make FlinkTypeFactory overr...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/4929


---