Skip to content

Commit 5af15f4

Browse files
authored
[8.x] ESQL - docs for to_date_nanos (#120124) (#120203)
* ESQL - docs for to_date_nanos (#120124) I forgot to link the ToDateNanos docs when I merged that function. --------- Co-authored-by: elasticsearchmachine <[email protected]> Conflicts: docs/reference/esql/functions/description/to_date_nanos.asciidoc docs/reference/esql/functions/kibana/definition/to_date_nanos.json docs/reference/esql/functions/kibana/docs/to_date_nanos.md docs/reference/esql/functions/layout/to_date_nanos.asciidoc * ESQL - docs for to_date_nanos (#120124) I forgot to link the ToDateNanos docs when I merged that function. --------- Co-authored-by: elasticsearchmachine <[email protected]> Conflicts: docs/reference/esql/functions/description/to_date_nanos.asciidoc docs/reference/esql/functions/kibana/definition/to_date_nanos.json docs/reference/esql/functions/kibana/docs/to_date_nanos.md docs/reference/esql/functions/layout/to_date_nanos.asciidoc * unmute ToDateNanos tests, and build docs
1 parent ea30ecd commit 5af15f4

File tree

10 files changed

+151
-5
lines changed

10 files changed

+151
-5
lines changed

docs/reference/esql/functions/description/to_date_nanos.asciidoc

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/kibana/definition/to_date_nanos.json

Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/kibana/docs/to_date_nanos.md

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/layout/to_date_nanos.asciidoc

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/parameters/to_date_nanos.asciidoc

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/signature/to_date_nanos.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/reference/esql/functions/type-conversion-functions.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* <<esql-to_cartesianshape>>
1919
* experimental:[] <<esql-to_dateperiod>>
2020
* <<esql-to_datetime>>
21+
* <<esql-to_date_nanos>>
2122
* <<esql-to_degrees>>
2223
* <<esql-to_double>>
2324
* <<esql-to_geopoint>>
@@ -37,6 +38,7 @@ include::layout/to_cartesianpoint.asciidoc[]
3738
include::layout/to_cartesianshape.asciidoc[]
3839
include::layout/to_dateperiod.asciidoc[]
3940
include::layout/to_datetime.asciidoc[]
41+
include::layout/to_date_nanos.asciidoc[]
4042
include::layout/to_degrees.asciidoc[]
4143
include::layout/to_double.asciidoc[]
4244
include::layout/to_geopoint.asciidoc[]

docs/reference/esql/functions/types/to_date_nanos.asciidoc

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

muted-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ tests:
165165
- class: org.elasticsearch.xpack.ml.integration.MlJobIT
166166
method: testGetJobs_GivenSingleJob
167167
issue: https://github.com/elastic/elasticsearch/issues/113655
168-
- class: org.elasticsearch.xpack.esql.expression.function.scalar.convert.ToDateNanosTests
169-
issue: https://github.com/elastic/elasticsearch/issues/113661
170168
- class: org.elasticsearch.search.retriever.RankDocsRetrieverBuilderTests
171169
method: testRewrite
172170
issue: https://github.com/elastic/elasticsearch/issues/114467

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDateNanos.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public class ToDateNanos extends AbstractConvertFunction {
6363
@FunctionInfo(
6464
returnType = "date_nanos",
6565
description = "Converts an input to a nanosecond-resolution date value (aka date_nanos).",
66-
note = "The range for date nanos is 1970-01-01T00:00:00.000000000Z to 2262-04-11T23:47:16.854775807Z. Additionally, integers "
67-
+ "cannot be converted into date nanos, as the range of integer nanoseconds only covers about 2 seconds after epoch.",
68-
preview = true
66+
note = "The range for date nanos is 1970-01-01T00:00:00.000000000Z to 2262-04-11T23:47:16.854775807Z, attepting to convert"
67+
+ "values outside of that range will result in null with a warning.. Additionally, integers cannot be converted into date "
68+
+ "nanos, as the range of integer nanoseconds only covers about 2 seconds after epoch."
6969
)
7070
public ToDateNanos(
7171
Source source,

0 commit comments

Comments
 (0)