lib/bmg/algebra/shortcuts.rb in bmg-0.21.3 vs lib/bmg/algebra/shortcuts.rb in bmg-0.21.4

- old
+ new

@@ -55,9 +55,17 @@ return super unless on.is_a?(Hash) renaming = Hash[on.map{|k,v| [v,k] }] self.left_join(right.rename(renaming), on.keys, *args) end + def cross_product(right) + return join(right) unless self.type.typechecked? || right.type.typechecked? + return join(right) unless self.type.knows_attrlist? && right.type.knows_attrlist? + + self.type.cross_join_compatible!(right) + return join(right) + end + def matching(right, on = []) return super unless on.is_a?(Hash) renaming = Hash[on.map{|k,v| [v,k] }] self.matching(right.rename(renaming), on.keys) end