lib/alf/operator/relational/not_matching.rb in alf-0.10.1 vs lib/alf/operator/relational/not_matching.rb in alf-0.11.0

- old
+ new

@@ -1,45 +1,18 @@ module Alf - module Operator::Relational - class NotMatching < Alf::Operator() - include Operator::Relational, Operator::Shortcut, Operator::Binary - - signature do |s| - end - - # - # Performs a NotMatching of two relations through a Hash buffer on the - # right one. - # - class HashBased - include Operator, Operator::Binary - - # (see Operator#_each) - def _each - seen, key = nil, nil - left.each do |left_tuple| - seen ||= begin - h = Hash.new - right.each do |right_tuple| - key ||= coerce(left_tuple.keys & right_tuple.keys, AttrList) - h[key.project(right_tuple)] = true - end - key ||= coerce([], AttrList) - h - end - yield(left_tuple) unless seen.has_key?(key.project(left_tuple)) - end + module Operator + module Relational + class NotMatching + include Relational, Binary + + signature do |s| end - - end # class HashBased - - protected - - # (see Shortcut#longexpr) - def longexpr - chain HashBased.new, - datasets - end - - end # class NotMatching - end # module Operator::Relational + + # (see Operator#compile) + def compile + Engine::Semi::Hash.new(left, right, false) + end + + end # class NotMatching + end # module Relational + end # module Operator end # module Alf