Skip to content

Commit

Permalink
[ES|QL] Update the functions definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Nov 21, 2024
1 parent 764abe6 commit 5d25894
Show file tree
Hide file tree
Showing 3 changed files with 374 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const countDefinition: FunctionDefinition = {
validate: undefined,
examples: [
'FROM employees\n| STATS COUNT(height)',
'FROM employees \n| STATS count = COUNT(*) BY languages \n| SORT languages DESC',
'FROM employees\n| STATS count = COUNT(*) BY languages\n| SORT languages DESC',
'ROW words="foo;bar;baz;qux;quux;foo"\n| STATS word_count = COUNT(SPLIT(words, ";"))',
'ROW n=1\n| WHERE n < 0\n| STATS COUNT(n)',
'ROW n=1\n| STATS COUNT(n > 0 OR NULL), COUNT(n < 0 OR NULL)',
Expand Down Expand Up @@ -343,6 +343,61 @@ const countDistinctDefinition: FunctionDefinition = {
],
returnType: 'long',
},
{
params: [
{
name: 'field',
type: 'date_nanos',
optional: false,
},
],
returnType: 'long',
},
{
params: [
{
name: 'field',
type: 'date_nanos',
optional: false,
},
{
name: 'precision',
type: 'integer',
optional: true,
},
],
returnType: 'long',
},
{
params: [
{
name: 'field',
type: 'date_nanos',
optional: false,
},
{
name: 'precision',
type: 'long',
optional: true,
},
],
returnType: 'long',
},
{
params: [
{
name: 'field',
type: 'date_nanos',
optional: false,
},
{
name: 'precision',
type: 'unsigned_long',
optional: true,
},
],
returnType: 'long',
},
{
params: [
{
Expand Down Expand Up @@ -769,6 +824,16 @@ const maxDefinition: FunctionDefinition = {
],
returnType: 'date',
},
{
params: [
{
name: 'field',
type: 'date_nanos',
optional: false,
},
],
returnType: 'date_nanos',
},
{
params: [
{
Expand Down Expand Up @@ -984,6 +1049,16 @@ const minDefinition: FunctionDefinition = {
],
returnType: 'date',
},
{
params: [
{
name: 'field',
type: 'date_nanos',
optional: false,
},
],
returnType: 'date_nanos',
},
{
params: [
{
Expand Down Expand Up @@ -1544,6 +1619,16 @@ const valuesDefinition: FunctionDefinition = {
],
returnType: 'date',
},
{
params: [
{
name: 'field',
type: 'date_nanos',
optional: false,
},
],
returnType: 'date_nanos',
},
{
params: [
{
Expand Down
Loading

0 comments on commit 5d25894

Please sign in to comment.