OpenSearch/docs/en/sql/language
Nik Everett 876aebf7e0 SQL: Make extract work for any datetime function (elastic/x-pack-elasticsearch#3756)
This allows any datetime function to be present in `EXTRACT` which feels
more consistent. `EXTRACT(FOO FROM bar)` is now just sugar for
`FOO(bar)`. This is *much* simpler to explain in the documentation then
"these 10 fields are supported by extract and they are the same as this
subset of the datetime functions."

The implementation of this is a little simpler then the old way. Instead
of resolving the function in the parser we create an
`UnresolvedFunction` that looks *almost* just like what we'd create for
a single argument function and resolve the function in the `Analyzer`.
This feels like a net positive as it allows us to group `EXTRACT`
resolution failures with other function resolution failures.

This also creates `UnresolvedFunctionTests` and
`UnresolvedAttributeTests`. I had to create `UnresolvedFunctionTests`
because `UnreolvedFunction` now has three boolean parameters which is
incompatible with the generic `NodeSubclassTests`'s requirement that all
ctor parameters be unique. I created `UnresolvedAttributeTests` because
I didn't want `UnresolvedFunctionTests` to call `NodeSubclassTests` and
figured that we'd want `UnresolvedAttributeTest` eventually and now felt
like as good a time as any.

Added a 

Original commit: elastic/x-pack-elasticsearch@358aada308
2018-02-03 16:10:09 -05:00
..
data-types.asciidoc SQL: More comments in docs 2018-02-02 11:10:34 -05:00
index.asciidoc SQL: Match naming conventions for asciidoc files (elastic/x-pack-elasticsearch#3471) 2018-01-03 15:06:36 -05:00
reserved.asciidoc SQL: Match naming conventions for asciidoc files (elastic/x-pack-elasticsearch#3471) 2018-01-03 15:06:36 -05:00
syntax.asciidoc SQL: Make extract work for any datetime function (elastic/x-pack-elasticsearch#3756) 2018-02-03 16:10:09 -05:00