elasticsearch/docs/reference/esql/functions
Mark Tozzi 67c69bb224
[ESQL] Date nanos type (#110205)
Resolves #109987

Add initial support for the date nanos data type. At this point, almost no functions are supported, including casting. This just covers loading and returning the values. Like millisecond dates, nanosecond dates are internally modeled as long values, so we don't need a new block type to support them.

This has very patchwork function support. Ideally, I don't think I would have added any function support yet, but the five MV functions you see here declare that they accept any non-spatial type, and will error tests if not wired up for new types. There are other functions, like Values, which also claim to support all non-spatial types, but don't currently enforce that in testing, so I didn't add them yet. Finally, there are functions like == which should work for all types, but are implemented as a specific list. I've left those for a follow up ticket as well.
2024-08-07 13:17:26 -04:00
..
appendix ESQL: Add COUNT and COUNT_DISTINCT aggregation tests (#111409) 2024-07-30 03:07:15 +10:00
description ESQL: Add MV_PSERIES_WEIGHTED_SUM for score calculations used by security solution (#109017) 2024-07-31 12:08:28 +02:00
examples ESQL: Add MV_PSERIES_WEIGHTED_SUM for score calculations used by security solution (#109017) 2024-07-31 12:08:28 +02:00
kibana [ESQL] Date nanos type (#110205) 2024-08-07 13:17:26 -04:00
layout ESQL: Add MV_PSERIES_WEIGHTED_SUM for score calculations used by security solution (#109017) 2024-07-31 12:08:28 +02:00
parameters ESQL: Add MV_PSERIES_WEIGHTED_SUM for score calculations used by security solution (#109017) 2024-07-31 12:08:28 +02:00
signature ESQL: Add MV_PSERIES_WEIGHTED_SUM for score calculations used by security solution (#109017) 2024-07-31 12:08:28 +02:00
types [ESQL] Date nanos type (#110205) 2024-08-07 13:17:26 -04:00
aggregation-functions.asciidoc ESQL: WEIGHTED_AVG aggregation tests and docs (#111449) 2024-07-31 00:42:23 +10:00
binary.asciidoc ESQL docs: Push down needs index and doc_values (#110353) 2024-07-02 14:22:50 -04:00
cast.asciidoc ESQL: Document the cast operator (::) (#107871) 2024-04-25 10:10:59 -04:00
conditional-functions-and-expressions.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
date-time-functions.asciidoc ES|QL: Add unit tests for now() function (#108498) 2024-05-10 14:28:19 +02:00
grouping-functions.asciidoc ESQL: Document BUCKET as a grouping function (#107864) 2024-04-25 12:38:12 -04:00
in.asciidoc [DOCS] Examples for ES|QL DISSECT and WHERE (#102591) 2023-11-27 10:56:48 +01:00
ip-functions.asciidoc ESQL: Add aggregations testing base and docs (#110042) 2024-06-27 21:21:55 +10:00
like.asciidoc [ES|QL] Add/Modify annotations for operators for better doc generation (#108220) 2024-05-03 22:59:51 -04:00
logical.asciidoc Restructure ES|QL docs (#100806) 2023-10-17 17:36:14 +02:00
math-functions.asciidoc Add the EXP ES|QL function (#110879) 2024-07-16 16:36:01 +02:00
mv-functions.asciidoc ESQL: Add MV_PSERIES_WEIGHTED_SUM for score calculations used by security solution (#109017) 2024-07-31 12:08:28 +02:00
operators.asciidoc Introduce an IP functions group (#108304) 2024-05-06 13:43:30 +02:00
predicates.asciidoc [DOCS] Examples for ES|QL DISSECT and WHERE (#102591) 2023-11-27 10:56:48 +01:00
README.md ESQL: Generate kibana inline docs (#106782) 2024-04-09 14:19:48 -04:00
rlike.asciidoc [ES|QL] Add/Modify annotations for operators for better doc generation (#108220) 2024-05-03 22:59:51 -04:00
spatial-functions.asciidoc ES|QL ST_DISTANCE Function (#108764) 2024-06-21 11:59:44 +02:00
string-functions.asciidoc ESQL: add REPEAT string function (#109220) 2024-06-04 16:32:43 -05:00
type-conversion-functions.asciidoc [DOCS] ES|QL implicit casting (#108618) 2024-05-15 09:07:09 -04:00
unary.asciidoc ESQL: Add type tables for operators to docs (#103206) 2023-12-11 10:51:38 -05:00

The files in these subdirectories are generated by ESQL's test suite:

  • description - description of each function scraped from @FunctionInfo#description
  • examples - examples of each function scraped from @FunctionInfo#examples
  • parameters - description of each function's parameters scraped from @Param
  • signature - railroad diagram of the syntax to invoke each function
  • types - a table of each combination of support type for each parameter. These are generated from tests.
  • layout - a fully generated description for each function
  • kibana/definition - function definitions for kibana's ESQL editor
  • kibana/docs - the inline docs for kibana

Most functions can use the generated docs generated in the layout directory. If we need something more custom for the function we can make a file in this directory that can include:: any parts of the files above.

To regenerate the files for a function run its tests using gradle:

./gradlew :x-pack:plugin:esql:test -Dtests.class='*SinTests'

To regenerate the files for all functions run all of ESQL's tests using gradle:

./gradlew :x-pack:plugin:esql:test