bmg icon indicating copy to clipboard operation
bmg copied to clipboard

projections shouldn't always be pushed down the tree.

Open robertoplancarte opened this issue 1 year ago • 0 comments

This test fails on the second expect because projection always happens before transform.

    it 'respects order of operations' do
      db = Relation.new([{ a: 'a' }, { a: 'A' }])

      got = db.project([:a]).transform(:upcase)
      expect(got.to_a).to eql([{ a: 'A' }, { a: 'A' }])

      got = db.transform(:upcase).project([:a])
      expect(got.to_a).to eql([{ a: 'A' }])
    end

This issue was introduced by commit efcdd73 because projections can't always be pushed down the tree.

robertoplancarte avatar Nov 13 '24 18:11 robertoplancarte