kennknowles commented on a change in pull request #10990: disable coder 
inference for rows
URL: https://github.com/apache/beam/pull/10990#discussion_r385303509
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamSetOperatorRelBase.java
 ##########
 @@ -65,6 +66,16 @@ 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."
 
 Review comment:
   This is the base class, so shouldn't be calling it "intersect". Incidentally 
I don't think having a base class adds much value here, so inlining or 
inverting would be a-ok.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to