|
@@ -1,5 +1,5 @@
|
|
|
keywordByInt
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
FROM employees
|
|
|
| SORT emp_no
|
|
|
| LIMIT 4
|
|
@@ -17,7 +17,7 @@ emp_no:integer | languages:integer | lang_name:keyword
|
|
|
;
|
|
|
|
|
|
keywordByMvInt
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW int=[1, 2, 3]
|
|
|
| LOOKUP int_number_names ON int
|
|
|
;
|
|
@@ -27,7 +27,7 @@ int:integer | name:keyword
|
|
|
;
|
|
|
|
|
|
keywordByDupeInt
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW int=[1, 1, 1]
|
|
|
| LOOKUP int_number_names ON int
|
|
|
;
|
|
@@ -37,7 +37,7 @@ int:integer | name:keyword
|
|
|
;
|
|
|
|
|
|
intByKeyword
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW name="two"
|
|
|
| LOOKUP int_number_names ON name
|
|
|
;
|
|
@@ -48,7 +48,7 @@ name:keyword | int:integer
|
|
|
|
|
|
|
|
|
keywordByLong
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
FROM employees
|
|
|
| SORT emp_no
|
|
|
| LIMIT 4
|
|
@@ -66,7 +66,7 @@ emp_no:integer | languages:long | lang_name:keyword
|
|
|
;
|
|
|
|
|
|
longByKeyword
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW name="two"
|
|
|
| LOOKUP long_number_names ON name
|
|
|
;
|
|
@@ -76,7 +76,7 @@ name:keyword | long:long
|
|
|
;
|
|
|
|
|
|
keywordByFloat
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
FROM employees
|
|
|
| SORT emp_no
|
|
|
| LIMIT 4
|
|
@@ -94,7 +94,7 @@ emp_no:integer | height:double | height_name:keyword
|
|
|
;
|
|
|
|
|
|
floatByKeyword
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW name="two point zero eight"
|
|
|
| LOOKUP double_number_names ON name
|
|
|
;
|
|
@@ -104,7 +104,7 @@ two point zero eight | 2.08
|
|
|
;
|
|
|
|
|
|
floatByNullMissing
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW name=null
|
|
|
| LOOKUP double_number_names ON name
|
|
|
;
|
|
@@ -114,7 +114,7 @@ name:null | double:double
|
|
|
;
|
|
|
|
|
|
floatByNullMatching
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW name=null
|
|
|
| LOOKUP double_number_names_with_null ON name
|
|
|
;
|
|
@@ -124,7 +124,7 @@ name:null | double:double
|
|
|
;
|
|
|
|
|
|
intIntByKeywordKeyword
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW aa="foo", ab="zoo"
|
|
|
| LOOKUP big ON aa, ab
|
|
|
;
|
|
@@ -134,7 +134,7 @@ foo | zoo | 1 | -1
|
|
|
;
|
|
|
|
|
|
intIntByKeywordKeywordMissing
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW aa="foo", ab="zoi"
|
|
|
| LOOKUP big ON aa, ab
|
|
|
;
|
|
@@ -144,7 +144,7 @@ foo | zoi | null | null
|
|
|
;
|
|
|
|
|
|
intIntByKeywordKeywordSameValues
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW aa="foo", ab="foo"
|
|
|
| LOOKUP big ON aa, ab
|
|
|
;
|
|
@@ -154,7 +154,7 @@ foo | foo | 2 | -2
|
|
|
;
|
|
|
|
|
|
intIntByKeywordKeywordSameValuesMissing
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW aa="bar", ab="bar"
|
|
|
| LOOKUP big ON aa, ab
|
|
|
;
|
|
@@ -164,7 +164,7 @@ bar | bar | null | null
|
|
|
;
|
|
|
|
|
|
lookupBeforeStats
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
FROM employees
|
|
|
| RENAME languages AS int
|
|
|
| LOOKUP int_number_names ON int
|
|
@@ -182,7 +182,7 @@ height:double | languages:keyword
|
|
|
;
|
|
|
|
|
|
lookupAfterStats
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
FROM employees
|
|
|
| STATS int=TO_INT(AVG(height))
|
|
|
| LOOKUP int_number_names ON int
|
|
@@ -194,7 +194,7 @@ two
|
|
|
|
|
|
// Makes sure the LOOKUP squashes previous names
|
|
|
doesNotDuplicateNames
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
FROM employees
|
|
|
| SORT emp_no
|
|
|
| LIMIT 4
|
|
@@ -213,7 +213,7 @@ emp_no:integer | languages:long | name:keyword
|
|
|
;
|
|
|
|
|
|
lookupBeforeSort
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
FROM employees
|
|
|
| WHERE emp_no < 10005
|
|
|
| RENAME languages AS int
|
|
@@ -231,7 +231,7 @@ languages:keyword | emp_no:integer
|
|
|
;
|
|
|
|
|
|
lookupAfterSort
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
FROM employees
|
|
|
| WHERE emp_no < 10005
|
|
|
| SORT languages ASC, emp_no ASC
|
|
@@ -248,12 +248,38 @@ languages:keyword | emp_no:integer
|
|
|
five | 10004
|
|
|
;
|
|
|
|
|
|
+shadowing
|
|
|
+required_capability: lookup_v3
|
|
|
+FROM employees
|
|
|
+| KEEP emp_no
|
|
|
+| WHERE emp_no == 10001
|
|
|
+| EVAL left = "left", int = emp_no - 10000, name = "name", right = "right"
|
|
|
+| LOOKUP int_number_names ON int
|
|
|
+;
|
|
|
+
|
|
|
+emp_no:integer | left:keyword | int:integer | right:keyword | name:keyword
|
|
|
+ 10001 | left | 1 | right | one
|
|
|
+;
|
|
|
+
|
|
|
+shadowingMulti
|
|
|
+required_capability: lookup_v3
|
|
|
+FROM employees
|
|
|
+| KEEP emp_no
|
|
|
+| WHERE emp_no == 10001
|
|
|
+| EVAL left = "left", nb = -10011+emp_no, na = "na", middle = "middle", ab = "ab", aa = "bar", right = "right"
|
|
|
+| LOOKUP big ON aa, nb
|
|
|
+;
|
|
|
+
|
|
|
+emp_no:integer | left:keyword | nb:integer | middle:keyword | aa:keyword | right:keyword | ab:keyword | na:integer
|
|
|
+ 10001 | left | -10 | middle | bar | right | zop | 10
|
|
|
+;
|
|
|
+
|
|
|
//
|
|
|
// Make sure that the new LOOKUP syntax doesn't clash with any existing things
|
|
|
// named "lookup"
|
|
|
//
|
|
|
rowNamedLookup
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW lookup = "a"
|
|
|
;
|
|
|
|
|
@@ -262,7 +288,7 @@ lookup:keyword
|
|
|
;
|
|
|
|
|
|
rowNamedLOOKUP
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW LOOKUP = "a"
|
|
|
;
|
|
|
|
|
@@ -271,7 +297,7 @@ LOOKUP:keyword
|
|
|
;
|
|
|
|
|
|
evalNamedLookup
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW a = "a" | EVAL lookup = CONCAT(a, "1")
|
|
|
;
|
|
|
|
|
@@ -280,7 +306,7 @@ a:keyword | lookup:keyword
|
|
|
;
|
|
|
|
|
|
dissectNamedLookup
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
row a = "foo bar" | dissect a "foo %{lookup}";
|
|
|
|
|
|
a:keyword | lookup:keyword
|
|
@@ -288,7 +314,7 @@ a:keyword | lookup:keyword
|
|
|
;
|
|
|
|
|
|
renameIntoLookup
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
row a = "foo bar" | RENAME a AS lookup;
|
|
|
|
|
|
lookup:keyword
|
|
@@ -296,7 +322,7 @@ lookup:keyword
|
|
|
;
|
|
|
|
|
|
sortOnLookup
|
|
|
-required_capability: tables_types
|
|
|
+required_capability: lookup_v3
|
|
|
ROW lookup = "a" | SORT lookup
|
|
|
;
|
|
|
|