Sha256: 73ae12dcdf912a8aba338209c7b606302051fbb4de9df914f56e1cb43f8523a5

Contents?: true

Size: 649 Bytes

Versions: 5

Compression:

Stored size: 649 Bytes

Contents

module Alf
  module Algebra
    class Join
      include Operator
      include Relational
      include Binary

      signature do |s|
      end

      def heading
        @heading ||= left.heading + right.heading
      end

      def keys
        @keys ||= begin
          keys = []
          left.keys.each do |k1|
            right.keys.each do |k2|
              keys << (k1 | k2)
            end
          end
          Keys.new keys.uniq
        end
      end

    private

      def _type_check(options)
        joinable_headings!(left.heading, right.heading, options)
      end

    end # class Join
  end # module Algebra
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-core-0.16.3 lib/alf/algebra/operator/join.rb
alf-core-0.16.2 lib/alf/algebra/operator/join.rb
alf-core-0.16.1 lib/alf/algebra/operator/join.rb
alf-core-0.16.0 lib/alf/algebra/operator/join.rb
alf-core-0.15.0 lib/alf/algebra/operator/join.rb