elasticsearch/docs/reference/esql/functions
dreamquster 2644ccbb8a
Implement the 'left' function in issue #98545 (#98942)
@nik9000  Recheck out the main branch. Refactor the 'left' function to
cut the prefix string in place. But I meet a adversity that left failed
the test case 'testEvaluateInManyThreads'. I find that in multiple
thread situation,  `  EvalOperator.ExpressionEvaluator eval =
evalSupplier.get(); for (int c = 0; c < count; c++) {      
assertThat(toJavaObject(eval.eval(page), 0), testCase.getMatcher()); } `
toJavaObject function return a BytesRef with length=2, content is
[81,89]. However, assertThat function in junit4 receive the BytesRef
parameters that its length is 10. Can you give me some clues? I can't
find which variable is mutual.

Rerun failed test case's command: `gradlew ':x-pack:plugin:esql:test'
--tests
"org.elasticsearch.xpack.esql.expression.function.scalar.string.LeftTests.testEvaluateInManyThreads
{TestCase=Left basic test}" -Dtests.seed=44459C172243712
-Dtests.locale=lv-LV -Dtests.timezone=Asia/Irkutsk -Druntime.java=20`
2023-08-28 13:17:16 -04:00
..
signature ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
types ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
abs.asciidoc ESQL: Standardize font used in railroad diagrams (#98897) 2023-08-26 14:19:47 -04:00
acos.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
asin.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
atan.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
atan2.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
auto_bucket.asciidoc Support auto_bucket for numeric fields (ESQL-1494) 2023-07-31 16:45:59 -04:00
case.asciidoc Rename PROJECT command to KEEP (ESQL-1282) 2023-06-19 13:06:44 +02:00
ceil.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
cidr_match.asciidoc Move each function to its own file 2023-05-11 17:02:27 +02:00
coalesce.asciidoc ESQL: COALESCE function (#98542) 2023-08-17 13:51:44 -04:00
concat.asciidoc Rename PROJECT command to KEEP (ESQL-1282) 2023-06-19 13:06:44 +02:00
cos.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
cosh.asciidoc ESQL: Standardize font used in railroad diagrams (#98897) 2023-08-26 14:19:47 -04:00
date_extract.asciidoc Add date_extract function (ESQL-1346) 2023-07-19 14:08:06 +02:00
date_format.asciidoc Rename PROJECT command to KEEP (ESQL-1282) 2023-06-19 13:06:44 +02:00
date_parse.asciidoc Add date_extract function (ESQL-1346) 2023-07-19 14:08:06 +02:00
date_trunc.asciidoc ESQL: date_trunc(): swap order of arguments (#98624) 2023-08-22 18:20:05 +02:00
e.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
floor.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
greatest.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
is_finite.asciidoc Move each function to its own file 2023-05-11 17:02:27 +02:00
is_infinite.asciidoc Move each function to its own file 2023-05-11 17:02:27 +02:00
is_nan.asciidoc Move each function to its own file 2023-05-11 17:02:27 +02:00
least.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
left.asciidoc Implement the 'left' function in issue #98545 (#98942) 2023-08-28 13:17:16 -04:00
length.asciidoc Rename PROJECT command to KEEP (ESQL-1282) 2023-06-19 13:06:44 +02:00
log10.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
ltrim.asciidoc ESQL: LTRIM, RTRIM and fix unicode whitespace (#98590) 2023-08-17 11:30:12 -04:00
mv_avg.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
mv_concat.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
mv_count.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
mv_dedupe.asciidoc Implement MV_DEDUPE (ESQL-1287) 2023-06-27 08:13:19 -05:00
mv_max.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
mv_median.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
mv_min.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
mv_sum.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
now.asciidoc Implement now() function (ESQL-1172) 2023-06-27 12:01:09 +02:00
pi.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
pow.asciidoc ESQL: Standardize font used in railroad diagrams (#98897) 2023-08-26 14:19:47 -04:00
round.asciidoc Move IS_NULL, POW, ROUND, STARTS_WITH, SUBSTRING code snippets to CSV files 2023-07-07 15:45:06 +02:00
rtrim.asciidoc ESQL: LTRIM, RTRIM and fix unicode whitespace (#98590) 2023-08-17 11:30:12 -04:00
sin.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
sinh.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
split.asciidoc Docs: convert the results into a table (ESQL-1143) 2023-05-17 16:00:15 -04:00
sqrt.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
starts_with.asciidoc Move IS_NULL, POW, ROUND, STARTS_WITH, SUBSTRING code snippets to CSV files 2023-07-07 15:45:06 +02:00
substring.asciidoc Move IS_NULL, POW, ROUND, STARTS_WITH, SUBSTRING code snippets to CSV files 2023-07-07 15:45:06 +02:00
tan.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
tanh.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
tau.asciidoc ESQL: More docs (#98890) 2023-08-28 11:17:04 -04:00
to_boolean.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
to_datetime.asciidoc Add date_extract function (ESQL-1346) 2023-07-19 14:08:06 +02:00
to_degrees.asciidoc Add to_degrees and to_radians functions (ESQL-1496) 2023-08-03 04:23:15 +10:00
to_double.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
to_integer.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
to_ip.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
to_long.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
to_radians.asciidoc Add to_degrees and to_radians functions (ESQL-1496) 2023-08-03 04:23:15 +10:00
to_string.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
to_unsigned_long.asciidoc Add unsigned_long type support (ESQL-1289) 2023-07-04 15:45:10 +02:00
to_version.asciidoc Docs: compress results into query (ESQL-1259) 2023-06-12 09:37:45 -05:00
trim.asciidoc Reused example from spec file 2023-07-10 10:17:12 +02:00