|
@@ -63,7 +63,7 @@ long:long |ul:ul
|
|
[501379200000, 520128000000] |[501379200000, 520128000000]
|
|
[501379200000, 520128000000] |[501379200000, 520128000000]
|
|
;
|
|
;
|
|
|
|
|
|
-convertDoubleToUL
|
|
|
|
|
|
+convertDoubleToUL#[skip:-8.11.99, reason:ql exceptions updated in 8.12]
|
|
row d = 123.4 | eval ul = to_ul(d), overflow = to_ul(1e20);
|
|
row d = 123.4 | eval ul = to_ul(d), overflow = to_ul(1e20);
|
|
warning:Line 1:48: evaluation of [to_ul(1e20)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:48: evaluation of [to_ul(1e20)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:48: org.elasticsearch.xpack.ql.InvalidArgumentException: [1.0E20] out of [unsigned_long] range
|
|
warning:Line 1:48: org.elasticsearch.xpack.ql.InvalidArgumentException: [1.0E20] out of [unsigned_long] range
|
|
@@ -120,7 +120,7 @@ int:integer |long:long
|
|
[5013792, 520128] |[5013792, 520128]
|
|
[5013792, 520128] |[5013792, 520128]
|
|
;
|
|
;
|
|
|
|
|
|
-convertULToLong
|
|
|
|
|
|
+convertULToLong#[skip:-8.11.99, reason:ql exceptions were updated in 8.12]
|
|
row ul = [9223372036854775807, 9223372036854775808] | eval long = to_long(ul);
|
|
row ul = [9223372036854775807, 9223372036854775808] | eval long = to_long(ul);
|
|
warning:Line 1:67: evaluation of [to_long(ul)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:67: evaluation of [to_long(ul)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:67: org.elasticsearch.xpack.ql.InvalidArgumentException: [9223372036854775808] out of [long] range
|
|
warning:Line 1:67: org.elasticsearch.xpack.ql.InvalidArgumentException: [9223372036854775808] out of [long] range
|
|
@@ -161,7 +161,7 @@ str1:keyword |str2:keyword |str3:keyword |long1:long |long2:long |long3:long
|
|
// end::to_long-str-result[]
|
|
// end::to_long-str-result[]
|
|
;
|
|
;
|
|
|
|
|
|
-convertDoubleToLong
|
|
|
|
|
|
+convertDoubleToLong#[skip:-8.11.99, reason:ql exceptions were updated in 8.12]
|
|
row d = 123.4 | eval d2l = to_long(d), overflow = to_long(1e19);
|
|
row d = 123.4 | eval d2l = to_long(d), overflow = to_long(1e19);
|
|
warning:Line 1:51: evaluation of [to_long(1e19)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:51: evaluation of [to_long(1e19)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:51: org.elasticsearch.xpack.ql.InvalidArgumentException: [1.0E19] out of [long] range
|
|
warning:Line 1:51: org.elasticsearch.xpack.ql.InvalidArgumentException: [1.0E19] out of [long] range
|
|
@@ -179,7 +179,7 @@ int:integer |ii:integer
|
|
[5013792, 520128] |[5013792, 520128]
|
|
[5013792, 520128] |[5013792, 520128]
|
|
;
|
|
;
|
|
|
|
|
|
-convertLongToInt
|
|
|
|
|
|
+convertLongToInt#[skip:-8.11.99, reason:ql exceptions were updated in 8.12]
|
|
// tag::to_int-long[]
|
|
// tag::to_int-long[]
|
|
ROW long = [5013792, 2147483647, 501379200000]
|
|
ROW long = [5013792, 2147483647, 501379200000]
|
|
| EVAL int = TO_INTEGER(long)
|
|
| EVAL int = TO_INTEGER(long)
|
|
@@ -194,7 +194,7 @@ long:long |int:integer
|
|
// end::to_int-long-result[]
|
|
// end::to_int-long-result[]
|
|
;
|
|
;
|
|
|
|
|
|
-convertULToInt
|
|
|
|
|
|
+convertULToInt#[skip:-8.11.99, reason:ql exceptions were updated in 8.12]
|
|
row ul = [2147483647, 9223372036854775808] | eval int = to_int(ul);
|
|
row ul = [2147483647, 9223372036854775808] | eval int = to_int(ul);
|
|
warning:Line 1:57: evaluation of [to_int(ul)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:57: evaluation of [to_int(ul)] failed, treating result as null. Only first 20 failures recorded.
|
|
// UL conversion to int dips into long; not the most efficient, but it's how SQL does it too.
|
|
// UL conversion to int dips into long; not the most efficient, but it's how SQL does it too.
|
|
@@ -229,7 +229,7 @@ int_str:keyword |int_dbl_str:keyword |is2i:integer|ids2i:integer |overflow:in
|
|
2147483647 |2147483647.2 |2147483647 |2147483647 |null |null
|
|
2147483647 |2147483647.2 |2147483647 |2147483647 |null |null
|
|
;
|
|
;
|
|
|
|
|
|
-convertDoubleToInt
|
|
|
|
|
|
+convertDoubleToInt#[skip:-8.11.99, reason:ql exceptions were updated in 8.12]
|
|
row d = 123.4 | eval d2i = to_integer(d), overflow = to_integer(1e19);
|
|
row d = 123.4 | eval d2i = to_integer(d), overflow = to_integer(1e19);
|
|
warning:Line 1:54: evaluation of [to_integer(1e19)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:54: evaluation of [to_integer(1e19)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:54: org.elasticsearch.xpack.ql.InvalidArgumentException: [1.0E19] out of [long] range
|
|
warning:Line 1:54: org.elasticsearch.xpack.ql.InvalidArgumentException: [1.0E19] out of [long] range
|
|
@@ -473,7 +473,7 @@ ROW deg = [90, 180, 270]
|
|
[90, 180, 270] | [1.5707963267948966, 3.141592653589793, 4.71238898038469]
|
|
[90, 180, 270] | [1.5707963267948966, 3.141592653589793, 4.71238898038469]
|
|
;
|
|
;
|
|
|
|
|
|
-warningWithFromSource
|
|
|
|
|
|
+warningWithFromSource#[skip:-8.11.99, reason:ql exceptions were updated in 8.12]
|
|
from employees | sort emp_no | limit 1 | eval x = to_long(emp_no) * 10000000 | eval y = to_int(x) > 1 | keep y;
|
|
from employees | sort emp_no | limit 1 | eval x = to_long(emp_no) * 10000000 | eval y = to_int(x) > 1 | keep y;
|
|
warning:Line 1:89: evaluation of [to_int(x)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:89: evaluation of [to_int(x)] failed, treating result as null. Only first 20 failures recorded.
|
|
warning:Line 1:89: org.elasticsearch.xpack.ql.InvalidArgumentException: [100010000000] out of [integer] range
|
|
warning:Line 1:89: org.elasticsearch.xpack.ql.InvalidArgumentException: [100010000000] out of [integer] range
|