[ASTERIXDB-2366][TEST] Optimizer tests cleanup for SQL++ - user model changes: no - storage format changes: no - interface changes: no
Details: The current optimizerTest actually doesn't use the SQL++ test cases. The existed test cases for SQLPP also have various issues. This patch cleans part of the test cases which failed at variable names changes in the result query plan. Change-Id: I8dbe67d6376d517a4919e8478a6e88326b3e1cc0 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2591 Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Contrib: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Dmitry Lychagin <dmitry.lycha...@couchbase.com> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/33a656d1 Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/33a656d1 Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/33a656d1 Branch: refs/heads/master Commit: 33a656d1d79540ccc776127e63678029a16ecba5 Parents: 8a984aa Author: Xikui Wang <xkk...@gmail.com> Authored: Thu Apr 12 20:25:45 2018 -0700 Committer: Xikui Wang <xkk...@gmail.com> Committed: Fri Apr 13 13:46:21 2018 -0700 ---------------------------------------------------------------------- ...rjoin-probe-pidx-with-join-btree-sidx_02.aql | 73 -------- ...oin-probe-pidx-with-join-btree-sidx_02.sqlpp | 74 ++++++++ .../btree-index-join/primary-equi-join_04.aql | 64 ------- .../btree-index-join/primary-equi-join_04.sqlpp | 71 ++++++++ .../secondary-equi-join-multiindex.aql | 78 --------- .../secondary-equi-join-multiindex.sqlpp | 75 ++++++++ .../btree-index-join/secondary-equi-join_02.aql | 57 ------- .../secondary-equi-join_02.sqlpp | 61 +++++++ .../btree-index-join/secondary-equi-join_03.aql | 47 ----- .../secondary-equi-join_03.sqlpp | 50 ++++++ .../queries/btree-index/btree-secondary-33.aql | 47 ----- .../btree-index/btree-secondary-33.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-34.aql | 47 ----- .../btree-index/btree-secondary-34.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-35.aql | 47 ----- .../btree-index/btree-secondary-35.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-36.aql | 47 ----- .../btree-index/btree-secondary-36.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-40.aql | 44 ----- .../btree-index/btree-secondary-40.sqlpp | 47 +++++ .../queries/btree-index/btree-secondary-42.aql | 45 ----- .../btree-index/btree-secondary-42.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-43.aql | 45 ----- .../btree-index/btree-secondary-43.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-44.aql | 47 ----- .../btree-index/btree-secondary-44.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-45.aql | 47 ----- .../btree-index/btree-secondary-45.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-46.aql | 45 ----- .../btree-index/btree-secondary-46.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-47.aql | 45 ----- .../btree-index/btree-secondary-47.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-48.aql | 45 ----- .../btree-index/btree-secondary-48.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-49.aql | 45 ----- .../btree-index/btree-secondary-49.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-51.aql | 46 ----- .../btree-index/btree-secondary-51.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-52.aql | 45 ----- .../btree-index/btree-secondary-52.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-53.aql | 45 ----- .../btree-index/btree-secondary-53.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-54.aql | 44 ----- .../btree-index/btree-secondary-54.sqlpp | 47 +++++ .../queries/btree-index/btree-secondary-55.aql | 44 ----- .../btree-index/btree-secondary-55.sqlpp | 47 +++++ .../queries/btree-index/btree-secondary-56.aql | 44 ----- .../btree-index/btree-secondary-56.sqlpp | 47 +++++ .../queries/btree-index/btree-secondary-57.aql | 44 ----- .../btree-index/btree-secondary-57.sqlpp | 47 +++++ .../queries/btree-index/btree-secondary-58.aql | 44 ----- .../btree-index/btree-secondary-58.sqlpp | 47 +++++ .../queries/btree-index/btree-secondary-59.aql | 44 ----- .../btree-index/btree-secondary-59.sqlpp | 47 +++++ .../queries/btree-index/btree-secondary-60.aql | 44 ----- .../btree-index/btree-secondary-60.sqlpp | 47 +++++ .../queries/btree-index/btree-secondary-61.aql | 46 ----- .../btree-index/btree-secondary-61.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-62.aql | 47 ----- .../btree-index/btree-secondary-62.sqlpp | 48 ++++++ .../queries/btree-index/btree-secondary-63.aql | 47 ----- .../btree-index/btree-secondary-63.sqlpp | 48 ++++++ .../optimizerts/queries/collocated.aql | 49 ------ .../optimizerts/queries/collocated.sqlpp | 49 ++++++ .../optimizerts/queries/cust_group_no_agg.aql | 46 ----- .../optimizerts/queries/cust_group_no_agg.sqlpp | 48 ++++++ .../optimizerts/queries/denorm-cust-order.aql | 68 -------- .../optimizerts/queries/denorm-cust-order.sqlpp | 70 ++++++++ .../queries/disjunction-to-join-delete-3.aql | 32 ---- .../queries/disjunction-to-join-delete-3.sqlpp | 38 +++++ .../queries/insert-and-scan-dataset.aql | 44 ----- .../queries/insert-and-scan-dataset.sqlpp | 43 +++++ .../queries/introhashpartitionmerge.aql | 41 ----- .../queries/introhashpartitionmerge.sqlpp | 48 ++++++ .../ngram-contains-panic.aql | 47 ----- .../ngram-contains-panic.sqlpp | 49 ++++++ .../inverted-index-basic/ngram-contains.aql | 46 ----- .../inverted-index-basic/ngram-contains.sqlpp | 49 ++++++ .../ngram-edit-distance-check.aql | 45 ----- .../ngram-edit-distance-check.sqlpp | 48 ++++++ .../ngram-edit-distance.aql | 45 ----- .../ngram-edit-distance.sqlpp | 48 ++++++ .../ngram-fuzzyeq-edit-distance.aql | 48 ------ .../ngram-fuzzyeq-edit-distance.sqlpp | 52 ++++++ .../ngram-fuzzyeq-jaccard.aql | 49 ------ .../ngram-fuzzyeq-jaccard.sqlpp | 54 ++++++ .../ngram-jaccard-check.aql | 46 ----- .../ngram-jaccard-check.sqlpp | 50 ++++++ .../inverted-index-basic/ngram-jaccard.aql | 46 ----- .../inverted-index-basic/ngram-jaccard.sqlpp | 50 ++++++ .../olist-edit-distance-check-panic.aql | 54 ------ .../olist-edit-distance-check-panic.sqlpp | 61 +++++++ .../olist-edit-distance-check.aql | 53 ------ .../olist-edit-distance-check.sqlpp | 61 +++++++ .../olist-edit-distance-panic.aql | 54 ------ .../olist-edit-distance-panic.sqlpp | 61 +++++++ .../olist-edit-distance.aql | 53 ------ .../olist-edit-distance.sqlpp | 61 +++++++ .../olist-fuzzyeq-edit-distance.aql | 56 ------ .../olist-fuzzyeq-edit-distance.sqlpp | 65 +++++++ .../olist-fuzzyeq-jaccard.aql | 55 ------ .../olist-fuzzyeq-jaccard.sqlpp | 64 +++++++ .../olist-jaccard-check.aql | 52 ------ .../olist-jaccard-check.sqlpp | 60 +++++++ .../inverted-index-basic/olist-jaccard.aql | 52 ------ .../inverted-index-basic/olist-jaccard.sqlpp | 60 +++++++ .../ulist-fuzzyeq-jaccard.aql | 55 ------ .../ulist-fuzzyeq-jaccard.sqlpp | 64 +++++++ .../ulist-jaccard-check.aql | 52 ------ .../ulist-jaccard-check.sqlpp | 60 +++++++ .../inverted-index-basic/ulist-jaccard.aql | 52 ------ .../inverted-index-basic/ulist-jaccard.sqlpp | 60 +++++++ .../inverted-index-basic/word-contains.aql | 47 ----- .../inverted-index-basic/word-contains.sqlpp | 49 ++++++ .../word-fuzzyeq-jaccard.aql | 48 ------ .../word-fuzzyeq-jaccard.sqlpp | 52 ++++++ .../inverted-index-basic/word-jaccard-check.aql | 46 ----- .../word-jaccard-check.sqlpp | 48 ++++++ .../inverted-index-basic/word-jaccard.aql | 46 ----- .../inverted-index-basic/word-jaccard.sqlpp | 48 ++++++ ...edit-distance-check-let-panic-nopanic_01.aql | 50 ------ ...it-distance-check-let-panic-nopanic_01.sqlpp | 52 ++++++ ...edit-distance-check-let-panic-nopanic_02.aql | 50 ------ ...it-distance-check-let-panic-nopanic_02.sqlpp | 52 ++++++ .../ngram-edit-distance-check-let.aql | 47 ----- .../ngram-edit-distance-check-let.sqlpp | 50 ++++++ .../ngram-edit-distance-check-substring.aql | 49 ------ .../ngram-edit-distance-check-substring.sqlpp | 49 ++++++ .../ngram-jaccard-check-let.aql | 48 ------ .../ngram-jaccard-check-let.sqlpp | 52 ++++++ .../ngram-jaccard-check-multi-let.aql | 51 ------ .../ngram-jaccard-check-multi-let.sqlpp | 54 ++++++ .../olist-edit-distance-check-let-panic.aql | 55 ------ .../olist-edit-distance-check-let-panic.sqlpp | 63 +++++++ .../olist-edit-distance-check-let.aql | 55 ------ .../olist-edit-distance-check-let.sqlpp | 63 +++++++ .../olist-jaccard-check-let.aql | 54 ------ .../olist-jaccard-check-let.sqlpp | 62 +++++++ .../ulist-jaccard-check-let.aql | 54 ------ .../ulist-jaccard-check-let.sqlpp | 62 +++++++ .../word-jaccard-check-let.aql | 48 ------ .../word-jaccard-check-let.sqlpp | 50 ++++++ .../word-jaccard-check-multi-let.aql | 50 ------ .../word-jaccard-check-multi-let.sqlpp | 52 ++++++ .../ngram-edit-distance-inline.aql | 49 ------ .../ngram-edit-distance-inline.sqlpp | 52 ++++++ .../ngram-fuzzyeq-edit-distance.aql | 60 ------- .../ngram-fuzzyeq-edit-distance.sqlpp | 65 +++++++ .../ngram-jaccard-inline.aql | 50 ------ .../ngram-jaccard-inline.sqlpp | 54 ++++++ .../olist-edit-distance-inline.aql | 56 ------ .../olist-edit-distance-inline.sqlpp | 64 +++++++ .../olist-jaccard-inline.aql | 56 ------ .../olist-jaccard-inline.sqlpp | 64 +++++++ .../ulist-jaccard-inline.aql | 56 ------ .../ulist-jaccard-inline.sqlpp | 64 +++++++ .../word-jaccard-inline.aql | 49 ------ .../word-jaccard-inline.sqlpp | 52 ++++++ .../queries/inverted-index-join/issue741.aql | 65 ------- .../queries/inverted-index-join/issue741.sqlpp | 65 +++++++ ...idx-with-join-edit-distance-check-idx_01.aql | 73 -------- ...x-with-join-edit-distance-check-idx_01.sqlpp | 79 +++++++++ ...robe-pidx-with-join-jaccard-check-idx_01.aql | 73 -------- ...be-pidx-with-join-jaccard-check-idx_01.sqlpp | 79 +++++++++ .../ngram-edit-distance-check_02.aql | 56 ------ .../ngram-edit-distance-check_02.sqlpp | 60 +++++++ .../ngram-edit-distance-check_03.aql | 46 ----- .../ngram-edit-distance-check_03.sqlpp | 49 ++++++ .../ngram-edit-distance-check_04.aql | 48 ------ .../ngram-edit-distance-check_04.sqlpp | 51 ++++++ .../ngram-edit-distance_02.aql | 56 ------ .../ngram-edit-distance_02.sqlpp | 60 +++++++ .../ngram-edit-distance_03.aql | 46 ----- .../ngram-edit-distance_03.sqlpp | 49 ++++++ .../ngram-edit-distance_04.aql | 48 ------ .../ngram-edit-distance_04.sqlpp | 51 ++++++ .../ngram-fuzzyeq-edit-distance_01.aql | 59 ------- .../ngram-fuzzyeq-edit-distance_01.sqlpp | 64 +++++++ .../ngram-fuzzyeq-edit-distance_03.aql | 48 ------ .../ngram-fuzzyeq-edit-distance_03.sqlpp | 53 ++++++ .../ngram-fuzzyeq-jaccard_02.aql | 60 ------- .../ngram-fuzzyeq-jaccard_02.sqlpp | 66 +++++++ .../ngram-fuzzyeq-jaccard_03.aql | 50 ------ .../ngram-fuzzyeq-jaccard_03.sqlpp | 55 ++++++ .../ngram-jaccard-check_02.aql | 58 ------- .../ngram-jaccard-check_02.sqlpp | 62 +++++++ .../ngram-jaccard-check_03.aql | 48 ------ .../ngram-jaccard-check_03.sqlpp | 51 ++++++ .../ngram-jaccard-check_04.aql | 49 ------ .../ngram-jaccard-check_04.sqlpp | 53 ++++++ .../inverted-index-join/ngram-jaccard_02.aql | 58 ------- .../inverted-index-join/ngram-jaccard_02.sqlpp | 62 +++++++ .../inverted-index-join/ngram-jaccard_03.aql | 48 ------ .../inverted-index-join/ngram-jaccard_03.sqlpp | 51 ++++++ .../inverted-index-join/ngram-jaccard_04.aql | 49 ------ .../inverted-index-join/ngram-jaccard_04.sqlpp | 53 ++++++ .../olist-edit-distance-check_02.aql | 55 ------ .../olist-edit-distance-check_02.sqlpp | 63 +++++++ .../olist-edit-distance-check_03.aql | 53 ------ .../olist-edit-distance-check_03.sqlpp | 61 +++++++ .../olist-edit-distance-check_04.aql | 55 ------ .../olist-edit-distance-check_04.sqlpp | 63 +++++++ .../olist-edit-distance_02.aql | 55 ------ .../olist-edit-distance_02.sqlpp | 63 +++++++ .../olist-edit-distance_03.aql | 53 ------ .../olist-edit-distance_03.sqlpp | 61 +++++++ .../olist-edit-distance_04.aql | 55 ------ .../olist-edit-distance_04.sqlpp | 63 +++++++ .../olist-fuzzyeq-edit-distance_02.aql | 58 ------- .../olist-fuzzyeq-edit-distance_02.sqlpp | 67 ++++++++ .../olist-fuzzyeq-edit-distance_03.aql | 56 ------ .../olist-fuzzyeq-edit-distance_03.sqlpp | 65 +++++++ .../olist-fuzzyeq-jaccard_02.aql | 58 ------- .../olist-fuzzyeq-jaccard_02.sqlpp | 67 ++++++++ .../olist-fuzzyeq-jaccard_03.aql | 56 ------ .../olist-fuzzyeq-jaccard_03.sqlpp | 65 +++++++ .../olist-jaccard-check_02.aql | 55 ------ .../olist-jaccard-check_02.sqlpp | 63 +++++++ .../olist-jaccard-check_03.aql | 53 ------ .../olist-jaccard-check_03.sqlpp | 61 +++++++ .../olist-jaccard-check_04.aql | 55 ------ .../olist-jaccard-check_04.sqlpp | 63 +++++++ .../inverted-index-join/olist-jaccard_02.aql | 55 ------ .../inverted-index-join/olist-jaccard_02.sqlpp | 63 +++++++ .../inverted-index-join/olist-jaccard_03.aql | 53 ------ .../inverted-index-join/olist-jaccard_03.sqlpp | 61 +++++++ .../inverted-index-join/olist-jaccard_04.aql | 55 ------ .../inverted-index-join/olist-jaccard_04.sqlpp | 63 +++++++ .../ulist-fuzzyeq-jaccard_02.aql | 58 ------- .../ulist-fuzzyeq-jaccard_02.sqlpp | 67 ++++++++ .../ulist-fuzzyeq-jaccard_03.aql | 56 ------ .../ulist-fuzzyeq-jaccard_03.sqlpp | 65 +++++++ .../ulist-jaccard-check_02.aql | 55 ------ .../ulist-jaccard-check_02.sqlpp | 63 +++++++ .../ulist-jaccard-check_03.aql | 53 ------ .../ulist-jaccard-check_03.sqlpp | 61 +++++++ .../ulist-jaccard-check_04.aql | 55 ------ .../ulist-jaccard-check_04.sqlpp | 63 +++++++ .../inverted-index-join/ulist-jaccard_02.aql | 55 ------ .../inverted-index-join/ulist-jaccard_02.sqlpp | 63 +++++++ .../inverted-index-join/ulist-jaccard_03.aql | 53 ------ .../inverted-index-join/ulist-jaccard_03.sqlpp | 61 +++++++ .../inverted-index-join/ulist-jaccard_04.aql | 55 ------ .../inverted-index-join/ulist-jaccard_04.sqlpp | 63 +++++++ .../word-fuzzyeq-jaccard_02.aql | 59 ------- .../word-fuzzyeq-jaccard_02.sqlpp | 64 +++++++ .../word-fuzzyeq-jaccard_03.aql | 49 ------ .../word-fuzzyeq-jaccard_03.sqlpp | 53 ++++++ .../word-jaccard-check-after-btree-access.aql | 69 -------- .../word-jaccard-check-after-btree-access.sqlpp | 71 ++++++++ .../word-jaccard-check_02.aql | 57 ------- .../word-jaccard-check_02.sqlpp | 60 +++++++ .../word-jaccard-check_03.aql | 47 ----- .../word-jaccard-check_03.sqlpp | 49 ++++++ .../word-jaccard-check_04.aql | 48 ------ .../word-jaccard-check_04.sqlpp | 51 ++++++ .../inverted-index-join/word-jaccard_02.aql | 58 ------- .../inverted-index-join/word-jaccard_02.sqlpp | 60 +++++++ .../inverted-index-join/word-jaccard_03.aql | 47 ----- .../inverted-index-join/word-jaccard_03.sqlpp | 49 ++++++ .../inverted-index-join/word-jaccard_04.aql | 48 ------ .../inverted-index-join/word-jaccard_04.sqlpp | 51 ++++++ .../optimizerts/queries/join-super-key_01.aql | 100 ----------- .../optimizerts/queries/join-super-key_01.sqlpp | 100 +++++++++++ .../optimizerts/queries/join-super-key_02.aql | 98 ----------- .../optimizerts/queries/join-super-key_02.sqlpp | 100 +++++++++++ .../optimizerts/queries/loj-super-key_01.aql | 104 ----------- .../optimizerts/queries/loj-super-key_01.sqlpp | 103 +++++++++++ .../optimizerts/queries/loj-super-key_02.aql | 104 ----------- .../optimizerts/queries/loj-super-key_02.sqlpp | 103 +++++++++++ .../optimizerts/queries/nested_loj2.aql | 91 ---------- .../optimizerts/queries/nested_loj2.sqlpp | 94 ++++++++++ .../orders-index-search-conjunctive-open_01.aql | 58 ------- ...rders-index-search-conjunctive-open_01.sqlpp | 54 ++++++ .../orders-index-search-conjunctive-open_02.aql | 59 ------- ...rders-index-search-conjunctive-open_02.sqlpp | 54 ++++++ .../orders-index-search-conjunctive_01.aql | 58 ------- .../orders-index-search-conjunctive_01.sqlpp | 54 ++++++ .../orders-index-search-conjunctive_02.aql | 59 ------- .../orders-index-search-conjunctive_02.sqlpp | 54 ++++++ .../queries/pull_select_above_eq_join.aql | 54 ------ .../queries/pull_select_above_eq_join.sqlpp | 55 ++++++ .../queries/push-project-through-group.aql | 46 ----- .../queries/push-project-through-group.sqlpp | 49 ++++++ .../optimizerts/queries/q08_group_by.aql | 167 ------------------ .../optimizerts/queries/q08_group_by.sqlpp | 153 +++++++++++++++++ .../optimizerts/queries/q09_group_by.aql | 171 ------------------- .../optimizerts/queries/q09_group_by.sqlpp | 154 +++++++++++++++++ .../optimizerts/queries/query-issue601.aql | 58 ------- .../optimizerts/queries/query-issue601.sqlpp | 57 +++++++ .../optimizerts/queries/query_issue849-2.aql | 42 ----- .../optimizerts/queries/query_issue849-2.sqlpp | 50 ++++++ .../optimizerts/queries/query_issue849.aql | 42 ----- .../optimizerts/queries/query_issue849.sqlpp | 50 ++++++ ...rjoin-probe-pidx-with-join-rtree-sidx_02.aql | 71 -------- ...oin-probe-pidx-with-join-rtree-sidx_02.sqlpp | 75 ++++++++ .../spatial-intersect-point_02.aql | 51 ------ .../spatial-intersect-point_02.sqlpp | 55 ++++++ .../spatial-intersect-point_03.aql | 50 ------ .../spatial-intersect-point_03.sqlpp | 53 ++++++ .../skip-index/skip-secondary-btree-index-2.aql | 43 ----- .../skip-secondary-btree-index-2.sqlpp | 46 +++++ .../queries/split-materialization.aql | 49 ------ .../queries/split-materialization.sqlpp | 60 +++++++ ...join-probe-pidx-with-join-btree-sidx_02.plan | 10 +- .../btree-index-join/primary-equi-join_04.plan | 4 +- .../secondary-equi-join-multiindex.plan | 2 +- .../secondary-equi-join_02.plan | 2 +- .../secondary-equi-join_03.plan | 2 +- .../results/btree-index/btree-secondary-33.plan | 2 +- .../results/btree-index/btree-secondary-34.plan | 2 +- .../results/btree-index/btree-secondary-35.plan | 2 +- .../results/btree-index/btree-secondary-36.plan | 2 +- .../results/btree-index/btree-secondary-40.plan | 2 +- .../results/btree-index/btree-secondary-42.plan | 2 +- .../results/btree-index/btree-secondary-43.plan | 2 +- .../results/btree-index/btree-secondary-44.plan | 2 +- .../results/btree-index/btree-secondary-45.plan | 2 +- .../results/btree-index/btree-secondary-46.plan | 2 +- .../results/btree-index/btree-secondary-47.plan | 2 +- .../results/btree-index/btree-secondary-48.plan | 2 +- .../results/btree-index/btree-secondary-49.plan | 2 +- .../results/btree-index/btree-secondary-51.plan | 2 +- .../results/btree-index/btree-secondary-52.plan | 2 +- .../results/btree-index/btree-secondary-53.plan | 2 +- .../results/btree-index/btree-secondary-54.plan | 2 +- .../results/btree-index/btree-secondary-55.plan | 2 +- .../results/btree-index/btree-secondary-56.plan | 2 +- .../results/btree-index/btree-secondary-57.plan | 2 +- .../results/btree-index/btree-secondary-58.plan | 2 +- .../results/btree-index/btree-secondary-59.plan | 2 +- .../results/btree-index/btree-secondary-60.plan | 2 +- .../results/btree-index/btree-secondary-61.plan | 2 +- .../results/btree-index/btree-secondary-62.plan | 2 +- .../results/btree-index/btree-secondary-63.plan | 2 +- .../optimizerts/results/collocated.plan | 2 +- .../optimizerts/results/cust_group_no_agg.plan | 4 +- .../optimizerts/results/denorm-cust-order.plan | 8 +- .../results/disjunction-to-join-delete-3.plan | 2 +- .../optimizerts/results/distinct_aggregate.plan | 34 ++++ .../optimizerts/results/fj-dblp-csx.plan | 93 ---------- .../results/fj-phase2-with-hints.plan | 57 ------- .../results/insert-and-scan-dataset.plan | 2 +- .../results/introhashpartitionmerge.plan | 10 +- .../ngram-contains-panic.plan | 2 +- .../inverted-index-basic/ngram-contains.plan | 4 +- .../ngram-edit-distance-check.plan | 2 +- .../ngram-edit-distance.plan | 2 +- .../ngram-fuzzyeq-edit-distance.plan | 2 +- .../ngram-fuzzyeq-jaccard.plan | 2 +- .../ngram-jaccard-check.plan | 2 +- .../inverted-index-basic/ngram-jaccard.plan | 2 +- .../olist-edit-distance-check-panic.plan | 2 +- .../olist-edit-distance-check.plan | 4 +- .../olist-edit-distance-panic.plan | 2 +- .../olist-edit-distance.plan | 4 +- .../olist-fuzzyeq-edit-distance.plan | 4 +- .../olist-fuzzyeq-jaccard.plan | 2 +- .../olist-jaccard-check.plan | 2 +- .../inverted-index-basic/olist-jaccard.plan | 2 +- .../ulist-fuzzyeq-jaccard.plan | 2 +- .../ulist-jaccard-check.plan | 2 +- .../inverted-index-basic/ulist-jaccard.plan | 2 +- .../inverted-index-basic/word-contains.plan | 2 +- .../word-fuzzyeq-jaccard.plan | 2 +- .../word-jaccard-check.plan | 2 +- .../inverted-index-basic/word-jaccard.plan | 2 +- ...dit-distance-check-let-panic-nopanic_01.plan | 2 +- ...dit-distance-check-let-panic-nopanic_02.plan | 2 +- .../ngram-edit-distance-check-let.plan | 2 +- .../ngram-edit-distance-check-substring.plan | 2 +- .../ngram-jaccard-check-let.plan | 2 +- .../ngram-jaccard-check-multi-let.plan | 2 +- .../olist-edit-distance-check-let-panic.plan | 2 +- .../olist-edit-distance-check-let.plan | 4 +- .../olist-jaccard-check-let.plan | 2 +- .../ulist-jaccard-check-let.plan | 2 +- .../word-jaccard-check-let.plan | 2 +- .../word-jaccard-check-multi-let.plan | 2 +- .../ngram-edit-distance-inline.plan | 2 +- .../ngram-fuzzyeq-edit-distance.plan | 2 +- .../ngram-jaccard-inline.plan | 6 +- .../olist-edit-distance-inline.plan | 2 +- .../olist-jaccard-inline.plan | 2 +- .../ulist-jaccard-inline.plan | 2 +- .../word-jaccard-inline.plan | 6 +- .../results/inverted-index-join/issue741.plan | 12 +- ...dx-with-join-edit-distance-check-idx_01.plan | 14 +- ...obe-pidx-with-join-jaccard-check-idx_01.plan | 14 +- .../ngram-edit-distance-check_02.plan | 6 +- .../ngram-edit-distance-check_03.plan | 6 +- .../ngram-edit-distance-check_04.plan | 6 +- .../ngram-edit-distance_02.plan | 6 +- .../ngram-edit-distance_03.plan | 6 +- .../ngram-edit-distance_04.plan | 6 +- .../ngram-fuzzyeq-edit-distance_01.plan | 6 +- .../ngram-fuzzyeq-edit-distance_03.plan | 6 +- .../ngram-fuzzyeq-jaccard_02.plan | 6 +- .../ngram-fuzzyeq-jaccard_03.plan | 6 +- .../ngram-jaccard-check_02.plan | 6 +- .../ngram-jaccard-check_03.plan | 6 +- .../ngram-jaccard-check_04.plan | 6 +- .../inverted-index-join/ngram-jaccard_02.plan | 6 +- .../inverted-index-join/ngram-jaccard_03.plan | 6 +- .../inverted-index-join/ngram-jaccard_04.plan | 6 +- .../olist-edit-distance-check_02.plan | 6 +- .../olist-edit-distance-check_03.plan | 6 +- .../olist-edit-distance-check_04.plan | 6 +- .../olist-edit-distance_02.plan | 6 +- .../olist-edit-distance_03.plan | 6 +- .../olist-edit-distance_04.plan | 6 +- .../olist-fuzzyeq-edit-distance_02.plan | 6 +- .../olist-fuzzyeq-edit-distance_03.plan | 6 +- .../olist-fuzzyeq-jaccard_02.plan | 6 +- .../olist-fuzzyeq-jaccard_03.plan | 6 +- .../olist-jaccard-check_02.plan | 6 +- .../olist-jaccard-check_03.plan | 6 +- .../olist-jaccard-check_04.plan | 6 +- .../inverted-index-join/olist-jaccard_02.plan | 6 +- .../inverted-index-join/olist-jaccard_03.plan | 6 +- .../inverted-index-join/olist-jaccard_04.plan | 6 +- .../ulist-fuzzyeq-jaccard_02.plan | 6 +- .../ulist-fuzzyeq-jaccard_03.plan | 6 +- .../ulist-jaccard-check_02.plan | 6 +- .../ulist-jaccard-check_03.plan | 6 +- .../ulist-jaccard-check_04.plan | 6 +- .../inverted-index-join/ulist-jaccard_02.plan | 6 +- .../inverted-index-join/ulist-jaccard_03.plan | 6 +- .../inverted-index-join/ulist-jaccard_04.plan | 6 +- .../word-fuzzyeq-jaccard_02.plan | 6 +- .../word-fuzzyeq-jaccard_03.plan | 6 +- .../word-jaccard-check-after-btree-access.plan | 6 +- .../word-jaccard-check_02.plan | 6 +- .../word-jaccard-check_03.plan | 6 +- .../word-jaccard-check_04.plan | 6 +- .../inverted-index-join/word-jaccard_02.plan | 6 +- .../inverted-index-join/word-jaccard_03.plan | 6 +- .../inverted-index-join/word-jaccard_04.plan | 6 +- .../optimizerts/results/join-super-key_01.plan | 4 +- .../optimizerts/results/join-super-key_02.plan | 4 +- .../optimizerts/results/loj-super-key_01.plan | 10 +- .../optimizerts/results/loj-super-key_02.plan | 8 +- .../optimizerts/results/nested_loj2.plan | 18 +- ...orders-index-search-conjunctive-open_01.plan | 4 +- ...orders-index-search-conjunctive-open_02.plan | 4 +- .../orders-index-search-conjunctive_01.plan | 4 +- .../orders-index-search-conjunctive_02.plan | 4 +- .../results/pull_select_above_eq_join.plan | 6 +- .../results/push-project-through-group.plan | 12 +- .../optimizerts/results/q08_group_by.plan | 30 ++-- .../optimizerts/results/q09_group_by.plan | 18 +- .../optimizerts/results/query-issue601.plan | 6 +- .../optimizerts/results/query_issue849-2.plan | 4 +- .../optimizerts/results/query_issue849.plan | 4 +- ...join-probe-pidx-with-join-rtree-sidx_02.plan | 10 +- .../spatial-intersect-point_02.plan | 2 +- .../spatial-intersect-point_03.plan | 2 +- .../skip-secondary-btree-index-2.plan | 2 +- .../results/split-materialization.plan | 4 +- .../results/unnest_list_in_subplan.plan | 33 ---- 460 files changed, 9311 insertions(+), 8859 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02.aql deleted file mode 100644 index e757455..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02.aql +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : Test that left-outer-join may use two available indexes, one for primary index in prob subtree and another for secondary btree index in index subtree. - * Issue : 730, 741 - * Expected Res : Success - * Date : 8th May 2014 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type TwitterUserType as closed { - screen-name: string, - lang: string, - friends-count: int32, - statuses-count: int32, - name: string, - followers-count: int32 -} - -create type TweetMessageType as closed { - tweetid: int64, - user: TwitterUserType, - sender-location: point, - send-time: datetime, - referred-topics: {{ string }}, - message-text: string, - countA: int32, - countB: int32 -} - -create dataset TweetMessages(TweetMessageType) -primary key tweetid; - -create index twmSndLocIx on TweetMessages(sender-location) type rtree; -create index msgCountAIx on TweetMessages(countA) type btree; -create index msgCountBIx on TweetMessages(countB) type btree; -create index msgTextIx on TweetMessages(message-text) type keyword; - -write output to asterix_nc1:"rttest/btree-index-join_leftouterjoin-probe-pidx-with-join-btree-sidx_02.adm"; - -for $t1 in dataset('TweetMessages') -where $t1.tweetid < int64("10") -order by $t1.tweetid -return { -"tweetid1": $t1.tweetid, -"count1":$t1.countA, -"t2info": for $t2 in dataset('TweetMessages') - where $t1.countA /* +indexnl */= $t2.countB and - $t1.tweetid != $t2.tweetid - order by $t2.tweetid - return {"tweetid2": $t2.tweetid, - "count2":$t2.countB} -}; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02.sqlpp new file mode 100644 index 0000000..96e43a9 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02.sqlpp @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Test that left-outer-join may use two available indexes, one for primary index in prob subtree and another for secondary btree index in index subtree. + * Issue : 730, 741 + * Expected Res : Success + * Date : 8th May 2014 + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +create type test.TwitterUserType as + closed { + `screen-name` : string, + lang : string, + `friends-count` : integer, + `statuses-count` : integer, + name : string, + `followers-count` : integer +}; + +create type test.TweetMessageType as + closed { + tweetid : bigint, + user : TwitterUserType, + `sender-location` : point, + `send-time` : datetime, + `referred-topics` : {{string}}, + `message-text` : string, + countA : integer, + countB : integer +}; + +create dataset TweetMessages(TweetMessageType) primary key tweetid; + +create index twmSndLocIx on TweetMessages (`sender-location`) type rtree; + +create index msgCountAIx on TweetMessages (countA) type btree; + +create index msgCountBIx on TweetMessages (countB) type btree; + +create index msgTextIx on TweetMessages (`message-text`) type keyword; + +write output to asterix_nc1:"rttest/btree-index-join_leftouterjoin-probe-pidx-with-join-btree-sidx_02.adm"; +select element {'tweetid1':t1.tweetid,'count1':t1.countA,'t2info':( + select element {'tweetid2':t2.tweetid,'count2':t2.countB} + from TweetMessages as t2 + where ((t1.countA /*+ indexnl */ = t2.countB) and (t1.tweetid != t2.tweetid)) + order by t2.tweetid + )} +from TweetMessages as t1 +where (t1.tweetid < test.bigint('10')) +order by t1.tweetid +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-equi-join_04.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-equi-join_04.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-equi-join_04.aql deleted file mode 100644 index 1775c6a..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-equi-join_04.aql +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : Equi joins two datasets, Customers and Orders, based on the customer id. - * Given the 'indexnl' hint we expect the join to be transformed - * into an indexed nested-loop join using Customers' primary index. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type AddressType as closed { - number: int32, - street: string, - city: string -} - -create type CustomerType as closed { - cid: int32, - name: string, - age: int32?, - address: AddressType?, - lastorder: { - oid: int32, - total: float - } -} - -create type OrderType as closed { - oid: int32, - cid: int32, - orderstatus: string, - orderpriority: string, - clerk: string, - total: float -} - -create dataset Customers(CustomerType) primary key cid; -create dataset Orders(OrderType) primary key oid; - -write output to asterix_nc1:"rttest/btree-index-join_primary-equi-join_05.adm"; - -for $o in dataset('Orders') -for $c in dataset('Customers') -where $o.cid /*+ indexnl */ = $c.cid -return {"customer":$c, "order": $o} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-equi-join_04.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-equi-join_04.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-equi-join_04.sqlpp new file mode 100644 index 0000000..e465dc4 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-equi-join_04.sqlpp @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Equi joins two datasets, Customers and Orders, based on the customer id. + * Given the 'indexnl' hint we expect the join to be transformed + * into an indexed nested-loop join using Customers' primary index. + * Success : Yes + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +create type test.AddressType as + closed { + number : integer, + street : string, + city : string +}; + +create type test.CustomerType as + closed { + cid : integer, + name : string, + age : integer?, + address : AddressType?, + lastorder : { + oid : integer, + total : float + } + +}; + +create type test.OrderType as + closed { + oid : integer, + cid : integer, + orderstatus : string, + orderpriority : string, + clerk : string, + total : float +}; + +create dataset Customers(CustomerType) primary key cid; + +create dataset Orders(OrderType) primary key oid; + +write output to asterix_nc1:"rttest/btree-index-join_primary-equi-join_05.adm"; +select element {'customer':c,'order':o} +from Orders as o, + Customers as c +where (o.cid /*+ indexnl */ = c.cid) +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join-multiindex.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join-multiindex.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join-multiindex.aql deleted file mode 100644 index bb4ad1b..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join-multiindex.aql +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : Equi joins two datasets, FacebookUsers and FacebookMessages, based on their user's id. - * We first expect FacebookUsers' primary index to be used - * to satisfy the range condition on it's primary key. - * FacebookMessages has a secondary btree index on author-id-copy, and given the 'indexnl' hint - * we expect the join to be transformed into an indexed nested-loop join. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type EmploymentType as closed { - organization-name: string, - start-date: date, - end-date: date? -} - -create type FacebookUserType as closed { - id: int32, - id-copy: int32, - alias: string, - name: string, - user-since: datetime, - user-since-copy: datetime, - friend-ids: {{ int32 }}, - employment: [EmploymentType] -} - -create type FacebookMessageType as closed { - message-id: int32, - message-id-copy: int32, - author-id: int32, - author-id-copy: int32, - in-response-to: int32?, - sender-location: point?, - message: string -} - -create dataset FacebookUsers(FacebookUserType) -primary key id; - -create dataset FacebookMessages(FacebookMessageType) -primary key message-id; - -create index fbmIdxAutId if not exists on FacebookMessages(author-id-copy); - -write output to asterix_nc1:"rttest/btree-index-join_title-secondary-equi-join-multiindex.adm"; - -for $user in dataset('FacebookUsers') -for $message in dataset('FacebookMessages') -where $user.id /*+ indexnl */ = $message.author-id-copy -and $user.id >= 11000 and $user.id <= 12000 -return { - "fbu-ID": $user.id, - "fbm-auth-ID": $message.author-id, - "uname": $user.name, - "message": $message.message -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join-multiindex.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join-multiindex.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join-multiindex.sqlpp new file mode 100644 index 0000000..4580dab --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join-multiindex.sqlpp @@ -0,0 +1,75 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Equi joins two datasets, FacebookUsers and FacebookMessages, based on their user's id. + * We first expect FacebookUsers' primary index to be used + * to satisfy the range condition on it's primary key. + * FacebookMessages has a secondary btree index on author-id-copy, and given the 'indexnl' hint + * we expect the join to be transformed into an indexed nested-loop join. + * Success : Yes + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +create type test.EmploymentType as + closed { + `organization-name` : string, + `start-date` : date, + `end-date` : date? +}; + +create type test.FacebookUserType as + closed { + id : integer, + `id-copy` : integer, + alias : string, + name : string, + `user-since` : datetime, + `user-since-copy` : datetime, + `friend-ids` : {{integer}}, + employment : [EmploymentType] +}; + +create type test.FacebookMessageType as + closed { + `message-id` : integer, + `message-id-copy` : integer, + `author-id` : integer, + `author-id-copy` : integer, + `in-response-to` : integer?, + `sender-location` : point?, + message : string +}; + +create dataset FacebookUsers(FacebookUserType) primary key id; + +create dataset FacebookMessages(FacebookMessageType) primary key `message-id`; + +create index fbmIdxAutId if not exists on FacebookMessages (`author-id-copy`) type btree; + +write output to asterix_nc1:"rttest/btree-index-join_title-secondary-equi-join-multiindex.adm"; +select element {'fbu-ID':user.id,'fbm-auth-ID':message.`author-id`,'uname':user.name,'message':message.message} +from FacebookUsers as user, + FacebookMessages as message +where ((user.id /*+ indexnl */ = message.`author-id-copy`) and (user.id >= 11000) and (user.id <= 12000)) +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_02.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_02.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_02.aql deleted file mode 100644 index 5bdacc3..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_02.aql +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : Equi joins two datasets, DBLP and CSX, based on their title. - * CSX has a secondary btree index on title, and given the 'indexnl' hint - * we expect the join to be transformed into an indexed nested-loop join. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPType as closed { - id: int32, - dblpid: string, - title: string, - authors: string, - misc: string -} - -create type CSXType as closed { - id: int32, - csxid: string, - title: string, - authors: string, - misc: string -} - -create dataset DBLP(DBLPType) primary key id; - -create dataset CSX(CSXType) primary key id; - -create index title_index on CSX(title); - -write output to asterix_nc1:"rttest/btree-index-join_title-secondary-equi-join_02.adm"; - -for $a in dataset('DBLP') -for $b in dataset('CSX') -where $a.title /*+ indexnl */ = $b.title -return {"arec": $a, "brec": $b} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_02.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_02.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_02.sqlpp new file mode 100644 index 0000000..1c315f8 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_02.sqlpp @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Equi joins two datasets, DBLP and CSX, based on their title. + * CSX has a secondary btree index on title, and given the 'indexnl' hint + * we expect the join to be transformed into an indexed nested-loop join. + * Success : Yes + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +create type test.DBLPType as + closed { + id : integer, + dblpid : string, + title : string, + authors : string, + misc : string +}; + +create type test.CSXType as + closed { + id : integer, + csxid : string, + title : string, + authors : string, + misc : string +}; + +create dataset DBLP(DBLPType) primary key id; + +create dataset CSX(CSXType) primary key id; + +create index title_index on CSX (title) type btree; + +write output to asterix_nc1:"rttest/btree-index-join_title-secondary-equi-join_02.adm"; +select element {'arec':a,'brec':b} +from DBLP as a, + CSX as b +where (a.title /*+ indexnl */ = b.title) +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_03.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_03.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_03.aql deleted file mode 100644 index 33bb320..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_03.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : Equi self-joins a dataset, DBLP, based on its title. - * DBLP has a secondary btree index on title, and given the 'indexnl' hint - * we expect the join to be transformed into an indexed nested-loop join. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPType as closed { - id: int32, - dblpid: string, - title: string, - authors: string, - misc: string -} - -create dataset DBLP(DBLPType) primary key id; - -create index title_index on DBLP(title); - -write output to asterix_nc1:"rttest/btree-index-join_title-secondary-equi-join_03.adm"; - -for $a in dataset('DBLP') -for $b in dataset('DBLP') -where $a.title /*+ indexnl */ = $b.title -return {"arec": $a, "brec": $b} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_03.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_03.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_03.sqlpp new file mode 100644 index 0000000..7ab67fa --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/secondary-equi-join_03.sqlpp @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Equi self-joins a dataset, DBLP, based on its title. + * DBLP has a secondary btree index on title, and given the 'indexnl' hint + * we expect the join to be transformed into an indexed nested-loop join. + * Success : Yes + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +create type test.DBLPType as + closed { + id : integer, + dblpid : string, + title : string, + authors : string, + misc : string +}; + +create dataset DBLP(DBLPType) primary key id; + +create index title_index on DBLP (title) type btree; + +write output to asterix_nc1:"rttest/btree-index-join_title-secondary-equi-join_03.adm"; +select element {'arec':a,'brec':b} +from DBLP as a, + DBLP as b +where (a.title /*+ indexnl */ = b.title) +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.aql deleted file mode 100644 index b72dbcb..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -// Please note this is a Positive test and the BTree index should be used in the plan. - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-primary-33.adm"; - -create type TestType as open { - id : int32, - fname : string, - lname : string -} - -create dataset testdst(TestType) primary key id; - -create index sec_Idx on testdst(fname,lname); - -for $emp in dataset('testdst') -where $emp.fname > "Roger" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.sqlpp new file mode 100644 index 0000000..845da2a --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.sqlpp @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : BTree Index verification test + * : This test is intended to verify that the secondary BTree index is used + * : in the optimized query plan. + * Expected Result : Success + * Date : 13th Aug 2012 + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +write output to asterix_nc1:"rttest/btree-index_btree-primary-33.adm"; +create type test.TestType as +{ + id : integer, + fname : string, + lname : string +}; + +create dataset testdst(TestType) primary key id; + +create index sec_Idx on testdst (fname,lname) type btree; + +select element emp +from testdst as emp +where (emp.fname > 'Roger') +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.aql deleted file mode 100644 index 0030ddf..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -// This is a Positive test - prefix search, BTree index should be used in the plan. - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-34.adm"; - -create type TestType as open { - id : int32, - fname : string, - lname : string -} - -create dataset testdst(TestType) primary key id; - -create index sec_Idx on testdst(fname,lname); - -for $emp in dataset('testdst') -where $emp.fname >= "Susan" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.sqlpp new file mode 100644 index 0000000..db55b28 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.sqlpp @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : BTree Index verification test + * : This test is intended to verify that the secondary BTree index is used + * : in the optimized query plan. + * Expected Result : Success + * Date : 13th Aug 2012 + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +write output to asterix_nc1:"rttest/btree-index_btree-secondary-34.adm"; +create type test.TestType as +{ + id : integer, + fname : string, + lname : string +}; + +create dataset testdst(TestType) primary key id; + +create index sec_Idx on testdst (fname,lname) type btree; + +select element emp +from testdst as emp +where (emp.fname >= 'Susan') +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.aql deleted file mode 100644 index 48b67d4..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : BTree Index verification (usage) test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -// Positive test - prefix search, BTree index should be used. - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-35.adm"; - -create type TestType as open { - id : int32, - fname : string, - lname : string -} - -create dataset testdst(TestType) primary key id; - -create index sec_Idx on testdst(fname,lname); - -for $emp in dataset('testdst') -where $emp.fname < "Isa" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.sqlpp new file mode 100644 index 0000000..ecac451 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.sqlpp @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : BTree Index verification (usage) test + * : This test is intended to verify that the secondary BTree index is used + * : in the optimized query plan. + * Expected Result : Success + * Date : 13th Aug 2012 + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +write output to asterix_nc1:"rttest/btree-index_btree-secondary-35.adm"; +create type test.TestType as +{ + id : integer, + fname : string, + lname : string +}; + +create dataset testdst(TestType) primary key id; + +create index sec_Idx on testdst (fname,lname) type btree; + +select element emp +from testdst as emp +where (emp.fname < 'Isa') +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.aql deleted file mode 100644 index 5e39552..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -// Positive test - prefix search, BTree index should be used in query plan - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-36.adm"; - -create type TestType as open { - id : int32, - fname : string, - lname : string -} - -create dataset testdst(TestType) primary key id; - -create index sec_Idx on testdst(fname,lname); - -for $emp in dataset('testdst') -where $emp.fname <= "Vanpatten" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.sqlpp new file mode 100644 index 0000000..6354f25 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.sqlpp @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : BTree Index verification test + * : This test is intended to verify that the secondary BTree index is used + * : in the optimized query plan. + * Expected Result : Success + * Date : 13th Aug 2012 + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +write output to asterix_nc1:"rttest/btree-index_btree-secondary-36.adm"; +create type test.TestType as +{ + id : integer, + fname : string, + lname : string +}; + +create dataset testdst(TestType) primary key id; + +create index sec_Idx on testdst (fname,lname) type btree; + +select element emp +from testdst as emp +where (emp.fname <= 'Vanpatten') +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.aql deleted file mode 100644 index 23518e4..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.aql +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used in the optimized query plan - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-40.adm"; - -create type TestType as open { - id : int32, - fname : string, - lname : string -} - -create dataset testdst(TestType) primary key id; - -create index sec_Idx on testdst(fname,lname); - -for $emp in dataset('testdst') -where $emp.fname = "Young Seok" and $emp.lname = "Kim" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.sqlpp new file mode 100644 index 0000000..d8a95cd --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.sqlpp @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : BTree Index verification test + * : This test is intended to verify that the secondary BTree index is used in the optimized query plan + * Expected Result : Success + * Date : 13th Aug 2012 + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +write output to asterix_nc1:"rttest/btree-index_btree-secondary-40.adm"; +create type test.TestType as +{ + id : integer, + fname : string, + lname : string +}; + +create dataset testdst(TestType) primary key id; + +create index sec_Idx on testdst (fname,lname) type btree; + +select element emp +from testdst as emp +where ((emp.fname = 'Young Seok') and (emp.lname = 'Kim')) +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.aql deleted file mode 100644 index 81fb7b4..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.aql +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-42.adm"; - -create type TestType as open { - id : int32, - fname : string, - lname : string -} - -create dataset testdst(TestType) primary key id; - -create index sec_Idx on testdst(fname,lname); - -for $emp in dataset('testdst') -where $emp.fname > "Alex" and $emp.lname < "Zach" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.sqlpp new file mode 100644 index 0000000..75ccb90 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.sqlpp @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : BTree Index verification test + * : This test is intended to verify that the secondary BTree index is used + * : in the optimized query plan. + * Expected Result : Success + * Date : 13th Aug 2012 + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +write output to asterix_nc1:"rttest/btree-index_btree-secondary-42.adm"; +create type test.TestType as +{ + id : integer, + fname : string, + lname : string +}; + +create dataset testdst(TestType) primary key id; + +create index sec_Idx on testdst (fname,lname) type btree; + +select element emp +from testdst as emp +where ((emp.fname > 'Alex') and (emp.lname < 'Zach')) +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.aql deleted file mode 100644 index fbb504d..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.aql +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-43.adm"; - -create type TestType as open { - id : int32, - fname : string, - lname : string -} - -create dataset testdst(TestType) primary key id; - -create index sec_Idx on testdst(fname,lname); - -for $emp in dataset('testdst') -where $emp.fname > "Allan" and $emp.lname < "Zubi" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/33a656d1/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.sqlpp new file mode 100644 index 0000000..2cf7dbb --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.sqlpp @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : BTree Index verification test + * : This test is intended to verify that the secondary BTree index is used + * : in the optimized query plan. + * Expected Result : Success + * Date : 13th Aug 2012 + */ + +drop dataverse test if exists; +create dataverse test; + +use test; + + +write output to asterix_nc1:"rttest/btree-index_btree-secondary-43.adm"; +create type test.TestType as +{ + id : integer, + fname : string, + lname : string +}; + +create dataset testdst(TestType) primary key id; + +create index sec_Idx on testdst (fname,lname) type btree; + +select element emp +from testdst as emp +where ((emp.fname > 'Allan') and (emp.lname < 'Zubi')) +;