[ 
https://issues.apache.org/jira/browse/BEAM-9670?focusedWorklogId=414866&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-414866
 ]

ASF GitHub Bot logged work on BEAM-9670:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Apr/20 17:07
            Start Date: 02/Apr/20 17:07
    Worklog Time Spent: 10m 
      Work Description: TheNeuralBit commented on pull request #11290: 
[BEAM-9670] Fix nullability widening in CoGroup key resolution
URL: https://github.com/apache/beam/pull/11290#discussion_r402472001
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamSetOperatorRelBase.java
 ##########
 @@ -63,16 +62,6 @@ public BeamSetOperatorRelBase(BeamRelNode beamRelNode, 
OpType opType, boolean al
         inputs);
     PCollection<Row> leftRows = inputs.get(0);
     PCollection<Row> rightRows = inputs.get(1);
-    Schema leftSchema = leftRows.getSchema();
-    Schema rightSchema = rightRows.getSchema();
-    if (!leftSchema.typesEqual(rightSchema)) {
-      throw new IllegalArgumentException(
-          "Can't intersect two tables with different schemas."
-              + "lhsSchema: "
-              + leftSchema
-              + "  rhsSchema: "
-              + rightSchema);
-    }
 
 Review comment:
   Ah I see. If there aren't any tests verifying this already could you add one?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 414866)
    Time Spent: 1h 20m  (was: 1h 10m)

> CoGroup transform should allow widening nullability in key schemas
> ------------------------------------------------------------------
>
>                 Key: BEAM-9670
>                 URL: https://issues.apache.org/jira/browse/BEAM-9670
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> If the key field for one input has schema INT32 and the key field for the 
> second input has schema NULLABLE[INT32], CoGroup fails - complaining that the 
> key fields don't match. Instead CoGroup should widen the nullability 
> restriction, creating a schema that allows either key input.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to