IMPALA-939: Regex should match anywhere in string.

Change-Id: I8dcd337c3b06b632017270670a4f199ec7ada648
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2296
Reviewed-by: Victor Bittorf <victor.bittorf@cloudera.com>
Tested-by: jenkins
(cherry picked from commit c97f82eaaf0efe9bd4c3da3d005464f425696a62)
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2371
This commit is contained in:
Victor Bittorf
2014-04-14 16:03:12 -07:00
committed by jenkins
parent 46151dc7dd
commit 808f9a661a
5 changed files with 72 additions and 19 deletions

View File

@@ -9,28 +9,40 @@ join part p
where
(
p_brand = 'Brand#12'
and p_container REGEXP 'SM CASE||SM BOX||SM PACK||SM PKG'
and (p_container = 'SM CASE' or
p_container = 'SM BOX' or
p_container = 'SM PACK' or
p_container = 'SM PKG')
and l_quantity >= 1 and l_quantity <= 11
and p_size >= 1 and p_size <= 5
and l_shipmode REGEXP 'AIR||AIR REG'
and (l_shipmode = 'AIR' or
l_shipmode = 'AIR REG')
and l_shipinstruct = 'DELIVER IN PERSON'
)
or
(
p_brand = 'Brand#23'
and p_container REGEXP 'MED BAG||MED BOX||MED PKG||MED PACK'
and (p_container = 'MED BAG' or
p_container = 'MED BOX' or
p_container = 'MED PKG' or
p_container = 'MED PACK')
and l_quantity >= 10 and l_quantity <= 20
and p_size >= 1 and p_size <= 10
and l_shipmode REGEXP 'AIR||AIR REG'
and (l_shipmode = 'AIR' or
l_shipmode = 'AIR REG')
and l_shipinstruct = 'DELIVER IN PERSON'
)
or
(
p_brand = 'Brand#34'
and p_container REGEXP 'LG CASE||LG BOX||LG PACK||LG PKG'
and (p_container = 'LG CASE' or
p_container = 'LG BOX' or
p_container = 'LG PKG' or
p_container = 'LG PACK')
and l_quantity >= 20 and l_quantity <= 30
and p_size >= 1 and p_size <= 15
and l_shipmode REGEXP 'AIR||AIR REG'
and (l_shipmode = 'AIR' or
l_shipmode = 'AIR REG')
and l_shipinstruct = 'DELIVER IN PERSON'
)
---- TYPES