namhnguyen / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Optimizer tests need to more cleanly print physical query plans. #211

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Consider this query plan produced by our optimizer tests (actual plan):

-- SINK_WRITE  |PARTITIONED|
  -- RANDOM_MERGE_EXCHANGE  |PARTITIONED|
    -- STREAM_PROJECT  |PARTITIONED|
      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
        -- BTREE_SEARCH  |PARTITIONED|
          -- ONE_TO_ONE_EXCHANGE  |LOCAL|
            -- STABLE_SORT [$$20(ASC)]  |LOCAL|
              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                -- STREAM_PROJECT  |PARTITIONED|
                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                    -- BTREE_SEARCH  |PARTITIONED|
                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                        -- ASSIGN  |PARTITIONED|
                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|

Notice that the sort includes the variable it is operating on. 

This is the cause of much pain when adding new rewrite rules. Often, variable 
numbers change but the plans stay identical. Hence, correct rewrite rules may 
cause a significant number of tests to fail because of differences in variable 
numbers.

Original issue reported on code.google.com by alexande...@gmail.com on 19 Oct 2012 at 8:00

GoogleCodeExporter commented 9 years ago
Alex is this issue still valid or have you fixed it in any of your branches ? 

Original comment by khfaraaz82 on 20 Nov 2012 at 4:48

GoogleCodeExporter commented 9 years ago
This one is still valid.

Original comment by alexande...@gmail.com on 20 Nov 2012 at 5:59

GoogleCodeExporter commented 9 years ago
Thanks Alex.

Original comment by khfaraaz82 on 20 Nov 2012 at 6:25

GoogleCodeExporter commented 9 years ago

Original comment by vinay...@gmail.com on 17 May 2013 at 8:54