Ejemplo n.º 1
0
 public MapJoinStreamingRelation getStreamingSide() {
   RelMetadataQuery mq = RelMetadataQuery.instance();
   Double leftInputSize = mq.memory(left);
   Double rightInputSize = mq.memory(right);
   if (leftInputSize == null && rightInputSize == null) {
     return MapJoinStreamingRelation.NONE;
   } else if (leftInputSize != null
       && (rightInputSize == null || (leftInputSize < rightInputSize))) {
     return MapJoinStreamingRelation.RIGHT_RELATION;
   } else if (rightInputSize != null
       && (leftInputSize == null || (rightInputSize <= leftInputSize))) {
     return MapJoinStreamingRelation.LEFT_RELATION;
   }
   return MapJoinStreamingRelation.NONE;
 }