diff --git a/.buildkite/pipeline-resource-definitions/kibana-pr.yml b/.buildkite/pipeline-resource-definitions/kibana-pr.yml
new file mode 100644
index 0000000000000..8d2a6c8bf9e99
--- /dev/null
+++ b/.buildkite/pipeline-resource-definitions/kibana-pr.yml
@@ -0,0 +1,49 @@
+# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
+apiVersion: backstage.io/v1alpha1
+kind: Resource
+metadata:
+ name: bk-kibana-pull-request
+ description: Runs manually for pull requests
+ links:
+ - url: 'https://buildkite.com/elastic/kibana-pull-request'
+ title: Pipeline link
+spec:
+ type: buildkite-pipeline
+ owner: 'group:kibana-operations'
+ system: buildkite
+ implementation:
+ apiVersion: buildkite.elastic.dev/v1
+ kind: Pipeline
+ metadata:
+ name: kibana / pull request
+ description: Runs manually for pull requests
+ spec:
+ env:
+ PR_COMMENTS_ENABLED: 'true'
+ GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true'
+ GITHUB_BUILD_COMMIT_STATUS_CONTEXT: kibana-ci
+ GITHUB_STEP_COMMIT_STATUS_ENABLED: 'true'
+ allow_rebuilds: true
+ branch_configuration: ''
+ cancel_intermediate_builds: true
+ default_branch: main
+ repository: elastic/kibana
+ pipeline_file: .buildkite/scripts/pipelines/pull_request/pipeline.sh
+ skip_intermediate_builds: false
+ provider_settings:
+ build_branches: false
+ build_pull_requests: true
+ publish_commit_status: false
+ trigger_mode: none
+ build_tags: false
+ prefix_pull_request_fork_branch_names: false
+ skip_pull_request_builds_for_existing_commits: false
+ teams:
+ everyone:
+ access_level: BUILD_AND_READ
+ kibana-operations:
+ access_level: MANAGE_BUILD_AND_READ
+ appex-qa:
+ access_level: MANAGE_BUILD_AND_READ
+ kibana-tech-leads:
+ access_level: MANAGE_BUILD_AND_READ
diff --git a/.buildkite/pipeline-resource-definitions/locations.yml b/.buildkite/pipeline-resource-definitions/locations.yml
index 32ab205451dba..bd7e2c3bb86bd 100644
--- a/.buildkite/pipeline-resource-definitions/locations.yml
+++ b/.buildkite/pipeline-resource-definitions/locations.yml
@@ -24,6 +24,7 @@ spec:
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-on-merge-unsupported-ftrs.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-performance-daily.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-performance-data-set-extraction-daily.yml
+ - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-pr.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-purge-cloud-deployments.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/scalability_testing-daily.yml
diff --git a/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts b/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
index f515305b3d50b..aa6e33f1116b4 100644
--- a/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
+++ b/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
@@ -27,7 +27,7 @@ const getAgentRule = (queueName: string = 'n2-4-spot') => {
return {
provider: 'gcp',
image: 'family/kibana-ubuntu-2004',
- imageProject: 'elastic-images-qa',
+ imageProject: 'elastic-images-prod',
machineType: `${kind}-standard-${cores}`,
preemptible: spot === 'spot',
};
diff --git a/.buildkite/pipelines/pull_request/apm_cypress.yml b/.buildkite/pipelines/pull_request/apm_cypress.yml
index 38027371559db..e0d8b5f4db021 100644
--- a/.buildkite/pipelines/pull_request/apm_cypress.yml
+++ b/.buildkite/pipelines/pull_request/apm_cypress.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/apm_cypress.sh
label: 'APM Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml
index b3e1d3259efec..0af21702aedd0 100644
--- a/.buildkite/pipelines/pull_request/base.yml
+++ b/.buildkite/pipelines/pull_request/base.yml
@@ -3,14 +3,21 @@ steps:
label: Pre-Build
timeout_in_minutes: 10
agents:
- queue: kibana-default
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-2
- wait
- command: .buildkite/scripts/steps/build_kibana.sh
label: Build Kibana Distribution and Plugins
agents:
- queue: n2-16-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-16
+ preemptible: true
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 60
@@ -22,7 +29,11 @@ steps:
- command: .buildkite/scripts/steps/quick_checks.sh
label: 'Quick Checks'
agents:
- queue: n2-2-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-2
+ preemptible: true
key: quick_checks
timeout_in_minutes: 60
retry:
@@ -35,7 +46,10 @@ steps:
- command: .buildkite/scripts/steps/ci_stats_ready.sh
label: Mark CI Stats as ready
agents:
- queue: kibana-default
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-2
timeout_in_minutes: 10
depends_on:
- build
@@ -48,7 +62,10 @@ steps:
- command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh
label: 'Pick Test Group Run Order'
agents:
- queue: kibana-default
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-2
timeout_in_minutes: 10
env:
JEST_UNIT_SCRIPT: '.buildkite/scripts/steps/test/jest.sh'
@@ -62,7 +79,11 @@ steps:
- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
- queue: n2-8-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-8
+ preemptible: true
key: linting
timeout_in_minutes: 60
retry:
@@ -73,7 +94,11 @@ steps:
- command: .buildkite/scripts/steps/check_types.sh
label: 'Check Types'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
key: check_types
timeout_in_minutes: 70
retry:
@@ -84,7 +109,11 @@ steps:
- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
- queue: n2-16-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-16
+ preemptible: true
key: linting_with_types
timeout_in_minutes: 90
retry:
@@ -96,7 +125,11 @@ steps:
label: 'Checks'
key: checks
agents:
- queue: n2-2-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-2
+ preemptible: true
timeout_in_minutes: 60
retry:
automatic:
@@ -106,7 +139,11 @@ steps:
- command: .buildkite/scripts/steps/api_docs/build_api_docs.sh
label: 'Build API Docs'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
key: build_api_docs
timeout_in_minutes: 90
retry:
diff --git a/.buildkite/pipelines/pull_request/build_project.yml b/.buildkite/pipelines/pull_request/build_project.yml
index ba1f73c3b7a23..c6ae6479effd5 100644
--- a/.buildkite/pipelines/pull_request/build_project.yml
+++ b/.buildkite/pipelines/pull_request/build_project.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/artifacts/docker_image.sh
label: 'Build Project Image'
agents:
- queue: n2-16-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-16
+ preemptible: true
timeout_in_minutes: 60
soft_fail: true
retry:
diff --git a/.buildkite/pipelines/pull_request/check_next_docs.yml b/.buildkite/pipelines/pull_request/check_next_docs.yml
index 16b9145661a32..eafd8ca872392 100644
--- a/.buildkite/pipelines/pull_request/check_next_docs.yml
+++ b/.buildkite/pipelines/pull_request/check_next_docs.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/next_docs/build_and_validate_docs.sh
label: 'Build and Validate Next Docs'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
timeout_in_minutes: 30
retry:
automatic:
diff --git a/.buildkite/pipelines/pull_request/deploy_cloud.yml b/.buildkite/pipelines/pull_request/deploy_cloud.yml
index 722c6a2785c04..ed174aa41facd 100644
--- a/.buildkite/pipelines/pull_request/deploy_cloud.yml
+++ b/.buildkite/pipelines/pull_request/deploy_cloud.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/cloud/build_and_deploy.sh
label: 'Build and Deploy to Cloud'
agents:
- queue: n2-2-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-2
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/deploy_project.yml b/.buildkite/pipelines/pull_request/deploy_project.yml
index 0aacf9b46c48d..4891e287723fd 100644
--- a/.buildkite/pipelines/pull_request/deploy_project.yml
+++ b/.buildkite/pipelines/pull_request/deploy_project.yml
@@ -3,7 +3,11 @@ steps:
label: 'Build Project Image'
key: build_project_image
agents:
- queue: n2-16-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-16
+ preemptible: true
timeout_in_minutes: 60
soft_fail: true
retry:
@@ -13,7 +17,11 @@ steps:
- command: .buildkite/scripts/steps/serverless/deploy.sh
label: 'Deploy Project'
agents:
- queue: kibana-default
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
timeout_in_minutes: 10
depends_on:
- build_project_image
diff --git a/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml b/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml
index 719884a003c89..511e98321ecb7 100644
--- a/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml
+++ b/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/exploratory_view_plugin.sh
label: 'Exploratory View @elastic/synthetics Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/fips.yml b/.buildkite/pipelines/pull_request/fips.yml
index dac30490b3733..5118fae835718 100644
--- a/.buildkite/pipelines/pull_request/fips.yml
+++ b/.buildkite/pipelines/pull_request/fips.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/fips/build.sh
label: 'Build FIPS Image'
agents:
- queue: n2-2-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-2
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/fleet_cypress.yml b/.buildkite/pipelines/pull_request/fleet_cypress.yml
index 2f8e629478657..b2bf1bc3d9412 100644
--- a/.buildkite/pipelines/pull_request/fleet_cypress.yml
+++ b/.buildkite/pipelines/pull_request/fleet_cypress.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/fleet_cypress.sh
label: 'Fleet Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/kbn_handlebars.yml b/.buildkite/pipelines/pull_request/kbn_handlebars.yml
index ba12674abaf32..9bee1bc29f372 100644
--- a/.buildkite/pipelines/pull_request/kbn_handlebars.yml
+++ b/.buildkite/pipelines/pull_request/kbn_handlebars.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/test/kbn_handlebars.sh
label: 'Check @kbn/handlebars for upstream differences'
agents:
- queue: n2-2-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-2
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml b/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml
index 8a8d7e68e3f32..06c61b703b1e2 100644
--- a/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml
+++ b/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/observability_onboarding_cypress.sh
label: 'Observability onboarding Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/post_build.yml b/.buildkite/pipelines/pull_request/post_build.yml
index 63f7169334584..95764b537e5eb 100644
--- a/.buildkite/pipelines/pull_request/post_build.yml
+++ b/.buildkite/pipelines/pull_request/post_build.yml
@@ -5,4 +5,7 @@ steps:
- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
agents:
- queue: kibana-default
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-2
diff --git a/.buildkite/pipelines/pull_request/profiling_cypress.yml b/.buildkite/pipelines/pull_request/profiling_cypress.yml
index f9fef28fa5fea..7293db65cb704 100644
--- a/.buildkite/pipelines/pull_request/profiling_cypress.yml
+++ b/.buildkite/pipelines/pull_request/profiling_cypress.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/profiling_cypress.sh
label: 'Profiling Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/response_ops.yml b/.buildkite/pipelines/pull_request/response_ops.yml
index f9ada8c70c8fd..bc9f22fc8194c 100644
--- a/.buildkite/pipelines/pull_request/response_ops.yml
+++ b/.buildkite/pipelines/pull_request/response_ops.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/response_ops.sh
label: 'Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/response_ops_cases.yml b/.buildkite/pipelines/pull_request/response_ops_cases.yml
index 42ae473616e3d..421e71285af4d 100644
--- a/.buildkite/pipelines/pull_request/response_ops_cases.yml
+++ b/.buildkite/pipelines/pull_request/response_ops_cases.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/response_ops_cases.sh
label: 'Cases Cypress Tests on Security Solution'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml b/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml
index 828f94f5db417..a0dbfdb62e98d 100644
--- a/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_serverless_ai_assistant.sh
label: 'Serverless AI Assistant - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -16,7 +20,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_solution_ai_assistant.sh
label: 'AI Assistant - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml b/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml
index f5f7f62e0d90f..d3ee6fe63f641 100644
--- a/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml
@@ -2,7 +2,13 @@ steps:
- command: .buildkite/scripts/steps/functional/defend_workflows_burn.sh
label: '[Soft fail] Defend Workflows Cypress Tests, burning changed specs'
agents:
- queue: n2-4-virt
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ enableNestedVirtualization: true
+ localSsds: 1
+ localSsdInterface: nvme
+ machineType: n2-standard-4
depends_on:
- build
- quick_checks
@@ -15,7 +21,13 @@ steps:
- command: .buildkite/scripts/steps/functional/defend_workflows_serverless_burn.sh
label: '[Soft fail] Defend Workflows Cypress Tests on Serverless, burning changed specs'
agents:
- queue: n2-4-virt
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ enableNestedVirtualization: true
+ localSsds: 1
+ localSsdInterface: nvme
+ machineType: n2-standard-4
depends_on:
- build
- quick_checks
@@ -28,7 +40,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_solution_burn.sh
label: '[Soft fail] Security Solution Cypress tests, burning changed specs'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -41,11 +57,15 @@ steps:
- command: .buildkite/scripts/steps/functional/osquery_cypress_burn.sh
label: '[Soft fail] Osquery Cypress Tests, burning changed specs'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
timeout_in_minutes: 50
soft_fail: true
retry:
- automatic: false
\ No newline at end of file
+ automatic: false
diff --git a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml
index 31fe261a1b5b5..2fab86d72afa2 100644
--- a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml
@@ -2,7 +2,13 @@ steps:
- command: .buildkite/scripts/steps/functional/defend_workflows.sh
label: 'Defend Workflows Cypress Tests'
agents:
- queue: n2-4-virt
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ enableNestedVirtualization: true
+ localSsds: 1
+ localSsdInterface: nvme
+ machineType: n2-standard-4
depends_on:
- build
- quick_checks
@@ -16,7 +22,13 @@ steps:
- command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh
label: 'Defend Workflows Cypress Tests on Serverless'
agents:
- queue: n2-4-virt
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ enableNestedVirtualization: true
+ localSsds: 1
+ localSsdInterface: nvme
+ machineType: n2-standard-4
depends_on:
- build
- quick_checks
@@ -27,14 +39,18 @@ steps:
- exit_status: '-1'
limit: 1
- # status_exception: Native role management is not enabled in this Elasticsearch instance
- # - command: .buildkite/scripts/steps/functional/security_serverless_defend_workflows.sh
- # label: 'Serverless Security Defend Workflows Cypress Tests'
- # agents:
- # queue: n2-4-spot
- # depends_on: build
- # timeout_in_minutes: 60
- # retry:
- # automatic:
- # - exit_status: '-1'
- # limit: 1
+# status_exception: Native role management is not enabled in this Elasticsearch instance
+# - command: .buildkite/scripts/steps/functional/security_serverless_defend_workflows.sh
+# label: 'Serverless Security Defend Workflows Cypress Tests'
+# agents:
+# image: family/kibana-ubuntu-2004
+# imageProject: elastic-images-prod
+# provider: gcp
+# machineType: n2-standard-4
+# preemptible: true
+# depends_on: build
+# timeout_in_minutes: 60
+# retry:
+# automatic:
+# - exit_status: '-1'
+# limit: 1
diff --git a/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml b/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml
index 04c08a92a7ac1..b2294b33f82fe 100644
--- a/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_serverless_detection_engine.sh
label: 'Serverless Detection Engine - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -16,7 +20,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_serverless_detection_engine_exceptions.sh
label: 'Serverless Detection Engine - Exceptions - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -30,7 +38,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_solution_detection_engine.sh
label: 'Detection Engine - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -44,7 +56,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_solution_detection_engine_exceptions.sh
label: 'Detection Engine - Exceptions - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml b/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml
index 8ed45e2bd409a..bd670b4fa9324 100644
--- a/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh
label: 'Serverless Entity Analytics - Security Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -16,7 +20,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_solution_entity_analytics.sh
label: 'Entity Analytics - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/security_solution/explore.yml b/.buildkite/pipelines/pull_request/security_solution/explore.yml
index 3ee855334a28a..4f4609aca42f1 100644
--- a/.buildkite/pipelines/pull_request/security_solution/explore.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/explore.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_solution_explore.sh
label: 'Explore - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -16,7 +20,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
label: 'Serverless Explore - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/security_solution/investigations.yml b/.buildkite/pipelines/pull_request/security_solution/investigations.yml
index 38b7481e603e1..713b1b0bc45ab 100644
--- a/.buildkite/pipelines/pull_request/security_solution/investigations.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/investigations.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_solution_investigations.sh
label: 'Investigations - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -16,7 +20,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
label: 'Serverless Investigations - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml b/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml
index 784176ec19561..6e47721a6d671 100644
--- a/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/osquery_cypress.sh
label: 'Osquery Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -16,7 +20,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh
label: 'Serverless Osquery Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml
index 2680124d1575b..8c84a6566eca9 100644
--- a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh
label: 'Serverless Rule Management - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -16,7 +20,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh
label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -30,7 +38,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh
label: 'Rule Management - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
@@ -44,7 +56,11 @@ steps:
- command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh
label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml b/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml
index 519d36ba3c285..5f79c21bd4938 100644
--- a/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml
+++ b/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/threat_intelligence.sh
label: 'Threat Intelligence Cypress Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml b/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml
index 83332811bcc20..8dc048801c7c1 100644
--- a/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml
+++ b/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/slo_plugin_e2e.sh
label: 'SLO Plugin @elastic/synthetics Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/storybooks.yml b/.buildkite/pipelines/pull_request/storybooks.yml
index 8f76879231de2..fe8b333f2d46f 100644
--- a/.buildkite/pipelines/pull_request/storybooks.yml
+++ b/.buildkite/pipelines/pull_request/storybooks.yml
@@ -2,6 +2,10 @@ steps:
- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
label: 'Build Storybooks'
agents:
- queue: n2-8-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-8
+ preemptible: true
key: storybooks
timeout_in_minutes: 80
diff --git a/.buildkite/pipelines/pull_request/synthetics_plugin.yml b/.buildkite/pipelines/pull_request/synthetics_plugin.yml
index fe6fb1bb0b947..39467f473c08e 100644
--- a/.buildkite/pipelines/pull_request/synthetics_plugin.yml
+++ b/.buildkite/pipelines/pull_request/synthetics_plugin.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/synthetics_plugin.sh
label: 'Synthetics @elastic/synthetics Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/uptime_plugin.yml b/.buildkite/pipelines/pull_request/uptime_plugin.yml
index 9371fb6c3deb4..2350767b92edf 100644
--- a/.buildkite/pipelines/pull_request/uptime_plugin.yml
+++ b/.buildkite/pipelines/pull_request/uptime_plugin.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/uptime_plugin.sh
label: 'Uptime @elastic/synthetics Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml b/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml
index 2cb69eb1eadd9..747b7e813f752 100644
--- a/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml
+++ b/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml
@@ -2,7 +2,11 @@ steps:
- command: .buildkite/scripts/steps/functional/ux_synthetics_e2e.sh
label: 'UX Plugin @elastic/synthetics Tests'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
depends_on:
- build
- quick_checks
diff --git a/.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml b/.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml
index f1e61875fa254..03ff2bd0da693 100644
--- a/.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml
+++ b/.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml
@@ -2,6 +2,10 @@ steps:
- command: .buildkite/scripts/steps/webpack_bundle_analyzer/build_and_upload.sh
label: 'Build Webpack Bundle Analyzer reports'
agents:
- queue: n2-4-spot
+ image: family/kibana-ubuntu-2004
+ imageProject: elastic-images-prod
+ provider: gcp
+ machineType: n2-standard-4
+ preemptible: true
key: webpack_bundle_analyzer
timeout_in_minutes: 60
diff --git a/.buildkite/pipelines/upload_pipeline.yml b/.buildkite/pipelines/upload_pipeline.yml
index f20dd1f60f7f7..1f53ac97a7b47 100644
--- a/.buildkite/pipelines/upload_pipeline.yml
+++ b/.buildkite/pipelines/upload_pipeline.yml
@@ -7,5 +7,7 @@ steps:
echo "Uploading pipeline $TESTED_PIPELINE_PATH"
buildkite-agent pipeline upload $TESTED_PIPELINE_PATH
else
- $TESTED_PIPELINE_PATH | buildkite-agent pipeline upload
+ $TESTED_PIPELINE_PATH > /tmp/pipeline_steps.yml
+ buildkite-agent artifact upload '/tmp/pipeline_steps.yml'
+ buildkite-agent pipeline upload '/tmp/pipeline_steps.yml'
fi
diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts
index db0e8239d9701..02011690a13c3 100644
--- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts
+++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts
@@ -27,16 +27,6 @@ const getPipeline = (filename: string, removeSteps = true) => {
return removeSteps ? str.replace(/^steps:/, '') : str;
};
-const uploadPipeline = (pipelineContent: string | object) => {
- const str =
- typeof pipelineContent === 'string' ? pipelineContent : JSON.stringify(pipelineContent);
-
- execSync('buildkite-agent pipeline upload', {
- input: str,
- stdio: ['pipe', 'inherit', 'inherit'],
- });
-};
-
(async () => {
try {
const skippable = await areChangesSkippable(SKIPPABLE_PR_MATCHERS, REQUIRED_PATHS);
@@ -329,9 +319,9 @@ const uploadPipeline = (pipelineContent: string | object) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));
// remove duplicated steps
- uploadPipeline([...new Set(pipeline)].join('\n'));
+ console.log([...new Set(pipeline)].join('\n'));
} catch (ex) {
- console.error('PR pipeline generation error', ex.message);
+ console.error('Error while generating the pipeline steps: ' + ex.message, ex);
process.exit(1);
}
})();
diff --git a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx
index cf0fb81f7407e..3cc1c30877a89 100644
--- a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx
+++ b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx
@@ -398,6 +398,7 @@ export class ChromeService {
globalHelpExtensionMenuLinks$={globalHelpExtensionMenuLinks$}
actionMenu$={application.currentActionMenu$}
breadcrumbs$={currentProjectBreadcrumbs$}
+ customBranding$={customBranding$}
helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))}
helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))}
helpMenuLinks$={helpMenuLinks$}
diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts
index f07ac64de3856..03e40d7678f02 100644
--- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts
+++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts
@@ -114,9 +114,7 @@ export class ProjectNavigationService {
);
return {
- setProjectHome: (homeHref: string) => {
- this.projectHome$.next(homeHref);
- },
+ setProjectHome: this.setProjectHome.bind(this),
getProjectHome$: () => {
return this.projectHome$.asObservable();
},
@@ -408,14 +406,25 @@ export class ProjectNavigationService {
return;
}
- const { sideNavComponent } = definition;
+ const { sideNavComponent, homePage = '' } = definition;
+ const homePageLink = this.navLinksService?.get(homePage);
+
if (sideNavComponent) {
this.setSideNavComponent(sideNavComponent);
}
+
+ if (homePageLink) {
+ this.setProjectHome(homePageLink.href);
+ }
+
this.initNavigation(nextId, definition.navigationTree$);
});
}
+ private setProjectHome(homeHref: string) {
+ this.projectHome$.next(homeHref);
+ }
+
private goToSolutionHome(id: string) {
const definitions = this.solutionNavDefinitions$.getValue();
const definition = definitions[id];
diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.test.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.test.tsx
index 04e5773e176bd..10a6c75d709be 100644
--- a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.test.tsx
+++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.test.tsx
@@ -33,6 +33,7 @@ describe('Header', () => {
navControlsLeft$: Rx.of([]),
navControlsCenter$: Rx.of([]),
navControlsRight$: Rx.of([]),
+ customBranding$: Rx.of({}),
prependBasePath: (str) => `hello/world/${str}`,
toggleSideNav: jest.fn(),
};
@@ -46,5 +47,16 @@ describe('Header', () => {
expect(await screen.findByTestId('euiCollapsibleNavButton')).toBeVisible();
expect(await screen.findByText('Hello, world!')).toBeVisible();
+ expect(screen.queryByTestId(/customLogo/)).toBeNull();
+ });
+
+ it('renders custom branding logo', async () => {
+ const { queryByTestId } = render(
+
+ Hello, world!
+
+ );
+
+ expect(queryByTestId(/customLogo/)).not.toBeNull();
});
});
diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx
index 77aef1053a8a2..637e87773cf7a 100644
--- a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx
+++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx
@@ -14,6 +14,7 @@ import {
EuiLoadingSpinner,
useEuiTheme,
EuiThemeComputed,
+ EuiImage,
} from '@elastic/eui';
import { css } from '@emotion/react';
import type { InternalApplicationStart } from '@kbn/core-application-browser-internal';
@@ -33,7 +34,9 @@ import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { Router } from '@kbn/shared-ux-router';
import React, { useCallback } from 'react';
import useObservable from 'react-use/lib/useObservable';
-import { debounceTime, Observable, of } from 'rxjs';
+import { debounceTime, Observable } from 'rxjs';
+import type { CustomBranding } from '@kbn/core-custom-branding-common';
+
import { useHeaderActionMenuMounter } from '../header/header_action_menu';
import { Breadcrumbs } from './breadcrumbs';
import { HeaderHelpMenu } from '../header/header_help_menu';
@@ -46,11 +49,11 @@ import { ProjectNavigation } from './navigation';
const getHeaderCss = ({ size, colors }: EuiThemeComputed) => ({
logo: {
container: css`
- display: inline-block;
+ display: flex;
+ align-items: center;
+ justify-content: center;
min-width: 56px; /* 56 = 40 + 8 + 8 */
- padding: 0 ${size.s};
cursor: pointer;
- margin-left: -${size.s}; // to get equal spacing between .euiCollapsibleNavButtonWrapper, logo and breadcrumbs
`,
logo: css`
min-width: 0; /* overrides min-width: 40px */
@@ -113,6 +116,7 @@ export interface Props {
actionMenu$: Observable;
docLinks: DocLinksStart;
children: React.ReactNode;
+ customBranding$: Observable;
globalHelpExtensionMenuLinks$: Observable;
helpExtension$: Observable;
helpSupportUrl$: Observable;
@@ -130,46 +134,77 @@ export interface Props {
const LOADING_DEBOUNCE_TIME = 80;
-type LogoProps = Pick & {
+type LogoProps = Pick<
+ Props,
+ 'application' | 'homeHref$' | 'loadingCount$' | 'prependBasePath' | 'customBranding$'
+> & {
logoCss: HeaderCss['logo'];
};
-const Logo = (props: LogoProps) => {
- const loadingCount = useObservable(
- props.loadingCount$.pipe(debounceTime(LOADING_DEBOUNCE_TIME)),
- 0
- );
-
- const homeHref = useObservable(props.homeHref$, '/app/home');
+const Logo = ({
+ loadingCount$,
+ homeHref$,
+ prependBasePath,
+ application,
+ logoCss,
+ customBranding$,
+}: LogoProps) => {
+ const loadingCount = useObservable(loadingCount$.pipe(debounceTime(LOADING_DEBOUNCE_TIME)), 0);
+ const homeHref = useObservable(homeHref$, '/app/home');
+ const customBranding = useObservable(customBranding$, {});
+ const { logo } = customBranding;
let fullHref: string | undefined;
if (homeHref) {
- fullHref = props.prependBasePath(homeHref);
+ fullHref = prependBasePath(homeHref);
}
const navigateHome = useCallback(
(event: React.MouseEvent) => {
if (fullHref) {
- props.application.navigateToUrl(fullHref);
+ application.navigateToUrl(fullHref);
}
event.preventDefault();
},
- [fullHref, props.application]
+ [fullHref, application]
);
+ const renderLogo = () => {
+ if (logo) {
+ return (
+
+
+
+ );
+ }
+
+ return (
+
+ );
+ };
+
return (
-
+
{loadingCount === 0 ? (
-
+ renderLogo()
) : (
-
+
{
const headerActionMenuMounter = useHeaderActionMenuMounter(observables.actionMenu$);
@@ -200,7 +236,7 @@ export const ProjectHeader = ({
<>
@@ -220,6 +256,7 @@ export const ProjectHeader = ({
application={application}
homeHref$={observables.homeHref$}
loadingCount$={observables.loadingCount$}
+ customBranding$={customBranding$}
logoCss={logoCss}
/>
diff --git a/packages/kbn-esql-validation-autocomplete/BUILD.bazel b/packages/kbn-esql-validation-autocomplete/BUILD.bazel
index 366eaa3d1a66f..07106718615d1 100644
--- a/packages/kbn-esql-validation-autocomplete/BUILD.bazel
+++ b/packages/kbn-esql-validation-autocomplete/BUILD.bazel
@@ -3,6 +3,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
SRCS = glob(
[
"**/*.ts",
+ "**/*functions.json",
],
exclude = [
"**/*.config.js",
diff --git a/packages/kbn-esql-validation-autocomplete/package.json b/packages/kbn-esql-validation-autocomplete/package.json
index 5d3773ed082b8..892ffd6999656 100644
--- a/packages/kbn-esql-validation-autocomplete/package.json
+++ b/packages/kbn-esql-validation-autocomplete/package.json
@@ -5,6 +5,11 @@
"license": "SSPL-1.0 OR Elastic License 2.0",
"sideEffects": false,
"scripts": {
- "maketests": "ts-node --transpileOnly ./scripts/generate_function_validation_tests.ts"
+ "make:tests": "ts-node --transpileOnly ./scripts/generate_function_validation_tests.ts",
+ "postmake:tests": "yarn run lint:fix",
+ "make:defs": "ts-node --transpileOnly ./scripts/generate_function_definitions.ts",
+ "postmake:defs": "yarn run lint:fix && yarn run i18n:fix",
+ "lint:fix": "cd ../.. && node ./scripts/eslint --fix ./packages/kbn-esql-validation-autocomplete/src/**/*.ts",
+ "i18n:fix": "cd ../.. && node ./scripts/i18n_check.js --fix"
}
}
diff --git a/packages/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts b/packages/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts
new file mode 100644
index 0000000000000..b7cd905c63baf
--- /dev/null
+++ b/packages/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts
@@ -0,0 +1,385 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { readdirSync, readFileSync } from 'fs';
+import { writeFile } from 'fs/promises';
+import { join } from 'path';
+import _ from 'lodash';
+import type { RecursivePartial } from '@kbn/utility-types';
+import { FunctionDefinition, supportedFieldTypes } from '../src/definitions/types';
+
+const aliasTable: Record = {
+ to_version: ['to_ver'],
+ to_unsigned_long: ['to_ul', 'to_ulong'],
+ to_boolean: ['to_bool'],
+ to_string: ['to_str'],
+ to_datetime: ['to_dt'],
+ to_double: ['to_dbl'],
+ to_integer: ['to_int'],
+};
+const aliases = new Set(Object.values(aliasTable).flat());
+
+const evalSupportedCommandsAndOptions = {
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+};
+
+const excludedFunctions = new Set(['bucket', 'case']);
+
+const extraFunctions: FunctionDefinition[] = [
+ {
+ type: 'eval',
+ name: 'case',
+ description:
+ 'Accepts pairs of conditions and values. The function returns the value that belongs to the first condition that evaluates to `true`. If the number of arguments is odd, the last argument is the default value which is returned when no condition matches.',
+ ...evalSupportedCommandsAndOptions,
+ signatures: [
+ {
+ params: [
+ { name: 'condition', type: 'boolean' },
+ { name: 'value', type: 'any' },
+ ],
+ minParams: 2,
+ returnType: 'any',
+ },
+ ],
+ examples: [
+ `from index | eval type = case(languages <= 1, "monolingual", languages <= 2, "bilingual", "polyglot")`,
+ ],
+ },
+];
+
+const elasticsearchToKibanaType = (elasticsearchType: string) => {
+ if (
+ [
+ 'double',
+ 'unsigned_long',
+ 'long',
+ 'integer',
+ 'counter_integer',
+ 'counter_long',
+ 'counter_double',
+ ].includes(elasticsearchType)
+ ) {
+ return 'number';
+ }
+
+ if (['text', 'keyword'].includes(elasticsearchType)) {
+ return 'string';
+ }
+
+ if (['datetime', 'time_duration'].includes(elasticsearchType)) {
+ return 'date';
+ }
+
+ if (elasticsearchType === 'date_period') {
+ return 'time_literal'; // TODO - consider aligning with Elasticsearch
+ }
+
+ return elasticsearchType;
+};
+
+const validateLogFunctions = `(fnDef: ESQLFunction) => {
+ const messages = [];
+ // do not really care here about the base and field
+ // just need to check both values are not negative
+ for (const arg of fnDef.args) {
+ if (isLiteralItem(arg) && arg.value < 0) {
+ messages.push({
+ type: 'warning' as const,
+ code: 'logOfNegativeValue',
+ text: i18n.translate(
+ 'kbn-esql-validation-autocomplete.esql.divide.warning.logOfNegativeValue',
+ {
+ defaultMessage: 'Log of a negative number results in null: {value}',
+ values: {
+ value: arg.value,
+ },
+ }
+ ),
+ location: arg.location,
+ });
+ }
+ }
+ return messages;
+}`;
+
+const dateDiffSuggestions = [
+ 'year',
+ 'quarter',
+ 'month',
+ 'week',
+ 'day',
+ 'hour',
+ 'minute',
+ 'second',
+ 'millisecond',
+ 'microsecond',
+ 'nanosecond',
+];
+
+const dateDiffOptions = [
+ 'year',
+ 'years',
+ 'yy',
+ 'yyyy',
+ 'quarter',
+ 'quarters',
+ 'qq',
+ 'q',
+ 'month',
+ 'months',
+ 'mm',
+ 'm',
+ 'dayofyear',
+ 'dy',
+ 'y',
+ 'day',
+ 'days',
+ 'dd',
+ 'd',
+ 'week',
+ 'weeks',
+ 'wk',
+ 'ww',
+ 'weekday',
+ 'weekdays',
+ 'dw',
+ 'hour',
+ 'hours',
+ 'hh',
+ 'minute',
+ 'minutes',
+ 'mi',
+ 'n',
+ 'second',
+ 'seconds',
+ 'ss',
+ 's',
+ 'millisecond',
+ 'milliseconds',
+ 'ms',
+ 'microsecond',
+ 'microseconds',
+ 'mcs',
+ 'nanosecond',
+ 'nanoseconds',
+ 'ns',
+];
+
+/**
+ * Enrichments for function definitions
+ *
+ * This is the place to put information that is not provided by Elasticsearch
+ * and, hence, won't be present in the JSON file.
+ */
+const functionEnrichments: Record> = {
+ log10: {
+ validate: validateLogFunctions,
+ },
+ log: {
+ validate: validateLogFunctions,
+ },
+ date_diff: {
+ signatures: [
+ {
+ params: [{ literalOptions: dateDiffOptions, literalSuggestions: dateDiffSuggestions }],
+ },
+ ],
+ },
+ date_extract: {
+ signatures: [
+ {
+ // override the first param as type chrono_literal
+ params: [{ type: 'chrono_literal' }],
+ },
+ ],
+ },
+ date_trunc: {
+ signatures: [
+ {
+ // override the first param to be of type time_literal
+ params: [{ type: 'time_literal' }],
+ },
+ ],
+ },
+ mv_sort: {
+ signatures: new Array(6).fill({
+ params: [{}, { literalOptions: ['asc', 'desc'] }],
+ }),
+ },
+ // can be removed when https://github.com/elastic/elasticsearch/issues/108982 is complete
+ coalesce: {
+ signatures: supportedFieldTypes
+ .map((type) => [
+ {
+ params: [
+ {
+ name: 'first',
+ type,
+ optional: false,
+ },
+ ],
+ returnType: type,
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type,
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: type,
+ minParams: 1,
+ },
+ ])
+ .flat(),
+ },
+ // can be removed when https://github.com/elastic/elasticsearch/issues/108982 is complete
+ mv_dedupe: {
+ signatures: supportedFieldTypes.map((type) => ({
+ params: [
+ {
+ name: 'field',
+ type,
+ optional: false,
+ },
+ ],
+ returnType: type,
+ })),
+ },
+};
+
+/**
+ * Builds a function definition object from a row of the "meta functions" table
+ * @param {Array} value — the row of the "meta functions" table, corresponding to a single function definition
+ * @param {*} columnIndices — the indices of the columns in the "meta functions" table
+ * @returns
+ */
+function getFunctionDefinition(ESFunctionDefinition: Record): FunctionDefinition {
+ const ret = {
+ type: ESFunctionDefinition.type,
+ name: ESFunctionDefinition.name,
+ ...(ESFunctionDefinition.type === 'eval'
+ ? evalSupportedCommandsAndOptions
+ : { supportedCommands: ['stats'] }),
+ description: ESFunctionDefinition.description,
+ alias: aliasTable[ESFunctionDefinition.name],
+ signatures: _.uniqBy(
+ ESFunctionDefinition.signatures.map((signature: any) => ({
+ ...signature,
+ params: signature.params.map((param: any) => ({
+ ...param,
+ type: elasticsearchToKibanaType(param.type),
+ description: undefined,
+ })),
+ returnType: elasticsearchToKibanaType(signature.returnType),
+ variadic: undefined, // we don't support variadic property
+ minParams: signature.variadic
+ ? signature.params.filter((param: any) => !param.optional).length
+ : undefined,
+ })),
+ (el) => JSON.stringify(el)
+ ),
+ examples: ESFunctionDefinition.examples,
+ };
+
+ if (functionEnrichments[ret.name]) {
+ _.merge(ret, functionEnrichments[ret.name]);
+ }
+
+ return ret as FunctionDefinition;
+}
+
+function printGeneratedFunctionsFile(functionDefinitions: FunctionDefinition[]) {
+ const removeInlineAsciiDocLinks = (asciidocString: string) => {
+ const inlineLinkRegex = /\{.+?\}\/.+?\[(.+?)\]/g;
+ return asciidocString.replace(inlineLinkRegex, '$1');
+ };
+
+ const getDefinitionName = (name: string) => _.camelCase(`${name}Definition`);
+
+ const printFunctionDefinition = (functionDefinition: FunctionDefinition) => {
+ const { type, name, description, alias, signatures } = functionDefinition;
+
+ return `const ${getDefinitionName(name)}: FunctionDefinition = {
+ type: '${type}',
+ name: '${name}',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.${name}', { defaultMessage: ${JSON.stringify(
+ removeInlineAsciiDocLinks(description)
+ )} }),
+ alias: ${alias ? `['${alias.join("', '")}']` : 'undefined'},
+ signatures: ${JSON.stringify(signatures, null, 2)},
+ supportedCommands: ${JSON.stringify(functionDefinition.supportedCommands)},
+ supportedOptions: ${JSON.stringify(functionDefinition.supportedOptions)},
+ validate: ${functionDefinition.validate || 'undefined'},
+ examples: ${JSON.stringify(functionDefinition.examples || [])},
+}`;
+ };
+
+ const fileHeader = `// NOTE: This file is generated by the generate_function_definitions.js script
+// Do not edit it manually
+
+import type { ESQLFunction } from '@kbn/esql-ast';
+import { i18n } from '@kbn/i18n';
+import { isLiteralItem } from '../shared/helpers';
+import type { FunctionDefinition } from './types';
+
+
+`;
+
+ const functionDefinitionsString = functionDefinitions.map(printFunctionDefinition).join('\n\n');
+
+ const fileContents = `${fileHeader}${functionDefinitionsString}
+ export const evalFunctionDefinitions = [${functionDefinitions
+ .map(({ name }) => getDefinitionName(name))
+ .join(',\n')}];`;
+
+ return fileContents;
+}
+
+(async function main() {
+ const pathToElasticsearch = process.argv[2];
+
+ const ESFunctionDefinitionsDirectory = join(
+ __dirname,
+ pathToElasticsearch,
+ 'docs/reference/esql/functions/kibana/definition'
+ );
+
+ // read all ES function definitions (the directory is full of JSON files) and create an array of definitions
+ const ESFunctionDefinitions = readdirSync(ESFunctionDefinitionsDirectory).map((file) =>
+ JSON.parse(readFileSync(`${ESFunctionDefinitionsDirectory}/${file}`, 'utf-8'))
+ );
+
+ const evalFunctionDefinitions: FunctionDefinition[] = [];
+ // const aggFunctionDefinitions = [];
+ for (const ESDefinition of ESFunctionDefinitions) {
+ if (aliases.has(ESDefinition.name) || excludedFunctions.has(ESDefinition.name)) {
+ continue;
+ }
+
+ const functionDefinition = getFunctionDefinition(ESDefinition);
+
+ evalFunctionDefinitions.push(functionDefinition);
+ }
+
+ evalFunctionDefinitions.push(...extraFunctions);
+
+ await writeFile(
+ join(__dirname, '../src/definitions/functions.ts'),
+ printGeneratedFunctionsFile(evalFunctionDefinitions)
+ );
+})();
diff --git a/packages/kbn-esql-validation-autocomplete/scripts/generate_function_validation_tests.ts b/packages/kbn-esql-validation-autocomplete/scripts/generate_function_validation_tests.ts
index 2b68d96a4195c..bcf11337117f4 100644
--- a/packages/kbn-esql-validation-autocomplete/scripts/generate_function_validation_tests.ts
+++ b/packages/kbn-esql-validation-autocomplete/scripts/generate_function_validation_tests.ts
@@ -7,22 +7,30 @@
*/
import { readFileSync, writeFileSync } from 'fs';
-import { camelCase } from 'lodash';
import { join } from 'path';
import * as recast from 'recast';
+import { camelCase } from 'lodash';
+import { getParamAtPosition } from '../src/autocomplete/helper';
import { statsAggregationFunctionDefinitions } from '../src/definitions/aggs';
-import { evalFunctionsDefinitions } from '../src/definitions/functions';
+import { evalFunctionDefinitions } from '../src/definitions/functions';
import { groupingFunctionDefinitions } from '../src/definitions/grouping';
import { getFunctionSignatures } from '../src/definitions/helpers';
import { chronoLiterals, timeLiterals } from '../src/definitions/literals';
-import { FunctionDefinition } from '../src/definitions/types';
import { nonNullable } from '../src/shared/helpers';
+import {
+ SupportedFieldType,
+ FunctionDefinition,
+ supportedFieldTypes,
+ isSupportedFieldType,
+} from '../src/definitions/types';
import { FUNCTION_DESCRIBE_BLOCK_NAME } from '../src/validation/function_describe_block_name';
+export const fieldNameFromType = (type: SupportedFieldType) => `${camelCase(type)}Field`;
+
function main() {
const testCasesByFunction: Map> = new Map();
- for (const definition of evalFunctionsDefinitions) {
+ for (const definition of evalFunctionDefinitions) {
testCasesByFunction.set(definition.name, generateTestsForEvalFunction(definition));
}
@@ -131,26 +139,27 @@ function generateRowCommandTestsForEvalFunction(
);
testCases.set(`row var = ${signatureString}`, []);
-
- const { wrongFieldMapping, expectedErrors } = generateIncorrectlyTypedParameters(
- name,
- signatures,
- params,
- {
- stringField: '"a"',
- numberField: '5',
- booleanField: 'true',
- }
- );
- const wrongSignatureString = tweakSignatureForRowCommand(
- getFunctionSignatures(
- { name, ...defRest, signatures: [{ params: wrongFieldMapping, ...signRest }] },
- { withTypes: false }
- )[0].declaration
- );
- testCases.set(`row var = ${wrongSignatureString}`, expectedErrors);
}
}
+
+ // Test the parameter type checking
+ const signatureWithMostParams = signatures.reduce((acc, curr) =>
+ acc.params.length > curr.params.length ? acc : curr
+ );
+
+ const { wrongFieldMapping, expectedErrors } = generateIncorrectlyTypedParameters(
+ name,
+ signatures,
+ signatureWithMostParams.params,
+ supportedTypesAndConstants
+ );
+ const wrongSignatureString = tweakSignatureForRowCommand(
+ getFunctionSignatures(
+ { name, ...defRest, signatures: [{ ...signatureWithMostParams, params: wrongFieldMapping }] },
+ { withTypes: false }
+ )[0].declaration
+ );
+ testCases.set(`row var = ${wrongSignatureString}`, expectedErrors);
}
function generateWhereCommandTestsForEvalFunction(
@@ -195,7 +204,7 @@ function generateWhereCommandTestsForEvalFunction(
name,
signatures,
params,
- { stringField: 'stringField', numberField: 'numberField', booleanField: 'booleanField' }
+ supportedTypesAndFieldNames
);
testCases.set(
`from a_index | where ${returnType !== 'number' ? 'length(' : ''}${
@@ -349,11 +358,7 @@ function generateEvalCommandTestsForEvalFunction(
name,
signatures,
params,
- {
- stringField: 'stringField',
- numberField: 'numberField',
- booleanField: 'booleanField',
- }
+ supportedTypesAndFieldNames
);
testCases.set(
`from a_index | eval ${
@@ -364,50 +369,6 @@ function generateEvalCommandTestsForEvalFunction(
}`,
expectedErrors
);
-
- if (!signRest.minParams) {
- // test that additional args are spotted
- const fieldMappingWithOneExtraArg = getFieldMapping(params).concat({
- name: 'extraArg',
- type: 'number',
- });
- const refSignature = signatures[0];
- // get the expected args from the first signature in case of errors
- const minNumberOfArgs = refSignature.params.filter(({ optional }) => !optional).length;
- const fullNumberOfArgs = refSignature.params.length;
- const hasOptionalArgs = minNumberOfArgs < fullNumberOfArgs;
- const hasTooManyArgs = fieldMappingWithOneExtraArg.length > fullNumberOfArgs;
-
- // the validation engine tries to be smart about signatures with optional args
- let messageQuantifier = 'exactly ';
- if (hasOptionalArgs && hasTooManyArgs) {
- messageQuantifier = 'no more than ';
- }
- if (!hasOptionalArgs && !hasTooManyArgs) {
- messageQuantifier = 'at least ';
- }
- testCases.set(
- `from a_index | eval ${
- getFunctionSignatures(
- {
- name,
- ...defRest,
- signatures: [{ params: fieldMappingWithOneExtraArg, ...signRest }],
- },
- { withTypes: false }
- )[0].declaration
- }`,
- [
- `Error: [${name}] function expects ${messageQuantifier}${
- fullNumberOfArgs === 1
- ? 'one argument'
- : fullNumberOfArgs === 0
- ? '0 arguments'
- : `${fullNumberOfArgs} arguments`
- }, got ${fieldMappingWithOneExtraArg.length}.`,
- ]
- );
- }
}
// test that wildcard won't work as arg
@@ -430,6 +391,79 @@ function generateEvalCommandTestsForEvalFunction(
);
}
}
+
+ // test that the function can have too many args
+ if (signatures.some(({ minParams }) => minParams)) {
+ // at least one signature is variadic, so no way
+ // to have too many arguments
+ return;
+ }
+
+ // test that additional args are spotted
+
+ const getNumberOfParams = (signature: FunctionDefinition['signatures'][number]) => ({
+ all: signature.params.length,
+ required: signature.params.filter(({ optional }) => !optional).length,
+ });
+
+ // get the signature with the greatest number of params
+ const [first, ...rest] = signatures;
+ let signatureWithGreatestNumberOfParams = first;
+ let { all: maxNumberOfArgs, required: minNumberOfArgs } = getNumberOfParams(first);
+
+ for (const signature of rest) {
+ const numberOfParams = signature.params.length;
+ if (numberOfParams > signatureWithGreatestNumberOfParams.params.length) {
+ signatureWithGreatestNumberOfParams = signature;
+ }
+
+ maxNumberOfArgs = Math.max(maxNumberOfArgs, numberOfParams);
+ const numberOfRequiredParams = signature.params.filter(({ optional }) => !optional).length;
+ minNumberOfArgs = Math.min(minNumberOfArgs, numberOfRequiredParams);
+ }
+
+ const fieldMappingWithOneExtraArg = getFieldMapping(
+ signatureWithGreatestNumberOfParams.params
+ ).concat({
+ name: 'extraArg',
+ type: 'number',
+ });
+
+ // get the expected args from the first signature in case of errors
+ const hasOptionalArgs = minNumberOfArgs < maxNumberOfArgs;
+ const hasTooManyArgs = fieldMappingWithOneExtraArg.length > maxNumberOfArgs;
+
+ // the validation engine tries to be smart about signatures with optional args
+ let messageQuantifier = 'exactly ';
+ if (hasOptionalArgs && hasTooManyArgs) {
+ messageQuantifier = 'no more than ';
+ }
+ if (!hasOptionalArgs && !hasTooManyArgs) {
+ messageQuantifier = 'at least ';
+ }
+ testCases.set(
+ `from a_index | eval ${
+ getFunctionSignatures(
+ {
+ name,
+ ...defRest,
+ signatures: [
+ { ...signatureWithGreatestNumberOfParams, params: fieldMappingWithOneExtraArg },
+ ],
+ },
+ { withTypes: false }
+ )[0].declaration
+ }`,
+ [
+ `Error: [${name}] function expects ${messageQuantifier}${
+ maxNumberOfArgs === 1
+ ? 'one argument'
+ : maxNumberOfArgs === 0
+ ? '0 arguments'
+ : `${maxNumberOfArgs} arguments`
+ }, got ${fieldMappingWithOneExtraArg.length}.`,
+ ]
+ );
}
function generateEvalCommandTestsForAggFunction(
@@ -680,11 +714,7 @@ function generateStatsCommandTestsForAggFunction(
name,
signatures,
params,
- {
- stringField: 'stringField',
- numberField: 'numberField',
- booleanField: 'booleanField',
- }
+ supportedTypesAndFieldNames
);
// and the message is case of wrong argument type is passed
testCases.set(
@@ -818,18 +848,28 @@ function generateSortCommandTestsForAggFunction(
const generateSortCommandTestsForGroupingFunction = generateSortCommandTestsForAggFunction;
-const fieldTypes = [
- 'number',
- 'date',
- 'boolean',
- 'version',
- 'ip',
- 'string',
- 'cartesian_point',
- 'cartesian_shape',
- 'geo_point',
- 'geo_shape',
-];
+const fieldTypesToConstants: Record = {
+ string: '"a"',
+ number: '5',
+ date: 'now()',
+ boolean: 'true',
+ version: 'to_version("1.0.0")',
+ ip: 'to_ip("127.0.0.1")',
+ geo_point: 'to_geopoint("POINT (30 10)")',
+ geo_shape: 'to_geoshape("POINT (30 10)")',
+ cartesian_point: 'to_cartesianpoint("POINT (30 10)")',
+ cartesian_shape: 'to_cartesianshape("POINT (30 10)")',
+};
+
+const supportedTypesAndFieldNames = supportedFieldTypes.map((type) => ({
+ name: fieldNameFromType(type),
+ type,
+}));
+
+const supportedTypesAndConstants = supportedFieldTypes.map((type) => ({
+ name: fieldTypesToConstants[type],
+ type,
+}));
function prepareNestedFunction(fnSignature: FunctionDefinition): string {
return getFunctionSignatures(
@@ -848,28 +888,36 @@ function prepareNestedFunction(fnSignature: FunctionDefinition): string {
const toAvgSignature = statsAggregationFunctionDefinitions.find(({ name }) => name === 'avg')!;
-const toInteger = evalFunctionsDefinitions.find(({ name }) => name === 'to_integer')!;
-const toStringSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_string')!;
-const toDateSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_datetime')!;
-const toBooleanSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_boolean')!;
-const toIpSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_ip')!;
-const toGeoPointSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_geopoint')!;
-const toCartesianPointSignature = evalFunctionsDefinitions.find(
+const toInteger = evalFunctionDefinitions.find(({ name }) => name === 'to_integer')!;
+const toStringSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_string')!;
+const toDateSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_datetime')!;
+const toBooleanSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_boolean')!;
+const toIpSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_ip')!;
+const toGeoPointSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_geopoint')!;
+const toGeoShapeSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_geoshape')!;
+const toCartesianPointSignature = evalFunctionDefinitions.find(
({ name }) => name === 'to_cartesianpoint'
)!;
+const toCartesianShapeSignature = evalFunctionDefinitions.find(
+ ({ name }) => name === 'to_cartesianshape'
+)!;
+const toVersionSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_version')!;
-const nestedFunctions = {
+const nestedFunctions: Record = {
number: prepareNestedFunction(toInteger),
string: prepareNestedFunction(toStringSignature),
date: prepareNestedFunction(toDateSignature),
boolean: prepareNestedFunction(toBooleanSignature),
ip: prepareNestedFunction(toIpSignature),
+ version: prepareNestedFunction(toVersionSignature),
geo_point: prepareNestedFunction(toGeoPointSignature),
+ geo_shape: prepareNestedFunction(toGeoShapeSignature),
cartesian_point: prepareNestedFunction(toCartesianPointSignature),
+ cartesian_shape: prepareNestedFunction(toCartesianShapeSignature),
};
function getFieldName(
- typeString: string,
+ typeString: SupportedFieldType,
{ useNestedFunction, isStats }: { useNestedFunction: boolean; isStats: boolean }
) {
if (useNestedFunction && isStats) {
@@ -877,7 +925,7 @@ function getFieldName(
}
return useNestedFunction && typeString in nestedFunctions
? nestedFunctions[typeString as keyof typeof nestedFunctions]
- : `${camelCase(typeString)}Field`;
+ : fieldNameFromType(typeString);
}
const literals = {
@@ -902,21 +950,16 @@ function getMultiValue(type: string) {
return `[true, false]`;
}
-function tweakSignatureForRowCommand(signature: string) {
+function tweakSignatureForRowCommand(signature: string): string {
/**
* row has no access to any field, so replace it with literal
* or functions (for dates)
*/
- return signature
- .replace(/numberField/g, '5')
- .replace(/stringField/g, '"a"')
- .replace(/dateField/g, 'now()')
- .replace(/booleanField/g, 'true')
- .replace(/ipField/g, 'to_ip("127.0.0.1")')
- .replace(/geoPointField/g, 'to_geopoint("POINT (30 10)")')
- .replace(/geoShapeField/g, 'to_geoshape("POINT (30 10)")')
- .replace(/cartesianPointField/g, 'to_cartesianpoint("POINT (30 10)")')
- .replace(/cartesianShapeField/g, 'to_cartesianshape("POINT (30 10)")');
+ let ret = signature;
+ for (const [type, value] of Object.entries(fieldTypesToConstants)) {
+ ret = ret.replace(new RegExp(fieldNameFromType(type as SupportedFieldType), 'g'), value);
+ }
+ return ret;
}
function getFieldMapping(
@@ -933,7 +976,7 @@ function getFieldMapping(
};
return params.map(({ name: _name, type, constantOnly, literalOptions, ...rest }) => {
const typeString: string = type;
- if (fieldTypes.includes(typeString)) {
+ if (isSupportedFieldType(typeString)) {
if (useLiterals && literalOptions) {
return {
name: `"${literalOptions[0]}"`,
@@ -977,48 +1020,68 @@ function generateIncorrectlyTypedParameters(
name: string,
signatures: FunctionDefinition['signatures'],
currentParams: FunctionDefinition['signatures'][number]['params'],
- values: { stringField: string; numberField: string; booleanField: string }
+ availableFields: Array<{ name: string; type: SupportedFieldType }>
) {
const literalValues = {
string: `"a"`,
number: '5',
};
const wrongFieldMapping = currentParams.map(
- ({ name: _name, constantOnly, literalOptions, type, ...rest }, i) => {
+ ({ name: paramName, constantOnly, literalOptions, type, ...rest }, i) => {
// this thing is complex enough, let's not make it harder for constants
if (constantOnly) {
return {
name: literalValues[type as keyof typeof literalValues],
type,
+ actualType: type,
wrong: false,
...rest,
};
}
- const canBeFieldButNotString = Boolean(
- fieldTypes.filter((t) => t !== 'string').includes(type) &&
- signatures.every(({ params: fnParams }) => fnParams[i].type !== 'string')
- );
- const canBeFieldButNotNumber =
- fieldTypes.filter((t) => t !== 'number').includes(type) &&
- signatures.every(({ params: fnParams }) => fnParams[i].type !== 'number');
- const isLiteralType = /literal$/.test(type);
- // pick a field name purposely wrong
- const nameValue =
- canBeFieldButNotString || isLiteralType
- ? values.stringField
- : canBeFieldButNotNumber
- ? values.numberField
- : values.booleanField;
- return { name: nameValue, type, wrong: true, ...rest };
+
+ if (type !== 'any') {
+ // try to find an unacceptable field
+ const unacceptableField: { name: string; type: SupportedFieldType } | undefined =
+ availableFields
+ // sort to make the test deterministic
+ .sort((a, b) => a.type.localeCompare(b.type))
+ .find(({ type: fieldType }) =>
+ signatures.every((signature) => getParamAtPosition(signature, i)?.type !== fieldType)
+ );
+
+ if (unacceptableField) {
+ return {
+ name: unacceptableField.name,
+ type,
+ actualType: unacceptableField.type,
+ wrong: true,
+ ...rest,
+ };
+ }
+ }
+
+ // failed to find a bad field... they must all be acceptable
+ const acceptableField: { name: string; type: SupportedFieldType } | undefined =
+ type === 'any'
+ ? availableFields[0]
+ : availableFields.find(({ type: fieldType }) => fieldType === type);
+
+ if (!acceptableField) {
+ throw new Error(
+ `Unable to find an acceptable field for type ${type}... this should never happen`
+ );
+ }
+
+ return {
+ name: acceptableField.name,
+ type: acceptableField.type,
+ actualType: acceptableField.type,
+ wrong: false,
+ ...rest,
+ };
}
);
- const generatedFieldTypes = {
- [values.stringField]: 'string',
- [values.numberField]: 'number',
- [values.booleanField]: 'boolean',
- };
-
// Try to predict which signature will be used to generate the errors
// in the validation engine. The validator currently uses the signature
// which generates the fewest errors.
@@ -1027,12 +1090,15 @@ function generateIncorrectlyTypedParameters(
//
// This is not future-proof...
const misMatchesBySignature = signatures.map(({ params: fnParams }) => {
+ if (fnParams.length !== wrongFieldMapping.length) {
+ return Infinity;
+ }
const typeMatches = fnParams.map(({ type }, i) => {
if (wrongFieldMapping[i].wrong) {
- const typeFromIncorrectMapping = generatedFieldTypes[wrongFieldMapping[i].name];
+ const typeFromIncorrectMapping = wrongFieldMapping[i].actualType;
return type === typeFromIncorrectMapping;
}
- return type === wrongFieldMapping[i].type;
+ return type === wrongFieldMapping[i].actualType;
});
return typeMatches.filter((t) => !t).length;
})!;
@@ -1042,14 +1108,17 @@ function generateIncorrectlyTypedParameters(
const expectedErrors = signatureToUse.params
.filter(({ constantOnly }) => !constantOnly)
.map(({ type }, i) => {
+ if (!wrongFieldMapping[i].wrong) {
+ return;
+ }
const fieldName = wrongFieldMapping[i].name;
if (
fieldName === 'numberField' &&
- signatures.every(({ params: fnParams }) => fnParams[i].type !== 'string')
+ signatures.every((signature) => getParamAtPosition(signature, i)?.type !== 'string')
) {
return;
}
- return `Argument of [${name}] must be [${type}], found value [${fieldName}] type [${generatedFieldTypes[fieldName]}]`;
+ return `Argument of [${name}] must be [${type}], found value [${fieldName}] type [${wrongFieldMapping[i].actualType}]`;
})
.filter(nonNullable);
diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts
index 3e68887c86f39..efff60c382d34 100644
--- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts
@@ -7,7 +7,7 @@
*/
import { suggest } from './autocomplete';
-import { evalFunctionsDefinitions } from '../definitions/functions';
+import { evalFunctionDefinitions } from '../definitions/functions';
import { builtinFunctions } from '../definitions/builtin';
import { statsAggregationFunctionDefinitions } from '../definitions/aggs';
import { chronoLiterals, timeLiterals } from '../definitions/literals';
@@ -17,6 +17,8 @@ import { camelCase, partition } from 'lodash';
import { getAstAndSyntaxErrors } from '@kbn/esql-ast';
import { groupingFunctionDefinitions } from '../definitions/grouping';
import { FunctionArgSignature } from '../definitions/types';
+import { getParamAtPosition } from './helper';
+import { nonNullable } from '../shared/helpers';
import { METADATA_FIELDS } from '../shared/constants';
const triggerCharacters = [',', '(', '=', ' '];
@@ -118,7 +120,7 @@ function getFunctionSignaturesByReturnType(
}
// eval functions (eval is a special keyword in JS)
if (evalMath) {
- list.push(...evalFunctionsDefinitions);
+ list.push(...evalFunctionDefinitions);
}
if (builtin) {
list.push(...builtinFunctions.filter(({ name }) => (skipAssign ? name !== '=' : true)));
@@ -1129,22 +1131,27 @@ describe('autocomplete', () => {
);
// Test suggestions for each possible param, within each signature variation, for each function
- for (const fn of evalFunctionsDefinitions) {
+ for (const fn of evalFunctionDefinitions) {
// skip this fn for the moment as it's quite hard to test
if (fn.name !== 'bucket') {
for (const signature of fn.signatures) {
signature.params.forEach((param, i) => {
if (i < signature.params.length) {
- const canHaveMoreArgs =
- i + 1 < (signature.minParams ?? 0) ||
- signature.params.filter(({ optional }, j) => !optional && j > i).length > 0;
+ // This ref signature thing is probably wrong in a few cases, but it matches
+ // the logic in getFunctionArgsSuggestions. They should both be updated
+ const refSignature = fn.signatures[0];
+ const requiresMoreArgs =
+ i + 1 < (refSignature.minParams ?? 0) ||
+ refSignature.params.filter(({ optional }, j) => !optional && j > i).length > 0;
- const allParamDefs = fn.signatures.map((s) => s.params[i]);
+ const allParamDefs = fn.signatures
+ .map((s) => getParamAtPosition(s, i))
+ .filter(nonNullable);
// get all possible types for this param
const [constantOnlyParamDefs, acceptsFieldParamDefs] = partition(
allParamDefs,
- (p) => p.constantOnly || /_literal/.test(param.type)
+ (p) => p.constantOnly || /_literal/.test(p.type)
);
const getTypesFromParamDefs = (paramDefs: FunctionArgSignature[]) =>
@@ -1155,10 +1162,10 @@ describe('autocomplete', () => {
testSuggestions(
`from a | eval ${fn.name}(${Array(i).fill('field').join(', ')}${i ? ',' : ''} )`,
suggestedConstants?.length
- ? suggestedConstants.map((option) => `"${option}"${canHaveMoreArgs ? ',' : ''}`)
+ ? suggestedConstants.map((option) => `"${option}"${requiresMoreArgs ? ',' : ''}`)
: [
...getFieldNamesByType(getTypesFromParamDefs(acceptsFieldParamDefs)).map(
- (f) => (canHaveMoreArgs ? `${f},` : f)
+ (f) => (requiresMoreArgs ? `${f},` : f)
),
...getFunctionSignaturesByReturnType(
'eval',
@@ -1166,9 +1173,9 @@ describe('autocomplete', () => {
{ evalMath: true },
undefined,
[fn.name]
- ).map((l) => (canHaveMoreArgs ? `${l},` : l)),
+ ).map((l) => (requiresMoreArgs ? `${l},` : l)),
...getLiteralsByType(getTypesFromParamDefs(constantOnlyParamDefs)).map((d) =>
- canHaveMoreArgs ? `${d},` : d
+ requiresMoreArgs ? `${d},` : d
),
]
);
@@ -1177,10 +1184,10 @@ describe('autocomplete', () => {
i ? ',' : ''
} )`,
suggestedConstants?.length
- ? suggestedConstants.map((option) => `"${option}"${canHaveMoreArgs ? ',' : ''}`)
+ ? suggestedConstants.map((option) => `"${option}"${requiresMoreArgs ? ',' : ''}`)
: [
...getFieldNamesByType(getTypesFromParamDefs(acceptsFieldParamDefs)).map(
- (f) => (canHaveMoreArgs ? `${f},` : f)
+ (f) => (requiresMoreArgs ? `${f},` : f)
),
...getFunctionSignaturesByReturnType(
'eval',
@@ -1188,9 +1195,9 @@ describe('autocomplete', () => {
{ evalMath: true },
undefined,
[fn.name]
- ).map((l) => (canHaveMoreArgs ? `${l},` : l)),
+ ).map((l) => (requiresMoreArgs ? `${l},` : l)),
...getLiteralsByType(getTypesFromParamDefs(constantOnlyParamDefs)).map((d) =>
- canHaveMoreArgs ? `${d},` : d
+ requiresMoreArgs ? `${d},` : d
),
]
);
@@ -1236,7 +1243,13 @@ describe('autocomplete', () => {
]);
testSuggestions(
'from a | eval var0=date_trunc()',
- [...getLiteralsByType('time_literal').map((t) => `${t},`)],
+ [
+ ...getLiteralsByType('time_literal').map((t) => `${t},`),
+ ...getFunctionSignaturesByReturnType('eval', 'date', { evalMath: true }, undefined, [
+ 'date_trunc',
+ ]).map((t) => `${t},`),
+ ...getFieldNamesByType('date').map((t) => `${t},`),
+ ],
'('
);
testSuggestions('from a | eval var0=date_trunc(2 )', [
diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts
index cc16a8d8c7699..2d0c2cd9e757e 100644
--- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts
@@ -80,7 +80,11 @@ import {
getSourcesHelper,
} from '../shared/resources_helpers';
import { ESQLCallbacks } from '../shared/types';
-import { getFunctionsToIgnoreForStats, isAggFunctionUsedAlready } from './helper';
+import {
+ getFunctionsToIgnoreForStats,
+ getParamAtPosition,
+ isAggFunctionUsedAlready,
+} from './helper';
import { FunctionArgSignature } from '../definitions/types';
type GetSourceFn = () => Promise;
@@ -1082,6 +1086,7 @@ async function getFunctionArgsSuggestions(
const arg = node.args[argIndex];
// the first signature is used as reference
+ // TODO - take into consideration all signatures that match the current args
const refSignature = fnDefinition.signatures[0];
const hasMoreMandatoryArgs =
@@ -1182,13 +1187,7 @@ async function getFunctionArgsSuggestions(
* for the current parameter position in the given function definition,
*/
const allParamDefinitionsForThisPosition = validSignatures
- .map((signature) =>
- signature.params.length > argIndex
- ? signature.params[argIndex]
- : signature.minParams
- ? signature.params[signature.params.length - 1]
- : null
- )
+ .map((signature) => getParamAtPosition(signature, argIndex))
.filter(nonNullable);
// Separate the param definitions into two groups:
diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/documentation_util.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/documentation_util.ts
index 0e46046320430..692ac590e8c46 100644
--- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/documentation_util.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/documentation_util.ts
@@ -26,8 +26,8 @@ const examplesLabel = i18n.translate(
export const buildFunctionDocumentation = (
signatures: Array<{
declaration: string;
- examples?: string[];
- }>
+ }>,
+ examples: string[] | undefined
) => `
---
\
@@ -41,28 +41,23 @@ ${signatures
`
)
.join('\n\n')}
+ ${
+ examples?.length
+ ? `\
---
-${
- signatures.some((examples) => examples)
- ? `\
***${examplesLabel}***
\
-${signatures
- .filter(({ examples }) => examples)
- .map(
- ({ examples }) => `
- ${examples!
+ ${examples
.map(
(i) => `
- - \`\`${i}\`\`)
+ - \`\`${i}\`\`
`
)
.join('')}
`
- )}`
- : ''
-}`;
+ : ''
+ }`;
/** @internal **/
export const buildDocumentation = (declaration: string, examples?: string[]) => `
diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts
index 481399edfb4d5..4b2e74729db78 100644
--- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts
@@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
import { SuggestionRawDefinition } from './types';
import { groupingFunctionDefinitions } from '../definitions/grouping';
import { statsAggregationFunctionDefinitions } from '../definitions/aggs';
-import { evalFunctionsDefinitions } from '../definitions/functions';
+import { evalFunctionDefinitions } from '../definitions/functions';
import { getFunctionSignatures, getCommandSignature } from '../definitions/helpers';
import { chronoLiterals, timeLiterals } from '../definitions/literals';
import {
@@ -24,7 +24,7 @@ import { buildDocumentation, buildFunctionDocumentation } from './documentation_
import { DOUBLE_BACKTICK, SINGLE_TICK_REGEX } from '../shared/constants';
const allFunctions = statsAggregationFunctionDefinitions
- .concat(evalFunctionsDefinitions)
+ .concat(evalFunctionDefinitions)
.concat(groupingFunctionDefinitions);
export const TRIGGER_SUGGESTION_COMMAND = {
@@ -47,7 +47,7 @@ export function getSuggestionFunctionDefinition(fn: FunctionDefinition): Suggest
kind: 'Function',
detail: fn.description,
documentation: {
- value: buildFunctionDocumentation(fullSignatures),
+ value: buildFunctionDocumentation(fullSignatures, fn.examples),
},
// agg functgions have priority over everything else
sortText: fn.type === 'agg' ? '1A' : 'C',
diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts
index 11b853c2d3cf0..c52c18b822068 100644
--- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts
@@ -7,6 +7,7 @@
*/
import type { ESQLAstItem, ESQLCommand, ESQLFunction } from '@kbn/esql-ast';
+import { FunctionDefinition } from '../definitions/types';
import { getFunctionDefinition, isAssignment, isFunctionItem } from '../shared/helpers';
function extractFunctionArgs(args: ESQLAstItem[]): ESQLFunction[] {
@@ -37,3 +38,20 @@ export function getFunctionsToIgnoreForStats(command: ESQLCommand, argIndex: num
const arg = command.args[argIndex];
return isFunctionItem(arg) ? getFnContent(arg) : [];
}
+
+/**
+ * Given a function signature, returns the parameter at the given position.
+ *
+ * Takes into account variadic functions (minParams), returning the last
+ * parameter if the position is greater than the number of parameters.
+ *
+ * @param signature
+ * @param position
+ * @returns
+ */
+export function getParamAtPosition(
+ { params, minParams }: FunctionDefinition['signatures'][number],
+ position: number
+) {
+ return params.length > position ? params[position] : minParams ? params[params.length - 1] : null;
+}
diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/aggs.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/aggs.ts
index cafaf2d09fa97..2d20b871e251b 100644
--- a/packages/kbn-esql-validation-autocomplete/src/definitions/aggs.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/definitions/aggs.ts
@@ -41,12 +41,12 @@ function createNumericAggDefinition({
})),
],
returnType: 'number',
- examples: [
- `from index | stats result = ${name}(field${extraParamsExample})`,
- `from index | stats ${name}(field${extraParamsExample})`,
- ],
},
],
+ examples: [
+ `from index | stats result = ${name}(field${extraParamsExample})`,
+ `from index | stats ${name}(field${extraParamsExample})`,
+ ],
};
}
@@ -103,14 +103,13 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [
{
params: [{ name: 'column', type: 'number', noNestingFunctions: true }],
returnType: 'number',
- examples: [`from index | stats result = max(field)`, `from index | stats max(field)`],
},
{
params: [{ name: 'column', type: 'date', noNestingFunctions: true }],
returnType: 'number',
- examples: [`from index | stats result = max(field)`, `from index | stats max(field)`],
},
],
+ examples: [`from index | stats result = max(field)`, `from index | stats max(field)`],
},
{
name: 'min',
@@ -123,14 +122,13 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [
{
params: [{ name: 'column', type: 'number', noNestingFunctions: true }],
returnType: 'number',
- examples: [`from index | stats result = min(field)`, `from index | stats min(field)`],
},
{
params: [{ name: 'column', type: 'date', noNestingFunctions: true }],
returnType: 'number',
- examples: [`from index | stats result = min(field)`, `from index | stats min(field)`],
},
],
+ examples: [`from index | stats result = min(field)`, `from index | stats min(field)`],
},
])
.concat([
@@ -153,9 +151,9 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [
},
],
returnType: 'number',
- examples: [`from index | stats result = count(field)`, `from index | stats count(field)`],
},
],
+ examples: [`from index | stats result = count(field)`, `from index | stats count(field)`],
},
{
name: 'count_distinct',
@@ -174,12 +172,12 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [
{ name: 'precision', type: 'number', noNestingFunctions: true, optional: true },
],
returnType: 'number',
- examples: [
- `from index | stats result = count_distinct(field)`,
- `from index | stats count_distinct(field)`,
- ],
},
],
+ examples: [
+ `from index | stats result = count_distinct(field)`,
+ `from index | stats count_distinct(field)`,
+ ],
},
{
name: 'st_centroid_agg',
@@ -195,20 +193,18 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [
{
params: [{ name: 'column', type: 'cartesian_point', noNestingFunctions: true }],
returnType: 'cartesian_point',
- examples: [
- `from index | stats result = st_centroid_agg(cartesian_field)`,
- `from index | stats st_centroid_agg(cartesian_field)`,
- ],
},
{
params: [{ name: 'column', type: 'geo_point', noNestingFunctions: true }],
returnType: 'geo_point',
- examples: [
- `from index | stats result = st_centroid_agg(geo_field)`,
- `from index | stats st_centroid_agg(geo_field)`,
- ],
},
],
+ examples: [
+ `from index | stats result = st_centroid_agg(cartesian_field)`,
+ `from index | stats st_centroid_agg(cartesian_field)`,
+ `from index | stats result = st_centroid_agg(geo_field)`,
+ `from index | stats st_centroid_agg(geo_field)`,
+ ],
},
{
name: 'values',
@@ -221,11 +217,11 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [
{
params: [{ name: 'expression', type: 'any', noNestingFunctions: true }],
returnType: 'any',
- examples: [
- 'from index | stats all_agents=values(agents.keyword)',
- 'from index | stats all_sorted_agents=mv_sort(values(agents.keyword))',
- ],
},
],
+ examples: [
+ 'from index | stats all_agents=values(agents.keyword)',
+ 'from index | stats all_sorted_agents=mv_sort(values(agents.keyword))',
+ ],
},
]);
diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts
index 7347f4d18953e..d48baaf903541 100644
--- a/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts
@@ -6,1780 +6,4630 @@
* Side Public License, v 1.
*/
-import { i18n } from '@kbn/i18n';
+// NOTE: This file is generated by the generate_function_definitions.js script
+// Do not edit it manually
+
import type { ESQLFunction } from '@kbn/esql-ast';
+import { i18n } from '@kbn/i18n';
import { isLiteralItem } from '../shared/helpers';
import type { FunctionDefinition } from './types';
-const validateLogFunctions = (fnDef: ESQLFunction) => {
- const messages = [];
- // do not really care here about the base and field
- // just need to check both values are not negative
- for (const arg of fnDef.args) {
- if (isLiteralItem(arg) && arg.value < 0) {
- messages.push({
- type: 'warning' as const,
- code: 'logOfNegativeValue',
- text: i18n.translate(
- 'kbn-esql-validation-autocomplete.esql.divide.warning.logOfNegativeValue',
- {
- defaultMessage: 'Log of a negative number results in null: {value}',
- values: {
- value: arg.value,
- },
- }
- ),
- location: arg.location,
- });
- }
- }
- return messages;
-};
-
-const dateDiffSuggestions = [
- 'year',
- 'quarter',
- 'month',
- 'dayofyear',
- 'day',
- 'week',
- 'weekday',
- 'hour',
- 'minute',
- 'second',
- 'millisecond',
- 'microsecond',
- 'nanosecond',
-];
+const absDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'abs',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.abs', {
+ defaultMessage: 'Returns the absolute value.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW number = -1.0 \n| EVAL abs_number = ABS(number)',
+ 'FROM employees\n| KEEP first_name, last_name, height\n| EVAL abs_height = ABS(0.0 - height)',
+ ],
+};
-const dateDiffOptions = [
- 'year',
- 'years',
- 'yy',
- 'yyyy',
- 'quarter',
- 'quarters',
- 'qq',
- 'q',
- 'month',
- 'months',
- 'mm',
- 'm',
- 'dayofyear',
- 'dy',
- 'y',
- 'day',
- 'days',
- 'dd',
- 'd',
- 'week',
- 'weeks',
- 'wk',
- 'ww',
- 'weekday',
- 'weekdays',
- 'dw',
- 'hour',
- 'hours',
- 'hh',
- 'minute',
- 'minutes',
- 'mi',
- 'n',
- 'second',
- 'seconds',
- 'ss',
- 's',
- 'millisecond',
- 'milliseconds',
- 'ms',
- 'microsecond',
- 'microseconds',
- 'mcs',
- 'nanosecond',
- 'nanoseconds',
- 'ns',
-];
+const acosDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'acos',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.acos', {
+ defaultMessage: 'Returns the arccosine of `n` as an angle, expressed in radians.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=.9\n| EVAL acos=ACOS(a)'],
+};
-export const evalFunctionsDefinitions: FunctionDefinition[] = [
- {
- name: 'round',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.roundDoc', {
- defaultMessage:
- 'Returns a number rounded to the decimal, specified by he closest integer value. The default is to round to an integer.',
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'number' as const },
- { name: 'decimals', type: 'number' as const, optional: true },
- ],
- returnType: 'number' as const,
- examples: [
- `from index | eval round_value = round(field)`,
- `from index | eval round_value = round(field, 2)`,
- ],
- },
- ],
- },
- {
- name: 'signum',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.signumDoc', {
- defaultMessage:
- 'Returns the sign of the given number. It returns -1 for negative numbers, 0 for 0 and 1 for positive numbers.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval s = signum(field)`],
- },
- ],
- },
- {
- name: 'abs',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.absDoc', {
- defaultMessage: 'Returns the absolute value.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval abs_value = abs(field)`],
- },
- ],
- },
- {
- name: 'ceil',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.ceilDoc', {
- defaultMessage: 'Round a number up to the nearest integer.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval ceil_value = ceil(field)`],
- },
- ],
- },
- {
- name: 'log10',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.log10Doc', {
- defaultMessage: 'Returns the log base 10.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval log10_value = log10(field)`],
- },
- ],
- validate: validateLogFunctions,
- },
- {
- name: 'log',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.logDoc', {
- defaultMessage:
- 'A scalar function log(based, value) returns the logarithm of a value for a particular base, as specified in the argument',
- }),
- signatures: [
- {
- params: [
- { name: 'baseOrField', type: 'number' as const },
- { name: 'field', type: 'number' as const, optional: true },
- ],
- returnType: 'number' as const,
- examples: [
- `from index | eval log2_value = log(2, field)`,
- `from index | eval loge_value = log(field)`,
- ],
- },
- ],
- validate: validateLogFunctions,
- },
- {
- name: 'pow',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.powDoc', {
- defaultMessage:
- 'Returns the the value of a base (first argument) raised to a power (second argument).',
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'number' as const },
- { name: 'exponent', type: 'number' as const },
- ],
- returnType: 'number' as const,
- examples: ['from index | eval s = POW(field, exponent)'],
- },
- ],
- },
- {
- name: 'concat',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.concatDoc', {
- defaultMessage: 'Concatenates two or more strings.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'string' as const }],
- minParams: 2,
- returnType: 'string' as const,
- examples: ['from index | eval concatenated = concat(field1, "-", field2)'],
- },
- ],
- },
- {
- name: 'replace',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.replaceDoc', {
- defaultMessage:
- 'The function substitutes in the string (1st argument) any match of the regular expression (2nd argument) with the replacement string (3rd argument). If any of the arguments are NULL, the result is NULL.',
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'string' as const },
- { name: 'regexp', type: 'string' as const },
- { name: 'replacement', type: 'string' as const },
- ],
- returnType: 'string' as const,
- examples: ['from index | eval newStr = replace(field, "Hello", "World")'],
- },
- ],
- },
- {
- name: 'substring',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.substringDoc', {
- defaultMessage:
- 'Returns a substring of a string, specified by a start position and an optional length.',
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'string' as const },
- { name: 'startIndex', type: 'number' as const },
- { name: 'endIndex', type: 'number' as const },
- ],
- returnType: 'string' as const,
- examples: ['from index | eval new_string = substring(field, 1, 3)'],
- },
- ],
- },
- {
- name: 'to_lower',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toLowerDoc', {
- defaultMessage: 'Returns a new string representing the input string converted to lower case.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'string' as const }],
- returnType: 'string' as const,
- examples: ['from index | eval to_lower(field1)'],
- },
- ],
- },
- {
- name: 'to_upper',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toUpperDoc', {
- defaultMessage: 'Returns a new string representing the input string converted to upper case.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'string' as const }],
- returnType: 'string' as const,
- examples: ['from index | eval to_upper(field1)'],
- },
- ],
- },
- {
- name: 'trim',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.trimDoc', {
- defaultMessage: 'Removes leading and trailing whitespaces from strings.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'string' as const }],
- returnType: 'string' as const,
- examples: ['from index | eval new_string = trim(field)'],
- },
- ],
- },
- {
- name: 'starts_with',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.startsWithDoc', {
- defaultMessage:
- 'Returns a boolean that indicates whether a keyword string starts with another string.',
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'string' as const },
- { name: 'prefix', type: 'string' as const },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval starts_with_a = starts_with(field, "a")'],
- },
- ],
- },
- {
- name: 'ends_with',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.endsWithDoc', {
- defaultMessage:
- 'Returns a boolean that indicates whether a keyword string ends with another string:',
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'string' as const },
- { name: 'prefix', type: 'string' as const },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval ends_with_a = ends_with(field, "a")'],
- },
- ],
- },
- {
- name: 'split',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.splitDoc', {
- defaultMessage: 'Splits a single valued string into multiple strings.',
- }),
- signatures: [
- {
- params: [
- { name: 'words', type: 'string' as const },
- { name: 'separator', type: 'string' as const },
- ],
- returnType: 'string' as const,
- examples: [`ROW words="foo;bar;baz;qux;quux;corge" | EVAL word = SPLIT(words, ";")`],
- },
- ],
- },
- {
- name: 'to_string',
- alias: ['to_str'],
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toStringDoc', {
- defaultMessage: 'Converts to string.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'string' as const,
- examples: [`from index" | EVAL string = to_string(field)`],
- },
- ],
- },
- {
- name: 'to_boolean',
- alias: ['to_bool'],
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toBooleanDoc', {
- defaultMessage: 'Converts to boolean.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'boolean' as const,
- examples: [`from index" | EVAL bool = to_boolean(field)`],
- },
- ],
- },
- {
- name: 'to_cartesianpoint',
- description: i18n.translate(
- 'kbn-esql-validation-autocomplete.esql.definitions.toCartesianPointDoc',
- {
- defaultMessage: 'Converts an input value to a `point` value.',
- }
- ),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'cartesian_point' as const,
- examples: [`from index | EVAL point = to_cartesianpoint(field)`],
- },
- ],
- },
- {
- name: 'to_cartesianshape',
- description: i18n.translate(
- 'kbn-esql-validation-autocomplete.esql.definitions.toCartesianshapeDoc',
- {
- defaultMessage: 'Converts an input value to a cartesian_shape value.',
- }
- ),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'cartesian_shape' as const,
- examples: [`from index | EVAL cartesianshape = to_cartesianshape(field)`],
- },
- ],
- },
- {
- name: 'to_datetime',
- alias: ['to_dt'],
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toDateTimeDoc', {
- defaultMessage: 'Converts to date.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'date' as const,
- examples: [`from index" | EVAL datetime = to_datetime(field)`],
- },
- ],
- },
- {
- name: 'to_degrees',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toDegreesDoc', {
- defaultMessage: 'Coverts to degrees',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval degrees = to_degrees(field)`],
- },
- ],
- },
- {
- name: 'to_double',
- alias: ['to_dbl'],
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toDoubleDoc', {
- defaultMessage: 'Converts to double.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'number' as const,
- examples: [`from index | EVAL double = to_double(field)`],
- },
- ],
- },
- {
- name: 'to_geopoint',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toGeopointDoc', {
- defaultMessage: 'Converts to geo_point.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'geo_point' as const,
- examples: [`from index | EVAL geopoint = to_geopoint(field)`],
- },
- ],
- },
- {
- name: 'to_geoshape',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toGeoshapeDoc', {
- defaultMessage: 'Converts an input value to a geo_shape value.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'geo_shape' as const,
- examples: [`from index | EVAL geoshape = to_geoshape(field)`],
- },
- ],
- },
- {
- name: 'to_integer',
- alias: ['to_int'],
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toIntegerDoc', {
- defaultMessage: 'Converts to integer.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'number' as const,
- examples: [`from index | EVAL integer = to_integer(field)`],
- },
- ],
- },
- {
- name: 'to_long',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toLongDoc', {
- defaultMessage: 'Converts to long.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'number' as const,
- examples: [`from index | EVAL long = to_long(field)`],
- },
- ],
- },
- {
- name: 'to_radians',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toRadiansDoc', {
- defaultMessage: 'Converts to radians',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval radians = to_radians(field)`],
- },
- ],
- },
- {
- name: 'to_unsigned_long',
- alias: ['to_ul', 'to_ulong'],
- description: i18n.translate(
- 'kbn-esql-validation-autocomplete.esql.definitions.toUnsignedLongDoc',
- {
- defaultMessage: 'Converts to unsigned long.',
+const asinDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'asin',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.asin', {
+ defaultMessage:
+ 'Returns the arcsine of the input\nnumeric expression as an angle, expressed in radians.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=.9\n| EVAL asin=ASIN(a)'],
+};
+
+const atanDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'atan',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.atan', {
+ defaultMessage:
+ 'Returns the arctangent of the input\nnumeric expression as an angle, expressed in radians.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=12.9\n| EVAL atan=ATAN(a)'],
+};
+
+const atan2Definition: FunctionDefinition = {
+ type: 'eval',
+ name: 'atan2',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.atan2', {
+ defaultMessage:
+ 'The angle between the positive x-axis and the ray from the\norigin to the point (x , y) in the Cartesian plane, expressed in radians.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'y_coordinate',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'x_coordinate',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW y=12.9, x=.6\n| EVAL atan2=ATAN2(y, x)'],
+};
+
+const cbrtDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'cbrt',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cbrt', {
+ defaultMessage:
+ 'Returns the cube root of a number. The input can be any numeric value, the return value is always a double.\nCube roots of infinities are null.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW d = 1000.0\n| EVAL c = cbrt(d)'],
+};
+
+const ceilDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'ceil',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.ceil', {
+ defaultMessage: 'Round a number up to the nearest integer.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=1.8\n| EVAL a=CEIL(a)'],
+};
+
+const cidrMatchDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'cidr_match',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cidr_match', {
+ defaultMessage:
+ 'Returns true if the provided IP is contained in one of the provided CIDR blocks.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'ip',
+ type: 'ip',
+ optional: false,
+ },
+ {
+ name: 'blockX',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ minParams: 2,
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM hosts \n| WHERE CIDR_MATCH(ip1, "127.0.0.2/32", "127.0.0.3/32") \n| KEEP card, host, ip0, ip1',
+ ],
+};
+
+const coalesceDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'coalesce',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.coalesce', {
+ defaultMessage:
+ 'Returns the first of its arguments that is not null. If all arguments are null, it returns `null`.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'number',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'date',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'date',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'string',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'boolean',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'boolean',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'ip',
+ optional: false,
+ },
+ ],
+ returnType: 'ip',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'ip',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'ip',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_point',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'cartesian_point',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_shape',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'cartesian_shape',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_point',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'geo_point',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_shape',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'geo_shape',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'version',
+ optional: false,
+ },
+ ],
+ returnType: 'version',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'version',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'version',
+ minParams: 1,
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=null, b="b"\n| EVAL COALESCE(a, b)'],
+};
+
+const concatDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'concat',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.concat', {
+ defaultMessage: 'Concatenates two or more strings.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string1',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'string2',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ minParams: 2,
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM employees\n| KEEP first_name, last_name\n| EVAL fullname = CONCAT(first_name, " ", last_name)',
+ ],
+};
+
+const cosDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'cos',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cos', {
+ defaultMessage: 'Returns the cosine of an angle.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'angle',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=1.8 \n| EVAL cos=COS(a)'],
+};
+
+const coshDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'cosh',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cosh', {
+ defaultMessage: 'Returns the hyperbolic cosine of an angle.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'angle',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=1.8 \n| EVAL cosh=COSH(a)'],
+};
+
+const dateDiffDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'date_diff',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.date_diff', {
+ defaultMessage:
+ 'Subtracts the `startTimestamp` from the `endTimestamp` and returns the difference in multiples of `unit`.\nIf `startTimestamp` is later than the `endTimestamp`, negative values are returned.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'unit',
+ type: 'string',
+ optional: false,
+ literalOptions: [
+ 'year',
+ 'years',
+ 'yy',
+ 'yyyy',
+ 'quarter',
+ 'quarters',
+ 'qq',
+ 'q',
+ 'month',
+ 'months',
+ 'mm',
+ 'm',
+ 'dayofyear',
+ 'dy',
+ 'y',
+ 'day',
+ 'days',
+ 'dd',
+ 'd',
+ 'week',
+ 'weeks',
+ 'wk',
+ 'ww',
+ 'weekday',
+ 'weekdays',
+ 'dw',
+ 'hour',
+ 'hours',
+ 'hh',
+ 'minute',
+ 'minutes',
+ 'mi',
+ 'n',
+ 'second',
+ 'seconds',
+ 'ss',
+ 's',
+ 'millisecond',
+ 'milliseconds',
+ 'ms',
+ 'microsecond',
+ 'microseconds',
+ 'mcs',
+ 'nanosecond',
+ 'nanoseconds',
+ 'ns',
+ ],
+ literalSuggestions: [
+ 'year',
+ 'quarter',
+ 'month',
+ 'week',
+ 'day',
+ 'hour',
+ 'minute',
+ 'second',
+ 'millisecond',
+ 'microsecond',
+ 'nanosecond',
+ ],
+ },
+ {
+ name: 'startTimestamp',
+ type: 'date',
+ optional: false,
+ },
+ {
+ name: 'endTimestamp',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW date1 = TO_DATETIME("2023-12-02T11:00:00.000Z"), date2 = TO_DATETIME("2023-12-02T11:00:00.001Z")\n| EVAL dd_ms = DATE_DIFF("microseconds", date1, date2)',
+ ],
+};
+
+const dateExtractDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'date_extract',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.date_extract', {
+ defaultMessage: 'Extracts parts of a date, like year, month, day, hour.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'datePart',
+ type: 'chrono_literal',
+ optional: false,
+ },
+ {
+ name: 'date',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW date = DATE_PARSE("yyyy-MM-dd", "2022-05-06")\n| EVAL year = DATE_EXTRACT("year", date)',
+ 'FROM sample_data\n| WHERE DATE_EXTRACT("hour_of_day", @timestamp) < 9 AND DATE_EXTRACT("hour_of_day", @timestamp) >= 17',
+ ],
+};
+
+const dateFormatDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'date_format',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.date_format', {
+ defaultMessage: 'Returns a string representation of a date, in the provided format.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'dateFormat',
+ type: 'string',
+ optional: true,
+ },
+ {
+ name: 'date',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM employees\n| KEEP first_name, last_name, hire_date\n| EVAL hired = DATE_FORMAT("YYYY-MM-dd", hire_date)',
+ ],
+};
+
+const dateParseDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'date_parse',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.date_parse', {
+ defaultMessage:
+ 'Returns a date by parsing the second argument using the format specified in the first argument.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'datePattern',
+ type: 'string',
+ optional: true,
+ },
+ {
+ name: 'dateString',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW date_string = "2022-05-06"\n| EVAL date = DATE_PARSE("yyyy-MM-dd", date_string)'],
+};
+
+const dateTruncDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'date_trunc',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.date_trunc', {
+ defaultMessage: 'Rounds down a date to the closest interval.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'interval',
+ type: 'time_literal',
+ optional: false,
+ },
+ {
+ name: 'date',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'interval',
+ type: 'date',
+ optional: false,
+ },
+ {
+ name: 'date',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM employees\n| KEEP first_name, last_name, hire_date\n| EVAL year_hired = DATE_TRUNC(1 year, hire_date)',
+ 'FROM employees\n| EVAL year = DATE_TRUNC(1 year, hire_date)\n| STATS hires = COUNT(emp_no) BY year\n| SORT year',
+ 'FROM sample_data\n| EVAL error = CASE(message LIKE "*error*", 1, 0)\n| EVAL hour = DATE_TRUNC(1 hour, @timestamp)\n| STATS error_rate = AVG(error) by hour\n| SORT hour',
+ ],
+};
+
+const eDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'e',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.e', {
+ defaultMessage: "Returns Euler's number.",
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW E()'],
+};
+
+const endsWithDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'ends_with',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.ends_with', {
+ defaultMessage:
+ 'Returns a boolean that indicates whether a keyword string ends with another string.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'str',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'suffix',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['FROM employees\n| KEEP last_name\n| EVAL ln_E = ENDS_WITH(last_name, "d")'],
+};
+
+const floorDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'floor',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.floor', {
+ defaultMessage: 'Round a number down to the nearest integer.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=1.8\n| EVAL a=FLOOR(a)'],
+};
+
+const fromBase64Definition: FunctionDefinition = {
+ type: 'eval',
+ name: 'from_base64',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.from_base64', {
+ defaultMessage: 'Decode a base64 string.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['row a = "ZWxhc3RpYw==" \n| eval d = from_base64(a)'],
+};
+
+const greatestDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'greatest',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.greatest', {
+ defaultMessage:
+ 'Returns the maximum value from multiple columns. This is similar to <>\nexcept it is intended to run on multiple columns at once.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'boolean',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'boolean',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'number',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'ip',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'ip',
+ optional: true,
+ },
+ ],
+ returnType: 'ip',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'string',
+ optional: true,
+ },
+ ],
+ returnType: 'string',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'version',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'version',
+ optional: true,
+ },
+ ],
+ returnType: 'version',
+ minParams: 1,
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a = 10, b = 20\n| EVAL g = GREATEST(a, b)'],
+};
+
+const leastDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'least',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.least', {
+ defaultMessage:
+ 'Returns the minimum value from multiple columns. This is similar to <> except it is intended to run on multiple columns at once.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'boolean',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'boolean',
+ optional: true,
+ },
+ ],
+ returnType: 'boolean',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'number',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'ip',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'ip',
+ optional: true,
+ },
+ ],
+ returnType: 'ip',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'string',
+ optional: true,
+ },
+ ],
+ returnType: 'string',
+ minParams: 1,
+ },
+ {
+ params: [
+ {
+ name: 'first',
+ type: 'version',
+ optional: false,
+ },
+ {
+ name: 'rest',
+ type: 'version',
+ optional: true,
+ },
+ ],
+ returnType: 'version',
+ minParams: 1,
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a = 10, b = 20\n| EVAL l = LEAST(a, b)'],
+};
+
+const leftDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'left',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.left', {
+ defaultMessage:
+ "Returns the substring that extracts 'length' chars from 'string' starting from the left.",
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'length',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM employees\n| KEEP last_name\n| EVAL left = LEFT(last_name, 3)\n| SORT last_name ASC\n| LIMIT 5',
+ ],
+};
+
+const lengthDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'length',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.length', {
+ defaultMessage: 'Returns the character length of a string.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['FROM employees\n| KEEP first_name, last_name\n| EVAL fn_length = LENGTH(first_name)'],
+};
+
+const locateDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'locate',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.locate', {
+ defaultMessage:
+ 'Returns an integer that indicates the position of a keyword substring within another string',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'substring',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'substring',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['row a = "hello"\n| eval a_ll = locate(a, "ll")'],
+};
+
+const logDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'log',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.log', {
+ defaultMessage:
+ 'Returns the logarithm of a value to a base. The input can be any numeric value, the return value is always a double.\n\nLogs of zero, negative numbers, and base of one return `null` as well as a warning.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'base',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'base',
+ type: 'number',
+ optional: true,
+ },
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: (fnDef: ESQLFunction) => {
+ const messages = [];
+ // do not really care here about the base and field
+ // just need to check both values are not negative
+ for (const arg of fnDef.args) {
+ if (isLiteralItem(arg) && arg.value < 0) {
+ messages.push({
+ type: 'warning' as const,
+ code: 'logOfNegativeValue',
+ text: i18n.translate(
+ 'kbn-esql-validation-autocomplete.esql.divide.warning.logOfNegativeValue',
+ {
+ defaultMessage: 'Log of a negative number results in null: {value}',
+ values: {
+ value: arg.value,
+ },
+ }
+ ),
+ location: arg.location,
+ });
}
- ),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'number' as const,
- examples: [`from index | EVAL unsigned_long = to_unsigned_long(field)`],
- },
- ],
- },
- {
- name: 'to_ip',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toIpDoc', {
- defaultMessage: 'Converts to ip.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- returnType: 'ip' as const,
- examples: [`from index | EVAL ip = to_ip(field)`],
- },
- ],
- },
- {
- name: 'to_version',
- alias: ['to_ver'],
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.toVersionDoc', {
- defaultMessage: 'Converts to version.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'string' as const }],
- returnType: 'version' as const,
- examples: [`from index | EVAL version = to_version(stringField)`],
- },
- ],
+ }
+ return messages;
},
- {
- name: 'date_extract',
- description: i18n.translate(
- 'kbn-esql-validation-autocomplete.esql.definitions.dateExtractDoc',
- {
- defaultMessage: `Extracts parts of a date, like year, month, day, hour. The supported field types are those provided by java.time.temporal.ChronoField`,
+ examples: [
+ 'ROW base = 2.0, value = 8.0\n| EVAL s = LOG(base, value)',
+ 'row value = 100\n| EVAL s = LOG(value);',
+ ],
+};
+
+const log10Definition: FunctionDefinition = {
+ type: 'eval',
+ name: 'log10',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.log10', {
+ defaultMessage:
+ 'Returns the logarithm of a value to base 10. The input can be any numeric value, the return value is always a double.\n\nLogs of 0 and negative numbers return `null` as well as a warning.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: (fnDef: ESQLFunction) => {
+ const messages = [];
+ // do not really care here about the base and field
+ // just need to check both values are not negative
+ for (const arg of fnDef.args) {
+ if (isLiteralItem(arg) && arg.value < 0) {
+ messages.push({
+ type: 'warning' as const,
+ code: 'logOfNegativeValue',
+ text: i18n.translate(
+ 'kbn-esql-validation-autocomplete.esql.divide.warning.logOfNegativeValue',
+ {
+ defaultMessage: 'Log of a negative number results in null: {value}',
+ values: {
+ value: arg.value,
+ },
+ }
+ ),
+ location: arg.location,
+ });
}
- ),
- signatures: [
- {
- params: [
- {
- name: 'date_part',
- type: 'chrono_literal' as const,
- },
- { name: 'field', type: 'date' as const },
- ],
- returnType: 'number' as const,
- examples: [
- `ROW date = DATE_PARSE("yyyy-MM-dd", "2022-05-06") | EVAL year = DATE_EXTRACT("year", date)`,
- ],
- },
- ],
- },
- {
- name: 'date_diff',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.dateDiffDoc', {
- defaultMessage: `Subtracts the startTimestamp from the endTimestamp and returns the difference in multiples of unit. If startTimestamp is later than the endTimestamp, negative values are returned.`,
- }),
- signatures: [
- {
- params: [
- {
- name: 'unit',
- type: 'string' as const,
- literalOptions: dateDiffOptions,
- literalSuggestions: dateDiffSuggestions,
- },
- { name: 'startTimestamp', type: 'date' as const },
- { name: 'endTimestamp', type: 'date' as const },
- ],
- returnType: 'number' as const,
- examples: [],
- },
- ],
- },
- {
- name: 'date_format',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.dateFormatDoc', {
- defaultMessage: `Returns a string representation of a date in the provided format. If no format is specified, the "yyyy-MM-dd'T'HH:mm:ss.SSSZ" format is used.`,
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'date' as const },
- { name: 'format_string', type: 'string' as const, optional: true },
- ],
- returnType: 'string' as const,
- examples: ['from index | eval hired = date_format("YYYY-MM-dd", hire_date)'],
- },
- ],
- },
- {
- name: 'date_trunc',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.dateTruncDoc', {
- defaultMessage: `Rounds down a date to the closest interval. Intervals can be expressed using the timespan literal syntax.`,
- }),
- signatures: [
- {
- params: [
- { name: 'time', type: 'time_literal' as const },
- { name: 'field', type: 'date' as const },
- ],
- returnType: 'date' as const,
- examples: [`from index | eval year_hired = DATE_TRUNC(1 year, hire_date)`],
- },
- ],
- },
- {
- name: 'date_parse',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.dateParseDoc', {
- defaultMessage: `Parse dates from strings.`,
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'string' as const },
- { name: 'format_string', type: 'string' as const },
- ],
- returnType: 'date' as const,
- examples: [
- `from index | eval year_hired = date_parse("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", hire_date)`,
- ],
- },
- ],
- },
- {
- name: 'case',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.caseDoc', {
- defaultMessage:
- 'Accepts pairs of conditions and values. The function returns the value that belongs to the first condition that evaluates to `true`. If the number of arguments is odd, the last argument is the default value which is returned when no condition matches.',
- }),
- signatures: [
- {
- params: [
- { name: 'condition', type: 'boolean' as const },
- { name: 'value', type: 'any' as const },
- ],
- minParams: 2,
- returnType: 'any' as const,
- examples: [
- `from index | eval type = case(languages <= 1, "monolingual", languages <= 2, "bilingual", "polyglot")`,
- ],
- },
- ],
- },
- {
- name: 'length',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.lengthDoc', {
- defaultMessage: 'Returns the character length of a string.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'string' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval fn_length = length(field)`],
- },
- ],
- },
- {
- name: 'acos',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.acosDoc', {
- defaultMessage: 'Inverse cosine trigonometric function',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval acos = acos(field)`],
- },
- ],
- },
- {
- name: 'asin',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.asinDoc', {
- defaultMessage: 'Inverse sine trigonometric function',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval asin = asin(field)`],
- },
- ],
- },
- {
- name: 'atan',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.atanDoc', {
- defaultMessage: 'Inverse tangent trigonometric function',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval atan = atan(field)`],
- },
- ],
- },
- {
- name: 'atan2',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.atan2Doc', {
- defaultMessage:
- 'The angle between the positive x-axis and the ray from the origin to the point (x , y) in the Cartesian plane',
- }),
- signatures: [
- {
- params: [
- { name: 'x', type: 'number' as const },
- { name: 'y', type: 'number' as const },
- ],
- returnType: 'number' as const,
- examples: [`from index | eval atan2 = atan2(x, y)`],
- },
- ],
- },
- {
- name: 'coalesce',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.coalesceDoc', {
- defaultMessage: 'Returns the first non-null value.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- minParams: 1,
- returnType: 'any' as const,
- examples: [`ROW a=null, b="b" | EVAL COALESCE(a, b)`],
- },
- ],
- },
- {
- name: 'cos',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cosDoc', {
- defaultMessage: 'Cosine trigonometric function',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval cos = cos(field)`],
- },
- ],
- },
- {
- name: 'cosh',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.coshDoc', {
- defaultMessage: 'Cosine hyperbolic function',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval cosh = cosh(field)`],
- },
- ],
- },
- {
- name: 'floor',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.floorDoc', {
- defaultMessage: 'Round a number down to the nearest integer.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`from index | eval a = floor(field)`],
- },
- ],
- },
- {
- name: 'greatest',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.greatestDoc', {
- defaultMessage: 'Returns the maximum value from many columns.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'any' as const }],
- minParams: 1,
- returnType: 'any' as const,
- examples: [`ROW a = 10, b = 20 | EVAL g = GREATEST(a, b)`],
- },
- ],
- },
- {
- name: 'least',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.leastDoc', {
- defaultMessage: 'Returns the minimum value from many columns.',
- }),
- signatures: [
- {
- params: [{ name: 'first', type: 'any' as const }],
- minParams: 1,
- returnType: 'any' as const,
- examples: ['from index | eval l = least(a, b)'],
- },
- ],
- },
- {
- name: 'left',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.leftDoc', {
- defaultMessage:
- 'Return the substring that extracts length chars from the string starting from the left.',
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'string' as const },
- { name: 'length', type: 'number' as const },
- ],
- returnType: 'string' as const,
- examples: [`from index | eval substr = left(field, 3)`],
- },
- ],
- },
- {
- name: 'ltrim',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.ltrimDoc', {
- defaultMessage: 'Removes leading whitespaces from strings.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'string' as const }],
- returnType: 'string' as const,
- examples: [`ROW message = " some text "| EVAL message = LTRIM(message)`],
- },
- ],
- },
- {
- name: 'now',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.nowDoc', {
- defaultMessage: 'Returns current date and time.',
- }),
- signatures: [
- {
- params: [],
- returnType: 'date' as const,
- examples: [`ROW current_date = NOW()`],
- },
- ],
- },
- {
- name: 'right',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.rightDoc', {
- defaultMessage:
- 'Return the substring that extracts length chars from the string starting from the right.',
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'string' as const },
- { name: 'length', type: 'number' as const },
- ],
- returnType: 'string' as const,
- examples: [`from index | eval string = right(field, 3)`],
- },
- ],
- },
- {
- name: 'rtrim',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.rtrimDoc', {
- defaultMessage: 'Removes trailing whitespaces from strings.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'string' as const }],
- returnType: 'string' as const,
- examples: [`ROW message = " some text " | EVAL message = RTRIM(message)`],
- },
- ],
- },
- {
- name: 'sin',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.sinDoc', {
- defaultMessage: 'Sine trigonometric function.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`ROW a=1.8 | EVAL sin=SIN(a)`],
- },
- ],
- },
- {
- name: 'sinh',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.sinhDoc', {
- defaultMessage: 'Sine hyperbolic function.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`ROW a=1.8 | EVAL sinh=SINH(a)`],
- },
- ],
- },
- {
- name: 'sqrt',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.sqrtDoc', {
- defaultMessage: 'Returns the square root of a number. ',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`ROW d = 100.0 | EVAL s = SQRT(d)`],
- },
- ],
- },
- {
- name: 'tan',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.tanDoc', {
- defaultMessage: 'Tangent trigonometric function.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`ROW a=1.8 | EVAL tan=TAN(a)`],
- },
- ],
- },
- {
- name: 'tanh',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.tanhDoc', {
- defaultMessage: 'Tangent hyperbolic function.',
- }),
- signatures: [
- {
- params: [{ name: 'field', type: 'number' as const }],
- returnType: 'number' as const,
- examples: [`ROW a=1.8 | EVAL tanh=TANH(a)`],
- },
- ],
- },
- {
- name: 'cidr_match',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cidrMatchDoc', {
- defaultMessage:
- 'The function takes a first parameter of type IP, followed by one or more parameters evaluated to a CIDR specificatione.',
- }),
- signatures: [
- {
- minParams: 2,
- params: [
- { name: 'ip', type: 'ip' as const },
- { name: 'cidr_block', type: 'string' as const },
- ],
- returnType: 'boolean' as const,
- examples: [
- 'from index | where cidr_match(ip_field, "127.0.0.1/30")',
- 'from index | eval cidr="10.0.0.0/8" | where cidr_match(ip_field, "127.0.0.1/30", cidr)',
- ],
- },
- ],
- },
- {
- name: 'mv_sort',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvSortDoc', {
- defaultMessage: 'Sorts a multivalue expression in lexicographical order.',
- }),
- signatures: [
- {
- params: [
- { name: 'field', type: 'any' as const },
- {
- name: 'order',
- type: 'string' as const,
- optional: true,
- literalOptions: ['asc', 'desc'],
- },
- ],
- returnType: 'any' as const,
- examples: [
- 'row a = [4, 2, -3, 2] | eval sorted = mv_sort(a)',
- 'row a = ["b", "c", "a"] | sorted = mv_sort(a, "DESC")',
- ],
- },
- ],
- },
- {
- name: 'mv_avg',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvAvgDoc', {
- defaultMessage:
- 'Converts a multivalued field into a single valued field containing the average of all of the values.',
- }),
- signatures: [
- {
- params: [{ name: 'multivalue', type: 'number' as const }],
- returnType: 'number' as const,
- examples: ['row a = [1, 2, 3] | eval mv_avg(a)'],
- },
- ],
- },
- {
- name: 'mv_concat',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvConcatDoc', {
- defaultMessage:
- 'Converts a multivalued string field into a single valued field containing the concatenation of all values separated by a delimiter',
- }),
- signatures: [
- {
- params: [
- { name: 'multivalue', type: 'string' as const },
- { name: 'delimeter', type: 'string' as const },
- ],
- returnType: 'string' as const,
- examples: ['row a = ["1", "2", "3"] | eval mv_concat(a, ", ")'],
- },
- ],
- },
- {
- name: 'mv_count',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvCountDoc', {
- defaultMessage:
- 'Converts a multivalued field into a single valued field containing a count of the number of values',
- }),
- signatures: [
- {
- params: [{ name: 'multivalue', type: 'any' as const }],
- returnType: 'number' as const,
- examples: ['row a = [1, 2, 3] | eval mv_count(a)'],
- },
- ],
- },
- {
- name: 'mv_dedupe',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvDedupeDoc', {
- defaultMessage: 'Removes duplicates from a multivalued field',
- }),
- signatures: [
- {
- params: [{ name: 'multivalue', type: 'any' as const }],
- returnType: 'any' as const,
- examples: ['row a = [2, 2, 3] | eval mv_dedupe(a)'],
- },
- ],
- },
- {
- name: 'mv_first',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvFirstDoc', {
- defaultMessage:
- 'Reduce a multivalued field to a single valued field containing the first value.',
- }),
- signatures: [
- {
- params: [{ name: 'multivalue', type: 'any' as const }],
- returnType: 'any' as const,
- examples: ['row a = [1, 2, 3] | eval one = mv_first(a)'],
- },
- ],
- },
- {
- name: 'mv_last',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvLastDoc', {
- defaultMessage:
- 'Reduce a multivalued field to a single valued field containing the last value.',
- }),
- signatures: [
- {
- params: [{ name: 'multivalue', type: 'any' as const }],
- returnType: 'any' as const,
- examples: ['row a = [1, 2, 3] | eval three = mv_last(a)'],
- },
- ],
- },
- {
- name: 'mv_max',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvMaxDoc', {
- defaultMessage:
- 'Converts a multivalued field into a single valued field containing the maximum value.',
- }),
- signatures: [
- {
- params: [{ name: 'multivalue', type: 'any' as const }],
- returnType: 'any' as const,
- examples: ['row a = [1, 2, 3] | eval mv_max(a)'],
- },
- ],
- },
- {
- name: 'mv_min',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvMinDoc', {
- defaultMessage:
- 'Converts a multivalued field into a single valued field containing the minimum value.',
- }),
- signatures: [
- {
- params: [{ name: 'multivalue', type: 'any' as const }],
- returnType: 'any' as const,
- examples: ['row a = [1, 2, 3] | eval mv_min(a)'],
- },
- ],
- },
- {
- name: 'mv_median',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvMedianDoc', {
- defaultMessage:
- 'Converts a multivalued field into a single valued field containing the median value.',
- }),
- signatures: [
- {
- params: [{ name: 'multivalue', type: 'number' as const }],
- returnType: 'number' as const,
- examples: ['row a = [1, 2, 3] | eval mv_median(a)'],
- },
- ],
- },
- {
- name: 'mv_sum',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvSumDoc', {
- defaultMessage:
- 'Converts a multivalued field into a single valued field containing the sum of all of the values.',
- }),
- signatures: [
- {
- params: [{ name: 'multivalue', type: 'number' as const }],
- returnType: 'number' as const,
- examples: ['row a = [1, 2, 3] | eval mv_sum(a)'],
- },
- ],
- },
- {
- name: 'mv_slice',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvSliceDoc', {
- defaultMessage:
- 'Returns a subset of the multivalued field using the start and end index values.',
- }),
- signatures: [
- {
- params: [
- { name: 'multivalue', type: 'any' as const },
- { name: 'start', type: 'number' as const },
- { name: 'end', type: 'number' as const },
- ],
- returnType: 'number' as const,
- examples: ['row a = [1, 2, 2, 3] | eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)'],
- },
- ],
+ }
+ return messages;
},
- {
- name: 'mv_zip',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mvZipDoc', {
+ examples: ['ROW d = 1000.0 \n| EVAL s = LOG10(d)'],
+};
+
+const ltrimDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'ltrim',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.ltrim', {
+ defaultMessage: 'Removes leading whitespaces from a string.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW message = " some text ", color = " red "\n| EVAL message = LTRIM(message)\n| EVAL color = LTRIM(color)\n| EVAL message = CONCAT("\'", message, "\'")\n| EVAL color = CONCAT("\'", color, "\'")',
+ ],
+};
+
+const mvAvgDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_avg',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_avg', {
+ defaultMessage:
+ 'Converts a multivalued field into a single valued field containing the average of all of the values.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=[3, 5, 1, 6]\n| EVAL avg_a = MV_AVG(a)'],
+};
+
+const mvConcatDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_concat',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_concat', {
+ defaultMessage:
+ 'Converts a multivalued string expression into a single valued column containing the concatenation of all values separated by a delimiter.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'delim',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW a=["foo", "zoo", "bar"]\n| EVAL j = MV_CONCAT(a, ", ")',
+ 'ROW a=[10, 9, 8]\n| EVAL j = MV_CONCAT(TO_STRING(a), ", ")',
+ ],
+};
+
+const mvCountDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_count',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_count', {
+ defaultMessage:
+ 'Converts a multivalued expression into a single valued column containing a count of the number of values.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=["foo", "zoo", "bar"]\n| EVAL count_a = MV_COUNT(a)'],
+};
+
+const mvDedupeDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_dedupe',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_dedupe', {
+ defaultMessage: 'Remove duplicate values from a multivalued field.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ ],
+ returnType: 'ip',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ ],
+ returnType: 'version',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=["foo", "foo", "bar", "foo"]\n| EVAL dedupe_a = MV_DEDUPE(a)'],
+};
+
+const mvFirstDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_first',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_first', {
+ defaultMessage:
+ "Converts a multivalued expression into a single valued column containing the\nfirst value. This is most useful when reading from a function that emits\nmultivalued columns in a known order like <>.\n\nThe order that <> are read from\nunderlying storage is not guaranteed. It is *frequently* ascending, but don't\nrely on that. If you need the minimum value use <> instead of\n`MV_FIRST`. `MV_MIN` has optimizations for sorted values so there isn't a\nperformance benefit to `MV_FIRST`.",
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ ],
+ returnType: 'ip',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ ],
+ returnType: 'version',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a="foo;bar;baz"\n| EVAL first_a = MV_FIRST(SPLIT(a, ";"))'],
+};
+
+const mvLastDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_last',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_last', {
+ defaultMessage:
+ "Converts a multivalue expression into a single valued column containing the last\nvalue. This is most useful when reading from a function that emits multivalued\ncolumns in a known order like <>.\n\nThe order that <> are read from\nunderlying storage is not guaranteed. It is *frequently* ascending, but don't\nrely on that. If you need the maximum value use <> instead of\n`MV_LAST`. `MV_MAX` has optimizations for sorted values so there isn't a\nperformance benefit to `MV_LAST`.",
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ ],
+ returnType: 'ip',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ ],
+ returnType: 'version',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a="foo;bar;baz"\n| EVAL last_a = MV_LAST(SPLIT(a, ";"))'],
+};
+
+const mvMaxDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_max',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_max', {
+ defaultMessage:
+ 'Converts a multivalued expression into a single valued column containing the maximum value.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ ],
+ returnType: 'ip',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ ],
+ returnType: 'version',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW a=[3, 5, 1]\n| EVAL max_a = MV_MAX(a)',
+ 'ROW a=["foo", "zoo", "bar"]\n| EVAL max_a = MV_MAX(a)',
+ ],
+};
+
+const mvMedianDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_median',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_median', {
+ defaultMessage:
+ 'Converts a multivalued field into a single valued field containing the median value.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW a=[3, 5, 1]\n| EVAL median_a = MV_MEDIAN(a)',
+ 'ROW a=[3, 7, 1, 6]\n| EVAL median_a = MV_MEDIAN(a)',
+ ],
+};
+
+const mvMinDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_min',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_min', {
+ defaultMessage:
+ 'Converts a multivalued expression into a single valued column containing the minimum value.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ ],
+ returnType: 'ip',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ ],
+ returnType: 'version',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW a=[2, 1]\n| EVAL min_a = MV_MIN(a)',
+ 'ROW a=["foo", "bar"]\n| EVAL min_a = MV_MIN(a)',
+ ],
+};
+
+const mvSliceDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_slice',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_slice', {
+ defaultMessage:
+ 'Returns a subset of the multivalued field using the start and end index values.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'cartesian_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'cartesian_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'geo_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'geo_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'ip',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'end',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'version',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'row a = [1, 2, 2, 3]\n| eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)',
+ 'row a = [1, 2, 2, 3]\n| eval a1 = mv_slice(a, -2), a2 = mv_slice(a, -3, -1)',
+ ],
+};
+
+const mvSortDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_sort',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_sort', {
+ defaultMessage: 'Sorts a multivalued field in lexicographical order.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ {
+ name: 'order',
+ type: 'string',
+ optional: true,
+ literalOptions: ['asc', 'desc'],
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ {
+ name: 'order',
+ type: 'string',
+ optional: true,
+ literalOptions: ['asc', 'desc'],
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'order',
+ type: 'string',
+ optional: true,
+ literalOptions: ['asc', 'desc'],
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ {
+ name: 'order',
+ type: 'string',
+ optional: true,
+ literalOptions: ['asc', 'desc'],
+ },
+ ],
+ returnType: 'ip',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'order',
+ type: 'string',
+ optional: true,
+ literalOptions: ['asc', 'desc'],
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ {
+ name: 'order',
+ type: 'string',
+ optional: true,
+ literalOptions: ['asc', 'desc'],
+ },
+ ],
+ returnType: 'version',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a = [4, 2, -3, 2]\n| EVAL sa = mv_sort(a), sd = mv_sort(a, "DESC")'],
+};
+
+const mvSumDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_sum',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_sum', {
+ defaultMessage:
+ 'Converts a multivalued field into a single valued field containing the sum of all of the values.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=[3, 5, 6]\n| EVAL sum_a = MV_SUM(a)'],
+};
+
+const mvZipDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'mv_zip',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_zip', {
+ defaultMessage:
+ 'Combines the values from two multivalued fields with a delimiter that joins them together.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string1',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'string2',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'delim',
+ type: 'string',
+ optional: true,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW a = ["x", "y", "z"], b = ["1", "2"]\n| EVAL c = mv_zip(a, b, "-")\n| KEEP a, b, c',
+ ],
+};
+
+const nowDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'now',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.now', {
+ defaultMessage: 'Returns current date and time.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [],
+ returnType: 'date',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW current_date = NOW()', 'FROM sample_data\n| WHERE @timestamp > NOW() - 1 hour'],
+};
+
+const piDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'pi',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.pi', {
+ defaultMessage: "Returns Pi, the ratio of a circle's circumference to its diameter.",
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW PI()'],
+};
+
+const powDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'pow',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.pow', {
+ defaultMessage: 'Returns the value of `base` raised to the power of `exponent`.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'base',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'exponent',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW base = 2.0, exponent = 2\n| EVAL result = POW(base, exponent)',
+ 'ROW base = 4, exponent = 0.5\n| EVAL s = POW(base, exponent)',
+ ],
+};
+
+const replaceDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'replace',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.replace', {
+ defaultMessage:
+ 'The function substitutes in the string `str` any match of the regular expression `regex`\nwith the replacement string `newStr`.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'regex',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'newString',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW str = "Hello World"\n| EVAL str = REPLACE(str, "World", "Universe")\n| KEEP str'],
+};
+
+const rightDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'right',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.right', {
+ defaultMessage:
+ "Return the substring that extracts 'length' chars from 'str' starting from the right.",
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'length',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM employees\n| KEEP last_name\n| EVAL right = RIGHT(last_name, 3)\n| SORT last_name ASC\n| LIMIT 5',
+ ],
+};
+
+const roundDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'round',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.round', {
+ defaultMessage:
+ 'Rounds a number to the specified number of decimal places.\nDefaults to 0, which returns the nearest integer. If the\nprecision is a negative number, rounds to the number of digits left\nof the decimal point.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'decimals',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM employees\n| KEEP first_name, last_name, height\n| EVAL height_ft = ROUND(height * 3.281, 1)',
+ ],
+};
+
+const rtrimDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'rtrim',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.rtrim', {
+ defaultMessage: 'Removes trailing whitespaces from a string.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW message = " some text ", color = " red "\n| EVAL message = RTRIM(message)\n| EVAL color = RTRIM(color)\n| EVAL message = CONCAT("\'", message, "\'")\n| EVAL color = CONCAT("\'", color, "\'")',
+ ],
+};
+
+const signumDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'signum',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.signum', {
+ defaultMessage:
+ 'Returns the sign of the given number.\nIt returns `-1` for negative numbers, `0` for `0` and `1` for positive numbers.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW d = 100.0\n| EVAL s = SIGNUM(d)'],
+};
+
+const sinDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'sin',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.sin', {
+ defaultMessage: 'Returns ths Sine trigonometric function of an angle.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'angle',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=1.8 \n| EVAL sin=SIN(a)'],
+};
+
+const sinhDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'sinh',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.sinh', {
+ defaultMessage: 'Returns the hyperbolic sine of an angle.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'angle',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=1.8 \n| EVAL sinh=SINH(a)'],
+};
+
+const splitDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'split',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.split', {
+ defaultMessage: 'Split a single valued string into multiple strings.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'delim',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW words="foo;bar;baz;qux;quux;corge"\n| EVAL word = SPLIT(words, ";")'],
+};
+
+const sqrtDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'sqrt',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.sqrt', {
+ defaultMessage:
+ 'Returns the square root of a number. The input can be any numeric value, the return value is always a double.\nSquare roots of negative numbers and infinities are null.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW d = 100.0\n| EVAL s = SQRT(d)'],
+};
+
+const stContainsDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'st_contains',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.st_contains', {
+ defaultMessage:
+ 'Returns whether the first geometry contains the second geometry.\nThis is the inverse of the <> function.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM airport_city_boundaries\n| WHERE ST_CONTAINS(city_boundary, TO_GEOSHAPE("POLYGON((109.35 18.3, 109.45 18.3, 109.45 18.4, 109.35 18.4, 109.35 18.3))"))\n| KEEP abbrev, airport, region, city, city_location',
+ ],
+};
+
+const stDisjointDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'st_disjoint',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.st_disjoint', {
+ defaultMessage:
+ 'Returns whether the two geometries or geometry columns are disjoint.\nThis is the inverse of the <> function.\nIn mathematical terms: ST_Disjoint(A, B) ⇔ A ⋂ B = ∅',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM airport_city_boundaries\n| WHERE ST_DISJOINT(city_boundary, TO_GEOSHAPE("POLYGON((-10 -60, 120 -60, 120 60, -10 60, -10 -60))"))\n| KEEP abbrev, airport, region, city, city_location',
+ ],
+};
+
+const stIntersectsDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'st_intersects',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.st_intersects', {
+ defaultMessage:
+ 'Returns true if two geometries intersect.\nThey intersect if they have any point in common, including their interior points\n(points along lines or within polygons).\nThis is the inverse of the <> function.\nIn mathematical terms: ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM airports\n| WHERE ST_INTERSECTS(location, TO_GEOSHAPE("POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))"))',
+ ],
+};
+
+const stWithinDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'st_within',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.st_within', {
+ defaultMessage:
+ 'Returns whether the first geometry is within the second geometry.\nThis is the inverse of the <> function.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_point',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'geomA',
+ type: 'geo_shape',
+ optional: false,
+ },
+ {
+ name: 'geomB',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM airport_city_boundaries\n| WHERE ST_WITHIN(city_boundary, TO_GEOSHAPE("POLYGON((109.1 18.15, 109.6 18.15, 109.6 18.65, 109.1 18.65, 109.1 18.15))"))\n| KEEP abbrev, airport, region, city, city_location',
+ ],
+};
+
+const stXDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'st_x',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.st_x', {
+ defaultMessage:
+ 'Extracts the `x` coordinate from the supplied point.\nIf the points is of type `geo_point` this is equivalent to extracting the `longitude` value.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'point',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'point',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW point = TO_GEOPOINT("POINT(42.97109629958868 14.7552534006536)")\n| EVAL x = ST_X(point), y = ST_Y(point)',
+ ],
+};
+
+const stYDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'st_y',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.st_y', {
+ defaultMessage:
+ 'Extracts the `y` coordinate from the supplied point.\nIf the points is of type `geo_point` this is equivalent to extracting the `latitude` value.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'point',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'point',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW point = TO_GEOPOINT("POINT(42.97109629958868 14.7552534006536)")\n| EVAL x = ST_X(point), y = ST_Y(point)',
+ ],
+};
+
+const startsWithDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'starts_with',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.starts_with', {
+ defaultMessage:
+ 'Returns a boolean that indicates whether a keyword string starts with another string.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'str',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'prefix',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['FROM employees\n| KEEP last_name\n| EVAL ln_S = STARTS_WITH(last_name, "B")'],
+};
+
+const substringDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'substring',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.substring', {
+ defaultMessage:
+ 'Returns a substring of a string, specified by a start position and an optional length',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ {
+ name: 'start',
+ type: 'number',
+ optional: false,
+ },
+ {
+ name: 'length',
+ type: 'number',
+ optional: true,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'FROM employees\n| KEEP last_name\n| EVAL ln_sub = SUBSTRING(last_name, 1, 3)',
+ 'FROM employees\n| KEEP last_name\n| EVAL ln_sub = SUBSTRING(last_name, -3, 3)',
+ 'FROM employees\n| KEEP last_name\n| EVAL ln_sub = SUBSTRING(last_name, 2)',
+ ],
+};
+
+const tanDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'tan',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.tan', {
+ defaultMessage: 'Returns the Tangent trigonometric function of an angle.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'angle',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=1.8 \n| EVAL tan=TAN(a)'],
+};
+
+const tanhDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'tanh',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.tanh', {
+ defaultMessage: 'Returns the Tangent hyperbolic function of an angle.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'angle',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=1.8 \n| EVAL tanh=TANH(a)'],
+};
+
+const tauDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'tau',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.tau', {
+ defaultMessage: "Returns the ratio of a circle's circumference to its radius.",
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW TAU()'],
+};
+
+const toBase64Definition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_base64',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_base64', {
+ defaultMessage: 'Encode a string to a base64 string.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['row a = "elastic" \n| eval e = to_base64(a)'],
+};
+
+const toBooleanDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_boolean',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_boolean', {
+ defaultMessage:
+ 'Converts an input value to a boolean value.\nA string value of *true* will be case-insensitive converted to the Boolean *true*.\nFor anything else, including the empty string, the function will return *false*.\nThe numerical value of *0* will be converted to *false*, anything else will be converted to *true*.',
+ }),
+ alias: ['to_bool'],
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'boolean',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW str = ["true", "TRuE", "false", "", "yes", "1"]\n| EVAL bool = TO_BOOLEAN(str)'],
+};
+
+const toCartesianpointDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_cartesianpoint',
+ description: i18n.translate(
+ 'kbn-esql-validation-autocomplete.esql.definitions.to_cartesianpoint',
+ {
defaultMessage:
- 'Combines the values from two multivalued fields with a delimiter that joins them together.',
- }),
- signatures: [
- {
- params: [
- { name: 'mvLeft', type: 'string' as const },
- { name: 'mvRight', type: 'string' as const },
- { name: 'delim', type: 'string' as const },
- ],
- returnType: 'string' as const,
- examples: [
- 'ROW a = ["x", "y", "z"], b = ["1", "2"] \n| EVAL c = mv_zip(a, b, "-") \n| KEEP a, b, c',
- ],
- },
- ],
- },
- {
- name: 'pi',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.piDoc', {
- defaultMessage: 'The ratio of a circle’s circumference to its diameter.',
- }),
- signatures: [
- {
- params: [],
- returnType: 'number' as const,
- examples: ['row a = 1 | eval pi()'],
- },
- ],
- },
- {
- name: 'e',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.eDoc', {
- defaultMessage: 'Euler’s number.',
- }),
- signatures: [
- {
- params: [],
- returnType: 'number' as const,
- examples: ['row a = 1 | eval e()'],
- },
- ],
- },
- {
- name: 'tau',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.tauDoc', {
- defaultMessage: 'The ratio of a circle’s circumference to its radius.',
- }),
- signatures: [
- {
- params: [],
- returnType: 'number' as const,
- examples: ['row a = 1 | eval tau()'],
- },
- ],
- },
- // begin spatial functions
- {
- name: 'st_contains',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.stContainsDoc', {
- defaultMessage: 'Returns whether the first geometry contains the second geometry.',
- }),
- signatures: [
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_point' as const,
- },
- {
- name: 'geomB',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_contains(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_point' as const,
- },
- {
- name: 'geomB',
- type: 'geo_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_contains(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_shape' as const,
- },
- {
- name: 'geomB',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_contains(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_shape' as const,
- },
- {
- name: 'geomB',
- type: 'geo_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_contains(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_point' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_contains(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_point' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_contains(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_shape' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_contains(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_shape' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_contains(geometryA, geometryB)'],
- },
- ],
- },
- {
- name: 'st_within',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.stWithinDoc', {
- defaultMessage: 'Returns whether the first geometry is within the second geometry.',
- }),
- signatures: [
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_point' as const,
- },
- {
- name: 'geomB',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_within(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_point' as const,
- },
- {
- name: 'geomB',
- type: 'geo_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_within(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_shape' as const,
- },
- {
- name: 'geomB',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_within(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_shape' as const,
- },
- {
- name: 'geomB',
- type: 'geo_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_within(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_point' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_within(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_point' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_within(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_shape' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_within(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_shape' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_within(geometryA, geometryB)'],
- },
- ],
- },
- {
- name: 'st_disjoint',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.stDisjointDoc', {
- defaultMessage: 'Returns whether the two geometries or geometry columns are disjoint.',
- }),
- signatures: [
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_point' as const,
- },
- {
- name: 'geomB',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_disjoint(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_point' as const,
- },
- {
- name: 'geomB',
- type: 'geo_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_disjoint(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_shape' as const,
- },
- {
- name: 'geomB',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_disjoint(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_shape' as const,
- },
- {
- name: 'geomB',
- type: 'geo_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_disjoint(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_point' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_disjoint(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_point' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_disjoint(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_shape' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_disjoint(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_shape' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_disjoint(geometryA, geometryB)'],
- },
- ],
- },
- {
- name: 'st_intersects',
- description: i18n.translate(
- 'kbn-esql-validation-autocomplete.esql.definitions.stIntersectsDoc',
- {
- defaultMessage:
- 'Returns true if two geometries intersect. They intersect if they have any point in common, including their interior points (points along lines or within polygons).',
- }
- ),
- signatures: [
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_point' as const,
- },
- {
- name: 'geomB',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_intersects(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_point' as const,
- },
- {
- name: 'geomB',
- type: 'geo_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_intersects(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_shape' as const,
- },
- {
- name: 'geomB',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_intersects(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'geo_shape' as const,
- },
- {
- name: 'geomB',
- type: 'geo_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_intersects(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_point' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_intersects(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_point' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_intersects(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_shape' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_intersects(geometryA, geometryB)'],
- },
- {
- params: [
- {
- name: 'geomA',
- type: 'cartesian_shape' as const,
- },
- {
- name: 'geomB',
- type: 'cartesian_shape' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_intersects(geometryA, geometryB)'],
- },
- ],
- },
- {
- name: 'st_x',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.stXDoc', {
+ 'Converts an input value to a `cartesian_point` value.\nA string will only be successfully converted if it respects WKT Point format.',
+ }
+ ),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_point',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW wkt = ["POINT(4297.11 -1475.53)", "POINT(7580.93 2272.77)"]\n| MV_EXPAND wkt\n| EVAL pt = TO_CARTESIANPOINT(wkt)',
+ ],
+};
+
+const toCartesianshapeDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_cartesianshape',
+ description: i18n.translate(
+ 'kbn-esql-validation-autocomplete.esql.definitions.to_cartesianshape',
+ {
defaultMessage:
- 'Extracts the x coordinate from the supplied point. If the points is of type geo_point this is equivalent to extracting the longitude value.',
- }),
- signatures: [
- {
- params: [
- {
- name: 'point',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_x(point)'],
- },
- {
- params: [
- {
- name: 'point',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_x(point)'],
- },
- ],
- },
- {
- name: 'st_y',
- description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.stYDoc', {
+ 'Converts an input value to a `cartesian_shape` value.\nA string will only be successfully converted if it respects WKT format.',
+ }
+ ),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'cartesian_shape',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW wkt = ["POINT(4297.11 -1475.53)", "POLYGON ((3339584.72 1118889.97, 4452779.63 4865942.27, 2226389.81 4865942.27, 1113194.90 2273030.92, 3339584.72 1118889.97))"]\n| MV_EXPAND wkt\n| EVAL geom = TO_CARTESIANSHAPE(wkt)',
+ ],
+};
+
+const toDatetimeDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_datetime',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_datetime', {
+ defaultMessage:
+ "Converts an input value to a date value.\nA string will only be successfully converted if it's respecting the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`.\nTo convert dates in other formats, use <>.",
+ }),
+ alias: ['to_dt'],
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'date',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW string = ["1953-09-02T00:00:00.000Z", "1964-06-02T00:00:00.000Z", "1964-06-02 00:00:00"]\n| EVAL datetime = TO_DATETIME(string)',
+ 'ROW int = [0, 1]\n| EVAL dt = TO_DATETIME(int)',
+ ],
+};
+
+const toDegreesDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_degrees',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_degrees', {
+ defaultMessage: 'Converts a number in radians to degrees.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW rad = [1.57, 3.14, 4.71]\n| EVAL deg = TO_DEGREES(rad)'],
+};
+
+const toDoubleDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_double',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_double', {
+ defaultMessage:
+ 'Converts an input value to a double value. If the input parameter is of a date type,\nits value will be interpreted as milliseconds since the Unix epoch,\nconverted to double. Boolean *true* will be converted to double *1.0*, *false* to *0.0*.',
+ }),
+ alias: ['to_dbl'],
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW str1 = "5.20128E11", str2 = "foo"\n| EVAL dbl = TO_DOUBLE("520128000000"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2)',
+ ],
+};
+
+const toGeopointDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_geopoint',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_geopoint', {
+ defaultMessage:
+ 'Converts an input value to a `geo_point` value.\nA string will only be successfully converted if it respects WKT Point format.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_point',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_point',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW wkt = "POINT(42.97109630194 14.7552534413725)"\n| EVAL pt = TO_GEOPOINT(wkt)'],
+};
+
+const toGeoshapeDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_geoshape',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_geoshape', {
+ defaultMessage:
+ 'Converts an input value to a `geo_shape` value.\nA string will only be successfully converted if it respects WKT format.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_shape',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'geo_shape',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW wkt = "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))"\n| EVAL geom = TO_GEOSHAPE(wkt)',
+ ],
+};
+
+const toIntegerDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_integer',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_integer', {
+ defaultMessage:
+ 'Converts an input value to an integer value.\nIf the input parameter is of a date type, its value will be interpreted as milliseconds\nsince the Unix epoch, converted to integer.\nBoolean *true* will be converted to integer *1*, *false* to *0*.',
+ }),
+ alias: ['to_int'],
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW long = [5013792, 2147483647, 501379200000]\n| EVAL int = TO_INTEGER(long)'],
+};
+
+const toIpDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_ip',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_ip', {
+ defaultMessage: 'Converts an input string to an IP value.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ ],
+ returnType: 'ip',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'ip',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW str1 = "1.1.1.1", str2 = "foo"\n| EVAL ip1 = TO_IP(str1), ip2 = TO_IP(str2)\n| WHERE CIDR_MATCH(ip1, "1.0.0.0/8")',
+ ],
+};
+
+const toLongDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_long',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_long', {
+ defaultMessage:
+ 'Converts an input value to a long value. If the input parameter is of a date type,\nits value will be interpreted as milliseconds since the Unix epoch, converted to long.\nBoolean *true* will be converted to long *1*, *false* to *0*.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW str1 = "2147483648", str2 = "2147483648.2", str3 = "foo"\n| EVAL long1 = TO_LONG(str1), long2 = TO_LONG(str2), long3 = TO_LONG(str3)',
+ ],
+};
+
+const toLowerDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_lower',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_lower', {
+ defaultMessage: 'Returns a new string representing the input string converted to lower case.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'str',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW message = "Some Text"\n| EVAL message_lower = TO_LOWER(message)'],
+};
+
+const toRadiansDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_radians',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_radians', {
+ defaultMessage: 'Converts a number in degrees to radians.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'number',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW deg = [90.0, 180.0, 270.0]\n| EVAL rad = TO_RADIANS(deg)'],
+};
+
+const toStringDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_string',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_string', {
+ defaultMessage: 'Converts an input value into a string.',
+ }),
+ alias: ['to_str'],
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_point',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'cartesian_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_point',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'geo_shape',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'ip',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW a=10\n| EVAL j = TO_STRING(a)', 'ROW a=[10, 9, 8]\n| EVAL j = TO_STRING(a)'],
+};
+
+const toUnsignedLongDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_unsigned_long',
+ description: i18n.translate(
+ 'kbn-esql-validation-autocomplete.esql.definitions.to_unsigned_long',
+ {
defaultMessage:
- 'Extracts the y coordinate from the supplied point. If the points is of type geo_point this is equivalent to extracting the latitude value.',
- }),
- signatures: [
- {
- params: [
- {
- name: 'point',
- type: 'geo_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_y(point)'],
- },
- {
- params: [
- {
- name: 'point',
- type: 'cartesian_point' as const,
- },
- ],
- returnType: 'boolean' as const,
- examples: ['from index | eval st_y(point)'],
- },
- ],
- },
-]
- .sort(({ name: a }, { name: b }) => a.localeCompare(b))
- .map((def) => ({
- ...def,
- supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
- supportedOptions: ['by'],
- type: 'eval',
- }));
+ 'Converts an input value to an unsigned long value. If the input parameter is of a date type,\nits value will be interpreted as milliseconds since the Unix epoch, converted to unsigned long.\nBoolean *true* will be converted to unsigned long *1*, *false* to *0*.',
+ }
+ ),
+ alias: ['to_ul', 'to_ulong'],
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'boolean',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'date',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'number',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'number',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW str1 = "2147483648", str2 = "2147483648.2", str3 = "foo"\n| EVAL long1 = TO_UNSIGNED_LONG(str1), long2 = TO_ULONG(str2), long3 = TO_UL(str3)',
+ ],
+};
+
+const toUpperDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_upper',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_upper', {
+ defaultMessage: 'Returns a new string representing the input string converted to upper case.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'str',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW message = "Some Text"\n| EVAL message_upper = TO_UPPER(message)'],
+};
+
+const toVersionDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'to_version',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_version', {
+ defaultMessage: 'Converts an input string to a version value.',
+ }),
+ alias: ['to_ver'],
+ signatures: [
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'version',
+ },
+ {
+ params: [
+ {
+ name: 'field',
+ type: 'version',
+ optional: false,
+ },
+ ],
+ returnType: 'version',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: ['ROW v = TO_VERSION("1.2.3")'],
+};
+
+const trimDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'trim',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.trim', {
+ defaultMessage: 'Removes leading and trailing whitespaces from a string.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'string',
+ type: 'string',
+ optional: false,
+ },
+ ],
+ returnType: 'string',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'ROW message = " some text ", color = " red "\n| EVAL message = TRIM(message)\n| EVAL color = TRIM(color)',
+ ],
+};
+
+const caseDefinition: FunctionDefinition = {
+ type: 'eval',
+ name: 'case',
+ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.case', {
+ defaultMessage:
+ 'Accepts pairs of conditions and values. The function returns the value that belongs to the first condition that evaluates to `true`. If the number of arguments is odd, the last argument is the default value which is returned when no condition matches.',
+ }),
+ alias: undefined,
+ signatures: [
+ {
+ params: [
+ {
+ name: 'condition',
+ type: 'boolean',
+ },
+ {
+ name: 'value',
+ type: 'any',
+ },
+ ],
+ minParams: 2,
+ returnType: 'any',
+ },
+ ],
+ supportedCommands: ['stats', 'eval', 'where', 'row', 'sort'],
+ supportedOptions: ['by'],
+ validate: undefined,
+ examples: [
+ 'from index | eval type = case(languages <= 1, "monolingual", languages <= 2, "bilingual", "polyglot")',
+ ],
+};
+export const evalFunctionDefinitions = [
+ absDefinition,
+ acosDefinition,
+ asinDefinition,
+ atanDefinition,
+ atan2Definition,
+ cbrtDefinition,
+ ceilDefinition,
+ cidrMatchDefinition,
+ coalesceDefinition,
+ concatDefinition,
+ cosDefinition,
+ coshDefinition,
+ dateDiffDefinition,
+ dateExtractDefinition,
+ dateFormatDefinition,
+ dateParseDefinition,
+ dateTruncDefinition,
+ eDefinition,
+ endsWithDefinition,
+ floorDefinition,
+ fromBase64Definition,
+ greatestDefinition,
+ leastDefinition,
+ leftDefinition,
+ lengthDefinition,
+ locateDefinition,
+ logDefinition,
+ log10Definition,
+ ltrimDefinition,
+ mvAvgDefinition,
+ mvConcatDefinition,
+ mvCountDefinition,
+ mvDedupeDefinition,
+ mvFirstDefinition,
+ mvLastDefinition,
+ mvMaxDefinition,
+ mvMedianDefinition,
+ mvMinDefinition,
+ mvSliceDefinition,
+ mvSortDefinition,
+ mvSumDefinition,
+ mvZipDefinition,
+ nowDefinition,
+ piDefinition,
+ powDefinition,
+ replaceDefinition,
+ rightDefinition,
+ roundDefinition,
+ rtrimDefinition,
+ signumDefinition,
+ sinDefinition,
+ sinhDefinition,
+ splitDefinition,
+ sqrtDefinition,
+ stContainsDefinition,
+ stDisjointDefinition,
+ stIntersectsDefinition,
+ stWithinDefinition,
+ stXDefinition,
+ stYDefinition,
+ startsWithDefinition,
+ substringDefinition,
+ tanDefinition,
+ tanhDefinition,
+ tauDefinition,
+ toBase64Definition,
+ toBooleanDefinition,
+ toCartesianpointDefinition,
+ toCartesianshapeDefinition,
+ toDatetimeDefinition,
+ toDegreesDefinition,
+ toDoubleDefinition,
+ toGeopointDefinition,
+ toGeoshapeDefinition,
+ toIntegerDefinition,
+ toIpDefinition,
+ toLongDefinition,
+ toLowerDefinition,
+ toRadiansDefinition,
+ toStringDefinition,
+ toUnsignedLongDefinition,
+ toUpperDefinition,
+ toVersionDefinition,
+ trimDefinition,
+ caseDefinition,
+];
diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts
index fc725cbe0b429..79ac91d14403a 100644
--- a/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts
@@ -27,7 +27,6 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [
{ name: 'buckets', type: 'time_literal', constantOnly: true },
],
returnType: 'date',
- examples: ['from index | eval hd = bucket(hire_date, 1 hour)'],
},
{
params: [
@@ -35,7 +34,6 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [
{ name: 'buckets', type: 'number', constantOnly: true },
],
returnType: 'number',
- examples: ['from index | eval hd = bucket(bytes, 1 hour)'],
},
{
params: [
@@ -45,9 +43,6 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [
{ name: 'endDate', type: 'string', constantOnly: true },
],
returnType: 'date',
- examples: [
- 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")',
- ],
},
{
params: [
@@ -57,9 +52,6 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [
{ name: 'endDate', type: 'date', constantOnly: true },
],
returnType: 'date',
- examples: [
- 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")',
- ],
},
{
params: [
@@ -69,9 +61,6 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [
{ name: 'endDate', type: 'date', constantOnly: true },
],
returnType: 'date',
- examples: [
- 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")',
- ],
},
{
params: [
@@ -81,9 +70,6 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [
{ name: 'endDate', type: 'string', constantOnly: true },
],
returnType: 'date',
- examples: [
- 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")',
- ],
},
{
params: [
@@ -93,8 +79,14 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [
{ name: 'endValue', type: 'number', constantOnly: true },
],
returnType: 'number',
- examples: ['from index | eval bs = bucket(bytes, 20, 25324, 74999)'],
},
],
+ examples: [
+ 'from index | eval hd = bucket(bytes, 1 hour)',
+ 'from index | eval hd = bucket(hire_date, 1 hour)',
+ 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")',
+ 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")',
+ 'from index | eval bs = bucket(bytes, 20, 25324, 74999)',
+ ],
},
];
diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/helpers.ts
index 89485f2174a42..0380a07385a73 100644
--- a/packages/kbn-esql-validation-autocomplete/src/definitions/helpers.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/definitions/helpers.ts
@@ -19,7 +19,7 @@ export function getFunctionSignatures(
{ name, signatures }: FunctionDefinition,
{ withTypes }: { withTypes: boolean } = { withTypes: true }
) {
- return signatures.map(({ params, returnType, minParams, examples }) => {
+ return signatures.map(({ params, returnType, minParams }) => {
// for functions with a minimum number of args, repeat the last arg multiple times
// just make sure to compute the right number of args to add
const minParamsToAdd = Math.max((minParams || 0) - params.length, 0);
@@ -30,7 +30,6 @@ export function getFunctionSignatures(
.join(', ')}${handleAdditionalArgs(minParamsToAdd > 0, extraArg, withTypes)})${
withTypes ? `: ${returnType}` : ''
}`,
- examples,
};
});
}
diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts
index 0a614620ac08b..dbfbf08cca08a 100644
--- a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts
@@ -8,21 +8,30 @@
import type { ESQLCommand, ESQLCommandOption, ESQLFunction, ESQLMessage } from '@kbn/esql-ast';
+export const supportedFieldTypes = [
+ 'number',
+ 'date',
+ 'string',
+ 'boolean',
+ 'ip',
+ 'cartesian_point',
+ 'cartesian_shape',
+ 'geo_point',
+ 'geo_shape',
+ 'version',
+] as const;
+
+export const isSupportedFieldType = (type: string): type is SupportedFieldType =>
+ supportedFieldTypes.includes(type as SupportedFieldType);
+
+export type SupportedFieldType = typeof supportedFieldTypes[number];
+
export type FunctionParameterType =
- | 'number'
- | 'date'
- | 'string'
- | 'boolean'
+ | SupportedFieldType
| 'null'
| 'any'
- | 'ip'
| 'chrono_literal'
| 'time_literal'
- | 'cartesian_point'
- | 'cartesian_shape'
- | 'geo_point'
- | 'geo_shape'
- | 'version'
| 'number[]'
| 'string[]'
| 'boolean[]'
@@ -88,8 +97,8 @@ export interface FunctionDefinition {
}>;
minParams?: number;
returnType: FunctionReturnType;
- examples?: string[];
}>;
+ examples?: string[];
validate?: (fnDef: ESQLFunction) => ESQLMessage[];
}
diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts
index 5689b81c1b54d..e17788eba21b8 100644
--- a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts
@@ -20,7 +20,7 @@ import type {
import { statsAggregationFunctionDefinitions } from '../definitions/aggs';
import { builtinFunctions } from '../definitions/builtin';
import { commandDefinitions } from '../definitions/commands';
-import { evalFunctionsDefinitions } from '../definitions/functions';
+import { evalFunctionDefinitions } from '../definitions/functions';
import { groupingFunctionDefinitions } from '../definitions/grouping';
import { getFunctionSignatures } from '../definitions/helpers';
import { chronoLiterals, timeLiterals } from '../definitions/literals';
@@ -132,7 +132,7 @@ function buildFunctionLookup() {
if (!fnLookups) {
fnLookups = builtinFunctions
.concat(
- evalFunctionsDefinitions,
+ evalFunctionDefinitions,
statsAggregationFunctionDefinitions,
groupingFunctionDefinitions
)
diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json
index 14b55dee73cd7..89c267dd01f2d 100644
--- a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json
+++ b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json
@@ -17,21 +17,17 @@
"type": "date"
},
{
- "name": "booleanField",
- "type": "boolean"
+ "name": "stringField",
+ "type": "string"
},
{
- "name": "versionField",
- "type": "version"
+ "name": "booleanField",
+ "type": "boolean"
},
{
"name": "ipField",
"type": "ip"
},
- {
- "name": "stringField",
- "type": "string"
- },
{
"name": "cartesianPointField",
"type": "cartesian_point"
@@ -48,6 +44,10 @@
"name": "geoShapeField",
"type": "geo_shape"
},
+ {
+ "name": "versionField",
+ "type": "version"
+ },
{
"name": "any#Char$Field",
"type": "number"
@@ -3972,82 +3972,82 @@
"warning": []
},
{
- "query": "from a_index | where booleanField IS NULL",
+ "query": "from a_index | where stringField IS NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | where booleanField IS null",
+ "query": "from a_index | where stringField IS null",
"error": [],
"warning": []
},
{
- "query": "from a_index | where booleanField is null",
+ "query": "from a_index | where stringField is null",
"error": [],
"warning": []
},
{
- "query": "from a_index | where booleanField is NULL",
+ "query": "from a_index | where stringField is NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | where booleanField IS NOT NULL",
+ "query": "from a_index | where stringField IS NOT NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | where booleanField IS NOT null",
+ "query": "from a_index | where stringField IS NOT null",
"error": [],
"warning": []
},
{
- "query": "from a_index | where booleanField IS not NULL",
+ "query": "from a_index | where stringField IS not NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | where booleanField Is nOt NuLL",
+ "query": "from a_index | where stringField Is nOt NuLL",
"error": [],
"warning": []
},
{
- "query": "from a_index | where versionField IS NULL",
+ "query": "from a_index | where booleanField IS NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | where versionField IS null",
+ "query": "from a_index | where booleanField IS null",
"error": [],
"warning": []
},
{
- "query": "from a_index | where versionField is null",
+ "query": "from a_index | where booleanField is null",
"error": [],
"warning": []
},
{
- "query": "from a_index | where versionField is NULL",
+ "query": "from a_index | where booleanField is NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | where versionField IS NOT NULL",
+ "query": "from a_index | where booleanField IS NOT NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | where versionField IS NOT null",
+ "query": "from a_index | where booleanField IS NOT null",
"error": [],
"warning": []
},
{
- "query": "from a_index | where versionField IS not NULL",
+ "query": "from a_index | where booleanField IS not NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | where versionField Is nOt NuLL",
+ "query": "from a_index | where booleanField Is nOt NuLL",
"error": [],
"warning": []
},
@@ -4091,46 +4091,6 @@
"error": [],
"warning": []
},
- {
- "query": "from a_index | where stringField IS NULL",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | where stringField IS null",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | where stringField is null",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | where stringField is NULL",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | where stringField IS NOT NULL",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | where stringField IS NOT null",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | where stringField IS not NULL",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | where stringField Is nOt NuLL",
- "error": [],
- "warning": []
- },
{
"query": "from a_index | where cartesianPointField IS NULL",
"error": [],
@@ -4291,6 +4251,46 @@
"error": [],
"warning": []
},
+ {
+ "query": "from a_index | where versionField IS NULL",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where versionField IS null",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where versionField is null",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where versionField is NULL",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where versionField IS NOT NULL",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where versionField IS NOT null",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where versionField IS not NULL",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where versionField Is nOt NuLL",
+ "error": [],
+ "warning": []
+ },
{
"query": "from a_index | where stringField == \"a\" or null",
"error": [],
@@ -4493,72 +4493,72 @@
"warning": []
},
{
- "query": "from a_index | eval booleanField IS NULL",
+ "query": "from a_index | eval stringField IS NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval booleanField IS null",
+ "query": "from a_index | eval stringField IS null",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval booleanField is null",
+ "query": "from a_index | eval stringField is null",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval booleanField is NULL",
+ "query": "from a_index | eval stringField is NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval booleanField IS NOT NULL",
+ "query": "from a_index | eval stringField IS NOT NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval booleanField IS NOT null",
+ "query": "from a_index | eval stringField IS NOT null",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval booleanField IS not NULL",
+ "query": "from a_index | eval stringField IS not NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval versionField IS NULL",
+ "query": "from a_index | eval booleanField IS NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval versionField IS null",
+ "query": "from a_index | eval booleanField IS null",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval versionField is null",
+ "query": "from a_index | eval booleanField is null",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval versionField is NULL",
+ "query": "from a_index | eval booleanField is NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval versionField IS NOT NULL",
+ "query": "from a_index | eval booleanField IS NOT NULL",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval versionField IS NOT null",
+ "query": "from a_index | eval booleanField IS NOT null",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval versionField IS not NULL",
+ "query": "from a_index | eval booleanField IS not NULL",
"error": [],
"warning": []
},
@@ -4597,41 +4597,6 @@
"error": [],
"warning": []
},
- {
- "query": "from a_index | eval stringField IS NULL",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | eval stringField IS null",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | eval stringField is null",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | eval stringField is NULL",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | eval stringField IS NOT NULL",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | eval stringField IS NOT null",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | eval stringField IS not NULL",
- "error": [],
- "warning": []
- },
{
"query": "from a_index | eval cartesianPointField IS NULL",
"error": [],
@@ -4772,6 +4737,41 @@
"error": [],
"warning": []
},
+ {
+ "query": "from a_index | eval versionField IS NULL",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval versionField IS null",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval versionField is null",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval versionField is NULL",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval versionField IS NOT NULL",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval versionField IS NOT null",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval versionField IS not NULL",
+ "error": [],
+ "warning": []
+ },
{
"query": "from a_index | eval - numberField",
"error": [],
@@ -9000,6 +9000,20 @@
"error": [],
"warning": []
},
+ {
+ "query": "from a_index | eval var = date_diff(\"year\", to_datetime(dateField), to_datetime(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval date_diff(booleanField, booleanField, booleanField)",
+ "error": [
+ "Argument of [date_diff] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [date_diff] must be [date], found value [booleanField] type [boolean]",
+ "Argument of [date_diff] must be [date], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
{
"query": "row var = abs(5)",
"error": [],
@@ -9076,51 +9090,82 @@
"warning": []
},
{
- "query": "row var = acos(5)",
- "error": [],
- "warning": []
- },
- {
- "query": "row acos(5)",
+ "query": "row var = abs(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row var = acos(to_integer(\"a\"))",
- "error": [],
+ "query": "row var = abs(true)",
+ "error": [
+ "Argument of [abs] must be [number], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row var = acos(\"a\")",
+ "query": "from a_index | where abs(booleanField) > 0",
"error": [
- "Argument of [acos] must be [number], found value [\"a\"] type [string]"
+ "Argument of [abs] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | where acos(numberField) > 0",
+ "query": "from a_index | eval var = abs(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where acos(stringField) > 0",
+ "query": "from a_index | eval abs(booleanField)",
"error": [
- "Argument of [acos] must be [number], found value [stringField] type [string]"
+ "Argument of [abs] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = acos(numberField)",
+ "query": "row var = acos(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval acos(numberField)",
+ "query": "row acos(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = acos(to_integer(stringField))",
+ "query": "row var = acos(to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = acos(\"a\")",
+ "error": [
+ "Argument of [acos] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where acos(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where acos(stringField) > 0",
+ "error": [
+ "Argument of [acos] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = acos(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval acos(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = acos(to_integer(stringField))",
"error": [],
"warning": []
},
@@ -9150,6 +9195,37 @@
"error": [],
"warning": []
},
+ {
+ "query": "row var = acos(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = acos(true)",
+ "error": [
+ "Argument of [acos] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where acos(booleanField) > 0",
+ "error": [
+ "Argument of [acos] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = acos(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval acos(booleanField)",
+ "error": [
+ "Argument of [acos] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
{
"query": "row var = asin(5)",
"error": [],
@@ -9225,6 +9301,37 @@
"error": [],
"warning": []
},
+ {
+ "query": "row var = asin(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = asin(true)",
+ "error": [
+ "Argument of [asin] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where asin(booleanField) > 0",
+ "error": [
+ "Argument of [asin] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = asin(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval asin(booleanField)",
+ "error": [
+ "Argument of [asin] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
{
"query": "row var = atan(5)",
"error": [],
@@ -9300,6 +9407,37 @@
"error": [],
"warning": []
},
+ {
+ "query": "row var = atan(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = atan(true)",
+ "error": [
+ "Argument of [atan] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where atan(booleanField) > 0",
+ "error": [
+ "Argument of [atan] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = atan(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval atan(booleanField)",
+ "error": [
+ "Argument of [atan] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
{
"query": "row var = atan2(5, 5)",
"error": [],
@@ -9371,6 +9509,40 @@
"error": [],
"warning": []
},
+ {
+ "query": "row var = atan2(to_integer(true), to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = atan2(true, true)",
+ "error": [
+ "Argument of [atan2] must be [number], found value [true] type [boolean]",
+ "Argument of [atan2] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where atan2(booleanField, booleanField) > 0",
+ "error": [
+ "Argument of [atan2] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [atan2] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = atan2(to_integer(booleanField), to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval atan2(booleanField, booleanField)",
+ "error": [
+ "Argument of [atan2] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [atan2] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
{
"query": "row var = case(true, \"a\")",
"error": [],
@@ -9396,6 +9568,13 @@
"error": [],
"warning": []
},
+ {
+ "query": "row var = case(to_cartesianpoint(\"POINT (30 10)\"), true)",
+ "error": [
+ "Argument of [case] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
+ ],
+ "warning": []
+ },
{
"query": "row var = ceil(5)",
"error": [],
@@ -9471,6 +9650,37 @@
"error": [],
"warning": []
},
+ {
+ "query": "row var = ceil(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = ceil(true)",
+ "error": [
+ "Argument of [ceil] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where ceil(booleanField) > 0",
+ "error": [
+ "Argument of [ceil] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = ceil(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval ceil(booleanField)",
+ "error": [
+ "Argument of [ceil] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
{
"query": "row var = cidr_match(to_ip(\"127.0.0.1\"), \"a\")",
"error": [],
@@ -9522,6 +9732,32 @@
"error": [],
"warning": []
},
+ {
+ "query": "row var = cidr_match(to_ip(to_ip(\"127.0.0.1\")), to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = cidr_match(true, true)",
+ "error": [
+ "Argument of [cidr_match] must be [ip], found value [true] type [boolean]",
+ "Argument of [cidr_match] must be [string], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = cidr_match(to_ip(ipField), to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval cidr_match(booleanField, booleanField)",
+ "error": [
+ "Argument of [cidr_match] must be [ip], found value [booleanField] type [boolean]",
+ "Argument of [cidr_match] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
{
"query": "row var = coalesce(\"a\")",
"error": [],
@@ -9548,6820 +9784,14400 @@
"warning": []
},
{
- "query": "row var = concat(\"a\", \"a\")",
+ "query": "row var = coalesce(true)",
"error": [],
"warning": []
},
{
- "query": "row concat(\"a\", \"a\")",
+ "query": "row coalesce(true)",
"error": [],
"warning": []
},
{
- "query": "row var = concat(to_string(\"a\"), to_string(\"a\"))",
+ "query": "row var = coalesce(to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "row var = concat(5, 5)",
- "error": [
- "Argument of [concat] must be [string], found value [5] type [number]"
- ],
+ "query": "row var = coalesce(true, true)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where length(concat(stringField, stringField)) > 0",
+ "query": "row coalesce(true, true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(concat(numberField, numberField)) > 0",
- "error": [
- "Argument of [concat] must be [string], found value [numberField] type [number]"
- ],
+ "query": "row var = coalesce(to_boolean(true), to_boolean(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = concat(stringField, stringField)",
+ "query": "row var = coalesce(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval concat(stringField, stringField)",
+ "query": "row coalesce(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = concat(to_string(stringField), to_string(stringField))",
+ "query": "row var = coalesce(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval concat(numberField, numberField)",
- "error": [
- "Argument of [concat] must be [string], found value [numberField] type [number]"
- ],
+ "query": "row var = coalesce(5, 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort concat(stringField, stringField)",
+ "query": "row coalesce(5, 5)",
"error": [],
"warning": []
},
{
- "query": "row var = cos(5)",
+ "query": "row var = coalesce(to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row cos(5)",
+ "query": "row var = coalesce(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "row var = cos(to_integer(\"a\"))",
+ "query": "row var = coalesce(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "row var = cos(\"a\")",
- "error": [
- "Argument of [cos] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "row coalesce(\"a\", \"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where cos(numberField) > 0",
+ "query": "row var = coalesce(to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where cos(stringField) > 0",
- "error": [
- "Argument of [cos] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | where coalesce(numberField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = cos(numberField)",
+ "query": "from a_index | where coalesce(numberField, numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval cos(numberField)",
+ "query": "from a_index | where length(coalesce(stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = cos(to_integer(stringField))",
+ "query": "from a_index | where length(coalesce(stringField, stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval cos(stringField)",
- "error": [
- "Argument of [cos] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = coalesce(booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval cos(numberField, extraArg)",
- "error": [
- "Error: [cos] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval coalesce(booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = cos(*)",
- "error": [
- "Using wildcards (*) in cos is not allowed"
- ],
+ "query": "from a_index | eval var = coalesce(to_boolean(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort cos(numberField)",
+ "query": "from a_index | eval var = coalesce(booleanField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = cosh(5)",
+ "query": "from a_index | eval coalesce(booleanField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "row cosh(5)",
+ "query": "from a_index | eval var = coalesce(to_boolean(booleanField), to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = cosh(to_integer(\"a\"))",
+ "query": "from a_index | eval var = coalesce(numberField)",
"error": [],
"warning": []
},
{
- "query": "row var = cosh(\"a\")",
- "error": [
- "Argument of [cosh] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "from a_index | eval coalesce(numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where cosh(numberField) > 0",
+ "query": "from a_index | eval var = coalesce(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where cosh(stringField) > 0",
- "error": [
- "Argument of [cosh] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = coalesce(numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = cosh(numberField)",
+ "query": "from a_index | eval coalesce(numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval cosh(numberField)",
+ "query": "from a_index | eval var = coalesce(to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = cosh(to_integer(stringField))",
+ "query": "from a_index | eval var = coalesce(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval cosh(stringField)",
- "error": [
- "Argument of [cosh] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = coalesce(stringField, stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval cosh(numberField, extraArg)",
- "error": [
- "Error: [cosh] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval coalesce(stringField, stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = cosh(*)",
- "error": [
- "Using wildcards (*) in cosh is not allowed"
- ],
+ "query": "from a_index | eval var = coalesce(to_string(booleanField), to_string(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort cosh(numberField)",
+ "query": "from a_index | sort coalesce(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", now())",
+ "query": "row var = coalesce(5, true)",
"error": [],
"warning": []
},
{
- "query": "row date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", now())",
+ "query": "row coalesce(5, true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)",
+ "query": "row var = coalesce(to_integer(true), to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)",
+ "query": "row var = coalesce(now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", to_datetime(stringField))",
+ "query": "row coalesce(now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval date_extract(stringField, stringField)",
- "error": [
- "Argument of [date_extract] must be [chrono_literal], found value [stringField] type [string]",
- "Argument of [date_extract] must be [date], found value [stringField] type [string]"
- ],
+ "query": "row var = coalesce(to_datetime(now()))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField, extraArg)",
- "error": [
- "Error: [date_extract] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row var = coalesce(now(), true)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)",
+ "query": "row coalesce(now(), true)",
"error": [],
"warning": []
},
{
- "query": "row var = date_format(now(), \"a\")",
+ "query": "row var = coalesce(to_datetime(now()), to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "row date_format(now(), \"a\")",
+ "query": "row var = coalesce(\"a\", true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = date_format(dateField, stringField)",
+ "query": "row coalesce(\"a\", true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval date_format(dateField, stringField)",
+ "query": "row var = coalesce(to_string(true), to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = date_format(to_datetime(stringField), to_string(stringField))",
+ "query": "row var = coalesce(to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval date_format(stringField, numberField)",
- "error": [
- "Argument of [date_format] must be [date], found value [stringField] type [string]",
- "Argument of [date_format] must be [string], found value [numberField] type [number]"
- ],
+ "query": "row coalesce(to_ip(\"127.0.0.1\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval date_format(dateField, stringField, extraArg)",
- "error": [
- "Error: [date_format] function expects no more than 2 arguments, got 3."
- ],
+ "query": "row var = coalesce(to_ip(to_ip(\"127.0.0.1\")))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort date_format(dateField, stringField)",
+ "query": "row var = coalesce(to_ip(\"127.0.0.1\"), true)",
"error": [],
"warning": []
},
{
- "query": "row var = date_parse(\"a\", \"a\")",
+ "query": "row coalesce(to_ip(\"127.0.0.1\"), true)",
"error": [],
"warning": []
},
{
- "query": "row date_parse(\"a\", \"a\")",
+ "query": "row var = coalesce(to_ip(to_ip(\"127.0.0.1\")), to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "row var = date_parse(to_string(\"a\"), to_string(\"a\"))",
+ "query": "row var = coalesce(to_cartesianpoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row var = date_parse(5, 5)",
- "error": [
- "Argument of [date_parse] must be [string], found value [5] type [number]",
- "Argument of [date_parse] must be [string], found value [5] type [number]"
- ],
+ "query": "row coalesce(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = date_parse(stringField, stringField)",
+ "query": "row var = coalesce(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval date_parse(stringField, stringField)",
+ "query": "row var = coalesce(to_cartesianpoint(\"POINT (30 10)\"), true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = date_parse(to_string(stringField), to_string(stringField))",
+ "query": "row coalesce(to_cartesianpoint(\"POINT (30 10)\"), true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval date_parse(numberField, numberField)",
- "error": [
- "Argument of [date_parse] must be [string], found value [numberField] type [number]",
- "Argument of [date_parse] must be [string], found value [numberField] type [number]"
- ],
+ "query": "row var = coalesce(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_boolean(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval date_parse(stringField, stringField, extraArg)",
- "error": [
- "Error: [date_parse] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row var = coalesce(to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort date_parse(stringField, stringField)",
+ "query": "row coalesce(to_cartesianshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row var = date_trunc(1 year, now())",
+ "query": "row var = coalesce(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "row date_trunc(1 year, now())",
+ "query": "row var = coalesce(to_cartesianshape(\"POINT (30 10)\"), true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = date_trunc(1 year, dateField)",
+ "query": "row coalesce(to_cartesianshape(\"POINT (30 10)\"), true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval date_trunc(1 year, dateField)",
+ "query": "row var = coalesce(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = date_trunc(1 year, to_datetime(stringField))",
+ "query": "row var = coalesce(to_geopoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval date_trunc(stringField, stringField)",
- "error": [
- "Argument of [date_trunc] must be [time_literal], found value [stringField] type [string]",
- "Argument of [date_trunc] must be [date], found value [stringField] type [string]"
- ],
+ "query": "row coalesce(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval date_trunc(1 year, dateField, extraArg)",
- "error": [
- "Error: [date_trunc] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row var = coalesce(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort date_trunc(1 year, dateField)",
+ "query": "row var = coalesce(to_geopoint(\"POINT (30 10)\"), true)",
"error": [],
"warning": []
},
{
- "query": "row var = e()",
+ "query": "row coalesce(to_geopoint(\"POINT (30 10)\"), true)",
"error": [],
"warning": []
},
{
- "query": "row e()",
+ "query": "row var = coalesce(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where e() > 0",
+ "query": "row var = coalesce(to_geoshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = e()",
+ "query": "row coalesce(to_geoshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval e()",
+ "query": "row var = coalesce(to_geoshape(to_geopoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval e(extraArg)",
- "error": [
- "Error: [e] function expects exactly 0 arguments, got 1."
- ],
+ "query": "row var = coalesce(to_geoshape(\"POINT (30 10)\"), true)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort e()",
+ "query": "row coalesce(to_geoshape(\"POINT (30 10)\"), true)",
"error": [],
"warning": []
},
{
- "query": "row var = ends_with(\"a\", \"a\")",
+ "query": "row var = coalesce(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "row ends_with(\"a\", \"a\")",
+ "query": "row var = coalesce(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "row var = ends_with(to_string(\"a\"), to_string(\"a\"))",
+ "query": "row coalesce(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "row var = ends_with(5, 5)",
- "error": [
- "Argument of [ends_with] must be [string], found value [5] type [number]",
- "Argument of [ends_with] must be [string], found value [5] type [number]"
- ],
+ "query": "row var = coalesce(to_version(\"a\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = ends_with(stringField, stringField)",
+ "query": "row var = coalesce(to_version(\"1.0.0\"), true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval ends_with(stringField, stringField)",
+ "query": "row coalesce(to_version(\"1.0.0\"), true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = ends_with(to_string(stringField), to_string(stringField))",
+ "query": "row var = coalesce(to_version(\"a\"), to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval ends_with(numberField, numberField)",
- "error": [
- "Argument of [ends_with] must be [string], found value [numberField] type [number]",
- "Argument of [ends_with] must be [string], found value [numberField] type [number]"
- ],
+ "query": "from a_index | where coalesce(numberField, booleanField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval ends_with(stringField, stringField, extraArg)",
- "error": [
- "Error: [ends_with] function expects exactly 2 arguments, got 3."
- ],
+ "query": "from a_index | where length(coalesce(stringField, booleanField)) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort ends_with(stringField, stringField)",
+ "query": "from a_index | eval var = coalesce(numberField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = floor(5)",
+ "query": "from a_index | eval coalesce(numberField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "row floor(5)",
+ "query": "from a_index | eval var = coalesce(to_integer(booleanField), to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = floor(to_integer(\"a\"))",
+ "query": "from a_index | eval var = coalesce(dateField)",
"error": [],
"warning": []
},
{
- "query": "row var = floor(\"a\")",
- "error": [
- "Argument of [floor] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "from a_index | eval coalesce(dateField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where floor(numberField) > 0",
+ "query": "from a_index | eval var = coalesce(to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where floor(stringField) > 0",
- "error": [
- "Argument of [floor] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = coalesce(dateField, booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = floor(numberField)",
+ "query": "from a_index | eval coalesce(dateField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval floor(numberField)",
+ "query": "from a_index | eval var = coalesce(to_datetime(dateField), to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = floor(to_integer(stringField))",
+ "query": "from a_index | eval var = coalesce(stringField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval floor(stringField)",
- "error": [
- "Argument of [floor] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval coalesce(stringField, booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval floor(numberField, extraArg)",
- "error": [
- "Error: [floor] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval var = coalesce(to_string(booleanField), to_boolean(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = floor(*)",
- "error": [
- "Using wildcards (*) in floor is not allowed"
- ],
+ "query": "from a_index | eval var = coalesce(ipField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort floor(numberField)",
+ "query": "from a_index | eval coalesce(ipField)",
"error": [],
"warning": []
},
{
- "query": "row var = greatest(\"a\")",
+ "query": "from a_index | eval var = coalesce(to_ip(ipField))",
"error": [],
"warning": []
},
{
- "query": "row greatest(\"a\")",
+ "query": "from a_index | eval var = coalesce(ipField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = greatest(stringField)",
+ "query": "from a_index | eval coalesce(ipField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval greatest(stringField)",
+ "query": "from a_index | eval var = coalesce(to_ip(ipField), to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort greatest(stringField)",
+ "query": "from a_index | eval var = coalesce(cartesianPointField)",
"error": [],
"warning": []
},
{
- "query": "row var = least(\"a\")",
+ "query": "from a_index | eval var = coalesce(to_cartesianpoint(cartesianPointField))",
"error": [],
"warning": []
},
{
- "query": "row least(\"a\")",
+ "query": "from a_index | eval var = coalesce(cartesianPointField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = least(stringField)",
+ "query": "from a_index | eval coalesce(cartesianPointField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval least(stringField)",
+ "query": "from a_index | eval var = coalesce(to_cartesianpoint(cartesianPointField), to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort least(stringField)",
+ "query": "from a_index | eval var = coalesce(cartesianShapeField)",
"error": [],
"warning": []
},
{
- "query": "row var = left(\"a\", 5)",
+ "query": "from a_index | eval coalesce(cartesianShapeField)",
"error": [],
"warning": []
},
{
- "query": "row left(\"a\", 5)",
+ "query": "from a_index | eval var = coalesce(to_cartesianshape(cartesianPointField))",
"error": [],
"warning": []
},
{
- "query": "row var = left(to_string(\"a\"), to_integer(\"a\"))",
+ "query": "from a_index | eval var = coalesce(cartesianShapeField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = left(5, \"a\")",
- "error": [
- "Argument of [left] must be [string], found value [5] type [number]",
- "Argument of [left] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "from a_index | eval coalesce(cartesianShapeField, booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where length(left(stringField, numberField)) > 0",
+ "query": "from a_index | eval var = coalesce(to_cartesianshape(cartesianPointField), to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(left(numberField, stringField)) > 0",
- "error": [
- "Argument of [left] must be [string], found value [numberField] type [number]",
- "Argument of [left] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = coalesce(geoPointField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = left(stringField, numberField)",
+ "query": "from a_index | eval coalesce(geoPointField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval left(stringField, numberField)",
+ "query": "from a_index | eval var = coalesce(to_geopoint(geoPointField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = left(to_string(stringField), to_integer(stringField))",
+ "query": "from a_index | eval var = coalesce(geoPointField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval left(numberField, stringField)",
- "error": [
- "Argument of [left] must be [string], found value [numberField] type [number]",
- "Argument of [left] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval coalesce(geoPointField, booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval left(stringField, numberField, extraArg)",
- "error": [
- "Error: [left] function expects exactly 2 arguments, got 3."
- ],
+ "query": "from a_index | eval var = coalesce(to_geopoint(geoPointField), to_boolean(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort left(stringField, numberField)",
+ "query": "from a_index | eval var = coalesce(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "row var = length(\"a\")",
+ "query": "from a_index | eval coalesce(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "row length(\"a\")",
+ "query": "from a_index | eval var = coalesce(to_geoshape(geoPointField))",
"error": [],
"warning": []
},
{
- "query": "row var = length(to_string(\"a\"))",
+ "query": "from a_index | eval var = coalesce(geoShapeField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = length(5)",
- "error": [
- "Argument of [length] must be [string], found value [5] type [number]"
- ],
+ "query": "from a_index | eval coalesce(geoShapeField, booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where length(stringField) > 0",
+ "query": "from a_index | eval var = coalesce(to_geoshape(geoPointField), to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(numberField) > 0",
- "error": [
- "Argument of [length] must be [string], found value [numberField] type [number]"
- ],
+ "query": "from a_index | eval var = coalesce(versionField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = length(stringField)",
+ "query": "from a_index | eval coalesce(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval length(stringField)",
+ "query": "from a_index | eval var = coalesce(to_version(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = length(to_string(stringField))",
+ "query": "from a_index | eval var = coalesce(versionField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval length(numberField)",
- "error": [
- "Argument of [length] must be [string], found value [numberField] type [number]"
- ],
+ "query": "from a_index | eval coalesce(versionField, booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval length(stringField, extraArg)",
- "error": [
- "Error: [length] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval var = coalesce(to_version(stringField), to_boolean(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = length(*)",
- "error": [
- "Using wildcards (*) in length is not allowed"
- ],
+ "query": "from a_index | sort coalesce(numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort length(stringField)",
+ "query": "from a_index | eval coalesce(cartesianPointField)",
"error": [],
"warning": []
},
{
- "query": "row var = log(5, 5)",
+ "query": "row var = concat(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "row log(5, 5)",
+ "query": "row concat(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "row var = log(to_integer(\"a\"), to_integer(\"a\"))",
+ "query": "row var = concat(to_string(\"a\"), to_string(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = log(\"a\", \"a\")",
+ "query": "row var = concat(5, 5)",
"error": [
- "Argument of [log] must be [number], found value [\"a\"] type [string]",
- "Argument of [log] must be [number], found value [\"a\"] type [string]"
+ "Argument of [concat] must be [string], found value [5] type [number]",
+ "Argument of [concat] must be [string], found value [5] type [number]"
],
"warning": []
},
{
- "query": "from a_index | where log(numberField, numberField) > 0",
+ "query": "from a_index | where length(concat(stringField, stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | where log(stringField, stringField) > 0",
+ "query": "from a_index | where length(concat(numberField, numberField)) > 0",
"error": [
- "Argument of [log] must be [number], found value [stringField] type [string]",
- "Argument of [log] must be [number], found value [stringField] type [string]"
+ "Argument of [concat] must be [string], found value [numberField] type [number]",
+ "Argument of [concat] must be [string], found value [numberField] type [number]"
],
"warning": []
},
{
- "query": "from a_index | eval var = log(numberField, numberField)",
+ "query": "from a_index | eval var = concat(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval log(numberField, numberField)",
+ "query": "from a_index | eval concat(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = log(to_integer(stringField), to_integer(stringField))",
+ "query": "from a_index | eval var = concat(to_string(stringField), to_string(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval log(stringField, stringField)",
+ "query": "from a_index | eval concat(numberField, numberField)",
"error": [
- "Argument of [log] must be [number], found value [stringField] type [string]",
- "Argument of [log] must be [number], found value [stringField] type [string]"
+ "Argument of [concat] must be [string], found value [numberField] type [number]",
+ "Argument of [concat] must be [string], found value [numberField] type [number]"
],
"warning": []
},
{
- "query": "from a_index | eval log(numberField, numberField, extraArg)",
- "error": [
- "Error: [log] function expects no more than 2 arguments, got 3."
- ],
+ "query": "from a_index | sort concat(stringField, stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort log(numberField, numberField)",
+ "query": "row var = concat(to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "row var = log10(5)",
- "error": [],
+ "query": "row var = concat(true, true)",
+ "error": [
+ "Argument of [concat] must be [string], found value [true] type [boolean]",
+ "Argument of [concat] must be [string], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row log10(5)",
- "error": [],
+ "query": "from a_index | where length(concat(booleanField, booleanField)) > 0",
+ "error": [
+ "Argument of [concat] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [concat] must be [string], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row var = log10(to_integer(\"a\"))",
- "error": [],
- "warning": []
- },
- {
- "query": "row var = log10(\"a\")",
- "error": [
- "Argument of [log10] must be [number], found value [\"a\"] type [string]"
- ],
- "warning": []
- },
- {
- "query": "from a_index | where log10(numberField) > 0",
+ "query": "from a_index | eval var = concat(to_string(booleanField), to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where log10(stringField) > 0",
+ "query": "from a_index | eval concat(booleanField, booleanField)",
"error": [
- "Argument of [log10] must be [number], found value [stringField] type [string]"
+ "Argument of [concat] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [concat] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = log10(numberField)",
+ "query": "row var = cos(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval log10(numberField)",
+ "query": "row cos(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = log10(to_integer(stringField))",
+ "query": "row var = cos(to_integer(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval log10(stringField)",
+ "query": "row var = cos(\"a\")",
"error": [
- "Argument of [log10] must be [number], found value [stringField] type [string]"
+ "Argument of [cos] must be [number], found value [\"a\"] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval log10(numberField, extraArg)",
- "error": [
- "Error: [log10] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | where cos(numberField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = log10(*)",
+ "query": "from a_index | where cos(stringField) > 0",
"error": [
- "Using wildcards (*) in log10 is not allowed"
+ "Argument of [cos] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | sort log10(numberField)",
- "error": [],
- "warning": []
- },
- {
- "query": "row var = ltrim(\"a\")",
+ "query": "from a_index | eval var = cos(numberField)",
"error": [],
"warning": []
},
{
- "query": "row ltrim(\"a\")",
+ "query": "from a_index | eval cos(numberField)",
"error": [],
"warning": []
},
{
- "query": "row var = ltrim(to_string(\"a\"))",
+ "query": "from a_index | eval var = cos(to_integer(stringField))",
"error": [],
"warning": []
},
{
- "query": "row var = ltrim(5)",
+ "query": "from a_index | eval cos(stringField)",
"error": [
- "Argument of [ltrim] must be [string], found value [5] type [number]"
+ "Argument of [cos] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | where length(ltrim(stringField)) > 0",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | where length(ltrim(numberField)) > 0",
+ "query": "from a_index | eval cos(numberField, extraArg)",
"error": [
- "Argument of [ltrim] must be [string], found value [numberField] type [number]"
+ "Error: [cos] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | eval var = ltrim(stringField)",
- "error": [],
+ "query": "from a_index | eval var = cos(*)",
+ "error": [
+ "Using wildcards (*) in cos is not allowed"
+ ],
"warning": []
},
{
- "query": "from a_index | eval ltrim(stringField)",
+ "query": "from a_index | sort cos(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = ltrim(to_string(stringField))",
+ "query": "row var = cos(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval ltrim(numberField)",
+ "query": "row var = cos(true)",
"error": [
- "Argument of [ltrim] must be [string], found value [numberField] type [number]"
+ "Argument of [cos] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval ltrim(stringField, extraArg)",
+ "query": "from a_index | where cos(booleanField) > 0",
"error": [
- "Error: [ltrim] function expects exactly one argument, got 2."
+ "Argument of [cos] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = ltrim(*)",
- "error": [
- "Using wildcards (*) in ltrim is not allowed"
- ],
+ "query": "from a_index | eval var = cos(to_integer(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort ltrim(stringField)",
- "error": [],
+ "query": "from a_index | eval cos(booleanField)",
+ "error": [
+ "Argument of [cos] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row var = mv_avg(5)",
+ "query": "row var = cosh(5)",
"error": [],
"warning": []
},
{
- "query": "row mv_avg(5)",
+ "query": "row cosh(5)",
"error": [],
"warning": []
},
{
- "query": "row var = mv_avg(to_integer(\"a\"))",
+ "query": "row var = cosh(to_integer(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = mv_avg(\"a\")",
+ "query": "row var = cosh(\"a\")",
"error": [
- "Argument of [mv_avg] must be [number], found value [\"a\"] type [string]"
+ "Argument of [cosh] must be [number], found value [\"a\"] type [string]"
],
"warning": []
},
{
- "query": "from a_index | where mv_avg(numberField) > 0",
+ "query": "from a_index | where cosh(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | where mv_avg(stringField) > 0",
+ "query": "from a_index | where cosh(stringField) > 0",
"error": [
- "Argument of [mv_avg] must be [number], found value [stringField] type [string]"
+ "Argument of [cosh] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = mv_avg(numberField)",
+ "query": "from a_index | eval var = cosh(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_avg(numberField)",
+ "query": "from a_index | eval cosh(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_avg(to_integer(stringField))",
+ "query": "from a_index | eval var = cosh(to_integer(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_avg(stringField)",
+ "query": "from a_index | eval cosh(stringField)",
"error": [
- "Argument of [mv_avg] must be [number], found value [stringField] type [string]"
+ "Argument of [cosh] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval mv_avg(numberField, extraArg)",
+ "query": "from a_index | eval cosh(numberField, extraArg)",
"error": [
- "Error: [mv_avg] function expects exactly one argument, got 2."
+ "Error: [cosh] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | eval var = mv_avg(*)",
+ "query": "from a_index | eval var = cosh(*)",
"error": [
- "Using wildcards (*) in mv_avg is not allowed"
+ "Using wildcards (*) in cosh is not allowed"
],
"warning": []
},
{
- "query": "from a_index | sort mv_avg(numberField)",
- "error": [],
- "warning": []
- },
- {
- "query": "row var = mv_concat(\"a\", \"a\")",
+ "query": "from a_index | sort cosh(numberField)",
"error": [],
"warning": []
},
{
- "query": "row mv_concat(\"a\", \"a\")",
+ "query": "row var = cosh(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row var = mv_concat(to_string(\"a\"), to_string(\"a\"))",
- "error": [],
+ "query": "row var = cosh(true)",
+ "error": [
+ "Argument of [cosh] must be [number], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row var = mv_concat(5, 5)",
+ "query": "from a_index | where cosh(booleanField) > 0",
"error": [
- "Argument of [mv_concat] must be [string], found value [5] type [number]",
- "Argument of [mv_concat] must be [string], found value [5] type [number]"
+ "Argument of [cosh] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | where length(mv_concat(stringField, stringField)) > 0",
+ "query": "from a_index | eval var = cosh(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(mv_concat(numberField, numberField)) > 0",
+ "query": "from a_index | eval cosh(booleanField)",
"error": [
- "Argument of [mv_concat] must be [string], found value [numberField] type [number]",
- "Argument of [mv_concat] must be [string], found value [numberField] type [number]"
+ "Argument of [cosh] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = mv_concat(stringField, stringField)",
+ "query": "row var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_concat(stringField, stringField)",
+ "query": "row date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_concat(to_string(stringField), to_string(stringField))",
+ "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_concat(numberField, numberField)",
- "error": [
- "Argument of [mv_concat] must be [string], found value [numberField] type [number]",
- "Argument of [mv_concat] must be [string], found value [numberField] type [number]"
- ],
+ "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_concat(stringField, stringField, extraArg)",
- "error": [
- "Error: [mv_concat] function expects exactly 2 arguments, got 3."
- ],
+ "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", to_datetime(stringField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort mv_concat(stringField, stringField)",
- "error": [],
+ "query": "from a_index | eval date_extract(stringField, stringField)",
+ "error": [
+ "Argument of [date_extract] must be [chrono_literal], found value [stringField] type [string]",
+ "Argument of [date_extract] must be [date], found value [stringField] type [string]"
+ ],
"warning": []
},
{
- "query": "row var = mv_count(\"a\")",
- "error": [],
+ "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField, extraArg)",
+ "error": [
+ "Error: [date_extract] function expects exactly 2 arguments, got 3."
+ ],
"warning": []
},
{
- "query": "row mv_count(\"a\")",
+ "query": "from a_index | sort date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_count(stringField)",
- "error": [],
+ "query": "row var = date_extract(true, true)",
+ "error": [
+ "Argument of [date_extract] must be [chrono_literal], found value [true] type [boolean]",
+ "Argument of [date_extract] must be [date], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval mv_count(stringField)",
+ "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_count(*)",
+ "query": "from a_index | eval date_extract(booleanField, booleanField)",
"error": [
- "Using wildcards (*) in mv_count is not allowed"
+ "Argument of [date_extract] must be [chrono_literal], found value [booleanField] type [boolean]",
+ "Argument of [date_extract] must be [date], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | sort mv_count(stringField)",
+ "query": "row var = date_format(\"a\", now())",
"error": [],
"warning": []
},
{
- "query": "row var = mv_dedupe(\"a\")",
+ "query": "row date_format(\"a\", now())",
"error": [],
"warning": []
},
{
- "query": "row mv_dedupe(\"a\")",
+ "query": "from a_index | eval var = date_format(stringField, dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_dedupe(stringField)",
+ "query": "from a_index | eval date_format(stringField, dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_dedupe(stringField)",
+ "query": "from a_index | eval var = date_format(to_string(stringField), to_datetime(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_dedupe(*)",
+ "query": "from a_index | eval date_format(stringField, numberField)",
"error": [
- "Using wildcards (*) in mv_dedupe is not allowed"
+ "Argument of [date_format] must be [date], found value [numberField] type [number]"
],
"warning": []
},
{
- "query": "from a_index | sort mv_dedupe(stringField)",
- "error": [],
- "warning": []
- },
- {
- "query": "row var = mv_first(\"a\")",
- "error": [],
+ "query": "from a_index | eval date_format(stringField, dateField, extraArg)",
+ "error": [
+ "Error: [date_format] function expects no more than 2 arguments, got 3."
+ ],
"warning": []
},
{
- "query": "row mv_first(\"a\")",
+ "query": "from a_index | sort date_format(stringField, dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_first(stringField)",
- "error": [],
+ "query": "row var = date_format(true, true)",
+ "error": [
+ "Argument of [date_format] must be [string], found value [true] type [boolean]",
+ "Argument of [date_format] must be [date], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval mv_first(stringField)",
+ "query": "from a_index | eval var = date_format(to_string(booleanField), to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_first(*)",
+ "query": "from a_index | eval date_format(booleanField, booleanField)",
"error": [
- "Using wildcards (*) in mv_first is not allowed"
+ "Argument of [date_format] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [date_format] must be [date], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | sort mv_first(stringField)",
- "error": [],
- "warning": []
- },
- {
- "query": "row var = mv_last(\"a\")",
+ "query": "row var = date_parse(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "row mv_last(\"a\")",
+ "query": "row var = date_parse(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_last(stringField)",
+ "query": "row date_parse(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_last(stringField)",
+ "query": "row var = date_parse(to_string(\"a\"), to_string(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_last(*)",
+ "query": "row var = date_parse(5, 5)",
"error": [
- "Using wildcards (*) in mv_last is not allowed"
+ "Argument of [date_parse] must be [string], found value [5] type [number]",
+ "Argument of [date_parse] must be [string], found value [5] type [number]"
],
"warning": []
},
{
- "query": "from a_index | sort mv_last(stringField)",
+ "query": "from a_index | eval var = date_parse(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = mv_max(\"a\")",
+ "query": "from a_index | eval var = date_parse(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "row mv_max(\"a\")",
+ "query": "from a_index | eval date_parse(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_max(stringField)",
+ "query": "from a_index | eval var = date_parse(to_string(stringField), to_string(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_max(stringField)",
- "error": [],
+ "query": "from a_index | eval date_parse(numberField, numberField)",
+ "error": [
+ "Argument of [date_parse] must be [string], found value [numberField] type [number]",
+ "Argument of [date_parse] must be [string], found value [numberField] type [number]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval var = mv_max(*)",
+ "query": "from a_index | eval date_parse(stringField, stringField, extraArg)",
"error": [
- "Using wildcards (*) in mv_max is not allowed"
+ "Error: [date_parse] function expects no more than 2 arguments, got 3."
],
"warning": []
},
{
- "query": "from a_index | sort mv_max(stringField)",
+ "query": "from a_index | sort date_parse(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = mv_median(5)",
+ "query": "row var = date_parse(to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "row mv_median(5)",
- "error": [],
+ "query": "row var = date_parse(true, true)",
+ "error": [
+ "Argument of [date_parse] must be [string], found value [true] type [boolean]",
+ "Argument of [date_parse] must be [string], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row var = mv_median(to_integer(\"a\"))",
+ "query": "from a_index | eval var = date_parse(to_string(booleanField), to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = mv_median(\"a\")",
+ "query": "from a_index | eval date_parse(booleanField, booleanField)",
"error": [
- "Argument of [mv_median] must be [number], found value [\"a\"] type [string]"
+ "Argument of [date_parse] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [date_parse] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | where mv_median(numberField) > 0",
+ "query": "row var = date_trunc(1 year, now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | where mv_median(stringField) > 0",
- "error": [
- "Argument of [mv_median] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row date_trunc(1 year, now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_median(numberField)",
+ "query": "from a_index | eval var = date_trunc(1 year, dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_median(numberField)",
+ "query": "from a_index | eval date_trunc(1 year, dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_median(to_integer(stringField))",
+ "query": "from a_index | eval var = date_trunc(1 year, to_datetime(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_median(stringField)",
- "error": [
- "Argument of [mv_median] must be [number], found value [stringField] type [string]"
- ],
- "warning": []
- },
- {
- "query": "from a_index | eval mv_median(numberField, extraArg)",
+ "query": "from a_index | eval date_trunc(stringField, stringField)",
"error": [
- "Error: [mv_median] function expects exactly one argument, got 2."
+ "Argument of [date_trunc] must be [time_literal], found value [stringField] type [string]",
+ "Argument of [date_trunc] must be [date], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = mv_median(*)",
+ "query": "from a_index | eval date_trunc(1 year, dateField, extraArg)",
"error": [
- "Using wildcards (*) in mv_median is not allowed"
+ "Error: [date_trunc] function expects exactly 2 arguments, got 3."
],
"warning": []
},
{
- "query": "from a_index | sort mv_median(numberField)",
+ "query": "from a_index | sort date_trunc(1 year, dateField)",
"error": [],
"warning": []
},
{
- "query": "row var = mv_min(\"a\")",
+ "query": "row var = date_trunc(now(), now())",
"error": [],
"warning": []
},
{
- "query": "row mv_min(\"a\")",
+ "query": "row date_trunc(now(), now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_min(stringField)",
- "error": [],
+ "query": "row var = date_trunc(true, true)",
+ "error": [
+ "Argument of [date_trunc] must be [time_literal], found value [true] type [boolean]",
+ "Argument of [date_trunc] must be [date], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval mv_min(stringField)",
+ "query": "from a_index | eval var = date_trunc(1 year, to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_min(*)",
+ "query": "from a_index | eval date_trunc(booleanField, booleanField)",
"error": [
- "Using wildcards (*) in mv_min is not allowed"
+ "Argument of [date_trunc] must be [time_literal], found value [booleanField] type [boolean]",
+ "Argument of [date_trunc] must be [date], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | sort mv_min(stringField)",
+ "query": "from a_index | eval var = date_trunc(dateField, dateField)",
"error": [],
"warning": []
},
{
- "query": "row var = mv_slice(\"a\", 5, 5)",
+ "query": "from a_index | eval date_trunc(dateField, dateField)",
"error": [],
"warning": []
},
{
- "query": "row mv_slice(\"a\", 5, 5)",
+ "query": "from a_index | eval var = date_trunc(to_datetime(dateField), to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_slice(stringField, numberField, numberField)",
+ "query": "row var = e()",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_slice(stringField, numberField, numberField)",
+ "query": "row e()",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort mv_slice(stringField, numberField, numberField)",
+ "query": "from a_index | where e() > 0",
"error": [],
"warning": []
},
{
- "query": "row var = mv_sort(\"a\", \"asc\")",
+ "query": "from a_index | eval var = e()",
"error": [],
"warning": []
},
{
- "query": "row mv_sort(\"a\", \"asc\")",
+ "query": "from a_index | eval e()",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_sort(stringField, \"asc\")",
- "error": [],
+ "query": "from a_index | eval e(extraArg)",
+ "error": [
+ "Error: [e] function expects exactly 0 arguments, got 1."
+ ],
"warning": []
},
{
- "query": "from a_index | eval mv_sort(stringField, \"asc\")",
+ "query": "from a_index | sort e()",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort mv_sort(stringField, \"asc\")",
+ "query": "row var = ends_with(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "row var = mv_sum(5)",
+ "query": "row ends_with(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "row mv_sum(5)",
+ "query": "row var = ends_with(to_string(\"a\"), to_string(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = mv_sum(to_integer(\"a\"))",
+ "query": "row var = ends_with(5, 5)",
+ "error": [
+ "Argument of [ends_with] must be [string], found value [5] type [number]",
+ "Argument of [ends_with] must be [string], found value [5] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = ends_with(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = mv_sum(\"a\")",
- "error": [
- "Argument of [mv_sum] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "from a_index | eval ends_with(stringField, stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where mv_sum(numberField) > 0",
+ "query": "from a_index | eval var = ends_with(to_string(stringField), to_string(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where mv_sum(stringField) > 0",
+ "query": "from a_index | eval ends_with(numberField, numberField)",
"error": [
- "Argument of [mv_sum] must be [number], found value [stringField] type [string]"
+ "Argument of [ends_with] must be [string], found value [numberField] type [number]",
+ "Argument of [ends_with] must be [string], found value [numberField] type [number]"
],
"warning": []
},
{
- "query": "from a_index | eval var = mv_sum(numberField)",
- "error": [],
+ "query": "from a_index | eval ends_with(stringField, stringField, extraArg)",
+ "error": [
+ "Error: [ends_with] function expects exactly 2 arguments, got 3."
+ ],
"warning": []
},
{
- "query": "from a_index | eval mv_sum(numberField)",
+ "query": "from a_index | sort ends_with(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_sum(to_integer(stringField))",
+ "query": "row var = ends_with(to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_sum(stringField)",
+ "query": "row var = ends_with(true, true)",
"error": [
- "Argument of [mv_sum] must be [number], found value [stringField] type [string]"
+ "Argument of [ends_with] must be [string], found value [true] type [boolean]",
+ "Argument of [ends_with] must be [string], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval mv_sum(numberField, extraArg)",
- "error": [
- "Error: [mv_sum] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval var = ends_with(to_string(booleanField), to_string(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_sum(*)",
+ "query": "from a_index | eval ends_with(booleanField, booleanField)",
"error": [
- "Using wildcards (*) in mv_sum is not allowed"
+ "Argument of [ends_with] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [ends_with] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | sort mv_sum(numberField)",
+ "query": "row var = floor(5)",
"error": [],
"warning": []
},
{
- "query": "row var = mv_zip(\"a\", \"a\", \"a\")",
+ "query": "row floor(5)",
"error": [],
"warning": []
},
{
- "query": "row mv_zip(\"a\", \"a\", \"a\")",
+ "query": "row var = floor(to_integer(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = mv_zip(to_string(\"a\"), to_string(\"a\"), to_string(\"a\"))",
+ "query": "row var = floor(\"a\")",
+ "error": [
+ "Argument of [floor] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where floor(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "row var = mv_zip(5, 5, 5)",
+ "query": "from a_index | where floor(stringField) > 0",
"error": [
- "Argument of [mv_zip] must be [string], found value [5] type [number]",
- "Argument of [mv_zip] must be [string], found value [5] type [number]",
- "Argument of [mv_zip] must be [string], found value [5] type [number]"
+ "Argument of [floor] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | where length(mv_zip(stringField, stringField, stringField)) > 0",
+ "query": "from a_index | eval var = floor(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(mv_zip(numberField, numberField, numberField)) > 0",
+ "query": "from a_index | eval floor(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = floor(to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval floor(stringField)",
"error": [
- "Argument of [mv_zip] must be [string], found value [numberField] type [number]",
- "Argument of [mv_zip] must be [string], found value [numberField] type [number]",
- "Argument of [mv_zip] must be [string], found value [numberField] type [number]"
+ "Argument of [floor] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = mv_zip(stringField, stringField, stringField)",
- "error": [],
+ "query": "from a_index | eval floor(numberField, extraArg)",
+ "error": [
+ "Error: [floor] function expects exactly one argument, got 2."
+ ],
"warning": []
},
{
- "query": "from a_index | eval mv_zip(stringField, stringField, stringField)",
+ "query": "from a_index | eval var = floor(*)",
+ "error": [
+ "Using wildcards (*) in floor is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort floor(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = mv_zip(to_string(stringField), to_string(stringField), to_string(stringField))",
+ "query": "row var = floor(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval mv_zip(numberField, numberField, numberField)",
+ "query": "row var = floor(true)",
"error": [
- "Argument of [mv_zip] must be [string], found value [numberField] type [number]",
- "Argument of [mv_zip] must be [string], found value [numberField] type [number]",
- "Argument of [mv_zip] must be [string], found value [numberField] type [number]"
+ "Argument of [floor] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval mv_zip(stringField, stringField, stringField, extraArg)",
+ "query": "from a_index | where floor(booleanField) > 0",
"error": [
- "Error: [mv_zip] function expects exactly 3 arguments, got 4."
+ "Argument of [floor] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | sort mv_zip(stringField, stringField, stringField)",
+ "query": "from a_index | eval var = floor(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = now()",
- "error": [],
+ "query": "from a_index | eval floor(booleanField)",
+ "error": [
+ "Argument of [floor] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row now()",
+ "query": "row var = greatest(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = now()",
+ "query": "row greatest(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval now()",
+ "query": "from a_index | eval var = greatest(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval now(extraArg)",
- "error": [
- "Error: [now] function expects exactly 0 arguments, got 1."
- ],
+ "query": "from a_index | eval greatest(stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort now()",
+ "query": "from a_index | sort greatest(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = pi()",
+ "query": "row var = greatest(true)",
"error": [],
"warning": []
},
{
- "query": "row pi()",
+ "query": "row greatest(true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where pi() > 0",
+ "query": "row var = greatest(to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = pi()",
+ "query": "row var = greatest(true, true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval pi()",
+ "query": "row greatest(true, true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval pi(extraArg)",
- "error": [
- "Error: [pi] function expects exactly 0 arguments, got 1."
- ],
+ "query": "row var = greatest(to_boolean(true), to_boolean(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort pi()",
+ "query": "row var = greatest(5, 5)",
"error": [],
"warning": []
},
{
- "query": "row var = pow(5, 5)",
+ "query": "row greatest(5, 5)",
"error": [],
"warning": []
},
{
- "query": "row pow(5, 5)",
+ "query": "row var = greatest(to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row var = pow(to_integer(\"a\"), to_integer(\"a\"))",
+ "query": "row var = greatest(5)",
"error": [],
"warning": []
},
{
- "query": "row var = pow(\"a\", \"a\")",
- "error": [
- "Argument of [pow] must be [number], found value [\"a\"] type [string]",
- "Argument of [pow] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "row greatest(5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where pow(numberField, numberField) > 0",
+ "query": "row var = greatest(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where pow(stringField, stringField) > 0",
- "error": [
- "Argument of [pow] must be [number], found value [stringField] type [string]",
- "Argument of [pow] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = greatest(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = pow(numberField, numberField)",
+ "query": "row greatest(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval pow(numberField, numberField)",
+ "query": "row var = greatest(to_ip(to_ip(\"127.0.0.1\")), to_ip(to_ip(\"127.0.0.1\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = pow(to_integer(stringField), to_integer(stringField))",
+ "query": "row var = greatest(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval pow(stringField, stringField)",
- "error": [
- "Argument of [pow] must be [number], found value [stringField] type [string]",
- "Argument of [pow] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = greatest(\"a\", \"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval pow(numberField, numberField, extraArg)",
- "error": [
- "Error: [pow] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row greatest(\"a\", \"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort pow(numberField, numberField)",
+ "query": "row var = greatest(to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "row var = replace(\"a\", \"a\", \"a\")",
+ "query": "row var = greatest(to_version(\"1.0.0\"), to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "row replace(\"a\", \"a\", \"a\")",
+ "query": "row greatest(to_version(\"1.0.0\"), to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "row var = replace(to_string(\"a\"), to_string(\"a\"), to_string(\"a\"))",
+ "query": "row var = greatest(to_version(\"a\"), to_version(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = replace(5, 5, 5)",
+ "query": "row var = greatest(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
"error": [
- "Argument of [replace] must be [string], found value [5] type [number]",
- "Argument of [replace] must be [string], found value [5] type [number]",
- "Argument of [replace] must be [string], found value [5] type [number]"
+ "Argument of [greatest] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]",
+ "Argument of [greatest] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | where length(replace(stringField, stringField, stringField)) > 0",
+ "query": "from a_index | where greatest(numberField, numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(replace(numberField, numberField, numberField)) > 0",
+ "query": "from a_index | where greatest(cartesianPointField, cartesianPointField) > 0",
"error": [
- "Argument of [replace] must be [string], found value [numberField] type [number]",
- "Argument of [replace] must be [string], found value [numberField] type [number]",
- "Argument of [replace] must be [string], found value [numberField] type [number]"
+ "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]",
+ "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | eval var = replace(stringField, stringField, stringField)",
+ "query": "from a_index | where greatest(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval replace(stringField, stringField, stringField)",
- "error": [],
+ "query": "from a_index | where greatest(cartesianPointField) > 0",
+ "error": [
+ "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval var = replace(to_string(stringField), to_string(stringField), to_string(stringField))",
+ "query": "from a_index | where length(greatest(stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval replace(numberField, numberField, numberField)",
+ "query": "from a_index | where length(greatest(cartesianPointField)) > 0",
"error": [
- "Argument of [replace] must be [string], found value [numberField] type [number]",
- "Argument of [replace] must be [string], found value [numberField] type [number]",
- "Argument of [replace] must be [string], found value [numberField] type [number]"
+ "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | eval replace(stringField, stringField, stringField, extraArg)",
- "error": [
- "Error: [replace] function expects exactly 3 arguments, got 4."
- ],
+ "query": "from a_index | where length(greatest(stringField, stringField)) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort replace(stringField, stringField, stringField)",
- "error": [],
+ "query": "from a_index | where length(greatest(cartesianPointField, cartesianPointField)) > 0",
+ "error": [
+ "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]",
+ "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
"warning": []
},
{
- "query": "row var = right(\"a\", 5)",
+ "query": "from a_index | eval var = greatest(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row right(\"a\", 5)",
+ "query": "from a_index | eval greatest(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = right(to_string(\"a\"), to_integer(\"a\"))",
+ "query": "from a_index | eval var = greatest(to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = right(5, \"a\")",
+ "query": "from a_index | eval greatest(cartesianPointField)",
"error": [
- "Argument of [right] must be [string], found value [5] type [number]",
- "Argument of [right] must be [number], found value [\"a\"] type [string]"
+ "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | where length(right(stringField, numberField)) > 0",
+ "query": "from a_index | eval var = greatest(booleanField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(right(numberField, stringField)) > 0",
- "error": [
- "Argument of [right] must be [string], found value [numberField] type [number]",
- "Argument of [right] must be [number], found value [stringField] type [string]"
- ],
- "warning": []
- },
- {
- "query": "from a_index | eval var = right(stringField, numberField)",
+ "query": "from a_index | eval greatest(booleanField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval right(stringField, numberField)",
+ "query": "from a_index | eval var = greatest(to_boolean(booleanField), to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = right(to_string(stringField), to_integer(stringField))",
- "error": [],
+ "query": "from a_index | eval greatest(cartesianPointField, cartesianPointField)",
+ "error": [
+ "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]",
+ "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval right(numberField, stringField)",
- "error": [
- "Argument of [right] must be [string], found value [numberField] type [number]",
- "Argument of [right] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = greatest(numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval right(stringField, numberField, extraArg)",
- "error": [
- "Error: [right] function expects exactly 2 arguments, got 3."
- ],
+ "query": "from a_index | eval greatest(numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort right(stringField, numberField)",
+ "query": "from a_index | eval var = greatest(to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = round(5, 5)",
+ "query": "from a_index | eval var = greatest(numberField)",
"error": [],
"warning": []
},
{
- "query": "row round(5, 5)",
+ "query": "from a_index | eval greatest(numberField)",
"error": [],
"warning": []
},
{
- "query": "row var = round(to_integer(\"a\"), to_integer(\"a\"))",
+ "query": "from a_index | eval var = greatest(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = round(\"a\", \"a\")",
- "error": [
- "Argument of [round] must be [number], found value [\"a\"] type [string]",
- "Argument of [round] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "from a_index | eval var = greatest(ipField, ipField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where round(numberField, numberField) > 0",
+ "query": "from a_index | eval greatest(ipField, ipField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where round(stringField, stringField) > 0",
- "error": [
- "Argument of [round] must be [number], found value [stringField] type [string]",
- "Argument of [round] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = greatest(to_ip(ipField), to_ip(ipField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = round(numberField, numberField)",
+ "query": "from a_index | eval var = greatest(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval round(numberField, numberField)",
+ "query": "from a_index | eval var = greatest(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = round(to_integer(stringField), to_integer(stringField))",
+ "query": "from a_index | eval greatest(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval round(stringField, stringField)",
- "error": [
- "Argument of [round] must be [number], found value [stringField] type [string]",
- "Argument of [round] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = greatest(to_string(booleanField), to_string(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval round(numberField, numberField, extraArg)",
- "error": [
- "Error: [round] function expects no more than 2 arguments, got 3."
- ],
+ "query": "from a_index | eval var = greatest(versionField, versionField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort round(numberField, numberField)",
+ "query": "from a_index | eval greatest(versionField, versionField)",
"error": [],
"warning": []
},
{
- "query": "row var = rtrim(\"a\")",
+ "query": "from a_index | eval var = greatest(to_version(stringField), to_version(stringField))",
"error": [],
"warning": []
},
{
- "query": "row rtrim(\"a\")",
+ "query": "from a_index | sort greatest(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = rtrim(to_string(\"a\"))",
+ "query": "row var = least(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row var = rtrim(5)",
- "error": [
- "Argument of [rtrim] must be [string], found value [5] type [number]"
- ],
+ "query": "row least(\"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where length(rtrim(stringField)) > 0",
+ "query": "from a_index | eval var = least(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(rtrim(numberField)) > 0",
- "error": [
- "Argument of [rtrim] must be [string], found value [numberField] type [number]"
- ],
+ "query": "from a_index | eval least(stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = rtrim(stringField)",
+ "query": "from a_index | sort least(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval rtrim(stringField)",
+ "query": "row var = least(true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = rtrim(to_string(stringField))",
+ "query": "row least(true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval rtrim(numberField)",
- "error": [
- "Argument of [rtrim] must be [string], found value [numberField] type [number]"
- ],
+ "query": "row var = least(to_boolean(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval rtrim(stringField, extraArg)",
- "error": [
- "Error: [rtrim] function expects exactly one argument, got 2."
- ],
+ "query": "row var = least(true, true)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = rtrim(*)",
- "error": [
- "Using wildcards (*) in rtrim is not allowed"
- ],
+ "query": "row least(true, true)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort rtrim(stringField)",
+ "query": "row var = least(to_boolean(true), to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "row var = signum(5)",
+ "query": "row var = least(5, 5)",
"error": [],
"warning": []
},
{
- "query": "row signum(5)",
+ "query": "row least(5, 5)",
"error": [],
"warning": []
},
{
- "query": "row var = signum(to_integer(\"a\"))",
+ "query": "row var = least(to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row var = signum(\"a\")",
- "error": [
- "Argument of [signum] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "row var = least(5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where signum(numberField) > 0",
+ "query": "row least(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where signum(stringField) > 0",
- "error": [
- "Argument of [signum] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = least(to_integer(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = signum(numberField)",
+ "query": "row var = least(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval signum(numberField)",
+ "query": "row least(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = signum(to_integer(stringField))",
+ "query": "row var = least(to_ip(to_ip(\"127.0.0.1\")), to_ip(to_ip(\"127.0.0.1\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval signum(stringField)",
- "error": [
- "Argument of [signum] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = least(to_string(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval signum(numberField, extraArg)",
- "error": [
- "Error: [signum] function expects exactly one argument, got 2."
- ],
+ "query": "row var = least(\"a\", \"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = signum(*)",
- "error": [
- "Using wildcards (*) in signum is not allowed"
- ],
+ "query": "row least(\"a\", \"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort signum(numberField)",
+ "query": "row var = least(to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "row var = sin(5)",
+ "query": "row var = least(to_version(\"1.0.0\"), to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "row sin(5)",
+ "query": "row least(to_version(\"1.0.0\"), to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "row var = sin(to_integer(\"a\"))",
+ "query": "row var = least(to_version(\"a\"), to_version(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = sin(\"a\")",
+ "query": "row var = least(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
"error": [
- "Argument of [sin] must be [number], found value [\"a\"] type [string]"
+ "Argument of [least] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]",
+ "Argument of [least] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | where sin(numberField) > 0",
+ "query": "from a_index | where least(numberField, numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | where sin(stringField) > 0",
+ "query": "from a_index | where least(cartesianPointField, cartesianPointField) > 0",
"error": [
- "Argument of [sin] must be [number], found value [stringField] type [string]"
+ "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]",
+ "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | eval var = sin(numberField)",
+ "query": "from a_index | where least(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval sin(numberField)",
- "error": [],
+ "query": "from a_index | where least(cartesianPointField) > 0",
+ "error": [
+ "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval var = sin(to_integer(stringField))",
+ "query": "from a_index | where length(least(stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval sin(stringField)",
+ "query": "from a_index | where length(least(cartesianPointField)) > 0",
"error": [
- "Argument of [sin] must be [number], found value [stringField] type [string]"
+ "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | eval sin(numberField, extraArg)",
- "error": [
- "Error: [sin] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | where length(least(stringField, stringField)) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = sin(*)",
+ "query": "from a_index | where length(least(cartesianPointField, cartesianPointField)) > 0",
"error": [
- "Using wildcards (*) in sin is not allowed"
+ "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]",
+ "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | sort sin(numberField)",
- "error": [],
- "warning": []
- },
- {
- "query": "row var = sinh(5)",
+ "query": "from a_index | eval var = least(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row sinh(5)",
+ "query": "from a_index | eval least(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = sinh(to_integer(\"a\"))",
+ "query": "from a_index | eval var = least(to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = sinh(\"a\")",
+ "query": "from a_index | eval least(cartesianPointField)",
"error": [
- "Argument of [sinh] must be [number], found value [\"a\"] type [string]"
+ "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | where sinh(numberField) > 0",
+ "query": "from a_index | eval var = least(booleanField, booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where sinh(stringField) > 0",
- "error": [
- "Argument of [sinh] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval least(booleanField, booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = sinh(numberField)",
+ "query": "from a_index | eval var = least(to_boolean(booleanField), to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval sinh(numberField)",
- "error": [],
+ "query": "from a_index | eval least(cartesianPointField, cartesianPointField)",
+ "error": [
+ "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]",
+ "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval var = sinh(to_integer(stringField))",
+ "query": "from a_index | eval var = least(numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval sinh(stringField)",
- "error": [
- "Argument of [sinh] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval least(numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval sinh(numberField, extraArg)",
- "error": [
- "Error: [sinh] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval var = least(to_integer(booleanField), to_integer(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = sinh(*)",
- "error": [
- "Using wildcards (*) in sinh is not allowed"
- ],
+ "query": "from a_index | eval var = least(numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort sinh(numberField)",
+ "query": "from a_index | eval least(numberField)",
"error": [],
"warning": []
},
{
- "query": "row var = split(\"a\", \"a\")",
+ "query": "from a_index | eval var = least(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row split(\"a\", \"a\")",
+ "query": "from a_index | eval var = least(ipField, ipField)",
"error": [],
"warning": []
},
{
- "query": "row var = split(to_string(\"a\"), to_string(\"a\"))",
+ "query": "from a_index | eval least(ipField, ipField)",
"error": [],
"warning": []
},
{
- "query": "row var = split(5, 5)",
- "error": [
- "Argument of [split] must be [string], found value [5] type [number]",
- "Argument of [split] must be [string], found value [5] type [number]"
- ],
+ "query": "from a_index | eval var = least(to_ip(ipField), to_ip(ipField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where length(split(stringField, stringField)) > 0",
+ "query": "from a_index | eval var = least(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(split(numberField, numberField)) > 0",
- "error": [
- "Argument of [split] must be [string], found value [numberField] type [number]",
- "Argument of [split] must be [string], found value [numberField] type [number]"
- ],
+ "query": "from a_index | eval var = least(stringField, stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = split(stringField, stringField)",
+ "query": "from a_index | eval least(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval split(stringField, stringField)",
+ "query": "from a_index | eval var = least(to_string(booleanField), to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = split(to_string(stringField), to_string(stringField))",
+ "query": "from a_index | eval var = least(versionField, versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval split(numberField, numberField)",
- "error": [
- "Argument of [split] must be [string], found value [numberField] type [number]",
- "Argument of [split] must be [string], found value [numberField] type [number]"
- ],
+ "query": "from a_index | eval least(versionField, versionField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval split(stringField, stringField, extraArg)",
- "error": [
- "Error: [split] function expects exactly 2 arguments, got 3."
- ],
+ "query": "from a_index | eval var = least(to_version(stringField), to_version(stringField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort split(stringField, stringField)",
+ "query": "from a_index | sort least(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = sqrt(5)",
+ "query": "row var = left(\"a\", 5)",
"error": [],
"warning": []
},
{
- "query": "row sqrt(5)",
+ "query": "row left(\"a\", 5)",
"error": [],
"warning": []
},
{
- "query": "row var = sqrt(to_integer(\"a\"))",
+ "query": "row var = left(to_string(\"a\"), to_integer(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = sqrt(\"a\")",
+ "query": "row var = left(5, \"a\")",
"error": [
- "Argument of [sqrt] must be [number], found value [\"a\"] type [string]"
+ "Argument of [left] must be [string], found value [5] type [number]",
+ "Argument of [left] must be [number], found value [\"a\"] type [string]"
],
"warning": []
},
{
- "query": "from a_index | where sqrt(numberField) > 0",
+ "query": "from a_index | where length(left(stringField, numberField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | where sqrt(stringField) > 0",
+ "query": "from a_index | where length(left(numberField, stringField)) > 0",
"error": [
- "Argument of [sqrt] must be [number], found value [stringField] type [string]"
+ "Argument of [left] must be [string], found value [numberField] type [number]",
+ "Argument of [left] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = sqrt(numberField)",
+ "query": "from a_index | eval var = left(stringField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval sqrt(numberField)",
+ "query": "from a_index | eval left(stringField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = sqrt(to_integer(stringField))",
+ "query": "from a_index | eval var = left(to_string(stringField), to_integer(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval sqrt(stringField)",
+ "query": "from a_index | eval left(numberField, stringField)",
"error": [
- "Argument of [sqrt] must be [number], found value [stringField] type [string]"
+ "Argument of [left] must be [string], found value [numberField] type [number]",
+ "Argument of [left] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval sqrt(numberField, extraArg)",
+ "query": "from a_index | eval left(stringField, numberField, extraArg)",
"error": [
- "Error: [sqrt] function expects exactly one argument, got 2."
+ "Error: [left] function expects exactly 2 arguments, got 3."
],
"warning": []
},
{
- "query": "from a_index | eval var = sqrt(*)",
- "error": [
- "Using wildcards (*) in sqrt is not allowed"
- ],
+ "query": "from a_index | sort left(stringField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort sqrt(numberField)",
+ "query": "row var = left(to_string(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row var = st_contains(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "row var = left(true, true)",
+ "error": [
+ "Argument of [left] must be [string], found value [true] type [boolean]",
+ "Argument of [left] must be [number], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row st_contains(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | where length(left(booleanField, booleanField)) > 0",
+ "error": [
+ "Argument of [left] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [left] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row var = st_contains(to_geopoint(\"a\"), to_geopoint(\"a\"))",
+ "query": "from a_index | eval var = left(to_string(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_contains(\"a\", \"a\")",
+ "query": "from a_index | eval left(booleanField, booleanField)",
"error": [
- "Argument of [st_contains] must be [geo_point], found value [\"a\"] type [string]",
- "Argument of [st_contains] must be [geo_point], found value [\"a\"] type [string]"
+ "Argument of [left] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [left] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "row var = st_contains(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "row var = length(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row st_contains(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "row length(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row var = st_contains(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "row var = length(to_string(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "row var = length(5)",
+ "error": [
+ "Argument of [length] must be [string], found value [5] type [number]"
+ ],
"warning": []
},
{
- "query": "row st_contains(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "query": "from a_index | where length(stringField) > 0",
"error": [],
"warning": []
},
{
- "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))",
- "error": [],
+ "query": "from a_index | where length(numberField) > 0",
+ "error": [
+ "Argument of [length] must be [string], found value [numberField] type [number]"
+ ],
"warning": []
},
{
- "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = length(stringField)",
"error": [],
"warning": []
},
{
- "query": "row st_contains(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval length(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = length(to_string(stringField))",
"error": [],
"warning": []
},
{
- "query": "row st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | eval length(numberField)",
+ "error": [
+ "Argument of [length] must be [string], found value [numberField] type [number]"
+ ],
"warning": []
},
{
- "query": "row var = st_contains(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))",
- "error": [],
+ "query": "from a_index | eval length(stringField, extraArg)",
+ "error": [
+ "Error: [length] function expects exactly one argument, got 2."
+ ],
"warning": []
},
{
- "query": "row var = st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | eval var = length(*)",
+ "error": [
+ "Using wildcards (*) in length is not allowed"
+ ],
"warning": []
},
{
- "query": "row st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "from a_index | sort length(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_contains(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "row var = length(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "row var = length(true)",
+ "error": [
+ "Argument of [length] must be [string], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | where length(booleanField) > 0",
+ "error": [
+ "Argument of [length] must be [string], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))",
+ "query": "from a_index | eval var = length(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | eval length(booleanField)",
+ "error": [
+ "Argument of [length] must be [string], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "row var = log(5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(geoPointField, geoPointField)",
+ "query": "row log(5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(geoPointField, geoPointField)",
+ "query": "row var = log(to_integer(\"a\"), to_integer(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(to_geopoint(stringField), to_geopoint(stringField))",
- "error": [],
+ "query": "row var = log(\"a\", \"a\")",
+ "error": [
+ "Argument of [log] must be [number], found value [\"a\"] type [string]",
+ "Argument of [log] must be [number], found value [\"a\"] type [string]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval st_contains(stringField, stringField)",
- "error": [
- "Argument of [st_contains] must be [geo_point], found value [stringField] type [string]",
- "Argument of [st_contains] must be [geo_point], found value [stringField] type [string]"
- ],
+ "query": "from a_index | where log(numberField, numberField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(geoPointField, geoPointField, extraArg)",
+ "query": "from a_index | where log(stringField, stringField) > 0",
"error": [
- "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ "Argument of [log] must be [number], found value [stringField] type [string]",
+ "Argument of [log] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(geoPointField, geoShapeField)",
+ "query": "from a_index | eval var = log(numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(geoPointField, geoShapeField)",
+ "query": "from a_index | eval log(numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(to_geopoint(stringField), geoShapeField)",
+ "query": "from a_index | eval var = log(to_integer(stringField), to_integer(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(geoPointField, geoShapeField, extraArg)",
+ "query": "from a_index | eval log(stringField, stringField)",
"error": [
- "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ "Argument of [log] must be [number], found value [stringField] type [string]",
+ "Argument of [log] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(geoShapeField, geoPointField)",
- "error": [],
+ "query": "from a_index | eval log(numberField, numberField, extraArg)",
+ "error": [
+ "Error: [log] function expects no more than 2 arguments, got 3."
+ ],
"warning": []
},
{
- "query": "from a_index | eval st_contains(geoShapeField, geoPointField)",
+ "query": "from a_index | sort log(numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(geoShapeField, to_geopoint(stringField))",
+ "query": "row var = log(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(geoShapeField, geoPointField, extraArg)",
- "error": [
- "Error: [st_contains] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row log(5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(geoShapeField, geoShapeField)",
+ "query": "row var = log(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(geoShapeField, geoShapeField)",
+ "query": "row var = log(to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(geoShapeField, geoShapeField, extraArg)",
+ "query": "row var = log(true, true)",
"error": [
- "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ "Argument of [log] must be [number], found value [true] type [boolean]",
+ "Argument of [log] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(cartesianPointField, cartesianPointField)",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | eval st_contains(cartesianPointField, cartesianPointField)",
+ "query": "from a_index | where log(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(to_cartesianpoint(stringField), to_cartesianpoint(stringField))",
- "error": [],
+ "query": "from a_index | where log(booleanField) > 0",
+ "error": [
+ "Argument of [log] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval st_contains(cartesianPointField, cartesianPointField, extraArg)",
+ "query": "from a_index | where log(booleanField, booleanField) > 0",
"error": [
- "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ "Argument of [log] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [log] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(cartesianPointField, cartesianShapeField)",
+ "query": "from a_index | eval var = log(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(cartesianPointField, cartesianShapeField)",
+ "query": "from a_index | eval log(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(to_cartesianpoint(stringField), cartesianShapeField)",
+ "query": "from a_index | eval var = log(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(cartesianPointField, cartesianShapeField, extraArg)",
+ "query": "from a_index | eval log(booleanField)",
"error": [
- "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ "Argument of [log] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(cartesianShapeField, cartesianPointField)",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | eval st_contains(cartesianShapeField, cartesianPointField)",
- "error": [],
+ "query": "from a_index | eval var = log(*)",
+ "error": [
+ "Using wildcards (*) in log is not allowed"
+ ],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(cartesianShapeField, to_cartesianpoint(stringField))",
+ "query": "from a_index | eval var = log(to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(cartesianShapeField, cartesianPointField, extraArg)",
+ "query": "from a_index | eval log(booleanField, booleanField)",
"error": [
- "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ "Argument of [log] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [log] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_contains(cartesianShapeField, cartesianShapeField)",
+ "query": "from a_index | sort log(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(cartesianShapeField, cartesianShapeField)",
+ "query": "row var = log10(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_contains(cartesianShapeField, cartesianShapeField, extraArg)",
- "error": [
- "Error: [st_contains] function expects exactly 2 arguments, got 3."
- ],
- "warning": []
- },
- {
- "query": "from a_index | sort st_contains(geoPointField, geoPointField)",
+ "query": "row log10(5)",
"error": [],
"warning": []
},
{
- "query": "row var = st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "query": "row var = log10(to_integer(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "row var = log10(\"a\")",
+ "error": [
+ "Argument of [log10] must be [number], found value [\"a\"] type [string]"
+ ],
"warning": []
},
{
- "query": "row var = st_disjoint(to_geopoint(\"a\"), to_geopoint(\"a\"))",
+ "query": "from a_index | where log10(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "row var = st_disjoint(\"a\", \"a\")",
+ "query": "from a_index | where log10(stringField) > 0",
"error": [
- "Argument of [st_disjoint] must be [geo_point], found value [\"a\"] type [string]",
- "Argument of [st_disjoint] must be [geo_point], found value [\"a\"] type [string]"
+ "Argument of [log10] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "row var = st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = log10(numberField)",
"error": [],
"warning": []
},
{
- "query": "row st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval log10(numberField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_disjoint(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = log10(to_integer(stringField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | eval log10(stringField)",
+ "error": [
+ "Argument of [log10] must be [number], found value [stringField] type [string]"
+ ],
"warning": []
},
{
- "query": "row st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | eval log10(numberField, extraArg)",
+ "error": [
+ "Error: [log10] function expects exactly one argument, got 2."
+ ],
"warning": []
},
{
- "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))",
- "error": [],
+ "query": "from a_index | eval var = log10(*)",
+ "error": [
+ "Using wildcards (*) in log10 is not allowed"
+ ],
"warning": []
},
{
- "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | sort log10(numberField)",
"error": [],
"warning": []
},
{
- "query": "row st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "row var = log10(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row var = st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "row var = log10(true)",
+ "error": [
+ "Argument of [log10] must be [number], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | where log10(booleanField) > 0",
+ "error": [
+ "Argument of [log10] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row var = st_disjoint(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))",
+ "query": "from a_index | eval var = log10(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | eval log10(booleanField)",
+ "error": [
+ "Argument of [log10] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "row var = ltrim(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row var = st_disjoint(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "row ltrim(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "row var = ltrim(to_string(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "row var = ltrim(5)",
+ "error": [
+ "Argument of [ltrim] must be [string], found value [5] type [number]"
+ ],
"warning": []
},
{
- "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))",
+ "query": "from a_index | where length(ltrim(stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | where length(ltrim(numberField)) > 0",
+ "error": [
+ "Argument of [ltrim] must be [string], found value [numberField] type [number]"
+ ],
"warning": []
},
{
- "query": "row st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = ltrim(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(geoPointField, geoPointField)",
+ "query": "from a_index | eval ltrim(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(geoPointField, geoPointField)",
+ "query": "from a_index | eval var = ltrim(to_string(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(to_geopoint(stringField), to_geopoint(stringField))",
- "error": [],
+ "query": "from a_index | eval ltrim(numberField)",
+ "error": [
+ "Argument of [ltrim] must be [string], found value [numberField] type [number]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(stringField, stringField)",
+ "query": "from a_index | eval ltrim(stringField, extraArg)",
"error": [
- "Argument of [st_disjoint] must be [geo_point], found value [stringField] type [string]",
- "Argument of [st_disjoint] must be [geo_point], found value [stringField] type [string]"
+ "Error: [ltrim] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(geoPointField, geoPointField, extraArg)",
+ "query": "from a_index | eval var = ltrim(*)",
"error": [
- "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ "Using wildcards (*) in ltrim is not allowed"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(geoPointField, geoShapeField)",
+ "query": "from a_index | sort ltrim(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(geoPointField, geoShapeField)",
+ "query": "row var = ltrim(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(to_geopoint(stringField), geoShapeField)",
- "error": [],
+ "query": "row var = ltrim(true)",
+ "error": [
+ "Argument of [ltrim] must be [string], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(geoPointField, geoShapeField, extraArg)",
+ "query": "from a_index | where length(ltrim(booleanField)) > 0",
"error": [
- "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ "Argument of [ltrim] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(geoShapeField, geoPointField)",
+ "query": "from a_index | eval var = ltrim(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(geoShapeField, geoPointField)",
- "error": [],
+ "query": "from a_index | eval ltrim(booleanField)",
+ "error": [
+ "Argument of [ltrim] must be [string], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(geoShapeField, to_geopoint(stringField))",
+ "query": "row var = mv_avg(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(geoShapeField, geoPointField, extraArg)",
- "error": [
- "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row mv_avg(5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(geoShapeField, geoShapeField)",
+ "query": "row var = mv_avg(to_integer(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(geoShapeField, geoShapeField)",
+ "query": "row var = mv_avg(\"a\")",
+ "error": [
+ "Argument of [mv_avg] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where mv_avg(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(geoShapeField, geoShapeField, extraArg)",
+ "query": "from a_index | where mv_avg(stringField) > 0",
"error": [
- "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ "Argument of [mv_avg] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(cartesianPointField, cartesianPointField)",
+ "query": "from a_index | eval var = mv_avg(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianPointField)",
+ "query": "from a_index | eval mv_avg(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(stringField), to_cartesianpoint(stringField))",
+ "query": "from a_index | eval var = mv_avg(to_integer(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianPointField, extraArg)",
+ "query": "from a_index | eval mv_avg(stringField)",
"error": [
- "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ "Argument of [mv_avg] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(cartesianPointField, cartesianShapeField)",
- "error": [],
+ "query": "from a_index | eval mv_avg(numberField, extraArg)",
+ "error": [
+ "Error: [mv_avg] function expects exactly one argument, got 2."
+ ],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField)",
+ "query": "from a_index | eval var = mv_avg(*)",
+ "error": [
+ "Using wildcards (*) in mv_avg is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort mv_avg(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(stringField), cartesianShapeField)",
+ "query": "row var = mv_avg(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField, extraArg)",
+ "query": "row var = mv_avg(true)",
"error": [
- "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ "Argument of [mv_avg] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(cartesianShapeField, cartesianPointField)",
- "error": [],
+ "query": "from a_index | where mv_avg(booleanField) > 0",
+ "error": [
+ "Argument of [mv_avg] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianPointField)",
+ "query": "from a_index | eval var = mv_avg(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(cartesianShapeField, to_cartesianpoint(stringField))",
- "error": [],
+ "query": "from a_index | eval mv_avg(booleanField)",
+ "error": [
+ "Argument of [mv_avg] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianPointField, extraArg)",
- "error": [
- "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row var = mv_concat(\"a\", \"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_disjoint(cartesianShapeField, cartesianShapeField)",
+ "query": "row mv_concat(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField)",
+ "query": "row var = mv_concat(to_string(\"a\"), to_string(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField, extraArg)",
+ "query": "row var = mv_concat(5, 5)",
"error": [
- "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ "Argument of [mv_concat] must be [string], found value [5] type [number]",
+ "Argument of [mv_concat] must be [string], found value [5] type [number]"
],
"warning": []
},
{
- "query": "from a_index | sort st_disjoint(geoPointField, geoPointField)",
+ "query": "from a_index | where length(mv_concat(stringField, stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "query": "from a_index | where length(mv_concat(numberField, numberField)) > 0",
+ "error": [
+ "Argument of [mv_concat] must be [string], found value [numberField] type [number]",
+ "Argument of [mv_concat] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = mv_concat(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "row st_intersects(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval mv_concat(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_geopoint(\"a\"), to_geopoint(\"a\"))",
+ "query": "from a_index | eval var = mv_concat(to_string(stringField), to_string(stringField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(\"a\", \"a\")",
+ "query": "from a_index | eval mv_concat(numberField, numberField)",
"error": [
- "Argument of [st_intersects] must be [geo_point], found value [\"a\"] type [string]",
- "Argument of [st_intersects] must be [geo_point], found value [\"a\"] type [string]"
+ "Argument of [mv_concat] must be [string], found value [numberField] type [number]",
+ "Argument of [mv_concat] must be [string], found value [numberField] type [number]"
],
"warning": []
},
{
- "query": "row var = st_intersects(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | eval mv_concat(stringField, stringField, extraArg)",
+ "error": [
+ "Error: [mv_concat] function expects exactly 2 arguments, got 3."
+ ],
"warning": []
},
{
- "query": "row st_intersects(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | sort mv_concat(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "row var = mv_concat(to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "row var = mv_concat(true, true)",
+ "error": [
+ "Argument of [mv_concat] must be [string], found value [true] type [boolean]",
+ "Argument of [mv_concat] must be [string], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row st_intersects(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | where length(mv_concat(booleanField, booleanField)) > 0",
+ "error": [
+ "Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))",
+ "query": "from a_index | eval var = mv_concat(to_string(booleanField), to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
- "error": [],
+ "query": "from a_index | eval mv_concat(booleanField, booleanField)",
+ "error": [
+ "Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "row st_intersects(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "row var = mv_count(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "row mv_count(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))",
+ "query": "from a_index | eval mv_count(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(*)",
+ "error": [
+ "Using wildcards (*) in mv_count is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort mv_count(stringField)",
"error": [],
"warning": []
},
{
- "query": "row st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "row var = mv_count(true)",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "row mv_count(true)",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "row var = mv_count(to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "row st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "row var = mv_count(to_cartesianpoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))",
+ "query": "row mv_count(to_cartesianpoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "row var = mv_count(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "row st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "row var = mv_count(to_cartesianshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(geoPointField, geoPointField)",
+ "query": "row mv_count(to_cartesianshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(geoPointField, geoPointField)",
+ "query": "row var = mv_count(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(to_geopoint(stringField), to_geopoint(stringField))",
+ "query": "row var = mv_count(now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(stringField, stringField)",
- "error": [
- "Argument of [st_intersects] must be [geo_point], found value [stringField] type [string]",
- "Argument of [st_intersects] must be [geo_point], found value [stringField] type [string]"
- ],
+ "query": "row mv_count(now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(geoPointField, geoPointField, extraArg)",
- "error": [
- "Error: [st_intersects] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row var = mv_count(to_datetime(now()))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(geoPointField, geoShapeField)",
+ "query": "row var = mv_count(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(geoPointField, geoShapeField)",
+ "query": "row mv_count(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(to_geopoint(stringField), geoShapeField)",
+ "query": "row var = mv_count(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(geoPointField, geoShapeField, extraArg)",
- "error": [
- "Error: [st_intersects] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row var = mv_count(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(geoShapeField, geoPointField)",
+ "query": "row mv_count(to_geopoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(geoShapeField, geoPointField)",
+ "query": "row var = mv_count(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(geoShapeField, to_geopoint(stringField))",
+ "query": "row var = mv_count(to_geoshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(geoShapeField, geoPointField, extraArg)",
- "error": [
- "Error: [st_intersects] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row mv_count(to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(geoShapeField, geoShapeField)",
+ "query": "row var = mv_count(to_geoshape(to_geopoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(geoShapeField, geoShapeField)",
+ "query": "row var = mv_count(to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(geoShapeField, geoShapeField, extraArg)",
- "error": [
- "Error: [st_intersects] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row mv_count(to_ip(\"127.0.0.1\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(cartesianPointField, cartesianPointField)",
+ "query": "row var = mv_count(to_ip(to_ip(\"127.0.0.1\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(cartesianPointField, cartesianPointField)",
+ "query": "row var = mv_count(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(to_cartesianpoint(stringField), to_cartesianpoint(stringField))",
+ "query": "row var = mv_count(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(cartesianPointField, cartesianPointField, extraArg)",
- "error": [
- "Error: [st_intersects] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row mv_count(to_version(\"1.0.0\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(cartesianPointField, cartesianShapeField)",
+ "query": "row var = mv_count(to_version(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(cartesianPointField, cartesianShapeField)",
+ "query": "from a_index | where mv_count(booleanField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(to_cartesianpoint(stringField), cartesianShapeField)",
+ "query": "from a_index | where mv_count(cartesianPointField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(cartesianPointField, cartesianShapeField, extraArg)",
- "error": [
- "Error: [st_intersects] function expects exactly 2 arguments, got 3."
- ],
+ "query": "from a_index | where mv_count(cartesianShapeField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(cartesianShapeField, cartesianPointField)",
+ "query": "from a_index | where mv_count(dateField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianPointField)",
+ "query": "from a_index | where mv_count(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(cartesianShapeField, to_cartesianpoint(stringField))",
+ "query": "from a_index | where mv_count(geoPointField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianPointField, extraArg)",
- "error": [
- "Error: [st_intersects] function expects exactly 2 arguments, got 3."
- ],
+ "query": "from a_index | where mv_count(geoShapeField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_intersects(cartesianShapeField, cartesianShapeField)",
+ "query": "from a_index | where mv_count(ipField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField)",
+ "query": "from a_index | where mv_count(stringField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField, extraArg)",
- "error": [
- "Error: [st_intersects] function expects exactly 2 arguments, got 3."
- ],
+ "query": "from a_index | where mv_count(versionField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort st_intersects(geoPointField, geoPointField)",
+ "query": "from a_index | eval var = mv_count(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval mv_count(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row st_within(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_geopoint(\"a\"), to_geopoint(\"a\"))",
+ "query": "from a_index | eval var = mv_count(cartesianPointField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(\"a\", \"a\")",
- "error": [
- "Argument of [st_within] must be [geo_point], found value [\"a\"] type [string]",
- "Argument of [st_within] must be [geo_point], found value [\"a\"] type [string]"
- ],
+ "query": "from a_index | eval mv_count(cartesianPointField)",
+ "error": [],
"warning": []
},
{
- "query": "row var = st_within(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(to_cartesianpoint(cartesianPointField))",
"error": [],
"warning": []
},
{
- "query": "row st_within(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(cartesianShapeField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval mv_count(cartesianShapeField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(to_cartesianshape(cartesianPointField))",
"error": [],
"warning": []
},
{
- "query": "row st_within(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(dateField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))",
+ "query": "from a_index | eval mv_count(dateField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "row st_within(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(numberField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval mv_count(numberField)",
"error": [],
"warning": []
},
{
- "query": "row st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))",
+ "query": "from a_index | eval var = mv_count(geoPointField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval mv_count(geoPointField)",
"error": [],
"warning": []
},
{
- "query": "row st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(to_geopoint(geoPointField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval mv_count(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "row st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(to_geoshape(geoPointField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))",
+ "query": "from a_index | eval var = mv_count(ipField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval mv_count(ipField)",
"error": [],
"warning": []
},
{
- "query": "row st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_count(to_ip(ipField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(geoPointField, geoPointField)",
+ "query": "from a_index | eval var = mv_count(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(geoPointField, geoPointField)",
+ "query": "from a_index | eval var = mv_count(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(to_geopoint(stringField), to_geopoint(stringField))",
+ "query": "from a_index | eval mv_count(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(stringField, stringField)",
- "error": [
- "Argument of [st_within] must be [geo_point], found value [stringField] type [string]",
- "Argument of [st_within] must be [geo_point], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = mv_count(to_version(stringField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(geoPointField, geoPointField, extraArg)",
+ "query": "from a_index | eval mv_count(booleanField, extraArg)",
"error": [
- "Error: [st_within] function expects exactly 2 arguments, got 3."
+ "Error: [mv_count] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(geoPointField, geoShapeField)",
- "error": [],
- "warning": []
- },
- {
- "query": "from a_index | eval st_within(geoPointField, geoShapeField)",
+ "query": "from a_index | sort mv_count(booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(to_geopoint(stringField), geoShapeField)",
+ "query": "row var = mv_dedupe(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(geoPointField, geoShapeField, extraArg)",
- "error": [
- "Error: [st_within] function expects exactly 2 arguments, got 3."
- ],
- "warning": []
- },
- {
- "query": "from a_index | eval var = st_within(geoShapeField, geoPointField)",
+ "query": "row mv_dedupe(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(geoShapeField, geoPointField)",
+ "query": "from a_index | eval var = mv_dedupe(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(geoShapeField, to_geopoint(stringField))",
+ "query": "from a_index | eval mv_dedupe(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(geoShapeField, geoPointField, extraArg)",
+ "query": "from a_index | eval var = mv_dedupe(*)",
"error": [
- "Error: [st_within] function expects exactly 2 arguments, got 3."
+ "Using wildcards (*) in mv_dedupe is not allowed"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(geoShapeField, geoShapeField)",
+ "query": "from a_index | sort mv_dedupe(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(geoShapeField, geoShapeField)",
+ "query": "row var = mv_dedupe(true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(geoShapeField, geoShapeField, extraArg)",
- "error": [
- "Error: [st_within] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row mv_dedupe(true)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(cartesianPointField, cartesianPointField)",
+ "query": "row var = mv_dedupe(to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(cartesianPointField, cartesianPointField)",
+ "query": "row var = mv_dedupe(now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(to_cartesianpoint(stringField), to_cartesianpoint(stringField))",
+ "query": "row mv_dedupe(now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(cartesianPointField, cartesianPointField, extraArg)",
- "error": [
- "Error: [st_within] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row var = mv_dedupe(to_datetime(now()))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(cartesianPointField, cartesianShapeField)",
+ "query": "row var = mv_dedupe(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(cartesianPointField, cartesianShapeField)",
+ "query": "row mv_dedupe(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(to_cartesianpoint(stringField), cartesianShapeField)",
+ "query": "row var = mv_dedupe(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(cartesianPointField, cartesianShapeField, extraArg)",
- "error": [
- "Error: [st_within] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row var = mv_dedupe(to_ip(\"127.0.0.1\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(cartesianShapeField, cartesianPointField)",
+ "query": "row mv_dedupe(to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(cartesianShapeField, cartesianPointField)",
+ "query": "row var = mv_dedupe(to_ip(to_ip(\"127.0.0.1\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(cartesianShapeField, to_cartesianpoint(stringField))",
+ "query": "row var = mv_dedupe(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(cartesianShapeField, cartesianPointField, extraArg)",
- "error": [
- "Error: [st_within] function expects exactly 2 arguments, got 3."
- ],
+ "query": "row var = mv_dedupe(to_version(\"1.0.0\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_within(cartesianShapeField, cartesianShapeField)",
+ "query": "row mv_dedupe(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(cartesianShapeField, cartesianShapeField)",
+ "query": "row var = mv_dedupe(to_version(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_within(cartesianShapeField, cartesianShapeField, extraArg)",
- "error": [
- "Error: [st_within] function expects exactly 2 arguments, got 3."
- ],
+ "query": "from a_index | where mv_dedupe(numberField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort st_within(geoPointField, geoPointField)",
+ "query": "from a_index | where length(mv_dedupe(stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "row var = st_x(to_geopoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_dedupe(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row st_x(to_geopoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval mv_dedupe(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_x(to_geopoint(\"a\"))",
+ "query": "from a_index | eval var = mv_dedupe(to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_x(\"a\")",
- "error": [
- "Argument of [st_x] must be [geo_point], found value [\"a\"] type [string]"
- ],
+ "query": "from a_index | eval var = mv_dedupe(dateField)",
+ "error": [],
"warning": []
},
{
- "query": "row var = st_x(to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval mv_dedupe(dateField)",
"error": [],
"warning": []
},
{
- "query": "row st_x(to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "from a_index | eval var = mv_dedupe(to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "row var = st_x(to_cartesianpoint(\"a\"))",
+ "query": "from a_index | eval var = mv_dedupe(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_x(geoPointField)",
+ "query": "from a_index | eval mv_dedupe(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_x(geoPointField)",
+ "query": "from a_index | eval var = mv_dedupe(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_x(to_geopoint(stringField))",
+ "query": "from a_index | eval var = mv_dedupe(ipField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_x(stringField)",
- "error": [
- "Argument of [st_x] must be [geo_point], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval mv_dedupe(ipField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval st_x(geoPointField, extraArg)",
- "error": [
- "Error: [st_x] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval var = mv_dedupe(to_ip(ipField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_x(*)",
- "error": [
- "Using wildcards (*) in st_x is not allowed"
- ],
+ "query": "from a_index | eval var = mv_dedupe(to_string(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_x(cartesianPointField)",
+ "query": "from a_index | eval var = mv_dedupe(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_x(cartesianPointField)",
+ "query": "from a_index | eval mv_dedupe(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_x(to_cartesianpoint(stringField))",
+ "query": "from a_index | eval var = mv_dedupe(to_version(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_x(cartesianPointField, extraArg)",
+ "query": "from a_index | eval mv_dedupe(booleanField, extraArg)",
"error": [
- "Error: [st_x] function expects exactly one argument, got 2."
+ "Error: [mv_dedupe] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | sort st_x(geoPointField)",
+ "query": "from a_index | sort mv_dedupe(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = st_y(to_geopoint(\"POINT (30 10)\"))",
+ "query": "row mv_dedupe(to_cartesianpoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row st_y(to_geopoint(\"POINT (30 10)\"))",
+ "query": "row var = mv_dedupe(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "row var = st_y(to_geopoint(\"a\"))",
+ "query": "row var = mv_dedupe(to_cartesianshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row var = st_y(\"a\")",
- "error": [
- "Argument of [st_y] must be [geo_point], found value [\"a\"] type [string]"
- ],
+ "query": "row mv_dedupe(to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "row var = st_y(to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "row var = mv_dedupe(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "row st_y(to_cartesianpoint(\"POINT (30 10)\"))",
+ "query": "row var = mv_dedupe(to_geopoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row var = st_y(to_cartesianpoint(\"a\"))",
+ "query": "row mv_dedupe(to_geopoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_y(geoPointField)",
+ "query": "row var = mv_dedupe(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_y(geoPointField)",
+ "query": "row var = mv_dedupe(to_geoshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_y(to_geopoint(stringField))",
+ "query": "row mv_dedupe(to_geoshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_y(stringField)",
- "error": [
- "Argument of [st_y] must be [geo_point], found value [stringField] type [string]"
- ],
+ "query": "row var = mv_dedupe(to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval st_y(geoPointField, extraArg)",
- "error": [
- "Error: [st_y] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval var = mv_dedupe(cartesianPointField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_y(*)",
- "error": [
- "Using wildcards (*) in st_y is not allowed"
- ],
+ "query": "from a_index | eval var = mv_dedupe(to_cartesianpoint(cartesianPointField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_y(cartesianPointField)",
+ "query": "from a_index | eval var = mv_dedupe(cartesianShapeField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_y(cartesianPointField)",
+ "query": "from a_index | eval mv_dedupe(cartesianShapeField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_y(to_cartesianpoint(stringField))",
+ "query": "from a_index | eval var = mv_dedupe(to_cartesianshape(cartesianPointField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval st_y(cartesianPointField, extraArg)",
- "error": [
- "Error: [st_y] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval var = mv_dedupe(geoPointField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort st_y(geoPointField)",
+ "query": "from a_index | eval mv_dedupe(geoPointField)",
"error": [],
"warning": []
},
{
- "query": "row var = starts_with(\"a\", \"a\")",
+ "query": "from a_index | eval var = mv_dedupe(to_geopoint(geoPointField))",
"error": [],
"warning": []
},
{
- "query": "row starts_with(\"a\", \"a\")",
+ "query": "from a_index | eval var = mv_dedupe(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "row var = starts_with(to_string(\"a\"), to_string(\"a\"))",
+ "query": "from a_index | eval mv_dedupe(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "row var = starts_with(5, 5)",
+ "query": "from a_index | eval var = mv_dedupe(to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval mv_dedupe(numberField, extraArg)",
"error": [
- "Argument of [starts_with] must be [string], found value [5] type [number]",
- "Argument of [starts_with] must be [string], found value [5] type [number]"
+ "Error: [mv_dedupe] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | eval var = starts_with(stringField, stringField)",
+ "query": "from a_index | sort mv_dedupe(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval starts_with(stringField, stringField)",
+ "query": "row var = mv_first(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = starts_with(to_string(stringField), to_string(stringField))",
+ "query": "row mv_first(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval starts_with(numberField, numberField)",
- "error": [
- "Argument of [starts_with] must be [string], found value [numberField] type [number]",
- "Argument of [starts_with] must be [string], found value [numberField] type [number]"
- ],
+ "query": "from a_index | eval var = mv_first(stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval starts_with(stringField, stringField, extraArg)",
+ "query": "from a_index | eval mv_first(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = mv_first(*)",
"error": [
- "Error: [starts_with] function expects exactly 2 arguments, got 3."
+ "Using wildcards (*) in mv_first is not allowed"
],
"warning": []
},
{
- "query": "from a_index | sort starts_with(stringField, stringField)",
+ "query": "from a_index | sort mv_first(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = substring(\"a\", 5, 5)",
+ "query": "row var = mv_first(true)",
"error": [],
"warning": []
},
{
- "query": "row substring(\"a\", 5, 5)",
+ "query": "row mv_first(true)",
"error": [],
"warning": []
},
{
- "query": "row var = substring(to_string(\"a\"), to_integer(\"a\"), to_integer(\"a\"))",
+ "query": "row var = mv_first(to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "row var = substring(5, \"a\", \"a\")",
- "error": [
- "Argument of [substring] must be [string], found value [5] type [number]",
- "Argument of [substring] must be [number], found value [\"a\"] type [string]",
- "Argument of [substring] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "row var = mv_first(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where length(substring(stringField, numberField, numberField)) > 0",
+ "query": "row mv_first(to_cartesianpoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(substring(numberField, stringField, stringField)) > 0",
- "error": [
- "Argument of [substring] must be [string], found value [numberField] type [number]",
- "Argument of [substring] must be [number], found value [stringField] type [string]",
- "Argument of [substring] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = mv_first(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = substring(stringField, numberField, numberField)",
+ "query": "row var = mv_first(to_cartesianshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval substring(stringField, numberField, numberField)",
+ "query": "row mv_first(to_cartesianshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = substring(to_string(stringField), to_integer(stringField), to_integer(stringField))",
+ "query": "row var = mv_first(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval substring(numberField, stringField, stringField)",
- "error": [
- "Argument of [substring] must be [string], found value [numberField] type [number]",
- "Argument of [substring] must be [number], found value [stringField] type [string]",
- "Argument of [substring] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = mv_first(now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval substring(stringField, numberField, numberField, extraArg)",
- "error": [
- "Error: [substring] function expects exactly 3 arguments, got 4."
- ],
+ "query": "row mv_first(now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort substring(stringField, numberField, numberField)",
+ "query": "row var = mv_first(to_datetime(now()))",
"error": [],
"warning": []
},
{
- "query": "row var = tan(5)",
+ "query": "row var = mv_first(5)",
"error": [],
"warning": []
},
{
- "query": "row tan(5)",
+ "query": "row mv_first(5)",
"error": [],
"warning": []
},
{
- "query": "row var = tan(to_integer(\"a\"))",
+ "query": "row var = mv_first(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row var = tan(\"a\")",
- "error": [
- "Argument of [tan] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "row var = mv_first(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where tan(numberField) > 0",
+ "query": "row mv_first(to_geopoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where tan(stringField) > 0",
- "error": [
- "Argument of [tan] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = mv_first(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = tan(numberField)",
+ "query": "row var = mv_first(to_geoshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval tan(numberField)",
+ "query": "row mv_first(to_geoshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = tan(to_integer(stringField))",
+ "query": "row var = mv_first(to_geoshape(to_geopoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval tan(stringField)",
- "error": [
- "Argument of [tan] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = mv_first(to_ip(\"127.0.0.1\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval tan(numberField, extraArg)",
- "error": [
- "Error: [tan] function expects exactly one argument, got 2."
- ],
+ "query": "row mv_first(to_ip(\"127.0.0.1\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = tan(*)",
- "error": [
- "Using wildcards (*) in tan is not allowed"
- ],
+ "query": "row var = mv_first(to_ip(to_ip(\"127.0.0.1\")))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort tan(numberField)",
+ "query": "row var = mv_first(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "row var = tanh(5)",
+ "query": "row var = mv_first(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "row tanh(5)",
+ "query": "row mv_first(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "row var = tanh(to_integer(\"a\"))",
+ "query": "row var = mv_first(to_version(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = tanh(\"a\")",
- "error": [
- "Argument of [tanh] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "from a_index | where mv_first(numberField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where tanh(numberField) > 0",
+ "query": "from a_index | where length(mv_first(stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | where tanh(stringField) > 0",
- "error": [
- "Argument of [tanh] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = mv_first(booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = tanh(numberField)",
+ "query": "from a_index | eval mv_first(booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval tanh(numberField)",
+ "query": "from a_index | eval var = mv_first(to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = tanh(to_integer(stringField))",
+ "query": "from a_index | eval var = mv_first(cartesianPointField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval tanh(stringField)",
- "error": [
- "Argument of [tanh] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval mv_first(cartesianPointField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval tanh(numberField, extraArg)",
- "error": [
- "Error: [tanh] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | eval var = mv_first(to_cartesianpoint(cartesianPointField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = tanh(*)",
- "error": [
- "Using wildcards (*) in tanh is not allowed"
- ],
+ "query": "from a_index | eval var = mv_first(cartesianShapeField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort tanh(numberField)",
+ "query": "from a_index | eval mv_first(cartesianShapeField)",
"error": [],
"warning": []
},
{
- "query": "row var = tau()",
+ "query": "from a_index | eval var = mv_first(to_cartesianshape(cartesianPointField))",
"error": [],
"warning": []
},
{
- "query": "row tau()",
+ "query": "from a_index | eval var = mv_first(dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where tau() > 0",
+ "query": "from a_index | eval mv_first(dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = tau()",
+ "query": "from a_index | eval var = mv_first(to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval tau()",
+ "query": "from a_index | eval var = mv_first(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval tau(extraArg)",
- "error": [
- "Error: [tau] function expects exactly 0 arguments, got 1."
- ],
+ "query": "from a_index | eval mv_first(numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort tau()",
+ "query": "from a_index | eval var = mv_first(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = to_boolean(\"a\")",
+ "query": "from a_index | eval var = mv_first(geoPointField)",
"error": [],
"warning": []
},
{
- "query": "row to_boolean(\"a\")",
+ "query": "from a_index | eval mv_first(geoPointField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_bool(\"a\")",
+ "query": "from a_index | eval var = mv_first(to_geopoint(geoPointField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_boolean(stringField)",
+ "query": "from a_index | eval var = mv_first(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_boolean(stringField)",
+ "query": "from a_index | eval mv_first(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_bool(stringField)",
+ "query": "from a_index | eval var = mv_first(to_geoshape(geoPointField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_boolean(*)",
- "error": [
- "Using wildcards (*) in to_boolean is not allowed"
- ],
+ "query": "from a_index | eval var = mv_first(ipField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort to_boolean(stringField)",
+ "query": "from a_index | eval mv_first(ipField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_cartesianpoint(\"a\")",
+ "query": "from a_index | eval var = mv_first(to_ip(ipField))",
"error": [],
"warning": []
},
{
- "query": "row to_cartesianpoint(\"a\")",
+ "query": "from a_index | eval var = mv_first(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_cartesianpoint(stringField)",
+ "query": "from a_index | eval var = mv_first(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_cartesianpoint(stringField)",
+ "query": "from a_index | eval mv_first(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_cartesianpoint(*)",
+ "query": "from a_index | eval var = mv_first(to_version(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval mv_first(booleanField, extraArg)",
"error": [
- "Using wildcards (*) in to_cartesianpoint is not allowed"
+ "Error: [mv_first] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | sort to_cartesianpoint(stringField)",
+ "query": "from a_index | sort mv_first(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_cartesianshape(\"a\")",
+ "query": "row var = mv_last(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row to_cartesianshape(\"a\")",
+ "query": "row mv_last(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_cartesianshape(stringField)",
+ "query": "from a_index | eval var = mv_last(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_cartesianshape(stringField)",
+ "query": "from a_index | eval mv_last(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_cartesianshape(*)",
+ "query": "from a_index | eval var = mv_last(*)",
"error": [
- "Using wildcards (*) in to_cartesianshape is not allowed"
+ "Using wildcards (*) in mv_last is not allowed"
],
"warning": []
},
{
- "query": "from a_index | sort to_cartesianshape(stringField)",
+ "query": "from a_index | sort mv_last(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_datetime(\"a\")",
+ "query": "row var = mv_last(true)",
"error": [],
"warning": []
},
{
- "query": "row to_datetime(\"a\")",
+ "query": "row mv_last(true)",
"error": [],
"warning": []
},
{
- "query": "row var = to_dt(\"a\")",
+ "query": "row var = mv_last(to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_datetime(stringField)",
+ "query": "row var = mv_last(to_cartesianpoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_datetime(stringField)",
+ "query": "row mv_last(to_cartesianpoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_dt(stringField)",
+ "query": "row var = mv_last(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_datetime(*)",
- "error": [
- "Using wildcards (*) in to_datetime is not allowed"
- ],
- "warning": []
- },
- {
- "query": "from a_index | sort to_datetime(stringField)",
+ "query": "row var = mv_last(to_cartesianshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row var = to_degrees(5)",
+ "query": "row mv_last(to_cartesianshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row to_degrees(5)",
+ "query": "row var = mv_last(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "row var = to_degrees(to_integer(\"a\"))",
+ "query": "row var = mv_last(now())",
"error": [],
"warning": []
},
{
- "query": "row var = to_degrees(\"a\")",
- "error": [
- "Argument of [to_degrees] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "row mv_last(now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where to_degrees(numberField) > 0",
+ "query": "row var = mv_last(to_datetime(now()))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where to_degrees(stringField) > 0",
- "error": [
- "Argument of [to_degrees] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = mv_last(5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_degrees(numberField)",
+ "query": "row mv_last(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_degrees(numberField)",
+ "query": "row var = mv_last(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_degrees(to_integer(stringField))",
+ "query": "row var = mv_last(to_geopoint(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_degrees(stringField)",
- "error": [
- "Argument of [to_degrees] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row mv_last(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval to_degrees(numberField, extraArg)",
- "error": [
- "Error: [to_degrees] function expects exactly one argument, got 2."
- ],
+ "query": "row var = mv_last(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_degrees(*)",
- "error": [
- "Using wildcards (*) in to_degrees is not allowed"
- ],
+ "query": "row var = mv_last(to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort to_degrees(numberField)",
+ "query": "row mv_last(to_geoshape(\"POINT (30 10)\"))",
"error": [],
"warning": []
},
{
- "query": "row var = to_double(\"a\")",
+ "query": "row var = mv_last(to_geoshape(to_geopoint(\"POINT (30 10)\")))",
"error": [],
"warning": []
},
{
- "query": "row to_double(\"a\")",
+ "query": "row var = mv_last(to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "row var = to_dbl(\"a\")",
+ "query": "row mv_last(to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_double(stringField)",
+ "query": "row var = mv_last(to_ip(to_ip(\"127.0.0.1\")))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_double(stringField)",
+ "query": "row var = mv_last(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_dbl(stringField)",
+ "query": "row var = mv_last(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_double(*)",
- "error": [
- "Using wildcards (*) in to_double is not allowed"
- ],
+ "query": "row mv_last(to_version(\"1.0.0\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort to_double(stringField)",
+ "query": "row var = mv_last(to_version(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = to_geopoint(\"a\")",
+ "query": "from a_index | where mv_last(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "row to_geopoint(\"a\")",
+ "query": "from a_index | where length(mv_last(stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_geopoint(stringField)",
+ "query": "from a_index | eval var = mv_last(booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_geopoint(stringField)",
+ "query": "from a_index | eval mv_last(booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_geopoint(*)",
- "error": [
- "Using wildcards (*) in to_geopoint is not allowed"
- ],
+ "query": "from a_index | eval var = mv_last(to_boolean(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort to_geopoint(stringField)",
+ "query": "from a_index | eval var = mv_last(cartesianPointField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_geoshape(\"a\")",
+ "query": "from a_index | eval mv_last(cartesianPointField)",
"error": [],
"warning": []
},
{
- "query": "row to_geoshape(\"a\")",
+ "query": "from a_index | eval var = mv_last(to_cartesianpoint(cartesianPointField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_geoshape(stringField)",
+ "query": "from a_index | eval var = mv_last(cartesianShapeField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_geoshape(stringField)",
+ "query": "from a_index | eval mv_last(cartesianShapeField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_geoshape(*)",
- "error": [
- "Using wildcards (*) in to_geoshape is not allowed"
- ],
+ "query": "from a_index | eval var = mv_last(to_cartesianshape(cartesianPointField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort to_geoshape(stringField)",
+ "query": "from a_index | eval var = mv_last(dateField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_integer(\"a\")",
+ "query": "from a_index | eval mv_last(dateField)",
"error": [],
"warning": []
},
{
- "query": "row to_integer(\"a\")",
+ "query": "from a_index | eval var = mv_last(to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "row var = to_int(\"a\")",
+ "query": "from a_index | eval var = mv_last(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_integer(stringField)",
+ "query": "from a_index | eval mv_last(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_integer(stringField)",
+ "query": "from a_index | eval var = mv_last(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_int(stringField)",
+ "query": "from a_index | eval var = mv_last(geoPointField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_integer(*)",
- "error": [
- "Using wildcards (*) in to_integer is not allowed"
- ],
+ "query": "from a_index | eval mv_last(geoPointField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort to_integer(stringField)",
+ "query": "from a_index | eval var = mv_last(to_geopoint(geoPointField))",
"error": [],
"warning": []
},
{
- "query": "row var = to_ip(\"a\")",
+ "query": "from a_index | eval var = mv_last(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "row to_ip(\"a\")",
+ "query": "from a_index | eval mv_last(geoShapeField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_ip(stringField)",
+ "query": "from a_index | eval var = mv_last(to_geoshape(geoPointField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_ip(stringField)",
+ "query": "from a_index | eval var = mv_last(ipField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_ip(*)",
- "error": [
- "Using wildcards (*) in to_ip is not allowed"
- ],
+ "query": "from a_index | eval mv_last(ipField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort to_ip(stringField)",
+ "query": "from a_index | eval var = mv_last(to_ip(ipField))",
"error": [],
"warning": []
},
{
- "query": "row var = to_long(\"a\")",
+ "query": "from a_index | eval var = mv_last(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row to_long(\"a\")",
+ "query": "from a_index | eval var = mv_last(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_long(stringField)",
+ "query": "from a_index | eval mv_last(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_long(stringField)",
+ "query": "from a_index | eval var = mv_last(to_version(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_long(*)",
+ "query": "from a_index | eval mv_last(booleanField, extraArg)",
"error": [
- "Using wildcards (*) in to_long is not allowed"
+ "Error: [mv_last] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | sort to_long(stringField)",
+ "query": "from a_index | sort mv_last(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_lower(\"a\")",
+ "query": "row var = mv_max(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row to_lower(\"a\")",
+ "query": "row mv_max(\"a\")",
"error": [],
"warning": []
},
{
- "query": "row var = to_lower(to_string(\"a\"))",
+ "query": "from a_index | eval var = mv_max(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_lower(5)",
+ "query": "from a_index | eval mv_max(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = mv_max(*)",
"error": [
- "Argument of [to_lower] must be [string], found value [5] type [number]"
+ "Using wildcards (*) in mv_max is not allowed"
],
"warning": []
},
{
- "query": "from a_index | where length(to_lower(stringField)) > 0",
+ "query": "from a_index | sort mv_max(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(to_lower(numberField)) > 0",
- "error": [
- "Argument of [to_lower] must be [string], found value [numberField] type [number]"
- ],
+ "query": "row var = mv_max(true)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_lower(stringField)",
+ "query": "row mv_max(true)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_lower(stringField)",
+ "query": "row var = mv_max(to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_lower(to_string(stringField))",
+ "query": "row var = mv_max(now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_lower(numberField)",
- "error": [
- "Argument of [to_lower] must be [string], found value [numberField] type [number]"
- ],
+ "query": "row mv_max(now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval to_lower(stringField, extraArg)",
- "error": [
- "Error: [to_lower] function expects exactly one argument, got 2."
- ],
+ "query": "row var = mv_max(to_datetime(now()))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_lower(*)",
- "error": [
- "Using wildcards (*) in to_lower is not allowed"
- ],
+ "query": "row var = mv_max(5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort to_lower(stringField)",
+ "query": "row mv_max(5)",
"error": [],
"warning": []
},
{
- "query": "row var = to_radians(5)",
+ "query": "row var = mv_max(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row to_radians(5)",
+ "query": "row var = mv_max(to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "row var = to_radians(to_integer(\"a\"))",
+ "query": "row mv_max(to_ip(\"127.0.0.1\"))",
"error": [],
"warning": []
},
{
- "query": "row var = to_radians(\"a\")",
- "error": [
- "Argument of [to_radians] must be [number], found value [\"a\"] type [string]"
- ],
+ "query": "row var = mv_max(to_ip(to_ip(\"127.0.0.1\")))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where to_radians(numberField) > 0",
+ "query": "row var = mv_max(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | where to_radians(stringField) > 0",
- "error": [
- "Argument of [to_radians] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = mv_max(to_version(\"1.0.0\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_radians(numberField)",
+ "query": "row mv_max(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_radians(numberField)",
+ "query": "row var = mv_max(to_version(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_radians(to_integer(stringField))",
+ "query": "row var = mv_max(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [
+ "Argument of [mv_max] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where mv_max(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_radians(stringField)",
+ "query": "from a_index | where mv_max(cartesianPointField) > 0",
"error": [
- "Argument of [to_radians] must be [number], found value [stringField] type [string]"
+ "Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | eval to_radians(numberField, extraArg)",
- "error": [
- "Error: [to_radians] function expects exactly one argument, got 2."
- ],
+ "query": "from a_index | where length(mv_max(stringField)) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_radians(*)",
+ "query": "from a_index | where length(mv_max(cartesianPointField)) > 0",
"error": [
- "Using wildcards (*) in to_radians is not allowed"
+ "Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
],
"warning": []
},
{
- "query": "from a_index | sort to_radians(numberField)",
+ "query": "from a_index | eval var = mv_max(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_string(\"a\")",
+ "query": "from a_index | eval mv_max(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row to_string(\"a\")",
+ "query": "from a_index | eval var = mv_max(to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = to_str(\"a\")",
+ "query": "from a_index | eval mv_max(cartesianPointField)",
+ "error": [
+ "Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = mv_max(dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_string(stringField)",
+ "query": "from a_index | eval mv_max(dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_string(stringField)",
+ "query": "from a_index | eval var = mv_max(to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_str(stringField)",
+ "query": "from a_index | eval var = mv_max(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_string(*)",
- "error": [
- "Using wildcards (*) in to_string is not allowed"
- ],
- "warning": []
- },
- {
- "query": "from a_index | sort to_string(stringField)",
+ "query": "from a_index | eval mv_max(numberField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_unsigned_long(\"a\")",
+ "query": "from a_index | eval var = mv_max(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row to_unsigned_long(\"a\")",
+ "query": "from a_index | eval var = mv_max(ipField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_ul(\"a\")",
+ "query": "from a_index | eval mv_max(ipField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_ulong(\"a\")",
+ "query": "from a_index | eval var = mv_max(to_ip(ipField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_unsigned_long(stringField)",
+ "query": "from a_index | eval var = mv_max(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_unsigned_long(stringField)",
+ "query": "from a_index | eval var = mv_max(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_ul(stringField)",
+ "query": "from a_index | eval mv_max(versionField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_ulong(stringField)",
+ "query": "from a_index | eval var = mv_max(to_version(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_unsigned_long(*)",
+ "query": "from a_index | eval mv_max(booleanField, extraArg)",
"error": [
- "Using wildcards (*) in to_unsigned_long is not allowed"
+ "Error: [mv_max] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | sort to_unsigned_long(stringField)",
+ "query": "from a_index | sort mv_max(booleanField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_upper(\"a\")",
+ "query": "row var = mv_median(5)",
"error": [],
"warning": []
},
{
- "query": "row to_upper(\"a\")",
+ "query": "row mv_median(5)",
"error": [],
"warning": []
},
{
- "query": "row var = to_upper(to_string(\"a\"))",
+ "query": "row var = mv_median(to_integer(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "row var = to_upper(5)",
+ "query": "row var = mv_median(\"a\")",
"error": [
- "Argument of [to_upper] must be [string], found value [5] type [number]"
+ "Argument of [mv_median] must be [number], found value [\"a\"] type [string]"
],
"warning": []
},
{
- "query": "from a_index | where length(to_upper(stringField)) > 0",
+ "query": "from a_index | where mv_median(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(to_upper(numberField)) > 0",
+ "query": "from a_index | where mv_median(stringField) > 0",
"error": [
- "Argument of [to_upper] must be [string], found value [numberField] type [number]"
+ "Argument of [mv_median] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = to_upper(stringField)",
+ "query": "from a_index | eval var = mv_median(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_upper(stringField)",
+ "query": "from a_index | eval mv_median(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_upper(to_string(stringField))",
+ "query": "from a_index | eval var = mv_median(to_integer(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_upper(numberField)",
+ "query": "from a_index | eval mv_median(stringField)",
"error": [
- "Argument of [to_upper] must be [string], found value [numberField] type [number]"
+ "Argument of [mv_median] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval to_upper(stringField, extraArg)",
+ "query": "from a_index | eval mv_median(numberField, extraArg)",
"error": [
- "Error: [to_upper] function expects exactly one argument, got 2."
+ "Error: [mv_median] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | eval var = to_upper(*)",
+ "query": "from a_index | eval var = mv_median(*)",
"error": [
- "Using wildcards (*) in to_upper is not allowed"
+ "Using wildcards (*) in mv_median is not allowed"
],
"warning": []
},
{
- "query": "from a_index | sort to_upper(stringField)",
+ "query": "from a_index | sort mv_median(numberField)",
"error": [],
"warning": []
},
{
- "query": "row var = to_version(\"a\")",
+ "query": "row var = mv_median(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "row to_version(\"a\")",
+ "query": "row var = mv_median(true)",
+ "error": [
+ "Argument of [mv_median] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where mv_median(booleanField) > 0",
+ "error": [
+ "Argument of [mv_median] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = mv_median(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "row var = to_ver(\"a\")",
+ "query": "from a_index | eval mv_median(booleanField)",
+ "error": [
+ "Argument of [mv_median] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = mv_min(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_version(stringField)",
+ "query": "row mv_min(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval to_version(stringField)",
+ "query": "from a_index | eval var = mv_min(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_ver(stringField)",
+ "query": "from a_index | eval mv_min(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = to_version(*)",
+ "query": "from a_index | eval var = mv_min(*)",
"error": [
- "Using wildcards (*) in to_version is not allowed"
+ "Using wildcards (*) in mv_min is not allowed"
],
"warning": []
},
{
- "query": "from a_index | sort to_version(stringField)",
+ "query": "from a_index | sort mv_min(stringField)",
"error": [],
"warning": []
},
{
- "query": "row var = trim(\"a\")",
+ "query": "row var = mv_min(true)",
"error": [],
"warning": []
},
{
- "query": "row trim(\"a\")",
+ "query": "row mv_min(true)",
"error": [],
"warning": []
},
{
- "query": "row var = trim(to_string(\"a\"))",
+ "query": "row var = mv_min(to_boolean(true))",
"error": [],
"warning": []
},
{
- "query": "row var = trim(5)",
- "error": [
- "Argument of [trim] must be [string], found value [5] type [number]"
- ],
+ "query": "row var = mv_min(now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where length(trim(stringField)) > 0",
+ "query": "row mv_min(now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | where length(trim(numberField)) > 0",
- "error": [
- "Argument of [trim] must be [string], found value [numberField] type [number]"
- ],
+ "query": "row var = mv_min(to_datetime(now()))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = trim(stringField)",
+ "query": "row var = mv_min(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval trim(stringField)",
+ "query": "row mv_min(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval var = trim(to_string(stringField))",
+ "query": "row var = mv_min(to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | eval trim(numberField)",
- "error": [
- "Argument of [trim] must be [string], found value [numberField] type [number]"
- ],
+ "query": "row var = mv_min(to_ip(\"127.0.0.1\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval trim(stringField, extraArg)",
- "error": [
- "Error: [trim] function expects exactly one argument, got 2."
- ],
+ "query": "row mv_min(to_ip(\"127.0.0.1\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = trim(*)",
- "error": [
- "Using wildcards (*) in trim is not allowed"
- ],
+ "query": "row var = mv_min(to_ip(to_ip(\"127.0.0.1\")))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort trim(stringField)",
+ "query": "row var = mv_min(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = avg(numberField)",
+ "query": "row var = mv_min(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField)",
+ "query": "row mv_min(to_version(\"1.0.0\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(avg(numberField))",
+ "query": "row var = mv_min(to_version(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(avg(numberField))",
- "error": [],
+ "query": "row var = mv_min(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [
+ "Argument of [mv_min] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats var = round(avg(numberField)) + avg(numberField)",
+ "query": "from a_index | where mv_min(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(avg(numberField)) + avg(numberField)",
- "error": [],
+ "query": "from a_index | where mv_min(cartesianPointField) > 0",
+ "error": [
+ "Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField / 2)",
+ "query": "from a_index | where length(mv_min(stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = avg(numberField / 2)",
- "error": [],
+ "query": "from a_index | where length(mv_min(cartesianPointField)) > 0",
+ "error": [
+ "Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), avg(numberField / 2)",
+ "query": "from a_index | eval var = mv_min(booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = avg(numberField / 2)",
+ "query": "from a_index | eval mv_min(booleanField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = avg(numberField)",
+ "query": "from a_index | eval var = mv_min(to_boolean(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), avg(numberField)",
- "error": [],
+ "query": "from a_index | eval mv_min(cartesianPointField)",
+ "error": [
+ "Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = avg(numberField)",
+ "query": "from a_index | eval var = mv_min(dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField) by round(numberField / 2)",
+ "query": "from a_index | eval mv_min(dateField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = avg(numberField) by var1 = round(numberField / 2)",
+ "query": "from a_index | eval var = mv_min(to_datetime(dateField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), avg(numberField) by round(numberField / 2), ipField",
+ "query": "from a_index | eval var = mv_min(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = avg(numberField) by var1 = round(numberField / 2), ipField",
+ "query": "from a_index | eval mv_min(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), avg(numberField) by round(numberField / 2), numberField / 2",
+ "query": "from a_index | eval var = mv_min(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = avg(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "query": "from a_index | eval var = mv_min(ipField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = avg(avg(numberField))",
- "error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
- ],
+ "query": "from a_index | eval mv_min(ipField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(avg(numberField))",
- "error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
- ],
+ "query": "from a_index | eval var = mv_min(to_ip(ipField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(stringField)",
- "error": [
- "Argument of [avg] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval var = mv_min(to_string(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = avg(*)",
- "error": [
- "Using wildcards (*) in avg is not allowed"
- ],
+ "query": "from a_index | eval var = mv_min(versionField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort avg(numberField)",
- "error": [
- "SORT does not support function avg"
- ],
+ "query": "from a_index | eval mv_min(versionField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where avg(numberField)",
- "error": [
- "WHERE does not support function avg"
- ],
+ "query": "from a_index | eval var = mv_min(to_version(stringField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where avg(numberField) > 0",
+ "query": "from a_index | eval mv_min(booleanField, extraArg)",
"error": [
- "WHERE does not support function avg"
+ "Error: [mv_min] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | eval var = avg(numberField)",
- "error": [
- "EVAL does not support function avg"
- ],
+ "query": "from a_index | sort mv_min(booleanField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = avg(numberField) > 0",
- "error": [
- "EVAL does not support function avg"
- ],
+ "query": "row var = mv_slice(\"a\", 5, 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval avg(numberField)",
- "error": [
- "EVAL does not support function avg"
- ],
+ "query": "row mv_slice(\"a\", 5, 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval avg(numberField) > 0",
- "error": [
- "EVAL does not support function avg"
- ],
+ "query": "from a_index | eval var = mv_slice(stringField, numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = sum(numberField)",
+ "query": "from a_index | eval mv_slice(stringField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats sum(numberField)",
+ "query": "from a_index | sort mv_slice(stringField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(sum(numberField))",
+ "query": "row var = mv_slice(true, 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(sum(numberField))",
+ "query": "row mv_slice(true, 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(sum(numberField)) + sum(numberField)",
+ "query": "row var = mv_slice(to_boolean(true), to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(sum(numberField)) + sum(numberField)",
+ "query": "row var = mv_slice(to_cartesianpoint(\"POINT (30 10)\"), 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats sum(numberField / 2)",
+ "query": "row mv_slice(to_cartesianpoint(\"POINT (30 10)\"), 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = sum(numberField / 2)",
+ "query": "row var = mv_slice(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), sum(numberField / 2)",
+ "query": "row var = mv_slice(to_cartesianshape(\"POINT (30 10)\"), 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = sum(numberField / 2)",
+ "query": "row mv_slice(to_cartesianshape(\"POINT (30 10)\"), 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = sum(numberField)",
+ "query": "row var = mv_slice(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), sum(numberField)",
+ "query": "row var = mv_slice(now(), 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = sum(numberField)",
+ "query": "row mv_slice(now(), 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats sum(numberField) by round(numberField / 2)",
+ "query": "row var = mv_slice(to_datetime(now()), to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = sum(numberField) by var1 = round(numberField / 2)",
+ "query": "row var = mv_slice(5, 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), sum(numberField) by round(numberField / 2), ipField",
+ "query": "row mv_slice(5, 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = sum(numberField) by var1 = round(numberField / 2), ipField",
+ "query": "row var = mv_slice(to_integer(true), to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), sum(numberField) by round(numberField / 2), numberField / 2",
+ "query": "row var = mv_slice(to_geopoint(\"POINT (30 10)\"), 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = sum(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "query": "row mv_slice(to_geopoint(\"POINT (30 10)\"), 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = sum(avg(numberField))",
- "error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
- ],
+ "query": "row var = mv_slice(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_integer(true), to_integer(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats sum(avg(numberField))",
- "error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
- ],
+ "query": "row var = mv_slice(to_geoshape(\"POINT (30 10)\"), 5, 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats sum(stringField)",
- "error": [
- "Argument of [sum] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row mv_slice(to_geoshape(\"POINT (30 10)\"), 5, 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = sum(*)",
- "error": [
- "Using wildcards (*) in sum is not allowed"
- ],
+ "query": "row var = mv_slice(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_integer(true), to_integer(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort sum(numberField)",
- "error": [
- "SORT does not support function sum"
- ],
+ "query": "row var = mv_slice(to_ip(\"127.0.0.1\"), 5, 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where sum(numberField)",
- "error": [
- "WHERE does not support function sum"
- ],
+ "query": "row mv_slice(to_ip(\"127.0.0.1\"), 5, 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where sum(numberField) > 0",
- "error": [
- "WHERE does not support function sum"
- ],
+ "query": "row var = mv_slice(to_ip(to_ip(\"127.0.0.1\")), to_integer(true), to_integer(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = sum(numberField)",
- "error": [
- "EVAL does not support function sum"
- ],
+ "query": "row var = mv_slice(to_string(true), to_integer(true), to_integer(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = sum(numberField) > 0",
+ "query": "row var = mv_slice(to_version(\"1.0.0\"), 5, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row mv_slice(to_version(\"1.0.0\"), 5, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = mv_slice(to_version(\"a\"), to_integer(true), to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = mv_slice(to_version(\"1.0.0\"), true, true)",
"error": [
- "EVAL does not support function sum"
+ "Argument of [mv_slice] must be [number], found value [true] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval sum(numberField)",
+ "query": "from a_index | where mv_slice(numberField, numberField, numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where mv_slice(numberField, booleanField, booleanField) > 0",
"error": [
- "EVAL does not support function sum"
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval sum(numberField) > 0",
+ "query": "from a_index | where length(mv_slice(stringField, numberField, numberField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(mv_slice(stringField, booleanField, booleanField)) > 0",
"error": [
- "EVAL does not support function sum"
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats var = median(numberField)",
+ "query": "from a_index | eval var = mv_slice(booleanField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats median(numberField)",
+ "query": "from a_index | eval mv_slice(booleanField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(median(numberField))",
+ "query": "from a_index | eval var = mv_slice(to_boolean(booleanField), to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(median(numberField))",
- "error": [],
+ "query": "from a_index | eval mv_slice(booleanField, booleanField, booleanField)",
+ "error": [
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats var = round(median(numberField)) + median(numberField)",
+ "query": "from a_index | eval var = mv_slice(cartesianPointField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(median(numberField)) + median(numberField)",
+ "query": "from a_index | eval mv_slice(cartesianPointField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats median(numberField / 2)",
+ "query": "from a_index | eval var = mv_slice(to_cartesianpoint(cartesianPointField), to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = median(numberField / 2)",
- "error": [],
+ "query": "from a_index | eval mv_slice(cartesianPointField, booleanField, booleanField)",
+ "error": [
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), median(numberField / 2)",
+ "query": "from a_index | eval var = mv_slice(cartesianShapeField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = median(numberField / 2)",
+ "query": "from a_index | eval mv_slice(cartesianShapeField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = median(numberField)",
+ "query": "from a_index | eval var = mv_slice(to_cartesianshape(cartesianPointField), to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), median(numberField)",
- "error": [],
+ "query": "from a_index | eval mv_slice(cartesianShapeField, booleanField, booleanField)",
+ "error": [
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = median(numberField)",
+ "query": "from a_index | eval var = mv_slice(dateField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats median(numberField) by round(numberField / 2)",
+ "query": "from a_index | eval mv_slice(dateField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = median(numberField) by var1 = round(numberField / 2)",
+ "query": "from a_index | eval var = mv_slice(to_datetime(dateField), to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), median(numberField) by round(numberField / 2), ipField",
- "error": [],
+ "query": "from a_index | eval mv_slice(dateField, booleanField, booleanField)",
+ "error": [
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = median(numberField) by var1 = round(numberField / 2), ipField",
+ "query": "from a_index | eval var = mv_slice(numberField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), median(numberField) by round(numberField / 2), numberField / 2",
+ "query": "from a_index | eval mv_slice(numberField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = median(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "query": "from a_index | eval var = mv_slice(to_integer(booleanField), to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = median(avg(numberField))",
+ "query": "from a_index | eval mv_slice(numberField, booleanField, booleanField)",
"error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats median(avg(numberField))",
- "error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
- ],
+ "query": "from a_index | eval var = mv_slice(geoPointField, numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats median(stringField)",
- "error": [
- "Argument of [median] must be [number], found value [stringField] type [string]"
- ],
+ "query": "from a_index | eval mv_slice(geoPointField, numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = median(*)",
- "error": [
- "Using wildcards (*) in median is not allowed"
- ],
+ "query": "from a_index | eval var = mv_slice(to_geopoint(geoPointField), to_integer(booleanField), to_integer(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort median(numberField)",
+ "query": "from a_index | eval mv_slice(geoPointField, booleanField, booleanField)",
"error": [
- "SORT does not support function median"
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | where median(numberField)",
- "error": [
- "WHERE does not support function median"
- ],
+ "query": "from a_index | eval var = mv_slice(geoShapeField, numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where median(numberField) > 0",
- "error": [
- "WHERE does not support function median"
- ],
+ "query": "from a_index | eval mv_slice(geoShapeField, numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = median(numberField)",
- "error": [
- "EVAL does not support function median"
- ],
+ "query": "from a_index | eval var = mv_slice(to_geoshape(geoPointField), to_integer(booleanField), to_integer(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = median(numberField) > 0",
+ "query": "from a_index | eval mv_slice(geoShapeField, booleanField, booleanField)",
"error": [
- "EVAL does not support function median"
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval median(numberField)",
- "error": [
- "EVAL does not support function median"
- ],
+ "query": "from a_index | eval var = mv_slice(ipField, numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval median(numberField) > 0",
- "error": [
- "EVAL does not support function median"
- ],
+ "query": "from a_index | eval mv_slice(ipField, numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = median_absolute_deviation(numberField)",
+ "query": "from a_index | eval var = mv_slice(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats median_absolute_deviation(numberField)",
- "error": [],
+ "query": "from a_index | eval mv_slice(ipField, booleanField, booleanField)",
+ "error": [
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats var = round(median_absolute_deviation(numberField))",
+ "query": "from a_index | eval var = mv_slice(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(median_absolute_deviation(numberField))",
- "error": [],
+ "query": "from a_index | eval mv_slice(stringField, booleanField, booleanField)",
+ "error": [
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats var = round(median_absolute_deviation(numberField)) + median_absolute_deviation(numberField)",
+ "query": "from a_index | eval var = mv_slice(versionField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(median_absolute_deviation(numberField)) + median_absolute_deviation(numberField)",
+ "query": "from a_index | eval mv_slice(versionField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats median_absolute_deviation(numberField / 2)",
+ "query": "from a_index | eval var = mv_slice(to_version(stringField), to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = median_absolute_deviation(numberField / 2)",
- "error": [],
+ "query": "from a_index | eval mv_slice(versionField, booleanField, booleanField)",
+ "error": [
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField / 2)",
- "error": [],
+ "query": "from a_index | eval mv_slice(booleanField, numberField, numberField, extraArg)",
+ "error": [
+ "Error: [mv_slice] function expects no more than 3 arguments, got 4."
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField / 2)",
+ "query": "from a_index | sort mv_slice(booleanField, numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = median_absolute_deviation(numberField)",
+ "query": "row var = mv_sort(\"a\", \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField)",
+ "query": "row mv_sort(\"a\", \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField)",
+ "query": "from a_index | eval var = mv_sort(stringField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats median_absolute_deviation(numberField) by round(numberField / 2)",
+ "query": "from a_index | eval mv_sort(stringField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2)",
+ "query": "from a_index | sort mv_sort(stringField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField) by round(numberField / 2), ipField",
+ "query": "row var = mv_sort(true, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2), ipField",
+ "query": "row mv_sort(true, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField) by round(numberField / 2), numberField / 2",
+ "query": "row var = mv_sort(now(), \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "query": "row mv_sort(now(), \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = median_absolute_deviation(avg(numberField))",
- "error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
- ],
+ "query": "row var = mv_sort(5, \"asc\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats median_absolute_deviation(avg(numberField))",
- "error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
- ],
+ "query": "row mv_sort(5, \"asc\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats median_absolute_deviation(stringField)",
- "error": [
- "Argument of [median_absolute_deviation] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row var = mv_sort(to_ip(\"127.0.0.1\"), \"asc\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = median_absolute_deviation(*)",
- "error": [
- "Using wildcards (*) in median_absolute_deviation is not allowed"
- ],
+ "query": "row mv_sort(to_ip(\"127.0.0.1\"), \"asc\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | sort median_absolute_deviation(numberField)",
- "error": [
- "SORT does not support function median_absolute_deviation"
- ],
+ "query": "row var = mv_sort(to_version(\"1.0.0\"), \"asc\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where median_absolute_deviation(numberField)",
- "error": [
- "WHERE does not support function median_absolute_deviation"
- ],
+ "query": "row mv_sort(to_version(\"1.0.0\"), \"asc\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where median_absolute_deviation(numberField) > 0",
+ "query": "row var = mv_sort(to_cartesianpoint(\"POINT (30 10)\"), true)",
"error": [
- "WHERE does not support function median_absolute_deviation"
+ "Argument of [mv_sort] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]",
+ "Argument of [mv_sort] must be [string], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = median_absolute_deviation(numberField)",
- "error": [
- "EVAL does not support function median_absolute_deviation"
- ],
+ "query": "from a_index | where mv_sort(numberField, \"asc\") > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = median_absolute_deviation(numberField) > 0",
+ "query": "from a_index | where mv_sort(cartesianPointField, booleanField) > 0",
"error": [
- "EVAL does not support function median_absolute_deviation"
+ "Argument of [mv_sort] must be [boolean], found value [cartesianPointField] type [cartesian_point]",
+ "Argument of [mv_sort] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval median_absolute_deviation(numberField)",
- "error": [
- "EVAL does not support function median_absolute_deviation"
- ],
+ "query": "from a_index | where length(mv_sort(stringField, \"asc\")) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval median_absolute_deviation(numberField) > 0",
+ "query": "from a_index | where length(mv_sort(cartesianPointField, booleanField)) > 0",
"error": [
- "EVAL does not support function median_absolute_deviation"
+ "Argument of [mv_sort] must be [boolean], found value [cartesianPointField] type [cartesian_point]",
+ "Argument of [mv_sort] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats var = percentile(numberField, 5)",
+ "query": "from a_index | eval var = mv_sort(booleanField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats percentile(numberField, 5)",
+ "query": "from a_index | eval mv_sort(booleanField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(percentile(numberField, 5))",
+ "query": "from a_index | eval var = mv_sort(dateField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(percentile(numberField, 5))",
+ "query": "from a_index | eval mv_sort(dateField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(percentile(numberField, 5)) + percentile(numberField, 5)",
+ "query": "from a_index | eval var = mv_sort(numberField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(percentile(numberField, 5)) + percentile(numberField, 5)",
+ "query": "from a_index | eval mv_sort(numberField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats percentile(numberField, numberField)",
- "error": [
- "Argument of [percentile] must be a constant, received [numberField]"
- ],
+ "query": "from a_index | eval var = mv_sort(ipField, \"asc\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats percentile(numberField / 2, 5)",
+ "query": "from a_index | eval mv_sort(ipField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = percentile(numberField / 2, 5)",
+ "query": "from a_index | eval var = mv_sort(versionField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), percentile(numberField / 2, 5)",
+ "query": "from a_index | eval mv_sort(versionField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = percentile(numberField / 2, 5)",
- "error": [],
+ "query": "from a_index | eval mv_sort(booleanField, \"asc\", extraArg)",
+ "error": [
+ "Error: [mv_sort] function expects no more than 2 arguments, got 3."
+ ],
"warning": []
},
{
- "query": "from a_index | stats var0 = percentile(numberField, 5)",
+ "query": "from a_index | sort mv_sort(booleanField, \"asc\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), percentile(numberField, 5)",
+ "query": "row var = mv_sum(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = percentile(numberField, 5)",
+ "query": "row mv_sum(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats percentile(numberField, 5) by round(numberField / 2)",
+ "query": "row var = mv_sum(to_integer(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = percentile(numberField, 5) by var1 = round(numberField / 2)",
- "error": [],
+ "query": "row var = mv_sum(\"a\")",
+ "error": [
+ "Argument of [mv_sum] must be [number], found value [\"a\"] type [string]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), percentile(numberField, 5) by round(numberField / 2), ipField",
+ "query": "from a_index | where mv_sum(numberField) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = percentile(numberField, 5) by var1 = round(numberField / 2), ipField",
- "error": [],
+ "query": "from a_index | where mv_sum(stringField) > 0",
+ "error": [
+ "Argument of [mv_sum] must be [number], found value [stringField] type [string]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), percentile(numberField, 5) by round(numberField / 2), numberField / 2",
+ "query": "from a_index | eval var = mv_sum(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = percentile(numberField, 5) by var1 = round(numberField / 2), numberField / 2",
+ "query": "from a_index | eval mv_sum(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = percentile(avg(numberField), 5)",
- "error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
- ],
+ "query": "from a_index | eval var = mv_sum(to_integer(stringField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats percentile(avg(numberField), 5)",
+ "query": "from a_index | eval mv_sum(stringField)",
"error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ "Argument of [mv_sum] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | stats percentile(stringField, 5)",
+ "query": "from a_index | eval mv_sum(numberField, extraArg)",
"error": [
- "Argument of [percentile] must be [number], found value [stringField] type [string]"
+ "Error: [mv_sum] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | sort percentile(numberField, 5)",
+ "query": "from a_index | eval var = mv_sum(*)",
"error": [
- "SORT does not support function percentile"
+ "Using wildcards (*) in mv_sum is not allowed"
],
"warning": []
},
{
- "query": "from a_index | where percentile(numberField, 5)",
- "error": [
- "WHERE does not support function percentile"
- ],
+ "query": "from a_index | sort mv_sum(numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where percentile(numberField, 5) > 0",
- "error": [
- "WHERE does not support function percentile"
- ],
+ "query": "row var = mv_sum(to_integer(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = percentile(numberField, 5)",
+ "query": "row var = mv_sum(true)",
"error": [
- "EVAL does not support function percentile"
+ "Argument of [mv_sum] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = percentile(numberField, 5) > 0",
+ "query": "from a_index | where mv_sum(booleanField) > 0",
"error": [
- "EVAL does not support function percentile"
+ "Argument of [mv_sum] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval percentile(numberField, 5)",
- "error": [
- "EVAL does not support function percentile"
- ],
+ "query": "from a_index | eval var = mv_sum(to_integer(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval percentile(numberField, 5) > 0",
+ "query": "from a_index | eval mv_sum(booleanField)",
"error": [
- "EVAL does not support function percentile"
+ "Argument of [mv_sum] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats var = max(numberField)",
+ "query": "row var = mv_zip(\"a\", \"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats max(numberField)",
+ "query": "row var = mv_zip(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(max(numberField))",
+ "query": "row mv_zip(\"a\", \"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(max(numberField))",
+ "query": "row mv_zip(\"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(max(numberField)) + max(numberField)",
+ "query": "row var = mv_zip(to_string(\"a\"), to_string(\"a\"), to_string(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(max(numberField)) + max(numberField)",
- "error": [],
+ "query": "row var = mv_zip(5, 5, 5)",
+ "error": [
+ "Argument of [mv_zip] must be [string], found value [5] type [number]",
+ "Argument of [mv_zip] must be [string], found value [5] type [number]",
+ "Argument of [mv_zip] must be [string], found value [5] type [number]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats max(numberField / 2)",
+ "query": "from a_index | where length(mv_zip(stringField, stringField, stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = max(numberField / 2)",
- "error": [],
+ "query": "from a_index | where length(mv_zip(numberField, numberField, numberField)) > 0",
+ "error": [
+ "Argument of [mv_zip] must be [string], found value [numberField] type [number]",
+ "Argument of [mv_zip] must be [string], found value [numberField] type [number]",
+ "Argument of [mv_zip] must be [string], found value [numberField] type [number]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), max(numberField / 2)",
+ "query": "from a_index | eval var = mv_zip(stringField, stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = max(numberField / 2)",
+ "query": "from a_index | eval mv_zip(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = max(numberField)",
+ "query": "from a_index | eval mv_zip(stringField, stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), max(numberField)",
+ "query": "from a_index | eval var = mv_zip(to_string(stringField), to_string(stringField), to_string(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = max(numberField)",
- "error": [],
+ "query": "from a_index | eval mv_zip(numberField, numberField, numberField)",
+ "error": [
+ "Argument of [mv_zip] must be [string], found value [numberField] type [number]",
+ "Argument of [mv_zip] must be [string], found value [numberField] type [number]",
+ "Argument of [mv_zip] must be [string], found value [numberField] type [number]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats max(numberField) by round(numberField / 2)",
- "error": [],
+ "query": "from a_index | eval mv_zip(stringField, stringField, stringField, extraArg)",
+ "error": [
+ "Error: [mv_zip] function expects no more than 3 arguments, got 4."
+ ],
"warning": []
},
{
- "query": "from a_index | stats var0 = max(numberField) by var1 = round(numberField / 2)",
+ "query": "from a_index | sort mv_zip(stringField, stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), max(numberField) by round(numberField / 2), ipField",
+ "query": "row var = mv_zip(to_string(true), to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = max(numberField) by var1 = round(numberField / 2), ipField",
- "error": [],
+ "query": "row var = mv_zip(true, true, true)",
+ "error": [
+ "Argument of [mv_zip] must be [string], found value [true] type [boolean]",
+ "Argument of [mv_zip] must be [string], found value [true] type [boolean]",
+ "Argument of [mv_zip] must be [string], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), max(numberField) by round(numberField / 2), numberField / 2",
- "error": [],
+ "query": "from a_index | where length(mv_zip(booleanField, booleanField, booleanField)) > 0",
+ "error": [
+ "Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = max(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "query": "from a_index | eval var = mv_zip(to_string(booleanField), to_string(booleanField), to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = max(avg(numberField))",
+ "query": "from a_index | eval mv_zip(booleanField, booleanField, booleanField)",
"error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ "Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats max(avg(numberField))",
- "error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
- ],
+ "query": "row var = now()",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats max(stringField)",
- "error": [
- "Argument of [max] must be [number], found value [stringField] type [string]"
- ],
+ "query": "row now()",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = max(*)",
+ "query": "from a_index | eval var = now()",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval now()",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval now(extraArg)",
"error": [
- "Using wildcards (*) in max is not allowed"
+ "Error: [now] function expects exactly 0 arguments, got 1."
],
"warning": []
},
{
- "query": "from a_index | stats var = max(dateField)",
+ "query": "from a_index | sort now()",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats max(dateField)",
+ "query": "row var = pi()",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(max(dateField))",
+ "query": "row pi()",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(max(dateField))",
+ "query": "from a_index | where pi() > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(max(dateField)) + max(dateField)",
+ "query": "from a_index | eval var = pi()",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(max(dateField)) + max(dateField)",
+ "query": "from a_index | eval pi()",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort max(numberField)",
+ "query": "from a_index | eval pi(extraArg)",
"error": [
- "SORT does not support function max"
+ "Error: [pi] function expects exactly 0 arguments, got 1."
],
"warning": []
},
{
- "query": "from a_index | where max(numberField)",
- "error": [
- "WHERE does not support function max"
- ],
+ "query": "from a_index | sort pi()",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where max(numberField) > 0",
- "error": [
- "WHERE does not support function max"
- ],
+ "query": "row var = pow(5, 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where max(dateField)",
- "error": [
- "WHERE does not support function max"
- ],
+ "query": "row pow(5, 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where max(dateField) > 0",
- "error": [
- "WHERE does not support function max"
- ],
+ "query": "row var = pow(to_integer(\"a\"), to_integer(\"a\"))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = max(numberField)",
+ "query": "row var = pow(\"a\", \"a\")",
"error": [
- "EVAL does not support function max"
+ "Argument of [pow] must be [number], found value [\"a\"] type [string]",
+ "Argument of [pow] must be [number], found value [\"a\"] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = max(numberField) > 0",
- "error": [
- "EVAL does not support function max"
- ],
+ "query": "from a_index | where pow(numberField, numberField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval max(numberField)",
+ "query": "from a_index | where pow(stringField, stringField) > 0",
"error": [
- "EVAL does not support function max"
+ "Argument of [pow] must be [number], found value [stringField] type [string]",
+ "Argument of [pow] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval max(numberField) > 0",
- "error": [
- "EVAL does not support function max"
- ],
+ "query": "from a_index | eval var = pow(numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = max(dateField)",
- "error": [
- "EVAL does not support function max"
- ],
+ "query": "from a_index | eval pow(numberField, numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = max(dateField) > 0",
- "error": [
- "EVAL does not support function max"
- ],
+ "query": "from a_index | eval var = pow(to_integer(stringField), to_integer(stringField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval max(dateField)",
+ "query": "from a_index | eval pow(stringField, stringField)",
"error": [
- "EVAL does not support function max"
+ "Argument of [pow] must be [number], found value [stringField] type [string]",
+ "Argument of [pow] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval max(dateField) > 0",
+ "query": "from a_index | eval pow(numberField, numberField, extraArg)",
"error": [
- "EVAL does not support function max"
+ "Error: [pow] function expects exactly 2 arguments, got 3."
],
"warning": []
},
{
- "query": "from a_index | stats var = min(numberField)",
+ "query": "from a_index | sort pow(numberField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats min(numberField)",
+ "query": "row var = pow(to_integer(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(min(numberField))",
- "error": [],
+ "query": "row var = pow(true, true)",
+ "error": [
+ "Argument of [pow] must be [number], found value [true] type [boolean]",
+ "Argument of [pow] must be [number], found value [true] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats round(min(numberField))",
- "error": [],
+ "query": "from a_index | where pow(booleanField, booleanField) > 0",
+ "error": [
+ "Argument of [pow] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [pow] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats var = round(min(numberField)) + min(numberField)",
+ "query": "from a_index | eval var = pow(to_integer(booleanField), to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(min(numberField)) + min(numberField)",
- "error": [],
+ "query": "from a_index | eval pow(booleanField, booleanField)",
+ "error": [
+ "Argument of [pow] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [pow] must be [number], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats min(numberField / 2)",
+ "query": "row var = replace(\"a\", \"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = min(numberField / 2)",
+ "query": "row replace(\"a\", \"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), min(numberField / 2)",
+ "query": "row var = replace(to_string(\"a\"), to_string(\"a\"), to_string(\"a\"))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = min(numberField / 2)",
- "error": [],
+ "query": "row var = replace(5, 5, 5)",
+ "error": [
+ "Argument of [replace] must be [string], found value [5] type [number]",
+ "Argument of [replace] must be [string], found value [5] type [number]",
+ "Argument of [replace] must be [string], found value [5] type [number]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats var0 = min(numberField)",
+ "query": "from a_index | where length(replace(stringField, stringField, stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), min(numberField)",
- "error": [],
+ "query": "from a_index | where length(replace(numberField, numberField, numberField)) > 0",
+ "error": [
+ "Argument of [replace] must be [string], found value [numberField] type [number]",
+ "Argument of [replace] must be [string], found value [numberField] type [number]",
+ "Argument of [replace] must be [string], found value [numberField] type [number]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = min(numberField)",
+ "query": "from a_index | eval var = replace(stringField, stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats min(numberField) by round(numberField / 2)",
+ "query": "from a_index | eval replace(stringField, stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var0 = min(numberField) by var1 = round(numberField / 2)",
+ "query": "from a_index | eval var = replace(to_string(stringField), to_string(stringField), to_string(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), min(numberField) by round(numberField / 2), ipField",
- "error": [],
+ "query": "from a_index | eval replace(numberField, numberField, numberField)",
+ "error": [
+ "Argument of [replace] must be [string], found value [numberField] type [number]",
+ "Argument of [replace] must be [string], found value [numberField] type [number]",
+ "Argument of [replace] must be [string], found value [numberField] type [number]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = min(numberField) by var1 = round(numberField / 2), ipField",
- "error": [],
+ "query": "from a_index | eval replace(stringField, stringField, stringField, extraArg)",
+ "error": [
+ "Error: [replace] function expects exactly 3 arguments, got 4."
+ ],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), min(numberField) by round(numberField / 2), numberField / 2",
+ "query": "from a_index | sort replace(stringField, stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats avg(numberField), var0 = min(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "query": "row var = replace(to_string(true), to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = min(avg(numberField))",
+ "query": "row var = replace(true, true, true)",
"error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ "Argument of [replace] must be [string], found value [true] type [boolean]",
+ "Argument of [replace] must be [string], found value [true] type [boolean]",
+ "Argument of [replace] must be [string], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats min(avg(numberField))",
+ "query": "from a_index | where length(replace(booleanField, booleanField, booleanField)) > 0",
"error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ "Argument of [replace] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [replace] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [replace] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats min(stringField)",
+ "query": "from a_index | eval var = replace(to_string(booleanField), to_string(booleanField), to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval replace(booleanField, booleanField, booleanField)",
"error": [
- "Argument of [min] must be [number], found value [stringField] type [string]"
+ "Argument of [replace] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [replace] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [replace] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats var = min(*)",
+ "query": "row var = right(\"a\", 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row right(\"a\", 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = right(to_string(\"a\"), to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = right(5, \"a\")",
"error": [
- "Using wildcards (*) in min is not allowed"
+ "Argument of [right] must be [string], found value [5] type [number]",
+ "Argument of [right] must be [number], found value [\"a\"] type [string]"
],
"warning": []
},
{
- "query": "from a_index | stats var = min(dateField)",
+ "query": "from a_index | where length(right(stringField, numberField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats min(dateField)",
+ "query": "from a_index | where length(right(numberField, stringField)) > 0",
+ "error": [
+ "Argument of [right] must be [string], found value [numberField] type [number]",
+ "Argument of [right] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = right(stringField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(min(dateField))",
+ "query": "from a_index | eval right(stringField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(min(dateField))",
+ "query": "from a_index | eval var = right(to_string(stringField), to_integer(stringField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(min(dateField)) + min(dateField)",
+ "query": "from a_index | eval right(numberField, stringField)",
+ "error": [
+ "Argument of [right] must be [string], found value [numberField] type [number]",
+ "Argument of [right] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval right(stringField, numberField, extraArg)",
+ "error": [
+ "Error: [right] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort right(stringField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(min(dateField)) + min(dateField)",
+ "query": "row var = right(to_string(true), to_integer(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort min(numberField)",
+ "query": "row var = right(true, true)",
"error": [
- "SORT does not support function min"
+ "Argument of [right] must be [string], found value [true] type [boolean]",
+ "Argument of [right] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | where min(numberField)",
+ "query": "from a_index | where length(right(booleanField, booleanField)) > 0",
"error": [
- "WHERE does not support function min"
+ "Argument of [right] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [right] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | where min(numberField) > 0",
+ "query": "from a_index | eval var = right(to_string(booleanField), to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval right(booleanField, booleanField)",
"error": [
- "WHERE does not support function min"
+ "Argument of [right] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [right] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | where min(dateField)",
+ "query": "row var = round(5, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row round(5, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = round(to_integer(\"a\"), to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = round(\"a\", \"a\")",
"error": [
- "WHERE does not support function min"
+ "Argument of [round] must be [number], found value [\"a\"] type [string]",
+ "Argument of [round] must be [number], found value [\"a\"] type [string]"
],
"warning": []
},
{
- "query": "from a_index | where min(dateField) > 0",
+ "query": "from a_index | where round(numberField, numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where round(stringField, stringField) > 0",
"error": [
- "WHERE does not support function min"
+ "Argument of [round] must be [number], found value [stringField] type [string]",
+ "Argument of [round] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = min(numberField)",
+ "query": "from a_index | eval var = round(numberField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval round(numberField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = round(to_integer(stringField), to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval round(stringField, stringField)",
"error": [
- "EVAL does not support function min"
+ "Argument of [round] must be [number], found value [stringField] type [string]",
+ "Argument of [round] must be [number], found value [stringField] type [string]"
],
"warning": []
},
{
- "query": "from a_index | eval var = min(numberField) > 0",
+ "query": "from a_index | eval round(numberField, numberField, extraArg)",
"error": [
- "EVAL does not support function min"
+ "Error: [round] function expects no more than 2 arguments, got 3."
],
"warning": []
},
{
- "query": "from a_index | eval min(numberField)",
+ "query": "from a_index | sort round(numberField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = round(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row round(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = round(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = round(to_integer(true), to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = round(true, true)",
"error": [
- "EVAL does not support function min"
+ "Argument of [round] must be [number], found value [true] type [boolean]",
+ "Argument of [round] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval min(numberField) > 0",
+ "query": "from a_index | where round(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where round(booleanField) > 0",
"error": [
- "EVAL does not support function min"
+ "Argument of [round] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = min(dateField)",
+ "query": "from a_index | where round(booleanField, booleanField) > 0",
"error": [
- "EVAL does not support function min"
+ "Argument of [round] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [round] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = min(dateField) > 0",
+ "query": "from a_index | eval var = round(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval round(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = round(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval round(booleanField)",
"error": [
- "EVAL does not support function min"
+ "Argument of [round] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval min(dateField)",
+ "query": "from a_index | eval var = round(*)",
"error": [
- "EVAL does not support function min"
+ "Using wildcards (*) in round is not allowed"
],
"warning": []
},
{
- "query": "from a_index | eval min(dateField) > 0",
+ "query": "from a_index | eval var = round(to_integer(booleanField), to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval round(booleanField, booleanField)",
"error": [
- "EVAL does not support function min"
+ "Argument of [round] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [round] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats var = count(stringField)",
+ "query": "from a_index | sort round(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats count(stringField)",
+ "query": "row var = rtrim(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(count(stringField))",
+ "query": "row rtrim(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(count(stringField))",
+ "query": "row var = rtrim(to_string(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = rtrim(5)",
+ "error": [
+ "Argument of [rtrim] must be [string], found value [5] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(rtrim(stringField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(rtrim(numberField)) > 0",
+ "error": [
+ "Argument of [rtrim] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = rtrim(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval rtrim(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = rtrim(to_string(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval rtrim(numberField)",
+ "error": [
+ "Argument of [rtrim] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval rtrim(stringField, extraArg)",
+ "error": [
+ "Error: [rtrim] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = rtrim(*)",
+ "error": [
+ "Using wildcards (*) in rtrim is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort rtrim(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = rtrim(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(count(stringField)) + count(stringField)",
+ "query": "row var = rtrim(true)",
+ "error": [
+ "Argument of [rtrim] must be [string], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(rtrim(booleanField)) > 0",
+ "error": [
+ "Argument of [rtrim] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = rtrim(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval rtrim(booleanField)",
+ "error": [
+ "Argument of [rtrim] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = signum(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row signum(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = signum(to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = signum(\"a\")",
+ "error": [
+ "Argument of [signum] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where signum(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where signum(stringField) > 0",
+ "error": [
+ "Argument of [signum] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = signum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval signum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = signum(to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval signum(stringField)",
+ "error": [
+ "Argument of [signum] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval signum(numberField, extraArg)",
+ "error": [
+ "Error: [signum] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = signum(*)",
+ "error": [
+ "Using wildcards (*) in signum is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort signum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = signum(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = signum(true)",
+ "error": [
+ "Argument of [signum] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where signum(booleanField) > 0",
+ "error": [
+ "Argument of [signum] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = signum(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval signum(booleanField)",
+ "error": [
+ "Argument of [signum] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = sin(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row sin(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sin(to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sin(\"a\")",
+ "error": [
+ "Argument of [sin] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sin(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sin(stringField) > 0",
+ "error": [
+ "Argument of [sin] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sin(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sin(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sin(to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sin(stringField)",
+ "error": [
+ "Argument of [sin] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sin(numberField, extraArg)",
+ "error": [
+ "Error: [sin] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sin(*)",
+ "error": [
+ "Using wildcards (*) in sin is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort sin(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sin(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sin(true)",
+ "error": [
+ "Argument of [sin] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sin(booleanField) > 0",
+ "error": [
+ "Argument of [sin] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sin(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sin(booleanField)",
+ "error": [
+ "Argument of [sin] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = sinh(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row sinh(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sinh(to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sinh(\"a\")",
+ "error": [
+ "Argument of [sinh] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sinh(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sinh(stringField) > 0",
+ "error": [
+ "Argument of [sinh] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sinh(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sinh(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sinh(to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sinh(stringField)",
+ "error": [
+ "Argument of [sinh] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sinh(numberField, extraArg)",
+ "error": [
+ "Error: [sinh] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sinh(*)",
+ "error": [
+ "Using wildcards (*) in sinh is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort sinh(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sinh(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sinh(true)",
+ "error": [
+ "Argument of [sinh] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sinh(booleanField) > 0",
+ "error": [
+ "Argument of [sinh] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sinh(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sinh(booleanField)",
+ "error": [
+ "Argument of [sinh] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = split(\"a\", \"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row split(\"a\", \"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = split(to_string(\"a\"), to_string(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = split(5, 5)",
+ "error": [
+ "Argument of [split] must be [string], found value [5] type [number]",
+ "Argument of [split] must be [string], found value [5] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(split(stringField, stringField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(split(numberField, numberField)) > 0",
+ "error": [
+ "Argument of [split] must be [string], found value [numberField] type [number]",
+ "Argument of [split] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = split(stringField, stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval split(stringField, stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = split(to_string(stringField), to_string(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval split(numberField, numberField)",
+ "error": [
+ "Argument of [split] must be [string], found value [numberField] type [number]",
+ "Argument of [split] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval split(stringField, stringField, extraArg)",
+ "error": [
+ "Error: [split] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort split(stringField, stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = split(to_string(true), to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = split(true, true)",
+ "error": [
+ "Argument of [split] must be [string], found value [true] type [boolean]",
+ "Argument of [split] must be [string], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(split(booleanField, booleanField)) > 0",
+ "error": [
+ "Argument of [split] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [split] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = split(to_string(booleanField), to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval split(booleanField, booleanField)",
+ "error": [
+ "Argument of [split] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [split] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = sqrt(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row sqrt(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sqrt(to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sqrt(\"a\")",
+ "error": [
+ "Argument of [sqrt] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sqrt(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sqrt(stringField) > 0",
+ "error": [
+ "Argument of [sqrt] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sqrt(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sqrt(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sqrt(to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sqrt(stringField)",
+ "error": [
+ "Argument of [sqrt] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sqrt(numberField, extraArg)",
+ "error": [
+ "Error: [sqrt] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sqrt(*)",
+ "error": [
+ "Using wildcards (*) in sqrt is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort sqrt(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sqrt(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = sqrt(true)",
+ "error": [
+ "Argument of [sqrt] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sqrt(booleanField) > 0",
+ "error": [
+ "Argument of [sqrt] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sqrt(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sqrt(booleanField)",
+ "error": [
+ "Argument of [sqrt] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_contains(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geopoint(\"a\"), to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(\"a\", \"a\")",
+ "error": [
+ "Argument of [st_contains] must be [cartesian_point], found value [\"a\"] type [string]",
+ "Argument of [st_contains] must be [cartesian_point], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_contains(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_contains(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_contains(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_geopoint(stringField), to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(stringField, stringField)",
+ "error": [
+ "Argument of [st_contains] must be [cartesian_point], found value [stringField] type [string]",
+ "Argument of [st_contains] must be [cartesian_point], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(geoPointField, geoPointField, extraArg)",
+ "error": [
+ "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(geoPointField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(geoPointField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_geopoint(stringField), geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(geoPointField, geoShapeField, extraArg)",
+ "error": [
+ "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(geoShapeField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(geoShapeField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(geoShapeField, to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(geoShapeField, geoPointField, extraArg)",
+ "error": [
+ "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(geoShapeField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(geoShapeField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(geoShapeField, geoShapeField, extraArg)",
+ "error": [
+ "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_cartesianpoint(stringField), to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(cartesianPointField, cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(cartesianPointField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(cartesianPointField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_cartesianpoint(stringField), cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(cartesianPointField, cartesianShapeField, extraArg)",
+ "error": [
+ "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(cartesianShapeField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(cartesianShapeField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(cartesianShapeField, to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(cartesianShapeField, cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(cartesianShapeField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(cartesianShapeField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(cartesianShapeField, cartesianShapeField, extraArg)",
+ "error": [
+ "Error: [st_contains] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_contains(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_contains(true, true)",
+ "error": [
+ "Argument of [st_contains] must be [cartesian_point], found value [true] type [boolean]",
+ "Argument of [st_contains] must be [cartesian_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_contains(booleanField, booleanField)",
+ "error": [
+ "Argument of [st_contains] must be [cartesian_point], found value [booleanField] type [boolean]",
+ "Argument of [st_contains] must be [cartesian_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_contains(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geopoint(\"a\"), to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(\"a\", \"a\")",
+ "error": [
+ "Argument of [st_disjoint] must be [cartesian_point], found value [\"a\"] type [string]",
+ "Argument of [st_disjoint] must be [cartesian_point], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_geopoint(stringField), to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(stringField, stringField)",
+ "error": [
+ "Argument of [st_disjoint] must be [cartesian_point], found value [stringField] type [string]",
+ "Argument of [st_disjoint] must be [cartesian_point], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(geoPointField, geoPointField, extraArg)",
+ "error": [
+ "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(geoPointField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(geoPointField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_geopoint(stringField), geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(geoPointField, geoShapeField, extraArg)",
+ "error": [
+ "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(geoShapeField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(geoShapeField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(geoShapeField, to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(geoShapeField, geoPointField, extraArg)",
+ "error": [
+ "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(geoShapeField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(geoShapeField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(geoShapeField, geoShapeField, extraArg)",
+ "error": [
+ "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(stringField), to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(cartesianPointField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(stringField), cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField, extraArg)",
+ "error": [
+ "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(cartesianShapeField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(cartesianShapeField, to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(cartesianShapeField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField, extraArg)",
+ "error": [
+ "Error: [st_disjoint] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_disjoint(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_disjoint(true, true)",
+ "error": [
+ "Argument of [st_disjoint] must be [cartesian_point], found value [true] type [boolean]",
+ "Argument of [st_disjoint] must be [cartesian_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_disjoint(booleanField, booleanField)",
+ "error": [
+ "Argument of [st_disjoint] must be [cartesian_point], found value [booleanField] type [boolean]",
+ "Argument of [st_disjoint] must be [cartesian_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_disjoint(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_intersects(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geopoint(\"a\"), to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(\"a\", \"a\")",
+ "error": [
+ "Argument of [st_intersects] must be [cartesian_point], found value [\"a\"] type [string]",
+ "Argument of [st_intersects] must be [cartesian_point], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_intersects(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_intersects(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_intersects(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_geopoint(stringField), to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(stringField, stringField)",
+ "error": [
+ "Argument of [st_intersects] must be [cartesian_point], found value [stringField] type [string]",
+ "Argument of [st_intersects] must be [cartesian_point], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(geoPointField, geoPointField, extraArg)",
+ "error": [
+ "Error: [st_intersects] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(geoPointField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(geoPointField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_geopoint(stringField), geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(geoPointField, geoShapeField, extraArg)",
+ "error": [
+ "Error: [st_intersects] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(geoShapeField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(geoShapeField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(geoShapeField, to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(geoShapeField, geoPointField, extraArg)",
+ "error": [
+ "Error: [st_intersects] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(geoShapeField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(geoShapeField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(geoShapeField, geoShapeField, extraArg)",
+ "error": [
+ "Error: [st_intersects] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_cartesianpoint(stringField), to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(cartesianPointField, cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_intersects] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(cartesianPointField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(cartesianPointField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_cartesianpoint(stringField), cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(cartesianPointField, cartesianShapeField, extraArg)",
+ "error": [
+ "Error: [st_intersects] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(cartesianShapeField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(cartesianShapeField, to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_intersects] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(cartesianShapeField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField, extraArg)",
+ "error": [
+ "Error: [st_intersects] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_intersects(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_intersects(true, true)",
+ "error": [
+ "Argument of [st_intersects] must be [cartesian_point], found value [true] type [boolean]",
+ "Argument of [st_intersects] must be [cartesian_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_intersects(booleanField, booleanField)",
+ "error": [
+ "Argument of [st_intersects] must be [cartesian_point], found value [booleanField] type [boolean]",
+ "Argument of [st_intersects] must be [cartesian_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_intersects(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_within(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geopoint(\"a\"), to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(\"a\", \"a\")",
+ "error": [
+ "Argument of [st_within] must be [cartesian_point], found value [\"a\"] type [string]",
+ "Argument of [st_within] must be [cartesian_point], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_within(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_within(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_within(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_geopoint(stringField), to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(stringField, stringField)",
+ "error": [
+ "Argument of [st_within] must be [cartesian_point], found value [stringField] type [string]",
+ "Argument of [st_within] must be [cartesian_point], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(geoPointField, geoPointField, extraArg)",
+ "error": [
+ "Error: [st_within] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(geoPointField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(geoPointField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_geopoint(stringField), geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(geoPointField, geoShapeField, extraArg)",
+ "error": [
+ "Error: [st_within] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(geoShapeField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(geoShapeField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(geoShapeField, to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(geoShapeField, geoPointField, extraArg)",
+ "error": [
+ "Error: [st_within] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(geoShapeField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(geoShapeField, geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(geoShapeField, geoShapeField, extraArg)",
+ "error": [
+ "Error: [st_within] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_cartesianpoint(stringField), to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(cartesianPointField, cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_within] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(cartesianPointField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(cartesianPointField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_cartesianpoint(stringField), cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(cartesianPointField, cartesianShapeField, extraArg)",
+ "error": [
+ "Error: [st_within] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(cartesianShapeField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(cartesianShapeField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(cartesianShapeField, to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(cartesianShapeField, cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_within] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(cartesianShapeField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(cartesianShapeField, cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(cartesianShapeField, cartesianShapeField, extraArg)",
+ "error": [
+ "Error: [st_within] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_within(geoPointField, geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_within(true, true)",
+ "error": [
+ "Argument of [st_within] must be [cartesian_point], found value [true] type [boolean]",
+ "Argument of [st_within] must be [cartesian_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_within(booleanField, booleanField)",
+ "error": [
+ "Argument of [st_within] must be [cartesian_point], found value [booleanField] type [boolean]",
+ "Argument of [st_within] must be [cartesian_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_geopoint(geoPointField), to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_geopoint(geoPointField), to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_geoshape(geoPointField), to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_within(to_geoshape(geoPointField), to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_within(cartesianPointField, cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_x(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_x(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_x(to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_x(\"a\")",
+ "error": [
+ "Argument of [st_x] must be [cartesian_point], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = st_x(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_x(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_x(to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_x(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_x(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_x(to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_x(stringField)",
+ "error": [
+ "Argument of [st_x] must be [cartesian_point], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_x(geoPointField, extraArg)",
+ "error": [
+ "Error: [st_x] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_x(*)",
+ "error": [
+ "Using wildcards (*) in st_x is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_x(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_x(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_x(to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_x(cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_x] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_x(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_x(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_x(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_x(true)",
+ "error": [
+ "Argument of [st_x] must be [cartesian_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_x(to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_x(booleanField)",
+ "error": [
+ "Argument of [st_x] must be [cartesian_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_x(to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_x(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_y(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_y(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_y(to_geopoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_y(\"a\")",
+ "error": [
+ "Argument of [st_y] must be [cartesian_point], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = st_y(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row st_y(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_y(to_cartesianpoint(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_y(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_y(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_y(to_geopoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_y(stringField)",
+ "error": [
+ "Argument of [st_y] must be [cartesian_point], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_y(geoPointField, extraArg)",
+ "error": [
+ "Error: [st_y] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_y(*)",
+ "error": [
+ "Using wildcards (*) in st_y is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_y(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_y(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_y(to_cartesianpoint(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_y(cartesianPointField, extraArg)",
+ "error": [
+ "Error: [st_y] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_y(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_y(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_y(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = st_y(true)",
+ "error": [
+ "Argument of [st_y] must be [cartesian_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_y(to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_y(booleanField)",
+ "error": [
+ "Argument of [st_y] must be [cartesian_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_y(to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_y(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = starts_with(\"a\", \"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row starts_with(\"a\", \"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = starts_with(to_string(\"a\"), to_string(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = starts_with(5, 5)",
+ "error": [
+ "Argument of [starts_with] must be [string], found value [5] type [number]",
+ "Argument of [starts_with] must be [string], found value [5] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = starts_with(stringField, stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval starts_with(stringField, stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = starts_with(to_string(stringField), to_string(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval starts_with(numberField, numberField)",
+ "error": [
+ "Argument of [starts_with] must be [string], found value [numberField] type [number]",
+ "Argument of [starts_with] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval starts_with(stringField, stringField, extraArg)",
+ "error": [
+ "Error: [starts_with] function expects exactly 2 arguments, got 3."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort starts_with(stringField, stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = starts_with(to_string(true), to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = starts_with(true, true)",
+ "error": [
+ "Argument of [starts_with] must be [string], found value [true] type [boolean]",
+ "Argument of [starts_with] must be [string], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = starts_with(to_string(booleanField), to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval starts_with(booleanField, booleanField)",
+ "error": [
+ "Argument of [starts_with] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [starts_with] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = substring(\"a\", 5, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = substring(\"a\", 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row substring(\"a\", 5, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row substring(\"a\", 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = substring(to_string(\"a\"), to_integer(\"a\"), to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = substring(5, \"a\", \"a\")",
+ "error": [
+ "Argument of [substring] must be [string], found value [5] type [number]",
+ "Argument of [substring] must be [number], found value [\"a\"] type [string]",
+ "Argument of [substring] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(substring(stringField, numberField, numberField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(substring(numberField, stringField, stringField)) > 0",
+ "error": [
+ "Argument of [substring] must be [string], found value [numberField] type [number]",
+ "Argument of [substring] must be [number], found value [stringField] type [string]",
+ "Argument of [substring] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = substring(stringField, numberField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval substring(stringField, numberField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = substring(to_string(stringField), to_integer(stringField), to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval substring(numberField, stringField, stringField)",
+ "error": [
+ "Argument of [substring] must be [string], found value [numberField] type [number]",
+ "Argument of [substring] must be [number], found value [stringField] type [string]",
+ "Argument of [substring] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval substring(stringField, numberField, numberField, extraArg)",
+ "error": [
+ "Error: [substring] function expects no more than 3 arguments, got 4."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort substring(stringField, numberField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort substring(stringField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = substring(to_string(true), to_integer(true), to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = substring(true, true, true)",
+ "error": [
+ "Argument of [substring] must be [string], found value [true] type [boolean]",
+ "Argument of [substring] must be [number], found value [true] type [boolean]",
+ "Argument of [substring] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(substring(booleanField, booleanField, booleanField)) > 0",
+ "error": [
+ "Argument of [substring] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [substring] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [substring] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = substring(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval substring(booleanField, booleanField, booleanField)",
+ "error": [
+ "Argument of [substring] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [substring] must be [number], found value [booleanField] type [boolean]",
+ "Argument of [substring] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = tan(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row tan(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = tan(to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = tan(\"a\")",
+ "error": [
+ "Argument of [tan] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where tan(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where tan(stringField) > 0",
+ "error": [
+ "Argument of [tan] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = tan(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tan(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = tan(to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tan(stringField)",
+ "error": [
+ "Argument of [tan] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tan(numberField, extraArg)",
+ "error": [
+ "Error: [tan] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = tan(*)",
+ "error": [
+ "Using wildcards (*) in tan is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort tan(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = tan(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = tan(true)",
+ "error": [
+ "Argument of [tan] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where tan(booleanField) > 0",
+ "error": [
+ "Argument of [tan] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = tan(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tan(booleanField)",
+ "error": [
+ "Argument of [tan] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = tanh(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row tanh(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = tanh(to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = tanh(\"a\")",
+ "error": [
+ "Argument of [tanh] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where tanh(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where tanh(stringField) > 0",
+ "error": [
+ "Argument of [tanh] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = tanh(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tanh(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = tanh(to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tanh(stringField)",
+ "error": [
+ "Argument of [tanh] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tanh(numberField, extraArg)",
+ "error": [
+ "Error: [tanh] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = tanh(*)",
+ "error": [
+ "Using wildcards (*) in tanh is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort tanh(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = tanh(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = tanh(true)",
+ "error": [
+ "Argument of [tanh] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where tanh(booleanField) > 0",
+ "error": [
+ "Argument of [tanh] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = tanh(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tanh(booleanField)",
+ "error": [
+ "Argument of [tanh] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = tau()",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row tau()",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where tau() > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = tau()",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tau()",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval tau(extraArg)",
+ "error": [
+ "Error: [tau] function expects exactly 0 arguments, got 1."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort tau()",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_boolean(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_boolean(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_bool(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_boolean(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_boolean(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_bool(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_boolean(*)",
+ "error": [
+ "Using wildcards (*) in to_boolean is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_boolean(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_boolean(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_boolean(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_bool(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_boolean(to_boolean(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_boolean(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_boolean(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_bool(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_boolean(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_boolean(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_boolean(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [
+ "Argument of [to_boolean] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_boolean(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_boolean(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_bool(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_boolean(to_boolean(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_boolean(cartesianPointField)",
+ "error": [
+ "Argument of [to_boolean] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_boolean(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_boolean(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_bool(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_boolean(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_boolean(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_boolean(booleanField, extraArg)",
+ "error": [
+ "Error: [to_boolean] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_boolean(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianpoint(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_cartesianpoint(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianpoint(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_cartesianpoint(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianpoint(*)",
+ "error": [
+ "Using wildcards (*) in to_cartesianpoint is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_cartesianpoint(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianpoint(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianpoint(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianpoint(true)",
+ "error": [
+ "Argument of [to_cartesianpoint] must be [cartesian_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianpoint(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_cartesianpoint(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianpoint(to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_cartesianpoint(booleanField)",
+ "error": [
+ "Argument of [to_cartesianpoint] must be [cartesian_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianpoint(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_cartesianpoint(cartesianPointField, extraArg)",
+ "error": [
+ "Error: [to_cartesianpoint] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_cartesianpoint(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianshape(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_cartesianshape(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianshape(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_cartesianshape(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianshape(*)",
+ "error": [
+ "Using wildcards (*) in to_cartesianshape is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_cartesianshape(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianshape(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianshape(to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_cartesianshape(to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianshape(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianshape(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_cartesianshape(true)",
+ "error": [
+ "Argument of [to_cartesianshape] must be [cartesian_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianshape(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_cartesianshape(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianshape(to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_cartesianshape(booleanField)",
+ "error": [
+ "Argument of [to_cartesianshape] must be [cartesian_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianshape(cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_cartesianshape(cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianshape(to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_cartesianshape(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_cartesianshape(cartesianPointField, extraArg)",
+ "error": [
+ "Error: [to_cartesianshape] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_cartesianshape(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_datetime(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_datetime(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_dt(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_datetime(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_datetime(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_dt(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_datetime(*)",
+ "error": [
+ "Using wildcards (*) in to_datetime is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_datetime(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_datetime(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_datetime(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_dt(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_datetime(to_datetime(now()))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_datetime(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_datetime(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_dt(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_datetime(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_datetime(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_datetime(true)",
+ "error": [
+ "Argument of [to_datetime] must be [date], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_datetime(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_datetime(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_dt(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_datetime(to_datetime(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_datetime(booleanField)",
+ "error": [
+ "Argument of [to_datetime] must be [date], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_datetime(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_datetime(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_dt(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_datetime(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_datetime(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_datetime(dateField, extraArg)",
+ "error": [
+ "Error: [to_datetime] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_datetime(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_degrees(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_degrees(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_degrees(to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_degrees(\"a\")",
+ "error": [
+ "Argument of [to_degrees] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_degrees(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_degrees(stringField) > 0",
+ "error": [
+ "Argument of [to_degrees] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_degrees(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_degrees(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_degrees(to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_degrees(stringField)",
+ "error": [
+ "Argument of [to_degrees] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_degrees(numberField, extraArg)",
+ "error": [
+ "Error: [to_degrees] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_degrees(*)",
+ "error": [
+ "Using wildcards (*) in to_degrees is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_degrees(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_degrees(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_degrees(true)",
+ "error": [
+ "Argument of [to_degrees] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_degrees(booleanField) > 0",
+ "error": [
+ "Argument of [to_degrees] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_degrees(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_degrees(booleanField)",
+ "error": [
+ "Argument of [to_degrees] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = to_double(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_double(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_dbl(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_double(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_double(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_dbl(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_double(*)",
+ "error": [
+ "Using wildcards (*) in to_double is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_double(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_double(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_double(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_dbl(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_double(to_boolean(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_double(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_double(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_dbl(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_double(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_double(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_double(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_dbl(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_double(to_datetime(now()))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_double(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_double(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [
+ "Argument of [to_double] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_double(booleanField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_double(cartesianPointField) > 0",
+ "error": [
+ "Argument of [to_double] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_double(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_double(dateField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_double(stringField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_double(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_double(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_dbl(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_double(to_boolean(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_double(cartesianPointField)",
+ "error": [
+ "Argument of [to_double] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_double(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_double(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_dbl(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_double(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_double(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_double(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_dbl(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_double(to_datetime(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_double(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_double(booleanField, extraArg)",
+ "error": [
+ "Error: [to_double] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_double(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geopoint(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_geopoint(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geopoint(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_geopoint(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geopoint(*)",
+ "error": [
+ "Using wildcards (*) in to_geopoint is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_geopoint(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geopoint(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_geopoint(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geopoint(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geopoint(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geopoint(true)",
+ "error": [
+ "Argument of [to_geopoint] must be [geo_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geopoint(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_geopoint(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geopoint(to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_geopoint(booleanField)",
+ "error": [
+ "Argument of [to_geopoint] must be [geo_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geopoint(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_geopoint(geoPointField, extraArg)",
+ "error": [
+ "Error: [to_geopoint] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_geopoint(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geoshape(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_geoshape(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geoshape(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_geoshape(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geoshape(*)",
+ "error": [
+ "Using wildcards (*) in to_geoshape is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_geoshape(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geoshape(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_geoshape(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geoshape(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geoshape(to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_geoshape(to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geoshape(to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geoshape(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_geoshape(true)",
+ "error": [
+ "Argument of [to_geoshape] must be [geo_point], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geoshape(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_geoshape(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geoshape(to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_geoshape(booleanField)",
+ "error": [
+ "Argument of [to_geoshape] must be [geo_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geoshape(geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_geoshape(geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geoshape(to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_geoshape(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_geoshape(geoPointField, extraArg)",
+ "error": [
+ "Error: [to_geoshape] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_geoshape(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_integer(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_integer(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_int(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_integer(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_integer(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_int(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_integer(*)",
+ "error": [
+ "Using wildcards (*) in to_integer is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_integer(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_integer(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_integer(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_int(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_integer(to_boolean(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_integer(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_integer(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_int(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_integer(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_integer(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_integer(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_int(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_integer(to_datetime(now()))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_integer(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_integer(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [
+ "Argument of [to_integer] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_integer(booleanField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_integer(cartesianPointField) > 0",
+ "error": [
+ "Argument of [to_integer] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_integer(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_integer(dateField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_integer(stringField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_integer(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_integer(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_int(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_integer(to_boolean(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_integer(cartesianPointField)",
+ "error": [
+ "Argument of [to_integer] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_integer(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_integer(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_int(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_integer(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_integer(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_integer(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_int(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_integer(to_datetime(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_integer(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_integer(booleanField, extraArg)",
+ "error": [
+ "Error: [to_integer] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_integer(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ip(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_ip(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ip(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_ip(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ip(*)",
+ "error": [
+ "Using wildcards (*) in to_ip is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_ip(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ip(to_ip(\"127.0.0.1\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_ip(to_ip(\"127.0.0.1\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ip(to_ip(to_ip(\"127.0.0.1\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ip(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ip(true)",
+ "error": [
+ "Argument of [to_ip] must be [ip], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ip(ipField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_ip(ipField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ip(to_ip(ipField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_ip(booleanField)",
+ "error": [
+ "Argument of [to_ip] must be [ip], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ip(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_ip(ipField, extraArg)",
+ "error": [
+ "Error: [to_ip] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_ip(ipField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_long(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_long(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_long(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_long(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_long(*)",
+ "error": [
+ "Using wildcards (*) in to_long is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_long(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_long(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_long(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_long(to_boolean(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_long(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_long(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_long(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_long(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_long(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_long(to_datetime(now()))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_long(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_long(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [
+ "Argument of [to_long] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_long(booleanField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_long(cartesianPointField) > 0",
+ "error": [
+ "Argument of [to_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_long(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_long(dateField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_long(stringField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_long(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_long(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_long(to_boolean(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_long(cartesianPointField)",
+ "error": [
+ "Argument of [to_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_long(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_long(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_long(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_long(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_long(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_long(to_datetime(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_long(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_long(booleanField, extraArg)",
+ "error": [
+ "Error: [to_long] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_long(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_lower(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_lower(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_lower(to_string(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_lower(5)",
+ "error": [
+ "Argument of [to_lower] must be [string], found value [5] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_lower(stringField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_lower(numberField)) > 0",
+ "error": [
+ "Argument of [to_lower] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_lower(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_lower(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_lower(to_string(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_lower(numberField)",
+ "error": [
+ "Argument of [to_lower] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_lower(stringField, extraArg)",
+ "error": [
+ "Error: [to_lower] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_lower(*)",
+ "error": [
+ "Using wildcards (*) in to_lower is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_lower(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_lower(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_lower(true)",
+ "error": [
+ "Argument of [to_lower] must be [string], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_lower(booleanField)) > 0",
+ "error": [
+ "Argument of [to_lower] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_lower(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_lower(booleanField)",
+ "error": [
+ "Argument of [to_lower] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = to_radians(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_radians(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_radians(to_integer(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_radians(\"a\")",
+ "error": [
+ "Argument of [to_radians] must be [number], found value [\"a\"] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_radians(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_radians(stringField) > 0",
+ "error": [
+ "Argument of [to_radians] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_radians(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_radians(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_radians(to_integer(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_radians(stringField)",
+ "error": [
+ "Argument of [to_radians] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_radians(numberField, extraArg)",
+ "error": [
+ "Error: [to_radians] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_radians(*)",
+ "error": [
+ "Using wildcards (*) in to_radians is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_radians(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_radians(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_radians(true)",
+ "error": [
+ "Argument of [to_radians] must be [number], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_radians(booleanField) > 0",
+ "error": [
+ "Argument of [to_radians] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_radians(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_radians(booleanField)",
+ "error": [
+ "Argument of [to_radians] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(*)",
+ "error": [
+ "Using wildcards (*) in to_string is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_string(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_boolean(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(to_cartesianshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_datetime(now()))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(to_geopoint(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_geopoint(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(to_geoshape(\"POINT (30 10)\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_geoshape(to_geopoint(\"POINT (30 10)\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_ip(\"127.0.0.1\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(to_ip(\"127.0.0.1\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(to_ip(\"127.0.0.1\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_ip(to_ip(\"127.0.0.1\")))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_version(\"1.0.0\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_string(to_version(\"1.0.0\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_str(to_version(\"1.0.0\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_string(to_version(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(booleanField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(cartesianPointField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(cartesianShapeField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(dateField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(numberField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(geoPointField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(geoShapeField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(ipField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(stringField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_string(versionField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_boolean(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_cartesianpoint(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(cartesianShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_cartesianshape(cartesianPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_datetime(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_geopoint(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(geoShapeField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_geoshape(geoPointField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(ipField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(ipField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(ipField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_ip(ipField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(versionField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(versionField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_str(versionField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_string(to_version(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_string(booleanField, extraArg)",
+ "error": [
+ "Error: [to_string] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_string(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_unsigned_long(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_unsigned_long(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ul(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ulong(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_unsigned_long(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_unsigned_long(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ul(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ulong(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_unsigned_long(*)",
+ "error": [
+ "Using wildcards (*) in to_unsigned_long is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_unsigned_long(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_unsigned_long(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_unsigned_long(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ul(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ulong(true)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_unsigned_long(to_boolean(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_unsigned_long(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_unsigned_long(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ul(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ulong(now())",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_unsigned_long(to_datetime(now()))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_unsigned_long(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_unsigned_long(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ul(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ulong(5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_unsigned_long(to_integer(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_unsigned_long(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_unsigned_long(to_cartesianpoint(\"POINT (30 10)\"))",
+ "error": [
+ "Argument of [to_unsigned_long] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_unsigned_long(booleanField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_unsigned_long(cartesianPointField) > 0",
+ "error": [
+ "Argument of [to_unsigned_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_unsigned_long(dateField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_unsigned_long(numberField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where to_unsigned_long(stringField) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_unsigned_long(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_unsigned_long(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ul(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ulong(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_unsigned_long(to_boolean(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_unsigned_long(cartesianPointField)",
+ "error": [
+ "Argument of [to_unsigned_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_unsigned_long(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_unsigned_long(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ul(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ulong(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_unsigned_long(to_datetime(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_unsigned_long(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_unsigned_long(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ul(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ulong(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_unsigned_long(to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_unsigned_long(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_unsigned_long(booleanField, extraArg)",
+ "error": [
+ "Error: [to_unsigned_long] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_unsigned_long(booleanField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_upper(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_upper(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_upper(to_string(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_upper(5)",
+ "error": [
+ "Argument of [to_upper] must be [string], found value [5] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_upper(stringField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_upper(numberField)) > 0",
+ "error": [
+ "Argument of [to_upper] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_upper(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_upper(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_upper(to_string(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_upper(numberField)",
+ "error": [
+ "Argument of [to_upper] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_upper(stringField, extraArg)",
+ "error": [
+ "Error: [to_upper] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_upper(*)",
+ "error": [
+ "Using wildcards (*) in to_upper is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_upper(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_upper(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_upper(true)",
+ "error": [
+ "Argument of [to_upper] must be [string], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(to_upper(booleanField)) > 0",
+ "error": [
+ "Argument of [to_upper] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_upper(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_upper(booleanField)",
+ "error": [
+ "Argument of [to_upper] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = to_version(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_version(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ver(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_version(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_version(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ver(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_version(*)",
+ "error": [
+ "Using wildcards (*) in to_version is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort to_version(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_version(to_version(\"1.0.0\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row to_version(to_version(\"1.0.0\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_ver(to_version(\"1.0.0\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = to_version(true)",
+ "error": [
+ "Argument of [to_version] must be [string], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_version(versionField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_version(versionField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = to_ver(versionField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval to_version(stringField, extraArg)",
+ "error": [
+ "Error: [to_version] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "row var = trim(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row trim(\"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = trim(to_string(\"a\"))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = trim(5)",
+ "error": [
+ "Argument of [trim] must be [string], found value [5] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(trim(stringField)) > 0",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(trim(numberField)) > 0",
+ "error": [
+ "Argument of [trim] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = trim(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval trim(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = trim(to_string(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval trim(numberField)",
+ "error": [
+ "Argument of [trim] must be [string], found value [numberField] type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval trim(stringField, extraArg)",
+ "error": [
+ "Error: [trim] function expects exactly one argument, got 2."
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = trim(*)",
+ "error": [
+ "Using wildcards (*) in trim is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort trim(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = trim(to_string(true))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "row var = trim(true)",
+ "error": [
+ "Argument of [trim] must be [string], found value [true] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where length(trim(booleanField)) > 0",
+ "error": [
+ "Argument of [trim] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = trim(to_string(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval trim(booleanField)",
+ "error": [
+ "Argument of [trim] must be [string], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = avg(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(avg(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(avg(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(avg(numberField)) + avg(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(avg(numberField)) + avg(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = avg(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), avg(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = avg(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = avg(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), avg(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = avg(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField) by round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = avg(numberField) by var1 = round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), avg(numberField) by round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = avg(numberField) by var1 = round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), avg(numberField) by round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = avg(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = avg(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(stringField)",
+ "error": [
+ "Argument of [avg] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = avg(*)",
+ "error": [
+ "Using wildcards (*) in avg is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort avg(numberField)",
+ "error": [
+ "SORT does not support function avg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where avg(numberField)",
+ "error": [
+ "WHERE does not support function avg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where avg(numberField) > 0",
+ "error": [
+ "WHERE does not support function avg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = avg(numberField)",
+ "error": [
+ "EVAL does not support function avg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = avg(numberField) > 0",
+ "error": [
+ "EVAL does not support function avg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval avg(numberField)",
+ "error": [
+ "EVAL does not support function avg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval avg(numberField) > 0",
+ "error": [
+ "EVAL does not support function avg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(booleanField)",
+ "error": [
+ "Argument of [avg] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = sum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats sum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(sum(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(sum(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(sum(numberField)) + sum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(sum(numberField)) + sum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats sum(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = sum(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), sum(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = sum(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = sum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), sum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = sum(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats sum(numberField) by round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = sum(numberField) by var1 = round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), sum(numberField) by round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = sum(numberField) by var1 = round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), sum(numberField) by round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = sum(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = sum(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats sum(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats sum(stringField)",
+ "error": [
+ "Argument of [sum] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = sum(*)",
+ "error": [
+ "Using wildcards (*) in sum is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort sum(numberField)",
+ "error": [
+ "SORT does not support function sum"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sum(numberField)",
+ "error": [
+ "WHERE does not support function sum"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where sum(numberField) > 0",
+ "error": [
+ "WHERE does not support function sum"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sum(numberField)",
+ "error": [
+ "EVAL does not support function sum"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = sum(numberField) > 0",
+ "error": [
+ "EVAL does not support function sum"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sum(numberField)",
+ "error": [
+ "EVAL does not support function sum"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval sum(numberField) > 0",
+ "error": [
+ "EVAL does not support function sum"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats sum(booleanField)",
+ "error": [
+ "Argument of [sum] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = median(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(median(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(median(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(median(numberField)) + median(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(median(numberField)) + median(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = median(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), median(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = median(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = median(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), median(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = median(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median(numberField) by round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = median(numberField) by var1 = round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), median(numberField) by round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = median(numberField) by var1 = round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), median(numberField) by round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = median(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = median(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median(stringField)",
+ "error": [
+ "Argument of [median] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = median(*)",
+ "error": [
+ "Using wildcards (*) in median is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort median(numberField)",
+ "error": [
+ "SORT does not support function median"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where median(numberField)",
+ "error": [
+ "WHERE does not support function median"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where median(numberField) > 0",
+ "error": [
+ "WHERE does not support function median"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = median(numberField)",
+ "error": [
+ "EVAL does not support function median"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = median(numberField) > 0",
+ "error": [
+ "EVAL does not support function median"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval median(numberField)",
+ "error": [
+ "EVAL does not support function median"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval median(numberField) > 0",
+ "error": [
+ "EVAL does not support function median"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median(booleanField)",
+ "error": [
+ "Argument of [median] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = median_absolute_deviation(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median_absolute_deviation(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(median_absolute_deviation(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(median_absolute_deviation(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(median_absolute_deviation(numberField)) + median_absolute_deviation(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(median_absolute_deviation(numberField)) + median_absolute_deviation(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median_absolute_deviation(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = median_absolute_deviation(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = median_absolute_deviation(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median_absolute_deviation(numberField) by round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField) by round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField) by round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = median_absolute_deviation(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median_absolute_deviation(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median_absolute_deviation(stringField)",
+ "error": [
+ "Argument of [median_absolute_deviation] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = median_absolute_deviation(*)",
+ "error": [
+ "Using wildcards (*) in median_absolute_deviation is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort median_absolute_deviation(numberField)",
+ "error": [
+ "SORT does not support function median_absolute_deviation"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where median_absolute_deviation(numberField)",
+ "error": [
+ "WHERE does not support function median_absolute_deviation"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where median_absolute_deviation(numberField) > 0",
+ "error": [
+ "WHERE does not support function median_absolute_deviation"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = median_absolute_deviation(numberField)",
+ "error": [
+ "EVAL does not support function median_absolute_deviation"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = median_absolute_deviation(numberField) > 0",
+ "error": [
+ "EVAL does not support function median_absolute_deviation"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval median_absolute_deviation(numberField)",
+ "error": [
+ "EVAL does not support function median_absolute_deviation"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval median_absolute_deviation(numberField) > 0",
+ "error": [
+ "EVAL does not support function median_absolute_deviation"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats median_absolute_deviation(booleanField)",
+ "error": [
+ "Argument of [median_absolute_deviation] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = percentile(numberField, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats percentile(numberField, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(percentile(numberField, 5))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(percentile(numberField, 5))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(percentile(numberField, 5)) + percentile(numberField, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(percentile(numberField, 5)) + percentile(numberField, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats percentile(numberField, numberField)",
+ "error": [
+ "Argument of [percentile] must be a constant, received [numberField]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats percentile(numberField / 2, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = percentile(numberField / 2, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), percentile(numberField / 2, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = percentile(numberField / 2, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = percentile(numberField, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), percentile(numberField, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = percentile(numberField, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats percentile(numberField, 5) by round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = percentile(numberField, 5) by var1 = round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), percentile(numberField, 5) by round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = percentile(numberField, 5) by var1 = round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), percentile(numberField, 5) by round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = percentile(numberField, 5) by var1 = round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = percentile(avg(numberField), 5)",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats percentile(avg(numberField), 5)",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats percentile(stringField, 5)",
+ "error": [
+ "Argument of [percentile] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort percentile(numberField, 5)",
+ "error": [
+ "SORT does not support function percentile"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where percentile(numberField, 5)",
+ "error": [
+ "WHERE does not support function percentile"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where percentile(numberField, 5) > 0",
+ "error": [
+ "WHERE does not support function percentile"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = percentile(numberField, 5)",
+ "error": [
+ "EVAL does not support function percentile"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = percentile(numberField, 5) > 0",
+ "error": [
+ "EVAL does not support function percentile"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval percentile(numberField, 5)",
+ "error": [
+ "EVAL does not support function percentile"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval percentile(numberField, 5) > 0",
+ "error": [
+ "EVAL does not support function percentile"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats percentile(booleanField, 5)",
+ "error": [
+ "Argument of [percentile] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = max(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats max(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(max(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(max(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(max(numberField)) + max(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(max(numberField)) + max(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats max(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = max(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), max(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = max(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = max(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), max(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = max(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats max(numberField) by round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = max(numberField) by var1 = round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), max(numberField) by round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = max(numberField) by var1 = round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), max(numberField) by round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = max(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = max(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats max(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats max(stringField)",
+ "error": [
+ "Argument of [max] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = max(*)",
+ "error": [
+ "Using wildcards (*) in max is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = max(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats max(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(max(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(max(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(max(dateField)) + max(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(max(dateField)) + max(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort max(numberField)",
+ "error": [
+ "SORT does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where max(numberField)",
+ "error": [
+ "WHERE does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where max(numberField) > 0",
+ "error": [
+ "WHERE does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where max(dateField)",
+ "error": [
+ "WHERE does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where max(dateField) > 0",
+ "error": [
+ "WHERE does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = max(numberField)",
+ "error": [
+ "EVAL does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = max(numberField) > 0",
+ "error": [
+ "EVAL does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval max(numberField)",
+ "error": [
+ "EVAL does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval max(numberField) > 0",
+ "error": [
+ "EVAL does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = max(dateField)",
+ "error": [
+ "EVAL does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = max(dateField) > 0",
+ "error": [
+ "EVAL does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval max(dateField)",
+ "error": [
+ "EVAL does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval max(dateField) > 0",
+ "error": [
+ "EVAL does not support function max"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats max(booleanField)",
+ "error": [
+ "Argument of [max] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = min(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats min(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(min(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(min(numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(min(numberField)) + min(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(min(numberField)) + min(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats min(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = min(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), min(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = min(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = min(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), min(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = min(numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats min(numberField) by round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var0 = min(numberField) by var1 = round(numberField / 2)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), min(numberField) by round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = min(numberField) by var1 = round(numberField / 2), ipField",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), min(numberField) by round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats avg(numberField), var0 = min(numberField) by var1 = round(numberField / 2), numberField / 2",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = min(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats min(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats min(stringField)",
+ "error": [
+ "Argument of [min] must be [number], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = min(*)",
+ "error": [
+ "Using wildcards (*) in min is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = min(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats min(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(min(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(min(dateField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(min(dateField)) + min(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(min(dateField)) + min(dateField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort min(numberField)",
+ "error": [
+ "SORT does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where min(numberField)",
+ "error": [
+ "WHERE does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where min(numberField) > 0",
+ "error": [
+ "WHERE does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where min(dateField)",
+ "error": [
+ "WHERE does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where min(dateField) > 0",
+ "error": [
+ "WHERE does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = min(numberField)",
+ "error": [
+ "EVAL does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = min(numberField) > 0",
+ "error": [
+ "EVAL does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval min(numberField)",
+ "error": [
+ "EVAL does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval min(numberField) > 0",
+ "error": [
+ "EVAL does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = min(dateField)",
+ "error": [
+ "EVAL does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = min(dateField) > 0",
+ "error": [
+ "EVAL does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval min(dateField)",
+ "error": [
+ "EVAL does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval min(dateField) > 0",
+ "error": [
+ "EVAL does not support function min"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats min(booleanField)",
+ "error": [
+ "Argument of [min] must be [number], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = count(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats count(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(count(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(count(stringField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(count(stringField)) + count(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(count(stringField)) + count(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort count(stringField)",
+ "error": [
+ "SORT does not support function count"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where count(stringField)",
+ "error": [
+ "WHERE does not support function count"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where count(stringField) > 0",
+ "error": [
+ "WHERE does not support function count"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = count(stringField)",
+ "error": [
+ "EVAL does not support function count"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = count(stringField) > 0",
+ "error": [
+ "EVAL does not support function count"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval count(stringField)",
+ "error": [
+ "EVAL does not support function count"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval count(stringField) > 0",
+ "error": [
+ "EVAL does not support function count"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = count_distinct(stringField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats count_distinct(stringField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(count_distinct(stringField, numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(count_distinct(stringField, numberField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = round(count_distinct(stringField, numberField)) + count_distinct(stringField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats round(count_distinct(stringField, numberField)) + count_distinct(stringField, numberField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort count_distinct(stringField, numberField)",
+ "error": [
+ "SORT does not support function count_distinct"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where count_distinct(stringField, numberField)",
+ "error": [
+ "WHERE does not support function count_distinct"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where count_distinct(stringField, numberField) > 0",
+ "error": [
+ "WHERE does not support function count_distinct"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = count_distinct(stringField, numberField)",
+ "error": [
+ "EVAL does not support function count_distinct"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = count_distinct(stringField, numberField) > 0",
+ "error": [
+ "EVAL does not support function count_distinct"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval count_distinct(stringField, numberField)",
+ "error": [
+ "EVAL does not support function count_distinct"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval count_distinct(stringField, numberField) > 0",
+ "error": [
+ "EVAL does not support function count_distinct"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = st_centroid_agg(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats st_centroid_agg(cartesianPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = st_centroid_agg(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats st_centroid_agg(avg(numberField))",
+ "error": [
+ "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats st_centroid_agg(stringField)",
+ "error": [
+ "Argument of [st_centroid_agg] must be [cartesian_point], found value [stringField] type [string]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = st_centroid_agg(*)",
+ "error": [
+ "Using wildcards (*) in st_centroid_agg is not allowed"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = st_centroid_agg(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats st_centroid_agg(geoPointField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort st_centroid_agg(cartesianPointField)",
+ "error": [
+ "SORT does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where st_centroid_agg(cartesianPointField)",
+ "error": [
+ "WHERE does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where st_centroid_agg(cartesianPointField) > 0",
+ "error": [
+ "WHERE does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where st_centroid_agg(geoPointField)",
+ "error": [
+ "WHERE does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where st_centroid_agg(geoPointField) > 0",
+ "error": [
+ "WHERE does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_centroid_agg(cartesianPointField)",
+ "error": [
+ "EVAL does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_centroid_agg(cartesianPointField) > 0",
+ "error": [
+ "EVAL does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_centroid_agg(cartesianPointField)",
+ "error": [
+ "EVAL does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_centroid_agg(cartesianPointField) > 0",
+ "error": [
+ "EVAL does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_centroid_agg(geoPointField)",
+ "error": [
+ "EVAL does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = st_centroid_agg(geoPointField) > 0",
+ "error": [
+ "EVAL does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_centroid_agg(geoPointField)",
+ "error": [
+ "EVAL does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval st_centroid_agg(geoPointField) > 0",
+ "error": [
+ "EVAL does not support function st_centroid_agg"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats st_centroid_agg(booleanField)",
+ "error": [
+ "Argument of [st_centroid_agg] must be [cartesian_point], found value [booleanField] type [boolean]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats var = values(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats values(stringField)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | sort values(stringField)",
+ "error": [
+ "SORT does not support function values"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where values(stringField)",
+ "error": [
+ "WHERE does not support function values"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | where values(stringField) > 0",
+ "error": [
+ "WHERE does not support function values"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = values(stringField)",
+ "error": [
+ "EVAL does not support function values"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval var = values(stringField) > 0",
+ "error": [
+ "EVAL does not support function values"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval values(stringField)",
+ "error": [
+ "EVAL does not support function values"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval values(stringField) > 0",
+ "error": [
+ "EVAL does not support function values"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats by bucket(dateField, 1 year)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats by bin(dateField, 1 year)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats by bucket(numberField, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats by bucket(numberField, numberField)",
+ "error": [
+ "Argument of [bucket] must be a constant, received [numberField]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats by bin(numberField, 5)",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats by bucket(dateField, 5, \"a\", \"a\")",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats by bucket(dateField, numberField, stringField, stringField)",
+ "error": [
+ "Argument of [bucket] must be a constant, received [numberField]",
+ "Argument of [bucket] must be a constant, received [stringField]",
+ "Argument of [bucket] must be a constant, received [stringField]"
+ ],
+ "warning": []
+ },
+ {
+ "query": "from a_index | stats by bin(dateField, 5, \"a\", \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats round(count(stringField)) + count(stringField)",
+ "query": "from a_index | stats by bucket(dateField, 5, now(), now())",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort count(stringField)",
+ "query": "from a_index | stats by bucket(dateField, numberField, dateField, dateField)",
"error": [
- "SORT does not support function count"
+ "Argument of [bucket] must be a constant, received [numberField]",
+ "Argument of [bucket] must be a constant, received [dateField]",
+ "Argument of [bucket] must be a constant, received [dateField]"
],
"warning": []
},
{
- "query": "from a_index | where count(stringField)",
- "error": [
- "WHERE does not support function count"
- ],
+ "query": "from a_index | stats by bin(dateField, 5, now(), now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where count(stringField) > 0",
- "error": [
- "WHERE does not support function count"
- ],
+ "query": "from a_index | stats by bucket(dateField, 5, \"a\", now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = count(stringField)",
+ "query": "from a_index | stats by bucket(dateField, numberField, stringField, dateField)",
"error": [
- "EVAL does not support function count"
+ "Argument of [bucket] must be a constant, received [numberField]",
+ "Argument of [bucket] must be a constant, received [stringField]",
+ "Argument of [bucket] must be a constant, received [dateField]"
],
"warning": []
},
{
- "query": "from a_index | eval var = count(stringField) > 0",
- "error": [
- "EVAL does not support function count"
- ],
+ "query": "from a_index | stats by bin(dateField, 5, \"a\", now())",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval count(stringField)",
- "error": [
- "EVAL does not support function count"
- ],
+ "query": "from a_index | stats by bucket(dateField, 5, now(), \"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval count(stringField) > 0",
+ "query": "from a_index | stats by bucket(dateField, numberField, dateField, stringField)",
"error": [
- "EVAL does not support function count"
+ "Argument of [bucket] must be a constant, received [numberField]",
+ "Argument of [bucket] must be a constant, received [dateField]",
+ "Argument of [bucket] must be a constant, received [stringField]"
],
"warning": []
},
{
- "query": "from a_index | stats var = count_distinct(stringField, numberField)",
+ "query": "from a_index | stats by bin(dateField, 5, now(), \"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats count_distinct(stringField, numberField)",
+ "query": "from a_index | stats by bucket(numberField, 5, 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(count_distinct(stringField, numberField))",
- "error": [],
+ "query": "from a_index | stats by bucket(numberField, numberField, numberField, numberField)",
+ "error": [
+ "Argument of [bucket] must be a constant, received [numberField]",
+ "Argument of [bucket] must be a constant, received [numberField]",
+ "Argument of [bucket] must be a constant, received [numberField]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats round(count_distinct(stringField, numberField))",
+ "query": "from a_index | stats by bin(numberField, 5, 5, 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = round(count_distinct(stringField, numberField)) + count_distinct(stringField, numberField)",
- "error": [],
+ "query": "from a_index | sort bucket(dateField, 1 year)",
+ "error": [
+ "SORT does not support function bucket"
+ ],
"warning": []
},
{
- "query": "from a_index | stats round(count_distinct(stringField, numberField)) + count_distinct(stringField, numberField)",
+ "query": "row var = cbrt(5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort count_distinct(stringField, numberField)",
- "error": [
- "SORT does not support function count_distinct"
- ],
- "warning": []
- },
- {
- "query": "from a_index | where count_distinct(stringField, numberField)",
- "error": [
- "WHERE does not support function count_distinct"
- ],
+ "query": "row cbrt(5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where count_distinct(stringField, numberField) > 0",
- "error": [
- "WHERE does not support function count_distinct"
- ],
+ "query": "row var = cbrt(to_integer(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = count_distinct(stringField, numberField)",
+ "query": "row var = cbrt(true)",
"error": [
- "EVAL does not support function count_distinct"
+ "Argument of [cbrt] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = count_distinct(stringField, numberField) > 0",
- "error": [
- "EVAL does not support function count_distinct"
- ],
+ "query": "from a_index | where cbrt(numberField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval count_distinct(stringField, numberField)",
+ "query": "from a_index | where cbrt(booleanField) > 0",
"error": [
- "EVAL does not support function count_distinct"
+ "Argument of [cbrt] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval count_distinct(stringField, numberField) > 0",
- "error": [
- "EVAL does not support function count_distinct"
- ],
+ "query": "from a_index | eval var = cbrt(numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = st_centroid_agg(cartesianPointField)",
+ "query": "from a_index | eval cbrt(numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats st_centroid_agg(cartesianPointField)",
+ "query": "from a_index | eval var = cbrt(to_integer(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats var = st_centroid_agg(avg(numberField))",
+ "query": "from a_index | eval cbrt(booleanField)",
"error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ "Argument of [cbrt] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats st_centroid_agg(avg(numberField))",
+ "query": "from a_index | eval var = cbrt(*)",
"error": [
- "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]"
+ "Using wildcards (*) in cbrt is not allowed"
],
"warning": []
},
{
- "query": "from a_index | stats st_centroid_agg(stringField)",
+ "query": "from a_index | eval cbrt(numberField, extraArg)",
"error": [
- "Argument of [st_centroid_agg] must be [cartesian_point], found value [stringField] type [string]"
+ "Error: [cbrt] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | stats var = st_centroid_agg(*)",
- "error": [
- "Using wildcards (*) in st_centroid_agg is not allowed"
- ],
+ "query": "from a_index | sort cbrt(numberField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = st_centroid_agg(geoPointField)",
+ "query": "row var = from_base64(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats st_centroid_agg(geoPointField)",
+ "query": "row from_base64(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort st_centroid_agg(cartesianPointField)",
- "error": [
- "SORT does not support function st_centroid_agg"
- ],
+ "query": "row var = from_base64(to_string(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where st_centroid_agg(cartesianPointField)",
+ "query": "row var = from_base64(true)",
"error": [
- "WHERE does not support function st_centroid_agg"
+ "Argument of [from_base64] must be [string], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | where st_centroid_agg(cartesianPointField) > 0",
- "error": [
- "WHERE does not support function st_centroid_agg"
- ],
+ "query": "from a_index | where length(from_base64(stringField)) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where st_centroid_agg(geoPointField)",
+ "query": "from a_index | where length(from_base64(booleanField)) > 0",
"error": [
- "WHERE does not support function st_centroid_agg"
+ "Argument of [from_base64] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | where st_centroid_agg(geoPointField) > 0",
- "error": [
- "WHERE does not support function st_centroid_agg"
- ],
+ "query": "from a_index | eval var = from_base64(stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_centroid_agg(cartesianPointField)",
- "error": [
- "EVAL does not support function st_centroid_agg"
- ],
+ "query": "from a_index | eval from_base64(stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = st_centroid_agg(cartesianPointField) > 0",
- "error": [
- "EVAL does not support function st_centroid_agg"
- ],
+ "query": "from a_index | eval var = from_base64(to_string(booleanField))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval st_centroid_agg(cartesianPointField)",
+ "query": "from a_index | eval from_base64(booleanField)",
"error": [
- "EVAL does not support function st_centroid_agg"
+ "Argument of [from_base64] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval st_centroid_agg(cartesianPointField) > 0",
+ "query": "from a_index | eval var = from_base64(*)",
"error": [
- "EVAL does not support function st_centroid_agg"
+ "Using wildcards (*) in from_base64 is not allowed"
],
"warning": []
},
{
- "query": "from a_index | eval var = st_centroid_agg(geoPointField)",
+ "query": "from a_index | eval from_base64(stringField, extraArg)",
"error": [
- "EVAL does not support function st_centroid_agg"
+ "Error: [from_base64] function expects exactly one argument, got 2."
],
"warning": []
},
{
- "query": "from a_index | eval var = st_centroid_agg(geoPointField) > 0",
- "error": [
- "EVAL does not support function st_centroid_agg"
- ],
+ "query": "from a_index | sort from_base64(stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval st_centroid_agg(geoPointField)",
- "error": [
- "EVAL does not support function st_centroid_agg"
- ],
+ "query": "row var = locate(\"a\", \"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval st_centroid_agg(geoPointField) > 0",
- "error": [
- "EVAL does not support function st_centroid_agg"
- ],
+ "query": "row locate(\"a\", \"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats var = values(stringField)",
+ "query": "row var = locate(to_string(true), to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats values(stringField)",
+ "query": "row var = locate(\"a\", \"a\", 5)",
"error": [],
"warning": []
},
{
- "query": "from a_index | sort values(stringField)",
- "error": [
- "SORT does not support function values"
- ],
+ "query": "row locate(\"a\", \"a\", 5)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where values(stringField)",
- "error": [
- "WHERE does not support function values"
- ],
+ "query": "row var = locate(to_string(true), to_string(true), to_integer(true))",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | where values(stringField) > 0",
+ "query": "row var = locate(true, true, true)",
"error": [
- "WHERE does not support function values"
+ "Argument of [locate] must be [string], found value [true] type [boolean]",
+ "Argument of [locate] must be [string], found value [true] type [boolean]",
+ "Argument of [locate] must be [number], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval var = values(stringField)",
- "error": [
- "EVAL does not support function values"
- ],
+ "query": "from a_index | where locate(stringField, stringField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval var = values(stringField) > 0",
+ "query": "from a_index | where locate(booleanField, booleanField) > 0",
"error": [
- "EVAL does not support function values"
+ "Argument of [locate] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [locate] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | eval values(stringField)",
- "error": [
- "EVAL does not support function values"
- ],
+ "query": "from a_index | where locate(stringField, stringField, numberField) > 0",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | eval values(stringField) > 0",
+ "query": "from a_index | where locate(booleanField, booleanField, booleanField) > 0",
"error": [
- "EVAL does not support function values"
+ "Argument of [locate] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [locate] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [locate] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats by bucket(dateField, 1 year)",
+ "query": "from a_index | eval var = locate(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bin(dateField, 1 year)",
+ "query": "from a_index | eval locate(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(numberField, 5)",
+ "query": "from a_index | eval var = locate(to_string(booleanField), to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(numberField, numberField)",
+ "query": "from a_index | eval locate(booleanField, booleanField)",
"error": [
- "Argument of [bucket] must be a constant, received [numberField]"
+ "Argument of [locate] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [locate] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats by bin(numberField, 5)",
+ "query": "from a_index | eval var = locate(stringField, stringField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(dateField, 5, \"a\", \"a\")",
+ "query": "from a_index | eval locate(stringField, stringField, numberField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(dateField, numberField, stringField, stringField)",
+ "query": "from a_index | eval var = locate(to_string(booleanField), to_string(booleanField), to_integer(booleanField))",
+ "error": [],
+ "warning": []
+ },
+ {
+ "query": "from a_index | eval locate(booleanField, booleanField, booleanField)",
"error": [
- "Argument of [bucket] must be a constant, received [numberField]",
- "Argument of [bucket] must be a constant, received [stringField]",
- "Argument of [bucket] must be a constant, received [stringField]"
+ "Argument of [locate] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [locate] must be [string], found value [booleanField] type [boolean]",
+ "Argument of [locate] must be [number], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats by bin(dateField, 5, \"a\", \"a\")",
- "error": [],
+ "query": "from a_index | eval locate(stringField, stringField, numberField, extraArg)",
+ "error": [
+ "Error: [locate] function expects no more than 3 arguments, got 4."
+ ],
"warning": []
},
{
- "query": "from a_index | stats by bucket(dateField, 5, now(), now())",
+ "query": "from a_index | sort locate(stringField, stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(dateField, numberField, dateField, dateField)",
- "error": [
- "Argument of [bucket] must be a constant, received [numberField]",
- "Argument of [bucket] must be a constant, received [dateField]",
- "Argument of [bucket] must be a constant, received [dateField]"
- ],
+ "query": "row var = to_base64(\"a\")",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats by bin(dateField, 5, now(), now())",
+ "query": "row to_base64(\"a\")",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(dateField, 5, \"a\", now())",
+ "query": "row var = to_base64(to_string(true))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(dateField, numberField, stringField, dateField)",
+ "query": "row var = to_base64(true)",
"error": [
- "Argument of [bucket] must be a constant, received [numberField]",
- "Argument of [bucket] must be a constant, received [stringField]",
- "Argument of [bucket] must be a constant, received [dateField]"
+ "Argument of [to_base64] must be [string], found value [true] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats by bin(dateField, 5, \"a\", now())",
+ "query": "from a_index | where length(to_base64(stringField)) > 0",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(dateField, 5, now(), \"a\")",
- "error": [],
+ "query": "from a_index | where length(to_base64(booleanField)) > 0",
+ "error": [
+ "Argument of [to_base64] must be [string], found value [booleanField] type [boolean]"
+ ],
"warning": []
},
{
- "query": "from a_index | stats by bucket(dateField, numberField, dateField, stringField)",
- "error": [
- "Argument of [bucket] must be a constant, received [numberField]",
- "Argument of [bucket] must be a constant, received [dateField]",
- "Argument of [bucket] must be a constant, received [stringField]"
- ],
+ "query": "from a_index | eval var = to_base64(stringField)",
+ "error": [],
"warning": []
},
{
- "query": "from a_index | stats by bin(dateField, 5, now(), \"a\")",
+ "query": "from a_index | eval to_base64(stringField)",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(numberField, 5, 5, 5)",
+ "query": "from a_index | eval var = to_base64(to_string(booleanField))",
"error": [],
"warning": []
},
{
- "query": "from a_index | stats by bucket(numberField, numberField, numberField, numberField)",
+ "query": "from a_index | eval to_base64(booleanField)",
"error": [
- "Argument of [bucket] must be a constant, received [numberField]",
- "Argument of [bucket] must be a constant, received [numberField]",
- "Argument of [bucket] must be a constant, received [numberField]"
+ "Argument of [to_base64] must be [string], found value [booleanField] type [boolean]"
],
"warning": []
},
{
- "query": "from a_index | stats by bin(numberField, 5, 5, 5)",
- "error": [],
+ "query": "from a_index | eval var = to_base64(*)",
+ "error": [
+ "Using wildcards (*) in to_base64 is not allowed"
+ ],
"warning": []
},
{
- "query": "from a_index | sort bucket(dateField, 1 year)",
+ "query": "from a_index | eval to_base64(stringField, extraArg)",
"error": [
- "SORT does not support function bucket"
+ "Error: [to_base64] function expects exactly one argument, got 2."
],
"warning": []
+ },
+ {
+ "query": "from a_index | sort to_base64(stringField)",
+ "error": [],
+ "warning": []
}
]
}
\ No newline at end of file
diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/validation/helpers.ts
index 9abb3ea3dc2aa..1b75dcd965550 100644
--- a/packages/kbn-esql-validation-autocomplete/src/validation/helpers.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/validation/helpers.ts
@@ -7,6 +7,7 @@
*/
import type { ESQLAst, ESQLAstItem, ESQLMessage, ESQLSingleAstItem } from '@kbn/esql-ast';
+import { FunctionDefinition } from '../definitions/types';
import { getAllArrayTypes, getAllArrayValues } from '../shared/helpers';
import { getMessageFromId } from './errors';
import type { ESQLPolicy, ReferenceMaps } from './types';
@@ -38,6 +39,21 @@ export function buildQueryForFieldsForStringSources(queryString: string, ast: ES
return customQuery;
}
+/**
+ * Returns the maximum and minimum number of parameters allowed by a function
+ *
+ * Used for too-many, too-few arguments validation
+ */
+export function getMaxMinNumberOfParams(definition: FunctionDefinition) {
+ let min = Infinity;
+ let max = 0;
+ definition.signatures.forEach(({ params, minParams }) => {
+ min = Math.min(min, params.filter(({ optional }) => !optional).length);
+ max = Math.max(max, minParams ? Infinity : params.length);
+ });
+ return { min, max };
+}
+
/**
* We only want to report one message when any number of the elements in an array argument is of the wrong type
*/
diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts
index 01d0695af4a6c..c05e6e2f28787 100644
--- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts
@@ -9,9 +9,9 @@
import { join } from 'path';
import { writeFile, readFile } from 'fs/promises';
import { ignoreErrorsMap, validateQuery } from './validation';
-import { evalFunctionsDefinitions } from '../definitions/functions';
+import { evalFunctionDefinitions } from '../definitions/functions';
import { getFunctionSignatures } from '../definitions/helpers';
-import { FunctionDefinition } from '../definitions/types';
+import { FunctionDefinition, SupportedFieldType, supportedFieldTypes } from '../definitions/types';
import { chronoLiterals, timeLiterals } from '../definitions/literals';
import { statsAggregationFunctionDefinitions } from '../definitions/aggs';
import capitalize from 'lodash/capitalize';
@@ -21,20 +21,8 @@ import { nonNullable } from '../shared/helpers';
import { METADATA_FIELDS } from '../shared/constants';
import { FUNCTION_DESCRIBE_BLOCK_NAME } from './function_describe_block_name';
-const fieldTypes = [
- 'number',
- 'date',
- 'boolean',
- 'version',
- 'ip',
- 'string',
- 'cartesian_point',
- 'cartesian_shape',
- 'geo_point',
- 'geo_shape',
-];
const fields = [
- ...fieldTypes.map((type) => ({ name: `${camelCase(type)}Field`, type })),
+ ...supportedFieldTypes.map((type) => ({ name: `${camelCase(type)}Field`, type })),
{ name: 'any#Char$Field', type: 'number' },
{ name: 'kubernetes.something.something', type: 'number' },
{ name: '@timestamp', type: 'date' },
@@ -97,13 +85,13 @@ function getCallbackMocks() {
};
}
-const toInteger = evalFunctionsDefinitions.find(({ name }) => name === 'to_integer')!;
-const toStringSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_string')!;
-const toDateSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_datetime')!;
-const toBooleanSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_boolean')!;
-const toIpSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_ip')!;
-const toGeoPointSignature = evalFunctionsDefinitions.find(({ name }) => name === 'to_geopoint')!;
-const toCartesianPointSignature = evalFunctionsDefinitions.find(
+const toInteger = evalFunctionDefinitions.find(({ name }) => name === 'to_integer')!;
+const toStringSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_string')!;
+const toDateSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_datetime')!;
+const toBooleanSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_boolean')!;
+const toIpSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_ip')!;
+const toGeoPointSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_geopoint')!;
+const toCartesianPointSignature = evalFunctionDefinitions.find(
({ name }) => name === 'to_cartesianpoint'
)!;
@@ -129,6 +117,9 @@ function getLiteralType(typeString: 'chrono_literal' | 'time_literal') {
}
return `1 ${literals[typeString]}`;
}
+
+export const fieldNameFromType = (type: SupportedFieldType) => `${camelCase(type)}Field`;
+
function getFieldName(
typeString: string,
{ useNestedFunction, isStats }: { useNestedFunction: boolean; isStats: boolean }
@@ -179,7 +170,7 @@ function getFieldMapping(
};
return params.map(({ name: _name, type, constantOnly, literalOptions, ...rest }) => {
const typeString: string = type;
- if (fieldTypes.includes(typeString)) {
+ if (supportedFieldTypes.includes(typeString as SupportedFieldType)) {
if (useLiterals && literalOptions) {
return {
name: `"${literalOptions[0]}"`,
@@ -1024,15 +1015,15 @@ describe('validation logic', () => {
[]
);
- for (const field of fieldTypes) {
- testErrorsAndWarnings(`from a_index | where ${camelCase(field)}Field IS NULL`, []);
- testErrorsAndWarnings(`from a_index | where ${camelCase(field)}Field IS null`, []);
- testErrorsAndWarnings(`from a_index | where ${camelCase(field)}Field is null`, []);
- testErrorsAndWarnings(`from a_index | where ${camelCase(field)}Field is NULL`, []);
- testErrorsAndWarnings(`from a_index | where ${camelCase(field)}Field IS NOT NULL`, []);
- testErrorsAndWarnings(`from a_index | where ${camelCase(field)}Field IS NOT null`, []);
- testErrorsAndWarnings(`from a_index | where ${camelCase(field)}Field IS not NULL`, []);
- testErrorsAndWarnings(`from a_index | where ${camelCase(field)}Field Is nOt NuLL`, []);
+ for (const field of supportedFieldTypes) {
+ testErrorsAndWarnings(`from a_index | where ${fieldNameFromType(field)} IS NULL`, []);
+ testErrorsAndWarnings(`from a_index | where ${fieldNameFromType(field)} IS null`, []);
+ testErrorsAndWarnings(`from a_index | where ${fieldNameFromType(field)} is null`, []);
+ testErrorsAndWarnings(`from a_index | where ${fieldNameFromType(field)} is NULL`, []);
+ testErrorsAndWarnings(`from a_index | where ${fieldNameFromType(field)} IS NOT NULL`, []);
+ testErrorsAndWarnings(`from a_index | where ${fieldNameFromType(field)} IS NOT null`, []);
+ testErrorsAndWarnings(`from a_index | where ${fieldNameFromType(field)} IS not NULL`, []);
+ testErrorsAndWarnings(`from a_index | where ${fieldNameFromType(field)} Is nOt NuLL`, []);
}
// this is a scenario that was failing because "or" didn't accept "null"
@@ -1087,14 +1078,14 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval a=["a", "b"]', []);
testErrorsAndWarnings('from a_index | eval a=null', []);
- for (const field of fieldTypes) {
- testErrorsAndWarnings(`from a_index | eval ${camelCase(field)}Field IS NULL`, []);
- testErrorsAndWarnings(`from a_index | eval ${camelCase(field)}Field IS null`, []);
- testErrorsAndWarnings(`from a_index | eval ${camelCase(field)}Field is null`, []);
- testErrorsAndWarnings(`from a_index | eval ${camelCase(field)}Field is NULL`, []);
- testErrorsAndWarnings(`from a_index | eval ${camelCase(field)}Field IS NOT NULL`, []);
- testErrorsAndWarnings(`from a_index | eval ${camelCase(field)}Field IS NOT null`, []);
- testErrorsAndWarnings(`from a_index | eval ${camelCase(field)}Field IS not NULL`, []);
+ for (const field of supportedFieldTypes) {
+ testErrorsAndWarnings(`from a_index | eval ${fieldNameFromType(field)} IS NULL`, []);
+ testErrorsAndWarnings(`from a_index | eval ${fieldNameFromType(field)} IS null`, []);
+ testErrorsAndWarnings(`from a_index | eval ${fieldNameFromType(field)} is null`, []);
+ testErrorsAndWarnings(`from a_index | eval ${fieldNameFromType(field)} is NULL`, []);
+ testErrorsAndWarnings(`from a_index | eval ${fieldNameFromType(field)} IS NOT NULL`, []);
+ testErrorsAndWarnings(`from a_index | eval ${fieldNameFromType(field)} IS NOT null`, []);
+ testErrorsAndWarnings(`from a_index | eval ${fieldNameFromType(field)} IS not NULL`, []);
}
for (const nesting of NESTED_DEPTHS) {
@@ -2060,6 +2051,20 @@ describe('validation logic', () => {
);
testErrorsAndWarnings('from a_index | sort date_diff("year", dateField, dateField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = date_diff("year", to_datetime(dateField), to_datetime(dateField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval date_diff(booleanField, booleanField, booleanField)',
+ [
+ 'Argument of [date_diff] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [date_diff] must be [date], found value [booleanField] type [boolean]',
+ 'Argument of [date_diff] must be [date], found value [booleanField] type [boolean]',
+ ]
+ );
});
describe('abs', () => {
@@ -2094,6 +2099,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort abs(numberField)', []);
+ testErrorsAndWarnings('row var = abs(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = abs(true)', [
+ 'Argument of [abs] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where abs(booleanField) > 0', [
+ 'Argument of [abs] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = abs(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval abs(booleanField)', [
+ 'Argument of [abs] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('acos', () => {
@@ -2128,6 +2148,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort acos(numberField)', []);
+ testErrorsAndWarnings('row var = acos(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = acos(true)', [
+ 'Argument of [acos] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where acos(booleanField) > 0', [
+ 'Argument of [acos] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = acos(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval acos(booleanField)', [
+ 'Argument of [acos] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('asin', () => {
@@ -2162,6 +2197,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort asin(numberField)', []);
+ testErrorsAndWarnings('row var = asin(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = asin(true)', [
+ 'Argument of [asin] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where asin(booleanField) > 0', [
+ 'Argument of [asin] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = asin(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval asin(booleanField)', [
+ 'Argument of [asin] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('atan', () => {
@@ -2196,6 +2246,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort atan(numberField)', []);
+ testErrorsAndWarnings('row var = atan(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = atan(true)', [
+ 'Argument of [atan] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where atan(booleanField) > 0', [
+ 'Argument of [atan] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = atan(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval atan(booleanField)', [
+ 'Argument of [atan] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('atan2', () => {
@@ -2233,6 +2298,27 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort atan2(numberField, numberField)', []);
+ testErrorsAndWarnings('row var = atan2(to_integer(true), to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = atan2(true, true)', [
+ 'Argument of [atan2] must be [number], found value [true] type [boolean]',
+ 'Argument of [atan2] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where atan2(booleanField, booleanField) > 0', [
+ 'Argument of [atan2] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [atan2] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = atan2(to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval atan2(booleanField, booleanField)', [
+ 'Argument of [atan2] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [atan2] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('case', () => {
@@ -2241,6 +2327,10 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval var = case(booleanField, stringField)', []);
testErrorsAndWarnings('from a_index | eval case(booleanField, stringField)', []);
testErrorsAndWarnings('from a_index | sort case(booleanField, stringField)', []);
+
+ testErrorsAndWarnings('row var = case(to_cartesianpoint("POINT (30 10)"), true)', [
+ 'Argument of [case] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]);
});
describe('ceil', () => {
@@ -2275,6 +2365,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort ceil(numberField)', []);
+ testErrorsAndWarnings('row var = ceil(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = ceil(true)', [
+ 'Argument of [ceil] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where ceil(booleanField) > 0', [
+ 'Argument of [ceil] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = ceil(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval ceil(booleanField)', [
+ 'Argument of [ceil] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('cidr_match', () => {
@@ -2301,6 +2406,25 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort cidr_match(ipField, stringField)', []);
+ testErrorsAndWarnings(
+ 'row var = cidr_match(to_ip(to_ip("127.0.0.1")), to_string(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = cidr_match(true, true)', [
+ 'Argument of [cidr_match] must be [ip], found value [true] type [boolean]',
+ 'Argument of [cidr_match] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = cidr_match(to_ip(ipField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval cidr_match(booleanField, booleanField)', [
+ 'Argument of [cidr_match] must be [ip], found value [booleanField] type [boolean]',
+ 'Argument of [cidr_match] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('coalesce', () => {
@@ -2309,6 +2433,277 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval var = coalesce(stringField)', []);
testErrorsAndWarnings('from a_index | eval coalesce(stringField)', []);
testErrorsAndWarnings('from a_index | sort coalesce(stringField)', []);
+ testErrorsAndWarnings('row var = coalesce(true)', []);
+ testErrorsAndWarnings('row coalesce(true)', []);
+ testErrorsAndWarnings('row var = coalesce(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = coalesce(true, true)', []);
+ testErrorsAndWarnings('row coalesce(true, true)', []);
+ testErrorsAndWarnings('row var = coalesce(to_boolean(true), to_boolean(true))', []);
+ testErrorsAndWarnings('row var = coalesce(5)', []);
+ testErrorsAndWarnings('row coalesce(5)', []);
+ testErrorsAndWarnings('row var = coalesce(to_integer(true))', []);
+ testErrorsAndWarnings('row var = coalesce(5, 5)', []);
+ testErrorsAndWarnings('row coalesce(5, 5)', []);
+ testErrorsAndWarnings('row var = coalesce(to_integer(true), to_integer(true))', []);
+ testErrorsAndWarnings('row var = coalesce(to_string(true))', []);
+ testErrorsAndWarnings('row var = coalesce("a", "a")', []);
+ testErrorsAndWarnings('row coalesce("a", "a")', []);
+ testErrorsAndWarnings('row var = coalesce(to_string(true), to_string(true))', []);
+
+ testErrorsAndWarnings('from a_index | where coalesce(numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where coalesce(numberField, numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where length(coalesce(stringField)) > 0', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(coalesce(stringField, stringField)) > 0',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(booleanField, booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(booleanField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_boolean(booleanField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(numberField, numberField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(numberField, numberField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(stringField, stringField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(stringField, stringField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | sort coalesce(booleanField)', []);
+ testErrorsAndWarnings('row var = coalesce(5, true)', []);
+ testErrorsAndWarnings('row coalesce(5, true)', []);
+ testErrorsAndWarnings('row var = coalesce(to_integer(true), to_boolean(true))', []);
+ testErrorsAndWarnings('row var = coalesce(now())', []);
+ testErrorsAndWarnings('row coalesce(now())', []);
+ testErrorsAndWarnings('row var = coalesce(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = coalesce(now(), true)', []);
+ testErrorsAndWarnings('row coalesce(now(), true)', []);
+ testErrorsAndWarnings('row var = coalesce(to_datetime(now()), to_boolean(true))', []);
+ testErrorsAndWarnings('row var = coalesce("a", true)', []);
+ testErrorsAndWarnings('row coalesce("a", true)', []);
+ testErrorsAndWarnings('row var = coalesce(to_string(true), to_boolean(true))', []);
+ testErrorsAndWarnings('row var = coalesce(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row coalesce(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = coalesce(to_ip(to_ip("127.0.0.1")))', []);
+ testErrorsAndWarnings('row var = coalesce(to_ip("127.0.0.1"), true)', []);
+ testErrorsAndWarnings('row coalesce(to_ip("127.0.0.1"), true)', []);
+ testErrorsAndWarnings(
+ 'row var = coalesce(to_ip(to_ip("127.0.0.1")), to_boolean(true))',
+ []
+ );
+ testErrorsAndWarnings('row var = coalesce(to_cartesianpoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row coalesce(to_cartesianpoint("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = coalesce(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = coalesce(to_cartesianpoint("POINT (30 10)"), true)', []);
+ testErrorsAndWarnings('row coalesce(to_cartesianpoint("POINT (30 10)"), true)', []);
+
+ testErrorsAndWarnings(
+ 'row var = coalesce(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_boolean(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = coalesce(to_cartesianshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row coalesce(to_cartesianshape("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = coalesce(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = coalesce(to_cartesianshape("POINT (30 10)"), true)', []);
+ testErrorsAndWarnings('row coalesce(to_cartesianshape("POINT (30 10)"), true)', []);
+
+ testErrorsAndWarnings(
+ 'row var = coalesce(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_boolean(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = coalesce(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row coalesce(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = coalesce(to_geopoint(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = coalesce(to_geopoint("POINT (30 10)"), true)', []);
+ testErrorsAndWarnings('row coalesce(to_geopoint("POINT (30 10)"), true)', []);
+
+ testErrorsAndWarnings(
+ 'row var = coalesce(to_geopoint(to_geopoint("POINT (30 10)")), to_boolean(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = coalesce(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row coalesce(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = coalesce(to_geoshape(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = coalesce(to_geoshape("POINT (30 10)"), true)', []);
+ testErrorsAndWarnings('row coalesce(to_geoshape("POINT (30 10)"), true)', []);
+
+ testErrorsAndWarnings(
+ 'row var = coalesce(to_geoshape(to_geopoint("POINT (30 10)")), to_boolean(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = coalesce(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row coalesce(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = coalesce(to_version("a"))', []);
+ testErrorsAndWarnings('row var = coalesce(to_version("1.0.0"), true)', []);
+ testErrorsAndWarnings('row coalesce(to_version("1.0.0"), true)', []);
+ testErrorsAndWarnings('row var = coalesce(to_version("a"), to_boolean(true))', []);
+ testErrorsAndWarnings('from a_index | where coalesce(numberField, booleanField) > 0', []);
+ testErrorsAndWarnings(
+ 'from a_index | where length(coalesce(stringField, booleanField)) > 0',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval var = coalesce(numberField, booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(numberField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_integer(booleanField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(dateField, booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(dateField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_datetime(dateField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(stringField, booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(stringField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_string(booleanField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(to_ip(ipField))', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(ipField, booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(ipField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_ip(ipField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(cartesianPointField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(cartesianPointField, booleanField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval coalesce(cartesianPointField, booleanField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_cartesianpoint(cartesianPointField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(cartesianShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(cartesianShapeField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(cartesianShapeField, booleanField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval coalesce(cartesianShapeField, booleanField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_cartesianshape(cartesianPointField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(to_geopoint(geoPointField))', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(geoPointField, booleanField)',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval coalesce(geoPointField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_geopoint(geoPointField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(to_geoshape(geoPointField))', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(geoShapeField, booleanField)',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval coalesce(geoShapeField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_geoshape(geoPointField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = coalesce(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(to_version(stringField))', []);
+ testErrorsAndWarnings('from a_index | eval var = coalesce(versionField, booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(versionField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = coalesce(to_version(stringField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | sort coalesce(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval coalesce(cartesianPointField)', []);
});
describe('concat', () => {
@@ -2318,6 +2713,7 @@ describe('validation logic', () => {
testErrorsAndWarnings('row var = concat(5, 5)', [
'Argument of [concat] must be [string], found value [5] type [number]',
+ 'Argument of [concat] must be [string], found value [5] type [number]',
]);
testErrorsAndWarnings(
@@ -2327,6 +2723,7 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | where length(concat(numberField, numberField)) > 0', [
'Argument of [concat] must be [string], found value [numberField] type [number]',
+ 'Argument of [concat] must be [string], found value [numberField] type [number]',
]);
testErrorsAndWarnings('from a_index | eval var = concat(stringField, stringField)', []);
@@ -2339,9 +2736,34 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval concat(numberField, numberField)', [
'Argument of [concat] must be [string], found value [numberField] type [number]',
+ 'Argument of [concat] must be [string], found value [numberField] type [number]',
]);
testErrorsAndWarnings('from a_index | sort concat(stringField, stringField)', []);
+ testErrorsAndWarnings('row var = concat(to_string(true), to_string(true))', []);
+
+ testErrorsAndWarnings('row var = concat(true, true)', [
+ 'Argument of [concat] must be [string], found value [true] type [boolean]',
+ 'Argument of [concat] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(concat(booleanField, booleanField)) > 0',
+ [
+ 'Argument of [concat] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [concat] must be [string], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = concat(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval concat(booleanField, booleanField)', [
+ 'Argument of [concat] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [concat] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('cos', () => {
@@ -2376,6 +2798,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort cos(numberField)', []);
+ testErrorsAndWarnings('row var = cos(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = cos(true)', [
+ 'Argument of [cos] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where cos(booleanField) > 0', [
+ 'Argument of [cos] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = cos(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval cos(booleanField)', [
+ 'Argument of [cos] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('cosh', () => {
@@ -2410,6 +2847,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort cosh(numberField)', []);
+ testErrorsAndWarnings('row var = cosh(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = cosh(true)', [
+ 'Argument of [cosh] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where cosh(booleanField) > 0', [
+ 'Argument of [cosh] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = cosh(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval cosh(booleanField)', [
+ 'Argument of [cosh] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('date_extract', () => {
@@ -2445,33 +2897,63 @@ describe('validation logic', () => {
'from a_index | sort date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", dateField)',
[]
);
+
+ testErrorsAndWarnings('row var = date_extract(true, true)', [
+ 'Argument of [date_extract] must be [chrono_literal], found value [true] type [boolean]',
+ 'Argument of [date_extract] must be [date], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", to_datetime(dateField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval date_extract(booleanField, booleanField)', [
+ 'Argument of [date_extract] must be [chrono_literal], found value [booleanField] type [boolean]',
+ 'Argument of [date_extract] must be [date], found value [booleanField] type [boolean]',
+ ]);
});
describe('date_format', () => {
- testErrorsAndWarnings('row var = date_format(now(), "a")', []);
- testErrorsAndWarnings('row date_format(now(), "a")', []);
- testErrorsAndWarnings('from a_index | eval var = date_format(dateField, stringField)', []);
- testErrorsAndWarnings('from a_index | eval date_format(dateField, stringField)', []);
+ testErrorsAndWarnings('row var = date_format("a", now())', []);
+ testErrorsAndWarnings('row date_format("a", now())', []);
+ testErrorsAndWarnings('from a_index | eval var = date_format(stringField, dateField)', []);
+ testErrorsAndWarnings('from a_index | eval date_format(stringField, dateField)', []);
testErrorsAndWarnings(
- 'from a_index | eval var = date_format(to_datetime(stringField), to_string(stringField))',
+ 'from a_index | eval var = date_format(to_string(stringField), to_datetime(stringField))',
[]
);
testErrorsAndWarnings('from a_index | eval date_format(stringField, numberField)', [
- 'Argument of [date_format] must be [date], found value [stringField] type [string]',
- 'Argument of [date_format] must be [string], found value [numberField] type [number]',
+ 'Argument of [date_format] must be [date], found value [numberField] type [number]',
]);
- testErrorsAndWarnings('from a_index | eval date_format(dateField, stringField, extraArg)', [
+ testErrorsAndWarnings('from a_index | eval date_format(stringField, dateField, extraArg)', [
'Error: [date_format] function expects no more than 2 arguments, got 3.',
]);
- testErrorsAndWarnings('from a_index | sort date_format(dateField, stringField)', []);
+ testErrorsAndWarnings('from a_index | sort date_format(stringField, dateField)', []);
+
+ testErrorsAndWarnings('row var = date_format(true, true)', [
+ 'Argument of [date_format] must be [string], found value [true] type [boolean]',
+ 'Argument of [date_format] must be [date], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = date_format(to_string(booleanField), to_datetime(dateField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval date_format(booleanField, booleanField)', [
+ 'Argument of [date_format] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [date_format] must be [date], found value [booleanField] type [boolean]',
+ ]);
});
describe('date_parse', () => {
testErrorsAndWarnings('row var = date_parse("a", "a")', []);
+ testErrorsAndWarnings('row var = date_parse("a")', []);
testErrorsAndWarnings('row date_parse("a", "a")', []);
testErrorsAndWarnings('row var = date_parse(to_string("a"), to_string("a"))', []);
@@ -2480,6 +2962,7 @@ describe('validation logic', () => {
'Argument of [date_parse] must be [string], found value [5] type [number]',
]);
+ testErrorsAndWarnings('from a_index | eval var = date_parse(stringField)', []);
testErrorsAndWarnings('from a_index | eval var = date_parse(stringField, stringField)', []);
testErrorsAndWarnings('from a_index | eval date_parse(stringField, stringField)', []);
@@ -2495,16 +2978,32 @@ describe('validation logic', () => {
testErrorsAndWarnings(
'from a_index | eval date_parse(stringField, stringField, extraArg)',
- ['Error: [date_parse] function expects exactly 2 arguments, got 3.']
+ ['Error: [date_parse] function expects no more than 2 arguments, got 3.']
);
testErrorsAndWarnings('from a_index | sort date_parse(stringField, stringField)', []);
- });
+ testErrorsAndWarnings('row var = date_parse(to_string(true), to_string(true))', []);
- describe('date_trunc', () => {
- testErrorsAndWarnings('row var = date_trunc(1 year, now())', []);
- testErrorsAndWarnings('row date_trunc(1 year, now())', []);
- testErrorsAndWarnings('from a_index | eval var = date_trunc(1 year, dateField)', []);
+ testErrorsAndWarnings('row var = date_parse(true, true)', [
+ 'Argument of [date_parse] must be [string], found value [true] type [boolean]',
+ 'Argument of [date_parse] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = date_parse(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval date_parse(booleanField, booleanField)', [
+ 'Argument of [date_parse] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [date_parse] must be [string], found value [booleanField] type [boolean]',
+ ]);
+ });
+
+ describe('date_trunc', () => {
+ testErrorsAndWarnings('row var = date_trunc(1 year, now())', []);
+ testErrorsAndWarnings('row date_trunc(1 year, now())', []);
+ testErrorsAndWarnings('from a_index | eval var = date_trunc(1 year, dateField)', []);
testErrorsAndWarnings('from a_index | eval date_trunc(1 year, dateField)', []);
testErrorsAndWarnings(
@@ -2522,6 +3021,31 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort date_trunc(1 year, dateField)', []);
+ testErrorsAndWarnings('row var = date_trunc(now(), now())', []);
+ testErrorsAndWarnings('row date_trunc(now(), now())', []);
+
+ testErrorsAndWarnings('row var = date_trunc(true, true)', [
+ 'Argument of [date_trunc] must be [time_literal], found value [true] type [boolean]',
+ 'Argument of [date_trunc] must be [date], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = date_trunc(1 year, to_datetime(dateField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval date_trunc(booleanField, booleanField)', [
+ 'Argument of [date_trunc] must be [time_literal], found value [booleanField] type [boolean]',
+ 'Argument of [date_trunc] must be [date], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = date_trunc(dateField, dateField)', []);
+ testErrorsAndWarnings('from a_index | eval date_trunc(dateField, dateField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = date_trunc(to_datetime(dateField), to_datetime(dateField))',
+ []
+ );
});
describe('e', () => {
@@ -2566,6 +3090,22 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort ends_with(stringField, stringField)', []);
+ testErrorsAndWarnings('row var = ends_with(to_string(true), to_string(true))', []);
+
+ testErrorsAndWarnings('row var = ends_with(true, true)', [
+ 'Argument of [ends_with] must be [string], found value [true] type [boolean]',
+ 'Argument of [ends_with] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = ends_with(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval ends_with(booleanField, booleanField)', [
+ 'Argument of [ends_with] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [ends_with] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('floor', () => {
@@ -2600,6 +3140,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort floor(numberField)', []);
+ testErrorsAndWarnings('row var = floor(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = floor(true)', [
+ 'Argument of [floor] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where floor(booleanField) > 0', [
+ 'Argument of [floor] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = floor(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval floor(booleanField)', [
+ 'Argument of [floor] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('greatest', () => {
@@ -2608,6 +3163,136 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval var = greatest(stringField)', []);
testErrorsAndWarnings('from a_index | eval greatest(stringField)', []);
testErrorsAndWarnings('from a_index | sort greatest(stringField)', []);
+ testErrorsAndWarnings('row var = greatest(true)', []);
+ testErrorsAndWarnings('row greatest(true)', []);
+ testErrorsAndWarnings('row var = greatest(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = greatest(true, true)', []);
+ testErrorsAndWarnings('row greatest(true, true)', []);
+ testErrorsAndWarnings('row var = greatest(to_boolean(true), to_boolean(true))', []);
+ testErrorsAndWarnings('row var = greatest(5, 5)', []);
+ testErrorsAndWarnings('row greatest(5, 5)', []);
+ testErrorsAndWarnings('row var = greatest(to_integer(true), to_integer(true))', []);
+ testErrorsAndWarnings('row var = greatest(5)', []);
+ testErrorsAndWarnings('row greatest(5)', []);
+ testErrorsAndWarnings('row var = greatest(to_integer(true))', []);
+ testErrorsAndWarnings('row var = greatest(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row greatest(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = greatest(to_ip(to_ip("127.0.0.1")), to_ip(to_ip("127.0.0.1")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = greatest(to_string(true))', []);
+ testErrorsAndWarnings('row var = greatest("a", "a")', []);
+ testErrorsAndWarnings('row greatest("a", "a")', []);
+ testErrorsAndWarnings('row var = greatest(to_string(true), to_string(true))', []);
+ testErrorsAndWarnings('row var = greatest(to_version("1.0.0"), to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row greatest(to_version("1.0.0"), to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = greatest(to_version("a"), to_version("a"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = greatest(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))',
+ [
+ 'Argument of [greatest] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ 'Argument of [greatest] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | where greatest(numberField, numberField) > 0', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | where greatest(cartesianPointField, cartesianPointField) > 0',
+ [
+ 'Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ 'Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | where greatest(numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where greatest(cartesianPointField) > 0', [
+ 'Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(greatest(stringField)) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where length(greatest(cartesianPointField)) > 0', [
+ 'Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(greatest(stringField, stringField)) > 0',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(greatest(cartesianPointField, cartesianPointField)) > 0',
+ [
+ 'Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ 'Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = greatest(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval greatest(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = greatest(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval greatest(cartesianPointField)', [
+ 'Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = greatest(booleanField, booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval greatest(booleanField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = greatest(to_boolean(booleanField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval greatest(cartesianPointField, cartesianPointField)',
+ [
+ 'Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ 'Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = greatest(numberField, numberField)', []);
+ testErrorsAndWarnings('from a_index | eval greatest(numberField, numberField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = greatest(to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = greatest(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval greatest(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = greatest(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = greatest(ipField, ipField)', []);
+ testErrorsAndWarnings('from a_index | eval greatest(ipField, ipField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = greatest(to_ip(ipField), to_ip(ipField))',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval var = greatest(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = greatest(stringField, stringField)', []);
+ testErrorsAndWarnings('from a_index | eval greatest(stringField, stringField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = greatest(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = greatest(versionField, versionField)', []);
+ testErrorsAndWarnings('from a_index | eval greatest(versionField, versionField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = greatest(to_version(stringField), to_version(stringField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | sort greatest(booleanField)', []);
});
describe('least', () => {
@@ -2616,6 +3301,136 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval var = least(stringField)', []);
testErrorsAndWarnings('from a_index | eval least(stringField)', []);
testErrorsAndWarnings('from a_index | sort least(stringField)', []);
+ testErrorsAndWarnings('row var = least(true)', []);
+ testErrorsAndWarnings('row least(true)', []);
+ testErrorsAndWarnings('row var = least(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = least(true, true)', []);
+ testErrorsAndWarnings('row least(true, true)', []);
+ testErrorsAndWarnings('row var = least(to_boolean(true), to_boolean(true))', []);
+ testErrorsAndWarnings('row var = least(5, 5)', []);
+ testErrorsAndWarnings('row least(5, 5)', []);
+ testErrorsAndWarnings('row var = least(to_integer(true), to_integer(true))', []);
+ testErrorsAndWarnings('row var = least(5)', []);
+ testErrorsAndWarnings('row least(5)', []);
+ testErrorsAndWarnings('row var = least(to_integer(true))', []);
+ testErrorsAndWarnings('row var = least(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row least(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = least(to_ip(to_ip("127.0.0.1")), to_ip(to_ip("127.0.0.1")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = least(to_string(true))', []);
+ testErrorsAndWarnings('row var = least("a", "a")', []);
+ testErrorsAndWarnings('row least("a", "a")', []);
+ testErrorsAndWarnings('row var = least(to_string(true), to_string(true))', []);
+ testErrorsAndWarnings('row var = least(to_version("1.0.0"), to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row least(to_version("1.0.0"), to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = least(to_version("a"), to_version("a"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = least(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))',
+ [
+ 'Argument of [least] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ 'Argument of [least] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | where least(numberField, numberField) > 0', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | where least(cartesianPointField, cartesianPointField) > 0',
+ [
+ 'Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ 'Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | where least(numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where least(cartesianPointField) > 0', [
+ 'Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(least(stringField)) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where length(least(cartesianPointField)) > 0', [
+ 'Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(least(stringField, stringField)) > 0',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(least(cartesianPointField, cartesianPointField)) > 0',
+ [
+ 'Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ 'Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = least(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval least(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = least(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval least(cartesianPointField)', [
+ 'Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = least(booleanField, booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval least(booleanField, booleanField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = least(to_boolean(booleanField), to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval least(cartesianPointField, cartesianPointField)',
+ [
+ 'Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ 'Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = least(numberField, numberField)', []);
+ testErrorsAndWarnings('from a_index | eval least(numberField, numberField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = least(to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = least(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval least(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = least(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = least(ipField, ipField)', []);
+ testErrorsAndWarnings('from a_index | eval least(ipField, ipField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = least(to_ip(ipField), to_ip(ipField))',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval var = least(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = least(stringField, stringField)', []);
+ testErrorsAndWarnings('from a_index | eval least(stringField, stringField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = least(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = least(versionField, versionField)', []);
+ testErrorsAndWarnings('from a_index | eval least(versionField, versionField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = least(to_version(stringField), to_version(stringField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | sort least(booleanField)', []);
});
describe('left', () => {
@@ -2656,6 +3471,27 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort left(stringField, numberField)', []);
+ testErrorsAndWarnings('row var = left(to_string(true), to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = left(true, true)', [
+ 'Argument of [left] must be [string], found value [true] type [boolean]',
+ 'Argument of [left] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(left(booleanField, booleanField)) > 0', [
+ 'Argument of [left] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [left] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = left(to_string(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval left(booleanField, booleanField)', [
+ 'Argument of [left] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [left] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('length', () => {
@@ -2690,6 +3526,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort length(stringField)', []);
+ testErrorsAndWarnings('row var = length(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = length(true)', [
+ 'Argument of [length] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(booleanField) > 0', [
+ 'Argument of [length] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = length(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval length(booleanField)', [
+ 'Argument of [length] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('log', () => {
@@ -2727,6 +3578,50 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort log(numberField, numberField)', []);
+ testErrorsAndWarnings('row var = log(5)', []);
+ testErrorsAndWarnings('row log(5)', []);
+ testErrorsAndWarnings('row var = log(to_integer(true))', []);
+ testErrorsAndWarnings('row var = log(to_integer(true), to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = log(true, true)', [
+ 'Argument of [log] must be [number], found value [true] type [boolean]',
+ 'Argument of [log] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where log(numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where log(booleanField) > 0', [
+ 'Argument of [log] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where log(booleanField, booleanField) > 0', [
+ 'Argument of [log] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [log] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = log(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval log(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = log(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval log(booleanField)', [
+ 'Argument of [log] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = log(*)', [
+ 'Using wildcards (*) in log is not allowed',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = log(to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval log(booleanField, booleanField)', [
+ 'Argument of [log] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [log] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort log(numberField)', []);
});
describe('log10', () => {
@@ -2761,6 +3656,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort log10(numberField)', []);
+ testErrorsAndWarnings('row var = log10(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = log10(true)', [
+ 'Argument of [log10] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where log10(booleanField) > 0', [
+ 'Argument of [log10] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = log10(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval log10(booleanField)', [
+ 'Argument of [log10] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('ltrim', () => {
@@ -2795,6 +3705,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort ltrim(stringField)', []);
+ testErrorsAndWarnings('row var = ltrim(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = ltrim(true)', [
+ 'Argument of [ltrim] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(ltrim(booleanField)) > 0', [
+ 'Argument of [ltrim] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = ltrim(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval ltrim(booleanField)', [
+ 'Argument of [ltrim] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('mv_avg', () => {
@@ -2829,6 +3754,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort mv_avg(numberField)', []);
+ testErrorsAndWarnings('row var = mv_avg(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = mv_avg(true)', [
+ 'Argument of [mv_avg] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where mv_avg(booleanField) > 0', [
+ 'Argument of [mv_avg] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_avg(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_avg(booleanField)', [
+ 'Argument of [mv_avg] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('mv_concat', () => {
@@ -2872,6 +3812,30 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort mv_concat(stringField, stringField)', []);
+ testErrorsAndWarnings('row var = mv_concat(to_string(true), to_string(true))', []);
+
+ testErrorsAndWarnings('row var = mv_concat(true, true)', [
+ 'Argument of [mv_concat] must be [string], found value [true] type [boolean]',
+ 'Argument of [mv_concat] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(mv_concat(booleanField, booleanField)) > 0',
+ [
+ 'Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_concat(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval mv_concat(booleanField, booleanField)', [
+ 'Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('mv_count', () => {
@@ -2885,23 +3849,213 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort mv_count(stringField)', []);
- });
+ testErrorsAndWarnings('row var = mv_count(true)', []);
+ testErrorsAndWarnings('row mv_count(true)', []);
+ testErrorsAndWarnings('row var = mv_count(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = mv_count(to_cartesianpoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_count(to_cartesianpoint("POINT (30 10)"))', []);
- describe('mv_dedupe', () => {
- testErrorsAndWarnings('row var = mv_dedupe("a")', []);
- testErrorsAndWarnings('row mv_dedupe("a")', []);
- testErrorsAndWarnings('from a_index | eval var = mv_dedupe(stringField)', []);
- testErrorsAndWarnings('from a_index | eval mv_dedupe(stringField)', []);
+ testErrorsAndWarnings(
+ 'row var = mv_count(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
- testErrorsAndWarnings('from a_index | eval var = mv_dedupe(*)', [
- 'Using wildcards (*) in mv_dedupe is not allowed',
- ]);
+ testErrorsAndWarnings('row var = mv_count(to_cartesianshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_count(to_cartesianshape("POINT (30 10)"))', []);
- testErrorsAndWarnings('from a_index | sort mv_dedupe(stringField)', []);
- });
+ testErrorsAndWarnings(
+ 'row var = mv_count(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
- describe('mv_first', () => {
- testErrorsAndWarnings('row var = mv_first("a")', []);
+ testErrorsAndWarnings('row var = mv_count(now())', []);
+ testErrorsAndWarnings('row mv_count(now())', []);
+ testErrorsAndWarnings('row var = mv_count(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = mv_count(5)', []);
+ testErrorsAndWarnings('row mv_count(5)', []);
+ testErrorsAndWarnings('row var = mv_count(to_integer(true))', []);
+ testErrorsAndWarnings('row var = mv_count(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_count(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = mv_count(to_geopoint(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = mv_count(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_count(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = mv_count(to_geoshape(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = mv_count(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row mv_count(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = mv_count(to_ip(to_ip("127.0.0.1")))', []);
+ testErrorsAndWarnings('row var = mv_count(to_string(true))', []);
+ testErrorsAndWarnings('row var = mv_count(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row mv_count(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = mv_count(to_version("a"))', []);
+ testErrorsAndWarnings('from a_index | where mv_count(booleanField) > 0', []);
+ testErrorsAndWarnings('from a_index | where mv_count(cartesianPointField) > 0', []);
+ testErrorsAndWarnings('from a_index | where mv_count(cartesianShapeField) > 0', []);
+ testErrorsAndWarnings('from a_index | where mv_count(dateField) > 0', []);
+ testErrorsAndWarnings('from a_index | where mv_count(numberField) > 0', []);
+ testErrorsAndWarnings('from a_index | where mv_count(geoPointField) > 0', []);
+ testErrorsAndWarnings('from a_index | where mv_count(geoShapeField) > 0', []);
+ testErrorsAndWarnings('from a_index | where mv_count(ipField) > 0', []);
+ testErrorsAndWarnings('from a_index | where mv_count(stringField) > 0', []);
+ testErrorsAndWarnings('from a_index | where mv_count(versionField) > 0', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_count(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(to_boolean(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(cartesianPointField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_count(cartesianPointField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_count(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = mv_count(cartesianShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_count(cartesianShapeField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_count(to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = mv_count(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_count(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_count(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_count(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(to_geopoint(geoPointField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_count(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(to_geoshape(geoPointField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_count(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(to_ip(ipField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_count(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_count(to_version(stringField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_count(booleanField, extraArg)', [
+ 'Error: [mv_count] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort mv_count(booleanField)', []);
+ });
+
+ describe('mv_dedupe', () => {
+ testErrorsAndWarnings('row var = mv_dedupe("a")', []);
+ testErrorsAndWarnings('row mv_dedupe("a")', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(stringField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(stringField)', []);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(*)', [
+ 'Using wildcards (*) in mv_dedupe is not allowed',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort mv_dedupe(stringField)', []);
+ testErrorsAndWarnings('row var = mv_dedupe(true)', []);
+ testErrorsAndWarnings('row mv_dedupe(true)', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(now())', []);
+ testErrorsAndWarnings('row mv_dedupe(now())', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(5)', []);
+ testErrorsAndWarnings('row mv_dedupe(5)', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_integer(true))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row mv_dedupe(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_ip(to_ip("127.0.0.1")))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_string(true))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row mv_dedupe(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_version("a"))', []);
+
+ testErrorsAndWarnings('from a_index | where mv_dedupe(numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where length(mv_dedupe(stringField)) > 0', []);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(to_ip(ipField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(to_version(stringField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(booleanField, extraArg)', [
+ 'Error: [mv_dedupe] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort mv_dedupe(booleanField)', []);
+ testErrorsAndWarnings('row mv_dedupe(to_cartesianpoint("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_dedupe(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_dedupe(to_cartesianshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_dedupe(to_cartesianshape("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_dedupe(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_dedupe(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_dedupe(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_geopoint(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_dedupe(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = mv_dedupe(to_geoshape(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(cartesianPointField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_dedupe(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(cartesianShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(cartesianShapeField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_dedupe(to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(geoPointField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_dedupe(to_geopoint(geoPointField))',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval var = mv_dedupe(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(geoShapeField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_dedupe(to_geoshape(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval mv_dedupe(numberField, extraArg)', [
+ 'Error: [mv_dedupe] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort mv_dedupe(numberField)', []);
+ });
+
+ describe('mv_first', () => {
+ testErrorsAndWarnings('row var = mv_first("a")', []);
testErrorsAndWarnings('row mv_first("a")', []);
testErrorsAndWarnings('from a_index | eval var = mv_first(stringField)', []);
testErrorsAndWarnings('from a_index | eval mv_first(stringField)', []);
@@ -2911,6 +4065,90 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort mv_first(stringField)', []);
+ testErrorsAndWarnings('row var = mv_first(true)', []);
+ testErrorsAndWarnings('row mv_first(true)', []);
+ testErrorsAndWarnings('row var = mv_first(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = mv_first(to_cartesianpoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_first(to_cartesianpoint("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_first(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_first(to_cartesianshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_first(to_cartesianshape("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_first(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_first(now())', []);
+ testErrorsAndWarnings('row mv_first(now())', []);
+ testErrorsAndWarnings('row var = mv_first(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = mv_first(5)', []);
+ testErrorsAndWarnings('row mv_first(5)', []);
+ testErrorsAndWarnings('row var = mv_first(to_integer(true))', []);
+ testErrorsAndWarnings('row var = mv_first(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_first(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = mv_first(to_geopoint(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = mv_first(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_first(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = mv_first(to_geoshape(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = mv_first(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row mv_first(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = mv_first(to_ip(to_ip("127.0.0.1")))', []);
+ testErrorsAndWarnings('row var = mv_first(to_string(true))', []);
+ testErrorsAndWarnings('row var = mv_first(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row mv_first(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = mv_first(to_version("a"))', []);
+ testErrorsAndWarnings('from a_index | where mv_first(numberField) > 0', []);
+ testErrorsAndWarnings('from a_index | where length(mv_first(stringField)) > 0', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_first(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(to_boolean(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(cartesianPointField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_first(cartesianPointField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_first(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = mv_first(cartesianShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_first(cartesianShapeField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_first(to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = mv_first(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_first(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_first(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_first(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(to_geopoint(geoPointField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_first(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(to_geoshape(geoPointField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_first(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(to_ip(ipField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_first(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_first(to_version(stringField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_first(booleanField, extraArg)', [
+ 'Error: [mv_first] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort mv_first(booleanField)', []);
});
describe('mv_last', () => {
@@ -2924,6 +4162,90 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort mv_last(stringField)', []);
+ testErrorsAndWarnings('row var = mv_last(true)', []);
+ testErrorsAndWarnings('row mv_last(true)', []);
+ testErrorsAndWarnings('row var = mv_last(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = mv_last(to_cartesianpoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_last(to_cartesianpoint("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_last(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_last(to_cartesianshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_last(to_cartesianshape("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_last(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_last(now())', []);
+ testErrorsAndWarnings('row mv_last(now())', []);
+ testErrorsAndWarnings('row var = mv_last(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = mv_last(5)', []);
+ testErrorsAndWarnings('row mv_last(5)', []);
+ testErrorsAndWarnings('row var = mv_last(to_integer(true))', []);
+ testErrorsAndWarnings('row var = mv_last(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_last(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = mv_last(to_geopoint(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = mv_last(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row mv_last(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = mv_last(to_geoshape(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = mv_last(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row mv_last(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = mv_last(to_ip(to_ip("127.0.0.1")))', []);
+ testErrorsAndWarnings('row var = mv_last(to_string(true))', []);
+ testErrorsAndWarnings('row var = mv_last(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row mv_last(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = mv_last(to_version("a"))', []);
+ testErrorsAndWarnings('from a_index | where mv_last(numberField) > 0', []);
+ testErrorsAndWarnings('from a_index | where length(mv_last(stringField)) > 0', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_last(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(to_boolean(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(cartesianPointField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_last(cartesianPointField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_last(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = mv_last(cartesianShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_last(cartesianShapeField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_last(to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = mv_last(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_last(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_last(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_last(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(to_geopoint(geoPointField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_last(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(to_geoshape(geoPointField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_last(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(to_ip(ipField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_last(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_last(to_version(stringField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_last(booleanField, extraArg)', [
+ 'Error: [mv_last] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort mv_last(booleanField)', []);
});
describe('mv_max', () => {
@@ -2937,6 +4259,66 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort mv_max(stringField)', []);
+ testErrorsAndWarnings('row var = mv_max(true)', []);
+ testErrorsAndWarnings('row mv_max(true)', []);
+ testErrorsAndWarnings('row var = mv_max(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = mv_max(now())', []);
+ testErrorsAndWarnings('row mv_max(now())', []);
+ testErrorsAndWarnings('row var = mv_max(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = mv_max(5)', []);
+ testErrorsAndWarnings('row mv_max(5)', []);
+ testErrorsAndWarnings('row var = mv_max(to_integer(true))', []);
+ testErrorsAndWarnings('row var = mv_max(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row mv_max(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = mv_max(to_ip(to_ip("127.0.0.1")))', []);
+ testErrorsAndWarnings('row var = mv_max(to_string(true))', []);
+ testErrorsAndWarnings('row var = mv_max(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row mv_max(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = mv_max(to_version("a"))', []);
+
+ testErrorsAndWarnings('row var = mv_max(to_cartesianpoint("POINT (30 10)"))', [
+ 'Argument of [mv_max] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where mv_max(numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where mv_max(cartesianPointField) > 0', [
+ 'Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(mv_max(stringField)) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where length(mv_max(cartesianPointField)) > 0', [
+ 'Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_max(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_max(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_max(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_max(cartesianPointField)', [
+ 'Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_max(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_max(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_max(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_max(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_max(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_max(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_max(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_max(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_max(to_ip(ipField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_max(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_max(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_max(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_max(to_version(stringField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_max(booleanField, extraArg)', [
+ 'Error: [mv_max] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort mv_max(booleanField)', []);
});
describe('mv_median', () => {
@@ -2971,6 +4353,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort mv_median(numberField)', []);
+ testErrorsAndWarnings('row var = mv_median(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = mv_median(true)', [
+ 'Argument of [mv_median] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where mv_median(booleanField) > 0', [
+ 'Argument of [mv_median] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_median(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_median(booleanField)', [
+ 'Argument of [mv_median] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('mv_min', () => {
@@ -2984,23 +4381,417 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort mv_min(stringField)', []);
+ testErrorsAndWarnings('row var = mv_min(true)', []);
+ testErrorsAndWarnings('row mv_min(true)', []);
+ testErrorsAndWarnings('row var = mv_min(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = mv_min(now())', []);
+ testErrorsAndWarnings('row mv_min(now())', []);
+ testErrorsAndWarnings('row var = mv_min(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = mv_min(5)', []);
+ testErrorsAndWarnings('row mv_min(5)', []);
+ testErrorsAndWarnings('row var = mv_min(to_integer(true))', []);
+ testErrorsAndWarnings('row var = mv_min(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row mv_min(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = mv_min(to_ip(to_ip("127.0.0.1")))', []);
+ testErrorsAndWarnings('row var = mv_min(to_string(true))', []);
+ testErrorsAndWarnings('row var = mv_min(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row mv_min(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = mv_min(to_version("a"))', []);
+
+ testErrorsAndWarnings('row var = mv_min(to_cartesianpoint("POINT (30 10)"))', [
+ 'Argument of [mv_min] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where mv_min(numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where mv_min(cartesianPointField) > 0', [
+ 'Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(mv_min(stringField)) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where length(mv_min(cartesianPointField)) > 0', [
+ 'Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_min(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_min(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_min(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_min(cartesianPointField)', [
+ 'Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_min(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_min(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_min(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_min(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_min(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_min(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_min(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_min(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_min(to_ip(ipField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_min(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_min(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval mv_min(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_min(to_version(stringField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_min(booleanField, extraArg)', [
+ 'Error: [mv_min] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort mv_min(booleanField)', []);
});
- describe('mv_slice', () => {
- testErrorsAndWarnings('row var = mv_slice("a", 5, 5)', []);
- testErrorsAndWarnings('row mv_slice("a", 5, 5)', []);
+ describe('mv_slice', () => {
+ testErrorsAndWarnings('row var = mv_slice("a", 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice("a", 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(stringField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(stringField, numberField, numberField)',
+ []
+ );
+ testErrorsAndWarnings(
+ 'from a_index | sort mv_slice(stringField, numberField, numberField)',
+ []
+ );
+ testErrorsAndWarnings('row var = mv_slice(true, 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice(true, 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_boolean(true), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_slice(to_cartesianpoint("POINT (30 10)"), 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice(to_cartesianpoint("POINT (30 10)"), 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_slice(to_cartesianshape("POINT (30 10)"), 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice(to_cartesianshape("POINT (30 10)"), 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_slice(now(), 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice(now(), 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_datetime(now()), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_slice(5, 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice(5, 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_integer(true), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_slice(to_geopoint("POINT (30 10)"), 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice(to_geopoint("POINT (30 10)"), 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_geopoint(to_geopoint("POINT (30 10)")), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_slice(to_geoshape("POINT (30 10)"), 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice(to_geoshape("POINT (30 10)"), 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_geoshape(to_geopoint("POINT (30 10)")), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_slice(to_ip("127.0.0.1"), 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice(to_ip("127.0.0.1"), 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_ip(to_ip("127.0.0.1")), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_string(true), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_slice(to_version("1.0.0"), 5, 5)', []);
+ testErrorsAndWarnings('row mv_slice(to_version("1.0.0"), 5, 5)', []);
+
+ testErrorsAndWarnings(
+ 'row var = mv_slice(to_version("a"), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_slice(to_version("1.0.0"), true, true)', [
+ 'Argument of [mv_slice] must be [number], found value [true] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where mv_slice(numberField, numberField, numberField) > 0',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | where mv_slice(numberField, booleanField, booleanField) > 0',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(mv_slice(stringField, numberField, numberField)) > 0',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(mv_slice(stringField, booleanField, booleanField)) > 0',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(booleanField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(booleanField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(to_boolean(booleanField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(booleanField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(cartesianPointField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(cartesianPointField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(to_cartesianpoint(cartesianPointField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(cartesianPointField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(cartesianShapeField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(cartesianShapeField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(to_cartesianshape(cartesianPointField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(cartesianShapeField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(dateField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(dateField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(to_datetime(dateField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(dateField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(numberField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(numberField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(to_integer(booleanField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(numberField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(geoPointField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(geoPointField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(to_geopoint(geoPointField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(geoPointField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(geoShapeField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(geoShapeField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(to_geoshape(geoPointField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(geoShapeField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(ipField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(ipField, numberField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval mv_slice(ipField, booleanField, booleanField)', [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(stringField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_slice(versionField, numberField, numberField)',
+ []
+ );
testErrorsAndWarnings(
- 'from a_index | eval var = mv_slice(stringField, numberField, numberField)',
+ 'from a_index | eval mv_slice(versionField, numberField, numberField)',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval mv_slice(stringField, numberField, numberField)',
+ 'from a_index | eval var = mv_slice(to_version(stringField), to_integer(booleanField), to_integer(booleanField))',
[]
);
+
testErrorsAndWarnings(
- 'from a_index | sort mv_slice(stringField, numberField, numberField)',
+ 'from a_index | eval mv_slice(versionField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [mv_slice] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_slice(booleanField, numberField, numberField, extraArg)',
+ ['Error: [mv_slice] function expects no more than 3 arguments, got 4.']
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | sort mv_slice(booleanField, numberField, numberField)',
[]
);
});
@@ -3011,6 +4802,58 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval var = mv_sort(stringField, "asc")', []);
testErrorsAndWarnings('from a_index | eval mv_sort(stringField, "asc")', []);
testErrorsAndWarnings('from a_index | sort mv_sort(stringField, "asc")', []);
+ testErrorsAndWarnings('row var = mv_sort(true, "asc")', []);
+ testErrorsAndWarnings('row mv_sort(true, "asc")', []);
+ testErrorsAndWarnings('row var = mv_sort(now(), "asc")', []);
+ testErrorsAndWarnings('row mv_sort(now(), "asc")', []);
+ testErrorsAndWarnings('row var = mv_sort(5, "asc")', []);
+ testErrorsAndWarnings('row mv_sort(5, "asc")', []);
+ testErrorsAndWarnings('row var = mv_sort(to_ip("127.0.0.1"), "asc")', []);
+ testErrorsAndWarnings('row mv_sort(to_ip("127.0.0.1"), "asc")', []);
+ testErrorsAndWarnings('row var = mv_sort(to_version("1.0.0"), "asc")', []);
+ testErrorsAndWarnings('row mv_sort(to_version("1.0.0"), "asc")', []);
+
+ testErrorsAndWarnings('row var = mv_sort(to_cartesianpoint("POINT (30 10)"), true)', [
+ 'Argument of [mv_sort] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ 'Argument of [mv_sort] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where mv_sort(numberField, "asc") > 0', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | where mv_sort(cartesianPointField, booleanField) > 0',
+ [
+ 'Argument of [mv_sort] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ 'Argument of [mv_sort] must be [string], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | where length(mv_sort(stringField, "asc")) > 0', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(mv_sort(cartesianPointField, booleanField)) > 0',
+ [
+ 'Argument of [mv_sort] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ 'Argument of [mv_sort] must be [string], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = mv_sort(booleanField, "asc")', []);
+ testErrorsAndWarnings('from a_index | eval mv_sort(booleanField, "asc")', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_sort(dateField, "asc")', []);
+ testErrorsAndWarnings('from a_index | eval mv_sort(dateField, "asc")', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_sort(numberField, "asc")', []);
+ testErrorsAndWarnings('from a_index | eval mv_sort(numberField, "asc")', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_sort(ipField, "asc")', []);
+ testErrorsAndWarnings('from a_index | eval mv_sort(ipField, "asc")', []);
+ testErrorsAndWarnings('from a_index | eval var = mv_sort(versionField, "asc")', []);
+ testErrorsAndWarnings('from a_index | eval mv_sort(versionField, "asc")', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_sort(booleanField, "asc", extraArg)', [
+ 'Error: [mv_sort] function expects no more than 2 arguments, got 3.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort mv_sort(booleanField, "asc")', []);
});
describe('mv_sum', () => {
@@ -3045,11 +4888,28 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort mv_sum(numberField)', []);
+ testErrorsAndWarnings('row var = mv_sum(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = mv_sum(true)', [
+ 'Argument of [mv_sum] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where mv_sum(booleanField) > 0', [
+ 'Argument of [mv_sum] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = mv_sum(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval mv_sum(booleanField)', [
+ 'Argument of [mv_sum] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('mv_zip', () => {
testErrorsAndWarnings('row var = mv_zip("a", "a", "a")', []);
+ testErrorsAndWarnings('row var = mv_zip("a", "a")', []);
testErrorsAndWarnings('row mv_zip("a", "a", "a")', []);
+ testErrorsAndWarnings('row mv_zip("a", "a")', []);
testErrorsAndWarnings(
'row var = mv_zip(to_string("a"), to_string("a"), to_string("a"))',
@@ -3081,6 +4941,8 @@ describe('validation logic', () => {
[]
);
+ testErrorsAndWarnings('from a_index | eval mv_zip(stringField, stringField)', []);
+
testErrorsAndWarnings(
'from a_index | eval mv_zip(stringField, stringField, stringField)',
[]
@@ -3099,13 +4961,46 @@ describe('validation logic', () => {
testErrorsAndWarnings(
'from a_index | eval mv_zip(stringField, stringField, stringField, extraArg)',
- ['Error: [mv_zip] function expects exactly 3 arguments, got 4.']
+ ['Error: [mv_zip] function expects no more than 3 arguments, got 4.']
);
testErrorsAndWarnings(
'from a_index | sort mv_zip(stringField, stringField, stringField)',
[]
);
+ testErrorsAndWarnings(
+ 'row var = mv_zip(to_string(true), to_string(true), to_string(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = mv_zip(true, true, true)', [
+ 'Argument of [mv_zip] must be [string], found value [true] type [boolean]',
+ 'Argument of [mv_zip] must be [string], found value [true] type [boolean]',
+ 'Argument of [mv_zip] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(mv_zip(booleanField, booleanField, booleanField)) > 0',
+ [
+ 'Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = mv_zip(to_string(booleanField), to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval mv_zip(booleanField, booleanField, booleanField)',
+ [
+ 'Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [mv_zip] must be [string], found value [booleanField] type [boolean]',
+ ]
+ );
});
describe('now', () => {
@@ -3170,6 +5065,27 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort pow(numberField, numberField)', []);
+ testErrorsAndWarnings('row var = pow(to_integer(true), to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = pow(true, true)', [
+ 'Argument of [pow] must be [number], found value [true] type [boolean]',
+ 'Argument of [pow] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where pow(booleanField, booleanField) > 0', [
+ 'Argument of [pow] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [pow] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = pow(to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval pow(booleanField, booleanField)', [
+ 'Argument of [pow] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [pow] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('replace', () => {
@@ -3234,6 +5150,39 @@ describe('validation logic', () => {
'from a_index | sort replace(stringField, stringField, stringField)',
[]
);
+ testErrorsAndWarnings(
+ 'row var = replace(to_string(true), to_string(true), to_string(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = replace(true, true, true)', [
+ 'Argument of [replace] must be [string], found value [true] type [boolean]',
+ 'Argument of [replace] must be [string], found value [true] type [boolean]',
+ 'Argument of [replace] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(replace(booleanField, booleanField, booleanField)) > 0',
+ [
+ 'Argument of [replace] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [replace] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [replace] must be [string], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = replace(to_string(booleanField), to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval replace(booleanField, booleanField, booleanField)',
+ [
+ 'Argument of [replace] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [replace] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [replace] must be [string], found value [booleanField] type [boolean]',
+ ]
+ );
});
describe('right', () => {
@@ -3274,6 +5223,30 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort right(stringField, numberField)', []);
+ testErrorsAndWarnings('row var = right(to_string(true), to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = right(true, true)', [
+ 'Argument of [right] must be [string], found value [true] type [boolean]',
+ 'Argument of [right] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(right(booleanField, booleanField)) > 0',
+ [
+ 'Argument of [right] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [right] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = right(to_string(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval right(booleanField, booleanField)', [
+ 'Argument of [right] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [right] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('round', () => {
@@ -3311,6 +5284,50 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort round(numberField, numberField)', []);
+ testErrorsAndWarnings('row var = round(5)', []);
+ testErrorsAndWarnings('row round(5)', []);
+ testErrorsAndWarnings('row var = round(to_integer(true))', []);
+ testErrorsAndWarnings('row var = round(to_integer(true), to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = round(true, true)', [
+ 'Argument of [round] must be [number], found value [true] type [boolean]',
+ 'Argument of [round] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where round(numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where round(booleanField) > 0', [
+ 'Argument of [round] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where round(booleanField, booleanField) > 0', [
+ 'Argument of [round] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [round] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = round(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval round(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = round(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval round(booleanField)', [
+ 'Argument of [round] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = round(*)', [
+ 'Using wildcards (*) in round is not allowed',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = round(to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval round(booleanField, booleanField)', [
+ 'Argument of [round] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [round] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort round(numberField)', []);
});
describe('rtrim', () => {
@@ -3345,6 +5362,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort rtrim(stringField)', []);
+ testErrorsAndWarnings('row var = rtrim(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = rtrim(true)', [
+ 'Argument of [rtrim] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(rtrim(booleanField)) > 0', [
+ 'Argument of [rtrim] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = rtrim(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval rtrim(booleanField)', [
+ 'Argument of [rtrim] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('signum', () => {
@@ -3379,6 +5411,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort signum(numberField)', []);
+ testErrorsAndWarnings('row var = signum(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = signum(true)', [
+ 'Argument of [signum] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where signum(booleanField) > 0', [
+ 'Argument of [signum] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = signum(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval signum(booleanField)', [
+ 'Argument of [signum] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('sin', () => {
@@ -3413,6 +5460,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort sin(numberField)', []);
+ testErrorsAndWarnings('row var = sin(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = sin(true)', [
+ 'Argument of [sin] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where sin(booleanField) > 0', [
+ 'Argument of [sin] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = sin(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval sin(booleanField)', [
+ 'Argument of [sin] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('sinh', () => {
@@ -3447,6 +5509,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort sinh(numberField)', []);
+ testErrorsAndWarnings('row var = sinh(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = sinh(true)', [
+ 'Argument of [sinh] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where sinh(booleanField) > 0', [
+ 'Argument of [sinh] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = sinh(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval sinh(booleanField)', [
+ 'Argument of [sinh] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('split', () => {
@@ -3487,6 +5564,30 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort split(stringField, stringField)', []);
+ testErrorsAndWarnings('row var = split(to_string(true), to_string(true))', []);
+
+ testErrorsAndWarnings('row var = split(true, true)', [
+ 'Argument of [split] must be [string], found value [true] type [boolean]',
+ 'Argument of [split] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(split(booleanField, booleanField)) > 0',
+ [
+ 'Argument of [split] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [split] must be [string], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = split(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval split(booleanField, booleanField)', [
+ 'Argument of [split] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [split] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('sqrt', () => {
@@ -3521,6 +5622,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort sqrt(numberField)', []);
+ testErrorsAndWarnings('row var = sqrt(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = sqrt(true)', [
+ 'Argument of [sqrt] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where sqrt(booleanField) > 0', [
+ 'Argument of [sqrt] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = sqrt(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval sqrt(booleanField)', [
+ 'Argument of [sqrt] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('st_contains', () => {
@@ -3537,8 +5653,8 @@ describe('validation logic', () => {
testErrorsAndWarnings('row var = st_contains(to_geopoint("a"), to_geopoint("a"))', []);
testErrorsAndWarnings('row var = st_contains("a", "a")', [
- 'Argument of [st_contains] must be [geo_point], found value ["a"] type [string]',
- 'Argument of [st_contains] must be [geo_point], found value ["a"] type [string]',
+ 'Argument of [st_contains] must be [cartesian_point], found value ["a"] type [string]',
+ 'Argument of [st_contains] must be [cartesian_point], found value ["a"] type [string]',
]);
testErrorsAndWarnings(
@@ -3648,8 +5764,8 @@ describe('validation logic', () => {
);
testErrorsAndWarnings('from a_index | eval st_contains(stringField, stringField)', [
- 'Argument of [st_contains] must be [geo_point], found value [stringField] type [string]',
- 'Argument of [st_contains] must be [geo_point], found value [stringField] type [string]',
+ 'Argument of [st_contains] must be [cartesian_point], found value [stringField] type [string]',
+ 'Argument of [st_contains] must be [cartesian_point], found value [stringField] type [string]',
]);
testErrorsAndWarnings(
@@ -3701,81 +5817,176 @@ describe('validation logic', () => {
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_contains(cartesianPointField, cartesianPointField)',
+ 'from a_index | eval var = st_contains(cartesianPointField, cartesianPointField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_contains(cartesianPointField, cartesianPointField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_contains(to_cartesianpoint(stringField), to_cartesianpoint(stringField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_contains(cartesianPointField, cartesianPointField, extraArg)',
+ ['Error: [st_contains] function expects exactly 2 arguments, got 3.']
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_contains(cartesianPointField, cartesianShapeField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_contains(cartesianPointField, cartesianShapeField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_contains(to_cartesianpoint(stringField), cartesianShapeField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_contains(cartesianPointField, cartesianShapeField, extraArg)',
+ ['Error: [st_contains] function expects exactly 2 arguments, got 3.']
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_contains(cartesianShapeField, cartesianPointField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_contains(cartesianShapeField, cartesianPointField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_contains(cartesianShapeField, to_cartesianpoint(stringField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_contains(cartesianShapeField, cartesianPointField, extraArg)',
+ ['Error: [st_contains] function expects exactly 2 arguments, got 3.']
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_contains(cartesianShapeField, cartesianShapeField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_contains(cartesianShapeField, cartesianShapeField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_contains(cartesianShapeField, cartesianShapeField, extraArg)',
+ ['Error: [st_contains] function expects exactly 2 arguments, got 3.']
+ );
+
+ testErrorsAndWarnings('from a_index | sort st_contains(geoPointField, geoPointField)', []);
+
+ testErrorsAndWarnings(
+ 'row var = st_contains(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_contains(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_contains(cartesianPointField, cartesianPointField)',
+ 'row var = st_contains(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_contains(to_cartesianpoint(stringField), to_cartesianpoint(stringField))',
+ 'row var = st_contains(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_contains(cartesianPointField, cartesianPointField, extraArg)',
- ['Error: [st_contains] function expects exactly 2 arguments, got 3.']
+ 'row var = st_contains(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))',
+ []
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_contains(cartesianPointField, cartesianShapeField)',
+ 'row var = st_contains(to_geopoint(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_contains(cartesianPointField, cartesianShapeField)',
+ 'row var = st_contains(to_geoshape(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_contains(to_cartesianpoint(stringField), cartesianShapeField)',
+ 'row var = st_contains(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))',
[]
);
+ testErrorsAndWarnings('row var = st_contains(true, true)', [
+ 'Argument of [st_contains] must be [cartesian_point], found value [true] type [boolean]',
+ 'Argument of [st_contains] must be [cartesian_point], found value [true] type [boolean]',
+ ]);
+
testErrorsAndWarnings(
- 'from a_index | eval st_contains(cartesianPointField, cartesianShapeField, extraArg)',
- ['Error: [st_contains] function expects exactly 2 arguments, got 3.']
+ 'from a_index | eval var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))',
+ []
);
+ testErrorsAndWarnings('from a_index | eval st_contains(booleanField, booleanField)', [
+ 'Argument of [st_contains] must be [cartesian_point], found value [booleanField] type [boolean]',
+ 'Argument of [st_contains] must be [cartesian_point], found value [booleanField] type [boolean]',
+ ]);
+
testErrorsAndWarnings(
- 'from a_index | eval var = st_contains(cartesianShapeField, cartesianPointField)',
+ 'from a_index | eval var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_contains(cartesianShapeField, cartesianPointField)',
+ 'from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_contains(cartesianShapeField, to_cartesianpoint(stringField))',
+ 'from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_contains(cartesianShapeField, cartesianPointField, extraArg)',
- ['Error: [st_contains] function expects exactly 2 arguments, got 3.']
+ 'from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geopoint(geoPointField))',
+ []
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_contains(cartesianShapeField, cartesianShapeField)',
+ 'from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geoshape(geoPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_contains(cartesianShapeField, cartesianShapeField)',
+ 'from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geopoint(geoPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_contains(cartesianShapeField, cartesianShapeField, extraArg)',
- ['Error: [st_contains] function expects exactly 2 arguments, got 3.']
+ 'from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geoshape(geoPointField))',
+ []
);
- testErrorsAndWarnings('from a_index | sort st_contains(geoPointField, geoPointField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | sort st_contains(cartesianPointField, cartesianPointField)',
+ []
+ );
});
describe('st_disjoint', () => {
@@ -3792,8 +6003,8 @@ describe('validation logic', () => {
testErrorsAndWarnings('row var = st_disjoint(to_geopoint("a"), to_geopoint("a"))', []);
testErrorsAndWarnings('row var = st_disjoint("a", "a")', [
- 'Argument of [st_disjoint] must be [geo_point], found value ["a"] type [string]',
- 'Argument of [st_disjoint] must be [geo_point], found value ["a"] type [string]',
+ 'Argument of [st_disjoint] must be [cartesian_point], found value ["a"] type [string]',
+ 'Argument of [st_disjoint] must be [cartesian_point], found value ["a"] type [string]',
]);
testErrorsAndWarnings(
@@ -3903,8 +6114,8 @@ describe('validation logic', () => {
);
testErrorsAndWarnings('from a_index | eval st_disjoint(stringField, stringField)', [
- 'Argument of [st_disjoint] must be [geo_point], found value [stringField] type [string]',
- 'Argument of [st_disjoint] must be [geo_point], found value [stringField] type [string]',
+ 'Argument of [st_disjoint] must be [cartesian_point], found value [stringField] type [string]',
+ 'Argument of [st_disjoint] must be [cartesian_point], found value [stringField] type [string]',
]);
testErrorsAndWarnings(
@@ -4031,6 +6242,101 @@ describe('validation logic', () => {
);
testErrorsAndWarnings('from a_index | sort st_disjoint(geoPointField, geoPointField)', []);
+
+ testErrorsAndWarnings(
+ 'row var = st_disjoint(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_disjoint(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_disjoint(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_disjoint(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_disjoint(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_disjoint(to_geopoint(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_disjoint(to_geoshape(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_disjoint(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = st_disjoint(true, true)', [
+ 'Argument of [st_disjoint] must be [cartesian_point], found value [true] type [boolean]',
+ 'Argument of [st_disjoint] must be [cartesian_point], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval st_disjoint(booleanField, booleanField)', [
+ 'Argument of [st_disjoint] must be [cartesian_point], found value [booleanField] type [boolean]',
+ 'Argument of [st_disjoint] must be [cartesian_point], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geopoint(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geoshape(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geopoint(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geoshape(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | sort st_disjoint(cartesianPointField, cartesianPointField)',
+ []
+ );
});
describe('st_intersects', () => {
@@ -4047,8 +6353,8 @@ describe('validation logic', () => {
testErrorsAndWarnings('row var = st_intersects(to_geopoint("a"), to_geopoint("a"))', []);
testErrorsAndWarnings('row var = st_intersects("a", "a")', [
- 'Argument of [st_intersects] must be [geo_point], found value ["a"] type [string]',
- 'Argument of [st_intersects] must be [geo_point], found value ["a"] type [string]',
+ 'Argument of [st_intersects] must be [cartesian_point], found value ["a"] type [string]',
+ 'Argument of [st_intersects] must be [cartesian_point], found value ["a"] type [string]',
]);
testErrorsAndWarnings(
@@ -4162,8 +6468,8 @@ describe('validation logic', () => {
);
testErrorsAndWarnings('from a_index | eval st_intersects(stringField, stringField)', [
- 'Argument of [st_intersects] must be [geo_point], found value [stringField] type [string]',
- 'Argument of [st_intersects] must be [geo_point], found value [stringField] type [string]',
+ 'Argument of [st_intersects] must be [cartesian_point], found value [stringField] type [string]',
+ 'Argument of [st_intersects] must be [cartesian_point], found value [stringField] type [string]',
]);
testErrorsAndWarnings(
@@ -4305,6 +6611,101 @@ describe('validation logic', () => {
'from a_index | sort st_intersects(geoPointField, geoPointField)',
[]
);
+
+ testErrorsAndWarnings(
+ 'row var = st_intersects(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_intersects(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_intersects(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_intersects(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_intersects(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_intersects(to_geopoint(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_intersects(to_geoshape(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = st_intersects(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = st_intersects(true, true)', [
+ 'Argument of [st_intersects] must be [cartesian_point], found value [true] type [boolean]',
+ 'Argument of [st_intersects] must be [cartesian_point], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval st_intersects(booleanField, booleanField)', [
+ 'Argument of [st_intersects] must be [cartesian_point], found value [booleanField] type [boolean]',
+ 'Argument of [st_intersects] must be [cartesian_point], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geopoint(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geoshape(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geopoint(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geoshape(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | sort st_intersects(cartesianPointField, cartesianPointField)',
+ []
+ );
});
describe('st_within', () => {
@@ -4321,8 +6722,8 @@ describe('validation logic', () => {
testErrorsAndWarnings('row var = st_within(to_geopoint("a"), to_geopoint("a"))', []);
testErrorsAndWarnings('row var = st_within("a", "a")', [
- 'Argument of [st_within] must be [geo_point], found value ["a"] type [string]',
- 'Argument of [st_within] must be [geo_point], found value ["a"] type [string]',
+ 'Argument of [st_within] must be [cartesian_point], found value ["a"] type [string]',
+ 'Argument of [st_within] must be [cartesian_point], found value ["a"] type [string]',
]);
testErrorsAndWarnings(
@@ -4432,134 +6833,229 @@ describe('validation logic', () => {
);
testErrorsAndWarnings('from a_index | eval st_within(stringField, stringField)', [
- 'Argument of [st_within] must be [geo_point], found value [stringField] type [string]',
- 'Argument of [st_within] must be [geo_point], found value [stringField] type [string]',
+ 'Argument of [st_within] must be [cartesian_point], found value [stringField] type [string]',
+ 'Argument of [st_within] must be [cartesian_point], found value [stringField] type [string]',
]);
testErrorsAndWarnings(
- 'from a_index | eval st_within(geoPointField, geoPointField, extraArg)',
+ 'from a_index | eval st_within(geoPointField, geoPointField, extraArg)',
+ ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_within(geoPointField, geoShapeField)',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval st_within(geoPointField, geoShapeField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_within(to_geopoint(stringField), geoShapeField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_within(geoPointField, geoShapeField, extraArg)',
+ ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_within(geoShapeField, geoPointField)',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval st_within(geoShapeField, geoPointField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_within(geoShapeField, to_geopoint(stringField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_within(geoShapeField, geoPointField, extraArg)',
+ ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_within(geoShapeField, geoShapeField)',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval st_within(geoShapeField, geoShapeField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_within(geoShapeField, geoShapeField, extraArg)',
+ ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_within(cartesianPointField, cartesianPointField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_within(cartesianPointField, cartesianPointField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_within(to_cartesianpoint(stringField), to_cartesianpoint(stringField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_within(cartesianPointField, cartesianPointField, extraArg)',
+ ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_within(cartesianPointField, cartesianShapeField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_within(cartesianPointField, cartesianShapeField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_within(to_cartesianpoint(stringField), cartesianShapeField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_within(cartesianPointField, cartesianShapeField, extraArg)',
['Error: [st_within] function expects exactly 2 arguments, got 3.']
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(geoPointField, geoShapeField)',
+ 'from a_index | eval var = st_within(cartesianShapeField, cartesianPointField)',
[]
);
- testErrorsAndWarnings('from a_index | eval st_within(geoPointField, geoShapeField)', []);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(to_geopoint(stringField), geoShapeField)',
+ 'from a_index | eval st_within(cartesianShapeField, cartesianPointField)',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_within(geoPointField, geoShapeField, extraArg)',
+ 'from a_index | eval var = st_within(cartesianShapeField, to_cartesianpoint(stringField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval st_within(cartesianShapeField, cartesianPointField, extraArg)',
['Error: [st_within] function expects exactly 2 arguments, got 3.']
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(geoShapeField, geoPointField)',
+ 'from a_index | eval var = st_within(cartesianShapeField, cartesianShapeField)',
[]
);
- testErrorsAndWarnings('from a_index | eval st_within(geoShapeField, geoPointField)', []);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(geoShapeField, to_geopoint(stringField))',
+ 'from a_index | eval st_within(cartesianShapeField, cartesianShapeField)',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_within(geoShapeField, geoPointField, extraArg)',
+ 'from a_index | eval st_within(cartesianShapeField, cartesianShapeField, extraArg)',
['Error: [st_within] function expects exactly 2 arguments, got 3.']
);
+ testErrorsAndWarnings('from a_index | sort st_within(geoPointField, geoPointField)', []);
+
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(geoShapeField, geoShapeField)',
+ 'row var = st_within(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
[]
);
- testErrorsAndWarnings('from a_index | eval st_within(geoShapeField, geoShapeField)', []);
testErrorsAndWarnings(
- 'from a_index | eval st_within(geoShapeField, geoShapeField, extraArg)',
- ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ 'row var = st_within(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(cartesianPointField, cartesianPointField)',
+ 'row var = st_within(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_within(cartesianPointField, cartesianPointField)',
+ 'row var = st_within(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(to_cartesianpoint(stringField), to_cartesianpoint(stringField))',
+ 'row var = st_within(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_within(cartesianPointField, cartesianPointField, extraArg)',
- ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ 'row var = st_within(to_geopoint(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))',
+ []
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(cartesianPointField, cartesianShapeField)',
+ 'row var = st_within(to_geoshape(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_within(cartesianPointField, cartesianShapeField)',
+ 'row var = st_within(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))',
[]
);
+ testErrorsAndWarnings('row var = st_within(true, true)', [
+ 'Argument of [st_within] must be [cartesian_point], found value [true] type [boolean]',
+ 'Argument of [st_within] must be [cartesian_point], found value [true] type [boolean]',
+ ]);
+
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(to_cartesianpoint(stringField), cartesianShapeField)',
+ 'from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))',
[]
);
+ testErrorsAndWarnings('from a_index | eval st_within(booleanField, booleanField)', [
+ 'Argument of [st_within] must be [cartesian_point], found value [booleanField] type [boolean]',
+ 'Argument of [st_within] must be [cartesian_point], found value [booleanField] type [boolean]',
+ ]);
+
testErrorsAndWarnings(
- 'from a_index | eval st_within(cartesianPointField, cartesianShapeField, extraArg)',
- ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ 'from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))',
+ []
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(cartesianShapeField, cartesianPointField)',
+ 'from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_within(cartesianShapeField, cartesianPointField)',
+ 'from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(cartesianShapeField, to_cartesianpoint(stringField))',
+ 'from a_index | eval var = st_within(to_geopoint(geoPointField), to_geopoint(geoPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_within(cartesianShapeField, cartesianPointField, extraArg)',
- ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ 'from a_index | eval var = st_within(to_geopoint(geoPointField), to_geoshape(geoPointField))',
+ []
);
testErrorsAndWarnings(
- 'from a_index | eval var = st_within(cartesianShapeField, cartesianShapeField)',
+ 'from a_index | eval var = st_within(to_geoshape(geoPointField), to_geopoint(geoPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_within(cartesianShapeField, cartesianShapeField)',
+ 'from a_index | eval var = st_within(to_geoshape(geoPointField), to_geoshape(geoPointField))',
[]
);
testErrorsAndWarnings(
- 'from a_index | eval st_within(cartesianShapeField, cartesianShapeField, extraArg)',
- ['Error: [st_within] function expects exactly 2 arguments, got 3.']
+ 'from a_index | sort st_within(cartesianPointField, cartesianPointField)',
+ []
);
-
- testErrorsAndWarnings('from a_index | sort st_within(geoPointField, geoPointField)', []);
});
describe('st_x', () => {
@@ -4568,7 +7064,7 @@ describe('validation logic', () => {
testErrorsAndWarnings('row var = st_x(to_geopoint("a"))', []);
testErrorsAndWarnings('row var = st_x("a")', [
- 'Argument of [st_x] must be [geo_point], found value ["a"] type [string]',
+ 'Argument of [st_x] must be [cartesian_point], found value ["a"] type [string]',
]);
testErrorsAndWarnings('row var = st_x(to_cartesianpoint("POINT (30 10)"))', []);
@@ -4579,7 +7075,7 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval var = st_x(to_geopoint(stringField))', []);
testErrorsAndWarnings('from a_index | eval st_x(stringField)', [
- 'Argument of [st_x] must be [geo_point], found value [stringField] type [string]',
+ 'Argument of [st_x] must be [cartesian_point], found value [stringField] type [string]',
]);
testErrorsAndWarnings('from a_index | eval st_x(geoPointField, extraArg)', [
@@ -4599,6 +7095,29 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort st_x(geoPointField)', []);
+
+ testErrorsAndWarnings(
+ 'row var = st_x(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = st_x(to_geopoint(to_geopoint("POINT (30 10)")))', []);
+
+ testErrorsAndWarnings('row var = st_x(true)', [
+ 'Argument of [st_x] must be [cartesian_point], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_x(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval st_x(booleanField)', [
+ 'Argument of [st_x] must be [cartesian_point], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = st_x(to_geopoint(geoPointField))', []);
+ testErrorsAndWarnings('from a_index | sort st_x(cartesianPointField)', []);
});
describe('st_y', () => {
@@ -4607,7 +7126,7 @@ describe('validation logic', () => {
testErrorsAndWarnings('row var = st_y(to_geopoint("a"))', []);
testErrorsAndWarnings('row var = st_y("a")', [
- 'Argument of [st_y] must be [geo_point], found value ["a"] type [string]',
+ 'Argument of [st_y] must be [cartesian_point], found value ["a"] type [string]',
]);
testErrorsAndWarnings('row var = st_y(to_cartesianpoint("POINT (30 10)"))', []);
@@ -4618,7 +7137,7 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval var = st_y(to_geopoint(stringField))', []);
testErrorsAndWarnings('from a_index | eval st_y(stringField)', [
- 'Argument of [st_y] must be [geo_point], found value [stringField] type [string]',
+ 'Argument of [st_y] must be [cartesian_point], found value [stringField] type [string]',
]);
testErrorsAndWarnings('from a_index | eval st_y(geoPointField, extraArg)', [
@@ -4638,6 +7157,29 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort st_y(geoPointField)', []);
+
+ testErrorsAndWarnings(
+ 'row var = st_y(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = st_y(to_geopoint(to_geopoint("POINT (30 10)")))', []);
+
+ testErrorsAndWarnings('row var = st_y(true)', [
+ 'Argument of [st_y] must be [cartesian_point], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = st_y(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval st_y(booleanField)', [
+ 'Argument of [st_y] must be [cartesian_point], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = st_y(to_geopoint(geoPointField))', []);
+ testErrorsAndWarnings('from a_index | sort st_y(cartesianPointField)', []);
});
describe('starts_with', () => {
@@ -4672,11 +7214,29 @@ describe('validation logic', () => {
);
testErrorsAndWarnings('from a_index | sort starts_with(stringField, stringField)', []);
+ testErrorsAndWarnings('row var = starts_with(to_string(true), to_string(true))', []);
+
+ testErrorsAndWarnings('row var = starts_with(true, true)', [
+ 'Argument of [starts_with] must be [string], found value [true] type [boolean]',
+ 'Argument of [starts_with] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = starts_with(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval starts_with(booleanField, booleanField)', [
+ 'Argument of [starts_with] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [starts_with] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('substring', () => {
testErrorsAndWarnings('row var = substring("a", 5, 5)', []);
+ testErrorsAndWarnings('row var = substring("a", 5)', []);
testErrorsAndWarnings('row substring("a", 5, 5)', []);
+ testErrorsAndWarnings('row substring("a", 5)', []);
testErrorsAndWarnings(
'row var = substring(to_string("a"), to_integer("a"), to_integer("a"))',
@@ -4729,13 +7289,48 @@ describe('validation logic', () => {
testErrorsAndWarnings(
'from a_index | eval substring(stringField, numberField, numberField, extraArg)',
- ['Error: [substring] function expects exactly 3 arguments, got 4.']
+ ['Error: [substring] function expects no more than 3 arguments, got 4.']
);
testErrorsAndWarnings(
'from a_index | sort substring(stringField, numberField, numberField)',
[]
);
+ testErrorsAndWarnings('from a_index | sort substring(stringField, numberField)', []);
+
+ testErrorsAndWarnings(
+ 'row var = substring(to_string(true), to_integer(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = substring(true, true, true)', [
+ 'Argument of [substring] must be [string], found value [true] type [boolean]',
+ 'Argument of [substring] must be [number], found value [true] type [boolean]',
+ 'Argument of [substring] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where length(substring(booleanField, booleanField, booleanField)) > 0',
+ [
+ 'Argument of [substring] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [substring] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [substring] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = substring(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval substring(booleanField, booleanField, booleanField)',
+ [
+ 'Argument of [substring] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [substring] must be [number], found value [booleanField] type [boolean]',
+ 'Argument of [substring] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
});
describe('tan', () => {
@@ -4770,6 +7365,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort tan(numberField)', []);
+ testErrorsAndWarnings('row var = tan(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = tan(true)', [
+ 'Argument of [tan] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where tan(booleanField) > 0', [
+ 'Argument of [tan] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = tan(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval tan(booleanField)', [
+ 'Argument of [tan] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('tanh', () => {
@@ -4804,6 +7414,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort tanh(numberField)', []);
+ testErrorsAndWarnings('row var = tanh(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = tanh(true)', [
+ 'Argument of [tanh] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where tanh(booleanField) > 0', [
+ 'Argument of [tanh] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = tanh(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval tanh(booleanField)', [
+ 'Argument of [tanh] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('tau', () => {
@@ -4833,6 +7458,40 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_boolean(stringField)', []);
+ testErrorsAndWarnings('row var = to_boolean(true)', []);
+ testErrorsAndWarnings('row to_boolean(true)', []);
+ testErrorsAndWarnings('row var = to_bool(true)', []);
+ testErrorsAndWarnings('row var = to_boolean(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = to_boolean(5)', []);
+ testErrorsAndWarnings('row to_boolean(5)', []);
+ testErrorsAndWarnings('row var = to_bool(5)', []);
+ testErrorsAndWarnings('row var = to_boolean(to_integer(true))', []);
+ testErrorsAndWarnings('row var = to_boolean(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_boolean(to_cartesianpoint("POINT (30 10)"))', [
+ 'Argument of [to_boolean] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_boolean(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval to_boolean(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_bool(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_boolean(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_boolean(cartesianPointField)', [
+ 'Argument of [to_boolean] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_boolean(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval to_boolean(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_bool(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_boolean(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_boolean(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_boolean(booleanField, extraArg)', [
+ 'Error: [to_boolean] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_boolean(booleanField)', []);
});
describe('to_cartesianpoint', () => {
@@ -4846,6 +7505,49 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_cartesianpoint(stringField)', []);
+ testErrorsAndWarnings(
+ 'row var = to_cartesianpoint(to_cartesianpoint("POINT (30 10)"))',
+ []
+ );
+ testErrorsAndWarnings('row to_cartesianpoint(to_cartesianpoint("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = to_cartesianpoint(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = to_cartesianpoint(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_cartesianpoint(true)', [
+ 'Argument of [to_cartesianpoint] must be [cartesian_point], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_cartesianpoint(cartesianPointField)',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval to_cartesianpoint(cartesianPointField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_cartesianpoint(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval to_cartesianpoint(booleanField)', [
+ 'Argument of [to_cartesianpoint] must be [cartesian_point], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_cartesianpoint(to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval to_cartesianpoint(cartesianPointField, extraArg)',
+ ['Error: [to_cartesianpoint] function expects exactly one argument, got 2.']
+ );
+
+ testErrorsAndWarnings('from a_index | sort to_cartesianpoint(cartesianPointField)', []);
});
describe('to_cartesianshape', () => {
@@ -4859,6 +7561,71 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_cartesianshape(stringField)', []);
+ testErrorsAndWarnings(
+ 'row var = to_cartesianshape(to_cartesianpoint("POINT (30 10)"))',
+ []
+ );
+ testErrorsAndWarnings('row to_cartesianshape(to_cartesianpoint("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = to_cartesianshape(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'row var = to_cartesianshape(to_cartesianshape("POINT (30 10)"))',
+ []
+ );
+ testErrorsAndWarnings('row to_cartesianshape(to_cartesianshape("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = to_cartesianshape(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = to_cartesianshape(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_cartesianshape(true)', [
+ 'Argument of [to_cartesianshape] must be [cartesian_point], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_cartesianshape(cartesianPointField)',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval to_cartesianshape(cartesianPointField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_cartesianshape(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval to_cartesianshape(booleanField)', [
+ 'Argument of [to_cartesianshape] must be [cartesian_point], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_cartesianshape(cartesianShapeField)',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval to_cartesianshape(cartesianShapeField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_cartesianshape(to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_cartesianshape(to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval to_cartesianshape(cartesianPointField, extraArg)',
+ ['Error: [to_cartesianshape] function expects exactly one argument, got 2.']
+ );
+
+ testErrorsAndWarnings('from a_index | sort to_cartesianshape(cartesianPointField)', []);
});
describe('to_datetime', () => {
@@ -4874,6 +7641,43 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_datetime(stringField)', []);
+ testErrorsAndWarnings('row var = to_datetime(now())', []);
+ testErrorsAndWarnings('row to_datetime(now())', []);
+ testErrorsAndWarnings('row var = to_dt(now())', []);
+ testErrorsAndWarnings('row var = to_datetime(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = to_datetime(5)', []);
+ testErrorsAndWarnings('row to_datetime(5)', []);
+ testErrorsAndWarnings('row var = to_dt(5)', []);
+ testErrorsAndWarnings('row var = to_datetime(to_integer(true))', []);
+ testErrorsAndWarnings('row var = to_datetime(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_datetime(true)', [
+ 'Argument of [to_datetime] must be [date], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_datetime(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval to_datetime(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_dt(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_datetime(to_datetime(dateField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_datetime(booleanField)', [
+ 'Argument of [to_datetime] must be [date], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_datetime(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval to_datetime(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_dt(numberField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_datetime(to_integer(booleanField))',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval var = to_datetime(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_datetime(dateField, extraArg)', [
+ 'Error: [to_datetime] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_datetime(dateField)', []);
});
describe('to_degrees', () => {
@@ -4908,6 +7712,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_degrees(numberField)', []);
+ testErrorsAndWarnings('row var = to_degrees(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = to_degrees(true)', [
+ 'Argument of [to_degrees] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_degrees(booleanField) > 0', [
+ 'Argument of [to_degrees] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_degrees(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_degrees(booleanField)', [
+ 'Argument of [to_degrees] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('to_double', () => {
@@ -4923,6 +7742,57 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_double(stringField)', []);
+ testErrorsAndWarnings('row var = to_double(true)', []);
+ testErrorsAndWarnings('row to_double(true)', []);
+ testErrorsAndWarnings('row var = to_dbl(true)', []);
+ testErrorsAndWarnings('row var = to_double(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = to_double(5)', []);
+ testErrorsAndWarnings('row to_double(5)', []);
+ testErrorsAndWarnings('row var = to_dbl(5)', []);
+ testErrorsAndWarnings('row var = to_double(to_integer(true))', []);
+ testErrorsAndWarnings('row var = to_double(now())', []);
+ testErrorsAndWarnings('row to_double(now())', []);
+ testErrorsAndWarnings('row var = to_dbl(now())', []);
+ testErrorsAndWarnings('row var = to_double(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = to_double(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_double(to_cartesianpoint("POINT (30 10)"))', [
+ 'Argument of [to_double] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_double(booleanField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where to_double(cartesianPointField) > 0', [
+ 'Argument of [to_double] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_double(numberField) > 0', []);
+ testErrorsAndWarnings('from a_index | where to_double(dateField) > 0', []);
+ testErrorsAndWarnings('from a_index | where to_double(stringField) > 0', []);
+ testErrorsAndWarnings('from a_index | eval var = to_double(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval to_double(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_dbl(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_double(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_double(cartesianPointField)', [
+ 'Argument of [to_double] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_double(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval to_double(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_dbl(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_double(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_double(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval to_double(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_dbl(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_double(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_double(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_double(booleanField, extraArg)', [
+ 'Error: [to_double] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_double(booleanField)', []);
});
describe('to_geopoint', () => {
@@ -4935,7 +7805,37 @@ describe('validation logic', () => {
'Using wildcards (*) in to_geopoint is not allowed',
]);
- testErrorsAndWarnings('from a_index | sort to_geopoint(stringField)', []);
+ testErrorsAndWarnings('from a_index | sort to_geopoint(stringField)', []);
+ testErrorsAndWarnings('row var = to_geopoint(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row to_geopoint(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings(
+ 'row var = to_geopoint(to_geopoint(to_geopoint("POINT (30 10)")))',
+ []
+ );
+ testErrorsAndWarnings('row var = to_geopoint(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_geopoint(true)', [
+ 'Argument of [to_geopoint] must be [geo_point], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_geopoint(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval to_geopoint(geoPointField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_geopoint(to_geopoint(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval to_geopoint(booleanField)', [
+ 'Argument of [to_geopoint] must be [geo_point], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_geopoint(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_geopoint(geoPointField, extraArg)', [
+ 'Error: [to_geopoint] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_geopoint(geoPointField)', []);
});
describe('to_geoshape', () => {
@@ -4949,6 +7849,48 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_geoshape(stringField)', []);
+ testErrorsAndWarnings('row var = to_geoshape(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row to_geoshape(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings(
+ 'row var = to_geoshape(to_geopoint(to_geopoint("POINT (30 10)")))',
+ []
+ );
+ testErrorsAndWarnings('row var = to_geoshape(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row to_geoshape(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings(
+ 'row var = to_geoshape(to_geoshape(to_geopoint("POINT (30 10)")))',
+ []
+ );
+ testErrorsAndWarnings('row var = to_geoshape(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_geoshape(true)', [
+ 'Argument of [to_geoshape] must be [geo_point], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_geoshape(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval to_geoshape(geoPointField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_geoshape(to_geopoint(geoPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval to_geoshape(booleanField)', [
+ 'Argument of [to_geoshape] must be [geo_point], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_geoshape(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval to_geoshape(geoShapeField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_geoshape(to_geoshape(geoPointField))',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval var = to_geoshape(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_geoshape(geoPointField, extraArg)', [
+ 'Error: [to_geoshape] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_geoshape(geoPointField)', []);
});
describe('to_integer', () => {
@@ -4964,6 +7906,57 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_integer(stringField)', []);
+ testErrorsAndWarnings('row var = to_integer(true)', []);
+ testErrorsAndWarnings('row to_integer(true)', []);
+ testErrorsAndWarnings('row var = to_int(true)', []);
+ testErrorsAndWarnings('row var = to_integer(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = to_integer(5)', []);
+ testErrorsAndWarnings('row to_integer(5)', []);
+ testErrorsAndWarnings('row var = to_int(5)', []);
+ testErrorsAndWarnings('row var = to_integer(to_integer(true))', []);
+ testErrorsAndWarnings('row var = to_integer(now())', []);
+ testErrorsAndWarnings('row to_integer(now())', []);
+ testErrorsAndWarnings('row var = to_int(now())', []);
+ testErrorsAndWarnings('row var = to_integer(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = to_integer(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_integer(to_cartesianpoint("POINT (30 10)"))', [
+ 'Argument of [to_integer] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_integer(booleanField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where to_integer(cartesianPointField) > 0', [
+ 'Argument of [to_integer] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_integer(numberField) > 0', []);
+ testErrorsAndWarnings('from a_index | where to_integer(dateField) > 0', []);
+ testErrorsAndWarnings('from a_index | where to_integer(stringField) > 0', []);
+ testErrorsAndWarnings('from a_index | eval var = to_integer(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval to_integer(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_int(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_integer(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_integer(cartesianPointField)', [
+ 'Argument of [to_integer] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_integer(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval to_integer(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_int(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_integer(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_integer(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval to_integer(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_int(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_integer(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_integer(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_integer(booleanField, extraArg)', [
+ 'Error: [to_integer] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_integer(booleanField)', []);
});
describe('to_ip', () => {
@@ -4977,6 +7970,30 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_ip(stringField)', []);
+ testErrorsAndWarnings('row var = to_ip(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row to_ip(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = to_ip(to_ip(to_ip("127.0.0.1")))', []);
+ testErrorsAndWarnings('row var = to_ip(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_ip(true)', [
+ 'Argument of [to_ip] must be [ip], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_ip(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval to_ip(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_ip(to_ip(ipField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_ip(booleanField)', [
+ 'Argument of [to_ip] must be [ip], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_ip(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_ip(ipField, extraArg)', [
+ 'Error: [to_ip] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_ip(ipField)', []);
});
describe('to_long', () => {
@@ -4990,6 +8007,51 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_long(stringField)', []);
+ testErrorsAndWarnings('row var = to_long(true)', []);
+ testErrorsAndWarnings('row to_long(true)', []);
+ testErrorsAndWarnings('row var = to_long(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = to_long(5)', []);
+ testErrorsAndWarnings('row to_long(5)', []);
+ testErrorsAndWarnings('row var = to_long(to_integer(true))', []);
+ testErrorsAndWarnings('row var = to_long(now())', []);
+ testErrorsAndWarnings('row to_long(now())', []);
+ testErrorsAndWarnings('row var = to_long(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = to_long(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_long(to_cartesianpoint("POINT (30 10)"))', [
+ 'Argument of [to_long] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_long(booleanField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where to_long(cartesianPointField) > 0', [
+ 'Argument of [to_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_long(numberField) > 0', []);
+ testErrorsAndWarnings('from a_index | where to_long(dateField) > 0', []);
+ testErrorsAndWarnings('from a_index | where to_long(stringField) > 0', []);
+ testErrorsAndWarnings('from a_index | eval var = to_long(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval to_long(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_long(to_boolean(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_long(cartesianPointField)', [
+ 'Argument of [to_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_long(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval to_long(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_long(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_long(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval to_long(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_long(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_long(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_long(booleanField, extraArg)', [
+ 'Error: [to_long] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_long(booleanField)', []);
});
describe('to_lower', () => {
@@ -5024,6 +8086,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_lower(stringField)', []);
+ testErrorsAndWarnings('row var = to_lower(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_lower(true)', [
+ 'Argument of [to_lower] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(to_lower(booleanField)) > 0', [
+ 'Argument of [to_lower] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_lower(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_lower(booleanField)', [
+ 'Argument of [to_lower] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('to_radians', () => {
@@ -5058,6 +8135,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_radians(numberField)', []);
+ testErrorsAndWarnings('row var = to_radians(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = to_radians(true)', [
+ 'Argument of [to_radians] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_radians(booleanField) > 0', [
+ 'Argument of [to_radians] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_radians(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_radians(booleanField)', [
+ 'Argument of [to_radians] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('to_string', () => {
@@ -5073,6 +8165,128 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_string(stringField)', []);
+ testErrorsAndWarnings('row var = to_string(true)', []);
+ testErrorsAndWarnings('row to_string(true)', []);
+ testErrorsAndWarnings('row var = to_str(true)', []);
+ testErrorsAndWarnings('row var = to_string(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = to_string(to_cartesianpoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row to_string(to_cartesianpoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = to_str(to_cartesianpoint("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = to_string(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = to_string(to_cartesianshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row to_string(to_cartesianshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = to_str(to_cartesianshape("POINT (30 10)"))', []);
+
+ testErrorsAndWarnings(
+ 'row var = to_string(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = to_string(now())', []);
+ testErrorsAndWarnings('row to_string(now())', []);
+ testErrorsAndWarnings('row var = to_str(now())', []);
+ testErrorsAndWarnings('row var = to_string(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = to_string(5)', []);
+ testErrorsAndWarnings('row to_string(5)', []);
+ testErrorsAndWarnings('row var = to_str(5)', []);
+ testErrorsAndWarnings('row var = to_string(to_integer(true))', []);
+ testErrorsAndWarnings('row var = to_string(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row to_string(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = to_str(to_geopoint("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = to_string(to_geopoint(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = to_string(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row to_string(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = to_str(to_geoshape("POINT (30 10)"))', []);
+ testErrorsAndWarnings('row var = to_string(to_geoshape(to_geopoint("POINT (30 10)")))', []);
+ testErrorsAndWarnings('row var = to_string(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row to_string(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = to_str(to_ip("127.0.0.1"))', []);
+ testErrorsAndWarnings('row var = to_string(to_ip(to_ip("127.0.0.1")))', []);
+ testErrorsAndWarnings('row var = to_string(to_string(true))', []);
+ testErrorsAndWarnings('row var = to_string(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row to_string(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = to_str(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = to_string(to_version("a"))', []);
+ testErrorsAndWarnings('from a_index | where length(to_string(booleanField)) > 0', []);
+ testErrorsAndWarnings(
+ 'from a_index | where length(to_string(cartesianPointField)) > 0',
+ []
+ );
+ testErrorsAndWarnings(
+ 'from a_index | where length(to_string(cartesianShapeField)) > 0',
+ []
+ );
+ testErrorsAndWarnings('from a_index | where length(to_string(dateField)) > 0', []);
+ testErrorsAndWarnings('from a_index | where length(to_string(numberField)) > 0', []);
+ testErrorsAndWarnings('from a_index | where length(to_string(geoPointField)) > 0', []);
+ testErrorsAndWarnings('from a_index | where length(to_string(geoShapeField)) > 0', []);
+ testErrorsAndWarnings('from a_index | where length(to_string(ipField)) > 0', []);
+ testErrorsAndWarnings('from a_index | where length(to_string(stringField)) > 0', []);
+ testErrorsAndWarnings('from a_index | where length(to_string(versionField)) > 0', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval to_string(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_str(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(to_boolean(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(cartesianPointField)', []);
+ testErrorsAndWarnings('from a_index | eval to_string(cartesianPointField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_str(cartesianPointField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_string(to_cartesianpoint(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = to_string(cartesianShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval to_string(cartesianShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_str(cartesianShapeField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_string(to_cartesianshape(cartesianPointField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = to_string(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval to_string(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_str(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(to_datetime(dateField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval to_string(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_str(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(to_integer(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval to_string(geoPointField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_str(geoPointField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_string(to_geopoint(geoPointField))',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval var = to_string(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval to_string(geoShapeField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_str(geoShapeField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_string(to_geoshape(geoPointField))',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval var = to_string(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval to_string(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_str(ipField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(to_ip(ipField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(to_string(booleanField))', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval to_string(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_str(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_string(to_version(stringField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_string(booleanField, extraArg)', [
+ 'Error: [to_string] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_string(booleanField)', []);
});
describe('to_unsigned_long', () => {
@@ -5090,6 +8304,75 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_unsigned_long(stringField)', []);
+ testErrorsAndWarnings('row var = to_unsigned_long(true)', []);
+ testErrorsAndWarnings('row to_unsigned_long(true)', []);
+ testErrorsAndWarnings('row var = to_ul(true)', []);
+ testErrorsAndWarnings('row var = to_ulong(true)', []);
+ testErrorsAndWarnings('row var = to_unsigned_long(to_boolean(true))', []);
+ testErrorsAndWarnings('row var = to_unsigned_long(now())', []);
+ testErrorsAndWarnings('row to_unsigned_long(now())', []);
+ testErrorsAndWarnings('row var = to_ul(now())', []);
+ testErrorsAndWarnings('row var = to_ulong(now())', []);
+ testErrorsAndWarnings('row var = to_unsigned_long(to_datetime(now()))', []);
+ testErrorsAndWarnings('row var = to_unsigned_long(5)', []);
+ testErrorsAndWarnings('row to_unsigned_long(5)', []);
+ testErrorsAndWarnings('row var = to_ul(5)', []);
+ testErrorsAndWarnings('row var = to_ulong(5)', []);
+ testErrorsAndWarnings('row var = to_unsigned_long(to_integer(true))', []);
+ testErrorsAndWarnings('row var = to_unsigned_long(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_unsigned_long(to_cartesianpoint("POINT (30 10)"))', [
+ 'Argument of [to_unsigned_long] must be [boolean], found value [to_cartesianpoint("POINT (30 10)")] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_unsigned_long(booleanField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where to_unsigned_long(cartesianPointField) > 0', [
+ 'Argument of [to_unsigned_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where to_unsigned_long(dateField) > 0', []);
+ testErrorsAndWarnings('from a_index | where to_unsigned_long(numberField) > 0', []);
+ testErrorsAndWarnings('from a_index | where to_unsigned_long(stringField) > 0', []);
+ testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval to_unsigned_long(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_ul(booleanField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_ulong(booleanField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_unsigned_long(to_boolean(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval to_unsigned_long(cartesianPointField)', [
+ 'Argument of [to_unsigned_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval to_unsigned_long(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_ul(dateField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_ulong(dateField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_unsigned_long(to_datetime(dateField))',
+ []
+ );
+ testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval to_unsigned_long(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_ul(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_ulong(numberField)', []);
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_unsigned_long(to_integer(booleanField))',
+ []
+ );
+ testErrorsAndWarnings(
+ 'from a_index | eval var = to_unsigned_long(to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval to_unsigned_long(booleanField, extraArg)', [
+ 'Error: [to_unsigned_long] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_unsigned_long(booleanField)', []);
});
describe('to_upper', () => {
@@ -5124,6 +8407,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_upper(stringField)', []);
+ testErrorsAndWarnings('row var = to_upper(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_upper(true)', [
+ 'Argument of [to_upper] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(to_upper(booleanField)) > 0', [
+ 'Argument of [to_upper] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_upper(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_upper(booleanField)', [
+ 'Argument of [to_upper] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('to_version', () => {
@@ -5139,6 +8437,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort to_version(stringField)', []);
+ testErrorsAndWarnings('row var = to_version(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row to_version(to_version("1.0.0"))', []);
+ testErrorsAndWarnings('row var = to_ver(to_version("1.0.0"))', []);
+
+ testErrorsAndWarnings('row var = to_version(true)', [
+ 'Argument of [to_version] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_version(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval to_version(versionField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_ver(versionField)', []);
+
+ testErrorsAndWarnings('from a_index | eval to_version(stringField, extraArg)', [
+ 'Error: [to_version] function expects exactly one argument, got 2.',
+ ]);
});
describe('trim', () => {
@@ -5173,6 +8486,21 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | sort trim(stringField)', []);
+ testErrorsAndWarnings('row var = trim(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = trim(true)', [
+ 'Argument of [trim] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(trim(booleanField)) > 0', [
+ 'Argument of [trim] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = trim(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval trim(booleanField)', [
+ 'Argument of [trim] must be [string], found value [booleanField] type [boolean]',
+ ]);
});
describe('avg', () => {
@@ -5273,6 +8601,10 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval avg(numberField) > 0', [
'EVAL does not support function avg',
]);
+
+ testErrorsAndWarnings('from a_index | stats avg(booleanField)', [
+ 'Argument of [avg] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('sum', () => {
@@ -5373,6 +8705,10 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval sum(numberField) > 0', [
'EVAL does not support function sum',
]);
+
+ testErrorsAndWarnings('from a_index | stats sum(booleanField)', [
+ 'Argument of [sum] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('median', () => {
@@ -5479,6 +8815,10 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval median(numberField) > 0', [
'EVAL does not support function median',
]);
+
+ testErrorsAndWarnings('from a_index | stats median(booleanField)', [
+ 'Argument of [median] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('median_absolute_deviation', () => {
@@ -5620,6 +8960,10 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval median_absolute_deviation(numberField) > 0', [
'EVAL does not support function median_absolute_deviation',
]);
+
+ testErrorsAndWarnings('from a_index | stats median_absolute_deviation(booleanField)', [
+ 'Argument of [median_absolute_deviation] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('percentile', () => {
@@ -5735,6 +9079,10 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval percentile(numberField, 5) > 0', [
'EVAL does not support function percentile',
]);
+
+ testErrorsAndWarnings('from a_index | stats percentile(booleanField, 5)', [
+ 'Argument of [percentile] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('max', () => {
@@ -5869,6 +9217,10 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval max(dateField) > 0', [
'EVAL does not support function max',
]);
+
+ testErrorsAndWarnings('from a_index | stats max(booleanField)', [
+ 'Argument of [max] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('min', () => {
@@ -6003,6 +9355,10 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval min(dateField) > 0', [
'EVAL does not support function min',
]);
+
+ testErrorsAndWarnings('from a_index | stats min(booleanField)', [
+ 'Argument of [min] must be [number], found value [booleanField] type [boolean]',
+ ]);
});
describe('count', () => {
@@ -6186,6 +9542,10 @@ describe('validation logic', () => {
testErrorsAndWarnings('from a_index | eval st_centroid_agg(geoPointField) > 0', [
'EVAL does not support function st_centroid_agg',
]);
+
+ testErrorsAndWarnings('from a_index | stats st_centroid_agg(booleanField)', [
+ 'Argument of [st_centroid_agg] must be [cartesian_point], found value [booleanField] type [boolean]',
+ ]);
});
describe('values', () => {
@@ -6296,6 +9656,191 @@ describe('validation logic', () => {
'SORT does not support function bucket',
]);
});
+
+ describe('cbrt', () => {
+ testErrorsAndWarnings('row var = cbrt(5)', []);
+ testErrorsAndWarnings('row cbrt(5)', []);
+ testErrorsAndWarnings('row var = cbrt(to_integer(true))', []);
+
+ testErrorsAndWarnings('row var = cbrt(true)', [
+ 'Argument of [cbrt] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where cbrt(numberField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where cbrt(booleanField) > 0', [
+ 'Argument of [cbrt] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = cbrt(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval cbrt(numberField)', []);
+ testErrorsAndWarnings('from a_index | eval var = cbrt(to_integer(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval cbrt(booleanField)', [
+ 'Argument of [cbrt] must be [number], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = cbrt(*)', [
+ 'Using wildcards (*) in cbrt is not allowed',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval cbrt(numberField, extraArg)', [
+ 'Error: [cbrt] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort cbrt(numberField)', []);
+ });
+
+ describe('from_base64', () => {
+ testErrorsAndWarnings('row var = from_base64("a")', []);
+ testErrorsAndWarnings('row from_base64("a")', []);
+ testErrorsAndWarnings('row var = from_base64(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = from_base64(true)', [
+ 'Argument of [from_base64] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(from_base64(stringField)) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where length(from_base64(booleanField)) > 0', [
+ 'Argument of [from_base64] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = from_base64(stringField)', []);
+ testErrorsAndWarnings('from a_index | eval from_base64(stringField)', []);
+ testErrorsAndWarnings('from a_index | eval var = from_base64(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval from_base64(booleanField)', [
+ 'Argument of [from_base64] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = from_base64(*)', [
+ 'Using wildcards (*) in from_base64 is not allowed',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval from_base64(stringField, extraArg)', [
+ 'Error: [from_base64] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort from_base64(stringField)', []);
+ });
+
+ describe('locate', () => {
+ testErrorsAndWarnings('row var = locate("a", "a")', []);
+ testErrorsAndWarnings('row locate("a", "a")', []);
+ testErrorsAndWarnings('row var = locate(to_string(true), to_string(true))', []);
+ testErrorsAndWarnings('row var = locate("a", "a", 5)', []);
+ testErrorsAndWarnings('row locate("a", "a", 5)', []);
+ testErrorsAndWarnings(
+ 'row var = locate(to_string(true), to_string(true), to_integer(true))',
+ []
+ );
+
+ testErrorsAndWarnings('row var = locate(true, true, true)', [
+ 'Argument of [locate] must be [string], found value [true] type [boolean]',
+ 'Argument of [locate] must be [string], found value [true] type [boolean]',
+ 'Argument of [locate] must be [number], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where locate(stringField, stringField) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where locate(booleanField, booleanField) > 0', [
+ 'Argument of [locate] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [locate] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | where locate(stringField, stringField, numberField) > 0',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | where locate(booleanField, booleanField, booleanField) > 0',
+ [
+ 'Argument of [locate] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [locate] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [locate] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings('from a_index | eval var = locate(stringField, stringField)', []);
+ testErrorsAndWarnings('from a_index | eval locate(stringField, stringField)', []);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = locate(to_string(booleanField), to_string(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings('from a_index | eval locate(booleanField, booleanField)', [
+ 'Argument of [locate] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [locate] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = locate(stringField, stringField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval locate(stringField, stringField, numberField)',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval var = locate(to_string(booleanField), to_string(booleanField), to_integer(booleanField))',
+ []
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval locate(booleanField, booleanField, booleanField)',
+ [
+ 'Argument of [locate] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [locate] must be [string], found value [booleanField] type [boolean]',
+ 'Argument of [locate] must be [number], found value [booleanField] type [boolean]',
+ ]
+ );
+
+ testErrorsAndWarnings(
+ 'from a_index | eval locate(stringField, stringField, numberField, extraArg)',
+ ['Error: [locate] function expects no more than 3 arguments, got 4.']
+ );
+
+ testErrorsAndWarnings('from a_index | sort locate(stringField, stringField)', []);
+ });
+
+ describe('to_base64', () => {
+ testErrorsAndWarnings('row var = to_base64("a")', []);
+ testErrorsAndWarnings('row to_base64("a")', []);
+ testErrorsAndWarnings('row var = to_base64(to_string(true))', []);
+
+ testErrorsAndWarnings('row var = to_base64(true)', [
+ 'Argument of [to_base64] must be [string], found value [true] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | where length(to_base64(stringField)) > 0', []);
+
+ testErrorsAndWarnings('from a_index | where length(to_base64(booleanField)) > 0', [
+ 'Argument of [to_base64] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_base64(stringField)', []);
+ testErrorsAndWarnings('from a_index | eval to_base64(stringField)', []);
+ testErrorsAndWarnings('from a_index | eval var = to_base64(to_string(booleanField))', []);
+
+ testErrorsAndWarnings('from a_index | eval to_base64(booleanField)', [
+ 'Argument of [to_base64] must be [string], found value [booleanField] type [boolean]',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval var = to_base64(*)', [
+ 'Using wildcards (*) in to_base64 is not allowed',
+ ]);
+
+ testErrorsAndWarnings('from a_index | eval to_base64(stringField, extraArg)', [
+ 'Error: [to_base64] function expects exactly one argument, got 2.',
+ ]);
+
+ testErrorsAndWarnings('from a_index | sort to_base64(stringField)', []);
+ });
});
});
diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts
index 5bef4d5faa604..1bc4121d729a2 100644
--- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts
@@ -70,7 +70,8 @@ import {
retrievePoliciesFields,
retrieveFieldsFromStringSources,
} from './resources';
-import { collapseWrongArgumentTypeMessages } from './helpers';
+import { collapseWrongArgumentTypeMessages, getMaxMinNumberOfParams } from './helpers';
+import { getParamAtPosition } from '../autocomplete/helper';
import { METADATA_FIELDS } from '../shared/constants';
function validateFunctionLiteralArg(
@@ -346,35 +347,28 @@ function validateFunction(
}
const matchingSignatures = extractCompatibleSignaturesForFunction(fnDefinition, astFunction);
if (!matchingSignatures.length) {
- const refSignature = fnDefinition.signatures[0];
- const numArgs =
- refSignature.minParams ?? refSignature.params.filter(({ optional }) => !optional).length;
- if (
- !refSignature.minParams &&
- refSignature.params.filter(({ optional }) => !optional).length === refSignature.params.length
- ) {
+ const { max, min } = getMaxMinNumberOfParams(fnDefinition);
+ if (max === min) {
messages.push(
getMessageFromId({
messageId: 'wrongArgumentNumber',
values: {
fn: astFunction.name,
- numArgs:
- refSignature.minParams ??
- refSignature.params.filter(({ optional }) => !optional).length,
+ numArgs: max,
passedArgs: astFunction.args.length,
},
locations: astFunction.location,
})
);
- } else if (Math.max(astFunction.args.length - refSignature.params.length, 0) > 0) {
+ } else if (astFunction.args.length > max) {
messages.push(
getMessageFromId({
messageId: 'wrongArgumentNumberTooMany',
values: {
fn: astFunction.name,
- numArgs: refSignature.params.length,
+ numArgs: max,
passedArgs: astFunction.args.length,
- extraArgs: Math.max(astFunction.args.length - refSignature.params.length, 0),
+ extraArgs: astFunction.args.length - max,
},
locations: astFunction.location,
})
@@ -385,9 +379,9 @@ function validateFunction(
messageId: 'wrongArgumentNumberTooFew',
values: {
fn: astFunction.name,
- numArgs,
+ numArgs: min,
passedArgs: astFunction.args.length,
- missingArgs: Math.max(numArgs - astFunction.args.length, 0),
+ missingArgs: min - astFunction.args.length,
},
locations: astFunction.location,
})
@@ -461,9 +455,9 @@ function validateFunction(
const failingSignatures: ESQLMessage[][] = [];
for (const signature of matchingSignatures) {
const failingSignature: ESQLMessage[] = [];
- signature.params.forEach((argDef, index) => {
- const outerArg = astFunction.args[index]!;
- if (!outerArg && argDef.optional) {
+ astFunction.args.forEach((outerArg, index) => {
+ const argDef = getParamAtPosition(signature, index);
+ if ((!outerArg && argDef?.optional) || !argDef) {
// that's ok, just skip it
// the else case is already catched with the argument counts check
// few lines above
diff --git a/packages/kbn-esql-validation-autocomplete/tsconfig.json b/packages/kbn-esql-validation-autocomplete/tsconfig.json
index 59bed1b2893f0..3c87e005c394f 100644
--- a/packages/kbn-esql-validation-autocomplete/tsconfig.json
+++ b/packages/kbn-esql-validation-autocomplete/tsconfig.json
@@ -14,6 +14,7 @@
"kbn_references": [
"@kbn/i18n",
"@kbn/esql-ast",
+ "@kbn/utility-types",
],
"exclude": [
"target/**/*",
diff --git a/packages/kbn-management/settings/setting_ids/index.ts b/packages/kbn-management/settings/setting_ids/index.ts
index 4fd4015baeb2c..0602ee6390629 100644
--- a/packages/kbn-management/settings/setting_ids/index.ts
+++ b/packages/kbn-management/settings/setting_ids/index.ts
@@ -123,8 +123,8 @@ export const OBSERVABILITY_ENABLE_COMPARISON_BY_DEFAULT_ID =
'observability:enableComparisonByDefault';
export const OBSERVABILITY_ENABLE_INFRASTRUCTURE_HOSTS_VIEW_ID =
'observability:enableInfrastructureHostsView';
-export const OBSERVABILITY_ENABLE_CONTAINER_ASSET_VIEW_ID =
- 'observability:enableContainerAssetView';
+export const OBSERVABILITY_ENABLE_INFRASTRUCTURE_CONTAINER_ASSET_VIEW_ID =
+ 'observability:enableInfrastructureContainerAssetView';
export const OBSERVABILITY_ENABLE_INFRASTRUCTURE_ASSET_CUSTOM_DASHBOARDS_ID =
'observability:enableInfrastructureAssetCustomDashboards';
export const OBSERVABILITY_ENABLE_INSPECT_ES_QUERIES_ID = 'observability:enableInspectEsQueries';
diff --git a/packages/serverless/settings/observability_project/index.ts b/packages/serverless/settings/observability_project/index.ts
index e9b5ceeee5eed..58be247f0ff8a 100644
--- a/packages/serverless/settings/observability_project/index.ts
+++ b/packages/serverless/settings/observability_project/index.ts
@@ -28,6 +28,7 @@ export const OBSERVABILITY_PROJECT_SETTINGS = [
settings.OBSERVABILITY_ENABLE_AWS_LAMBDA_METRICS_ID,
settings.OBSERVABILITY_APM_ENABLE_CRITICAL_PATH_ID,
settings.OBSERVABILITY_ENABLE_INFRASTRUCTURE_HOSTS_VIEW_ID,
+ settings.OBSERVABILITY_ENABLE_INFRASTRUCTURE_CONTAINER_ASSET_VIEW_ID,
settings.OBSERVABILITY_ENABLE_INFRASTRUCTURE_ASSET_CUSTOM_DASHBOARDS_ID,
settings.OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID,
settings.OBSERVABILITY_APM_ENABLE_TABLE_SEARCH_BAR,
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx
index 94723ddaea48b..d4e3ae19ae43e 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx
@@ -39,7 +39,7 @@ interface NativeConnectorConfigurationConfigProps {
export const NativeConnectorConfigurationConfig: React.FC<
NativeConnectorConfigurationConfigProps
-> = ({ connector, nativeConnector, status }) => {
+> = ({ connector, nativeConnector }) => {
const { hasPlatinumLicense } = useValues(LicensingLogic);
const { status: updateStatus } = useValues(ConnectorConfigurationApiLogic);
const { makeRequest } = useActions(ConnectorConfigurationApiLogic);
@@ -110,23 +110,6 @@ export const NativeConnectorConfigurationConfig: React.FC<
)}
- {status === ConnectorStatus.CONNECTED && (
- <>
-
-
- >
- )}
-
{connector.status && hasAdvancedFilteringFeature && !isAdvancedSnippetEmpty && (
<>
diff --git a/x-pack/plugins/fleet/public/applications/fleet/app.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/app.test.tsx
index a79946e49f366..e76a879f7154a 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/app.test.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/app.test.tsx
@@ -31,6 +31,8 @@ describe('AppRoutes', () => {
{
description: 'with Fleet:Agents:Read it should render AgentsApp',
path: '/agents',
+ expectReadOnly: true,
+ expectApp: 'AgentsApp',
authz: {
fleet: {
readAgents: true,
@@ -38,6 +40,20 @@ describe('AppRoutes', () => {
integrations: {},
},
},
+ {
+ description:
+ 'with Fleet:Agents:Read and Fleet:Agents:All it should render AgentsApp without readonly',
+ path: '/agents',
+ expectReadOnly: false,
+ expectApp: 'AgentsApp',
+ authz: {
+ fleet: {
+ allAgents: true,
+ readAgents: true,
+ },
+ integrations: {},
+ },
+ },
{
description: 'without Fleet:Agents:Read it should not render AgentsApp',
path: '/agents',
@@ -52,6 +68,7 @@ describe('AppRoutes', () => {
description: 'with Fleet:AgentPolicies:Read it should render AgentPolicyApp',
path: '/policies',
expectApp: 'AgentPolicyApp',
+ expectReadOnly: true,
authz: {
fleet: {
readAgentPolicies: true,
@@ -59,6 +76,20 @@ describe('AppRoutes', () => {
integrations: {},
},
},
+ {
+ description:
+ 'with Fleet:AgentPolicies:Read and Fleet:AgentPolicies:All it should render AgentPolicyApp without readonly',
+ path: '/policies',
+ expectApp: 'AgentPolicyApp',
+ expectReadOnly: false,
+ authz: {
+ fleet: {
+ allAgentPolicies: true,
+ readAgentPolicies: true,
+ },
+ integrations: {},
+ },
+ },
{
description: 'without Fleet:AgentPolicies:Read it should not render AgentPolicyApp',
path: '/policies',
@@ -72,6 +103,7 @@ describe('AppRoutes', () => {
{
description: 'with Fleet:Settings:Read it should render SettingsApp',
path: '/settings',
+ expectReadOnly: true,
expectApp: 'SettingsApp',
authz: {
fleet: {
@@ -80,6 +112,20 @@ describe('AppRoutes', () => {
integrations: {},
},
},
+ {
+ description:
+ 'with Fleet:Settings:Read and Fleet:Settings:All it should render SettingsApp without readonly',
+ path: '/settings',
+ expectReadOnly: false,
+ expectApp: 'SettingsApp',
+ authz: {
+ fleet: {
+ readSettings: true,
+ allSettings: true,
+ },
+ integrations: {},
+ },
+ },
{
description: 'without Fleet:Settings:Read it should not render SettingsApp',
path: '/settings',
@@ -95,7 +141,7 @@ describe('AppRoutes', () => {
it(scenario.description, () => {
jest.mocked(useAuthz).mockReturnValue(scenario.authz as any);
const testRenderer = createFleetTestRendererMock();
- testRenderer.startServices.navigation.ui.TopNavMenu = () => null as any;
+ testRenderer.startServices.navigation.ui.TopNavMenu = jest.fn().mockReturnValue(null);
testRenderer.history.push(`/mock${scenario.path}`);
const result = testRenderer.render( {}} />, {});
if (scenario.expectMissingPrivileges) {
@@ -106,6 +152,30 @@ describe('AppRoutes', () => {
if (scenario.expectApp) {
expect(result.queryByText(scenario.expectApp)).not.toBeNull();
}
+
+ if (scenario.expectReadOnly) {
+ expect(testRenderer.startServices.navigation.ui.TopNavMenu).toBeCalledWith(
+ expect.objectContaining({
+ config: expect.arrayContaining([
+ expect.objectContaining({
+ label: 'Read-only',
+ }),
+ ]),
+ }),
+ expect.anything()
+ );
+ } else {
+ expect(testRenderer.startServices.navigation.ui.TopNavMenu).not.toBeCalledWith(
+ expect.objectContaining({
+ config: expect.arrayContaining([
+ expect.objectContaining({
+ label: 'Read-only',
+ }),
+ ]),
+ }),
+ expect.anything()
+ );
+ }
});
}
});
diff --git a/x-pack/plugins/fleet/public/applications/fleet/app.tsx b/x-pack/plugins/fleet/public/applications/fleet/app.tsx
index 99a0d8ffbdbbe..faaf08adf4dbb 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/app.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/app.tsx
@@ -7,7 +7,7 @@
import React, { memo, useEffect, useState } from 'react';
import type { AppMountParameters } from '@kbn/core/public';
-import { EuiPortal } from '@elastic/eui';
+import { EuiPortal, useEuiTheme } from '@elastic/eui';
import type { History } from 'history';
import { Redirect, useRouteMatch } from 'react-router-dom';
import { Router, Routes, Route } from '@kbn/shared-ux-router';
@@ -17,6 +17,7 @@ import { i18n } from '@kbn/i18n';
import useObservable from 'react-use/lib/useObservable';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
+import { css } from '@emotion/css';
import type { TopNavMenuData } from '@kbn/navigation-plugin/public';
@@ -222,20 +223,49 @@ export const FleetAppContext: React.FC<{
);
const FleetTopNav = memo(
- ({ setHeaderActionMenu }: { setHeaderActionMenu: AppMountParameters['setHeaderActionMenu'] }) => {
+ ({
+ setHeaderActionMenu,
+ isReadOnly,
+ }: {
+ setHeaderActionMenu: AppMountParameters['setHeaderActionMenu'];
+ isReadOnly?: boolean;
+ }) => {
const services = useStartServices();
+ const { euiTheme } = useEuiTheme();
+
+ const readOnlyBtnClass = React.useMemo(() => {
+ return css`
+ color: ${euiTheme.colors.text};
+ `;
+ }, [euiTheme]);
const { TopNavMenu } = services.navigation.ui;
- const topNavConfig: TopNavMenuData[] = [
- {
- label: i18n.translate('xpack.fleet.appNavigation.sendFeedbackButton', {
- defaultMessage: 'Send feedback',
+ const topNavConfig: TopNavMenuData[] = [];
+
+ if (isReadOnly) {
+ topNavConfig.push({
+ label: i18n.translate('xpack.fleet.appNavigation.readOnlyBtn', {
+ defaultMessage: 'Read-only',
+ }),
+ disableButton: true,
+ className: readOnlyBtnClass,
+ iconType: 'glasses',
+ tooltip: i18n.translate('xpack.fleet.appNavigation.readOnlyTooltip', {
+ defaultMessage:
+ "You can view most Fleet settings, but your current privileges don't allow you to perform all actions.",
}),
- iconType: 'popout',
- run: () => window.open(FEEDBACK_URL),
- },
- ];
+ run: () => {},
+ });
+ }
+ topNavConfig.push({
+ label: i18n.translate('xpack.fleet.appNavigation.sendFeedbackButton', {
+ defaultMessage: 'Send feedback',
+ }),
+ iconType: 'popout',
+ run: () => window.open(FEEDBACK_URL),
+ });
+
return (
= ({ children, setHeaderActionMenu, isReadOnly }) => {
+ return (
+ <>
+
+ {children}
+ >
+ );
+};
+
export const AppRoutes = memo(
({ setHeaderActionMenu }: { setHeaderActionMenu: AppMountParameters['setHeaderActionMenu'] }) => {
const flyoutContext = useFlyoutContext();
const fleetStatus = useFleetStatus();
+
const { agentTamperProtectionEnabled } = ExperimentalFeaturesService.get();
const authz = useAuthz();
return (
<>
-
-
-
+
{authz.fleet.readAgents ? (
-
+
+
+
) : (
-
-
-
+
+
+
+
+
)}
{authz.fleet.readAgentPolicies ? (
-
+
+
+
) : (
-
-
-
+
+
+
+
+
)}
{authz.fleet.allAgents ? (
-
+
+
+
) : (
-
-
-
+
+
+
+
+
)}
{agentTamperProtectionEnabled && (
{authz.fleet.allAgents ? (
-
+
+
+
) : (
-
-
-
+
+
+
+
+
)}
)}
-
+
+
+
{authz.fleet.readSettings ? (
-
+
+
+
) : (
-
+
+
+
)}
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx
index 88d52d5554959..75ef6537ce9bd 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx
@@ -813,7 +813,8 @@ describe('When on the package policy create page', () => {
});
});
- test('should not show confirmation modal', async () => {
+ // FLAKY: https://github.com/elastic/kibana/issues/184191
+ test.skip('should not show confirmation modal', async () => {
(sendGetAgentStatus as jest.MockedFunction).mockResolvedValueOnce({
data: { results: { total: 1 } },
});
diff --git a/x-pack/plugins/osquery/common/constants.ts b/x-pack/plugins/osquery/common/constants.ts
index 966d00f708be1..b45c1cb082d03 100644
--- a/x-pack/plugins/osquery/common/constants.ts
+++ b/x-pack/plugins/osquery/common/constants.ts
@@ -15,6 +15,7 @@ export const RESULTS_INDEX = `${OSQUERY_LOGS_BASE}.results`;
export const OSQUERY_ACTIONS_INDEX = `${ACTIONS_INDEX}-*`;
export const ACTION_RESPONSES_INDEX = `.logs-${OSQUERY_INTEGRATION_NAME}.action.responses`;
+export const ACTION_RESPONSES_DATA_STREAM_INDEX = `logs-${OSQUERY_INTEGRATION_NAME}.action.responses`;
export const DEFAULT_PLATFORM = 'linux,windows,darwin';
diff --git a/x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts b/x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts
index 74ed26732ae90..3511b4e63d66c 100644
--- a/x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts
+++ b/x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts
@@ -83,4 +83,5 @@ export interface ActionResultsStrategyResponse
export interface ActionResultsRequestOptions extends RequestOptionsPaginated {
actionId: string;
startDate?: string;
+ useNewDataStream?: boolean;
}
diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts
index 41b07311cbe60..2ed9d406895a5 100644
--- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts
+++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts
@@ -9,7 +9,10 @@ import type { ISearchRequestParams } from '@kbn/search-types';
import { AGENT_ACTIONS_RESULTS_INDEX } from '@kbn/fleet-plugin/common';
import { isEmpty } from 'lodash';
import moment from 'moment';
-import { ACTION_RESPONSES_INDEX } from '../../../../../../common/constants';
+import {
+ ACTION_RESPONSES_DATA_STREAM_INDEX,
+ ACTION_RESPONSES_INDEX,
+} from '../../../../../../common/constants';
import type { ActionResultsRequestOptions } from '../../../../../../common/search_strategy';
import { getQueryFilter } from '../../../../../utils/build_query';
@@ -19,6 +22,7 @@ export const buildActionResultsQuery = ({
startDate,
sort,
componentTemplateExists,
+ useNewDataStream,
}: ActionResultsRequestOptions): ISearchRequestParams => {
let filter = `action_id: ${actionId}`;
if (!isEmpty(kuery)) {
@@ -41,11 +45,18 @@ export const buildActionResultsQuery = ({
const filterQuery = [...timeRangeFilter, getQueryFilter({ filter })];
+ let index: string;
+ if (useNewDataStream) {
+ index = ACTION_RESPONSES_DATA_STREAM_INDEX;
+ } else if (componentTemplateExists) {
+ index = ACTION_RESPONSES_INDEX;
+ } else {
+ index = AGENT_ACTIONS_RESULTS_INDEX;
+ }
+
return {
allow_no_indices: true,
- index: componentTemplateExists
- ? `${ACTION_RESPONSES_INDEX}-default*`
- : `${AGENT_ACTIONS_RESULTS_INDEX}*`,
+ index,
ignore_unavailable: true,
body: {
aggs: {
diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/index.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/index.ts
index 898f53b17c552..3cc3f8ad6b6c1 100644
--- a/x-pack/plugins/osquery/server/search_strategy/osquery/index.ts
+++ b/x-pack/plugins/osquery/server/search_strategy/osquery/index.ts
@@ -5,17 +5,18 @@
* 2.0.
*/
-import { from, map, mergeMap } from 'rxjs';
+import { map, mergeMap, forkJoin, from, of } from 'rxjs';
import type { ISearchStrategy, PluginStart } from '@kbn/data-plugin/server';
import { shimHitsTotal } from '@kbn/data-plugin/server';
import { ENHANCED_ES_SEARCH_STRATEGY } from '@kbn/data-plugin/common';
import type { CoreStart } from '@kbn/core/server';
-import { ACTIONS_INDEX } from '../../../common/constants';
+import { ACTION_RESPONSES_DATA_STREAM_INDEX, ACTIONS_INDEX } from '../../../common/constants';
import type {
FactoryQueryTypes,
StrategyResponseType,
StrategyRequestType,
} from '../../../common/search_strategy/osquery';
+import { OsqueryQueries } from '../../../common/search_strategy/osquery';
import { osqueryFactory } from './factory';
import type { OsqueryFactory } from './factory/types';
@@ -33,12 +34,15 @@ export const osquerySearchStrategyProvider = (
const queryFactory: OsqueryFactory = osqueryFactory[request.factoryQueryType];
- return from(
- esClient.asInternalUser.indices.exists({
+ return forkJoin({
+ actionsIndexExists: esClient.asInternalUser.indices.exists({
index: `${ACTIONS_INDEX}*`,
- })
- ).pipe(
- mergeMap((exists) => {
+ }),
+ newDataStreamIndexExists: esClient.asInternalUser.indices.exists({
+ index: `${ACTION_RESPONSES_DATA_STREAM_INDEX}*`,
+ }),
+ }).pipe(
+ mergeMap(({ actionsIndexExists, newDataStreamIndexExists }) => {
const strictRequest = {
factoryQueryType: request.factoryQueryType,
kuery: request.kuery,
@@ -51,7 +55,7 @@ export const osquerySearchStrategyProvider = (
const dsl = queryFactory.buildDsl({
...strictRequest,
- componentTemplateExists: exists,
+ componentTemplateExists: actionsIndexExists,
} as StrategyRequestType);
// use internal user for searching .fleet* indices
es =
@@ -59,7 +63,7 @@ export const osquerySearchStrategyProvider = (
? data.search.searchAsInternalUser
: data.search.getSearchStrategy(ENHANCED_ES_SEARCH_STRATEGY);
- return es.search(
+ const searchLegacyIndex$ = es.search(
{
...strictRequest,
params: dsl,
@@ -67,15 +71,56 @@ export const osquerySearchStrategyProvider = (
options,
deps
);
- }),
- map((response) => ({
- ...response,
- ...{
- rawResponse: shimHitsTotal(response.rawResponse, options),
- },
- total: response.rawResponse.hits.total as number,
- })),
- mergeMap((esSearchRes) => queryFactory.parse(request, esSearchRes))
+
+ // With the introduction of a new DS that sends data directly from an agent into the new index
+ // logs-osquery_manager.action.responses-default, instead of the old index .logs-osquery_manager.action.responses-default
+ // which was populated by a transform, we now need to check both places for results.
+ // The new index was introduced in integration package 1.12, so users running earlier versions won't have it.
+
+ return searchLegacyIndex$.pipe(
+ mergeMap((legacyIndexResponse) => {
+ if (
+ request.factoryQueryType === OsqueryQueries.actionResults &&
+ newDataStreamIndexExists
+ ) {
+ const dataStreamDsl = queryFactory.buildDsl({
+ ...strictRequest,
+ componentTemplateExists: actionsIndexExists,
+ useNewDataStream: true,
+ } as StrategyRequestType);
+
+ return from(
+ es.search(
+ {
+ ...strictRequest,
+ params: dataStreamDsl,
+ },
+ options,
+ deps
+ )
+ ).pipe(
+ map((newDataStreamIndexResponse) => {
+ if (newDataStreamIndexResponse.rawResponse.hits.total) {
+ return newDataStreamIndexResponse;
+ }
+
+ return legacyIndexResponse;
+ })
+ );
+ }
+
+ return of(legacyIndexResponse);
+ }),
+ map((response) => ({
+ ...response,
+ ...{
+ rawResponse: shimHitsTotal(response.rawResponse, options),
+ },
+ total: response.rawResponse.hits.total as number,
+ })),
+ mergeMap((esSearchRes) => queryFactory.parse(request, esSearchRes))
+ );
+ })
);
},
cancel: async (id, options, deps) => {
diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json
index 83548c6a562fd..3fddf1ca6ae2d 100644
--- a/x-pack/plugins/translations/translations/fr-FR.json
+++ b/x-pack/plugins/translations/translations/fr-FR.json
@@ -5062,27 +5062,15 @@
"kbn-esql-validation-autocomplete.esql.definition.orDoc": "ou",
"kbn-esql-validation-autocomplete.esql.definition.rlikeDoc": "Filtrer les données en fonction des expressions régulières des chaînes",
"kbn-esql-validation-autocomplete.esql.definition.subtractDoc": "Subtract (-)",
- "kbn-esql-validation-autocomplete.esql.definitions.absDoc": "Renvoie la valeur absolue.",
- "kbn-esql-validation-autocomplete.esql.definitions.acosDoc": "Fonction trigonométrique cosinus inverse",
"kbn-esql-validation-autocomplete.esql.definitions.appendSeparatorDoc": "Le ou les caractères qui séparent les champs ajoutés. A pour valeur par défaut une chaîne vide (\"\").",
"kbn-esql-validation-autocomplete.esql.definitions.asDoc": "En tant que",
- "kbn-esql-validation-autocomplete.esql.definitions.asinDoc": "Fonction trigonométrique sinus inverse",
- "kbn-esql-validation-autocomplete.esql.definitions.atan2Doc": "L'angle entre l'axe positif des x et le rayon allant de l'origine au point (x , y) dans le plan cartésien",
- "kbn-esql-validation-autocomplete.esql.definitions.atanDoc": "Fonction trigonométrique tangente inverse",
"kbn-esql-validation-autocomplete.esql.definitions.autoBucketDoc": "Groupement automatique des dates en fonction d'une plage et d'un compartiment cible donnés.",
"kbn-esql-validation-autocomplete.esql.definitions.avgDoc": "Renvoie la moyenne des valeurs dans un champ",
"kbn-esql-validation-autocomplete.esql.definitions.byDoc": "Par",
- "kbn-esql-validation-autocomplete.esql.definitions.caseDoc": "Accepte les paires de conditions et de valeurs. La fonction renvoie la valeur correspondant à la première condition évaluée à `true` (vraie). Si le nombre d'arguments est impair, le dernier argument est la valeur par défaut qui est renvoyée si aucune condition ne correspond.",
"kbn-esql-validation-autocomplete.esql.definitions.ccqAnyDoc": "L'enrichissement a lieu sur n'importe quel cluster",
"kbn-esql-validation-autocomplete.esql.definitions.ccqCoordinatorDoc": "L'enrichissement a lieu sur le cluster de coordination qui reçoit une requête ES|QL",
"kbn-esql-validation-autocomplete.esql.definitions.ccqModeDoc": "Mode de requête inter-clusters",
"kbn-esql-validation-autocomplete.esql.definitions.ccqRemoteDoc": "L'enrichissement a lieu sur le cluster qui héberge l'index cible.",
- "kbn-esql-validation-autocomplete.esql.definitions.ceilDoc": "Arrondir un nombre à l'entier supérieur.",
- "kbn-esql-validation-autocomplete.esql.definitions.cidrMatchDoc": "La fonction utilise un premier paramètre de type adresse IP, puis un ou plusieurs paramètres évalués en fonction d'une spécification CIDR.",
- "kbn-esql-validation-autocomplete.esql.definitions.coalesceDoc": "Renvoie la première valeur non nulle.",
- "kbn-esql-validation-autocomplete.esql.definitions.concatDoc": "Concatène deux ou plusieurs chaînes.",
- "kbn-esql-validation-autocomplete.esql.definitions.cosDoc": "Fonction trigonométrique cosinus",
- "kbn-esql-validation-autocomplete.esql.definitions.coshDoc": "Fonction hyperbolique cosinus",
"kbn-esql-validation-autocomplete.esql.definitions.countDistinctDoc": "Renvoie le décompte des valeurs distinctes dans un champ.",
"kbn-esql-validation-autocomplete.esql.definitions.countDoc": "Renvoie le décompte des valeurs dans un champ.",
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.day": "Jour",
@@ -5101,87 +5089,29 @@
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.weeks": "Semaines (pluriel)",
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.year": "An",
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.years": "Ans (pluriel)",
- "kbn-esql-validation-autocomplete.esql.definitions.dateExtractDoc": "Extrait des parties d'une date, telles que l'année, le mois, le jour, l'heure. Les types de champs pris en charge sont ceux fournis par la fonction \"java.time.temporal.ChronoField\"",
- "kbn-esql-validation-autocomplete.esql.definitions.dateFormatDoc": "Renvoie une représentation sous forme de chaîne d'une date dans le format fourni. Si aucun format n'est indiqué, le format \"yyyy-MM-dd'T'HH:mm:ss.SSSZ\" est utilisé.",
- "kbn-esql-validation-autocomplete.esql.definitions.dateParseDoc": "Analyser les dates à partir de chaînes.",
- "kbn-esql-validation-autocomplete.esql.definitions.dateTruncDoc": "Arrondit une date à l'intervalle le plus proche. Les intervalles peuvent être exprimés à l'aide de la syntaxe littérale timespan.",
"kbn-esql-validation-autocomplete.esql.definitions.dissectDoc": "Extrait de multiples valeurs de chaîne à partir d'une entrée de chaîne unique, suivant un modèle",
"kbn-esql-validation-autocomplete.esql.definitions.dropDoc": "Supprime les colonnes",
- "kbn-esql-validation-autocomplete.esql.definitions.eDoc": "Nombre d'Euler.",
- "kbn-esql-validation-autocomplete.esql.definitions.endsWithDoc": "Renvoie une valeur booléenne qui indique si une chaîne de mots-clés se termine par une autre chaîne :",
"kbn-esql-validation-autocomplete.esql.definitions.enrichDoc": "Enrichissez le tableau à l'aide d'un autre tableau. Avant de pouvoir utiliser l'enrichissement, vous devez créer et exécuter une politique d'enrichissement.",
"kbn-esql-validation-autocomplete.esql.definitions.evalDoc": "Calcule une expression et place la valeur résultante dans un champ de résultats de recherche.",
- "kbn-esql-validation-autocomplete.esql.definitions.floorDoc": "Arrondir un nombre à l'entier inférieur.",
"kbn-esql-validation-autocomplete.esql.definitions.fromDoc": "Récupère les données à partir d'un ou plusieurs flux de données, index ou alias. Dans une requête ou une sous-requête, vous devez utiliser d'abord la commande from, et cette dernière ne nécessite pas de barre verticale au début. Par exemple, pour récupérer des données d'un index :",
- "kbn-esql-validation-autocomplete.esql.definitions.greatestDoc": "Renvoie la valeur maximale de plusieurs colonnes.",
"kbn-esql-validation-autocomplete.esql.definitions.grokDoc": "Extrait de multiples valeurs de chaîne à partir d'une entrée de chaîne unique, suivant un modèle",
"kbn-esql-validation-autocomplete.esql.definitions.keepDoc": "Réarrange les champs dans le tableau d'entrée en appliquant les clauses \"KEEP\" dans les champs",
- "kbn-esql-validation-autocomplete.esql.definitions.leastDoc": "Renvoie la valeur minimale de plusieurs colonnes.",
- "kbn-esql-validation-autocomplete.esql.definitions.leftDoc": "Renvoyer la sous-chaîne qui extrait la longueur des caractères de la chaîne en partant de la gauche.",
- "kbn-esql-validation-autocomplete.esql.definitions.lengthDoc": "Renvoie la longueur des caractères d'une chaîne.",
"kbn-esql-validation-autocomplete.esql.definitions.limitDoc": "Renvoie les premiers résultats de recherche, dans l'ordre de recherche, en fonction de la \"limite\" spécifiée.",
- "kbn-esql-validation-autocomplete.esql.definitions.log10Doc": "Renvoie le log de base 10.",
- "kbn-esql-validation-autocomplete.esql.definitions.logDoc": "La fonction scalaire log(based, value) renvoie le logarithme d'une valeur pour une base spécifique, comme défini dans l'argument",
- "kbn-esql-validation-autocomplete.esql.definitions.ltrimDoc": "Retire les espaces au début des chaînes.",
"kbn-esql-validation-autocomplete.esql.definitions.maxDoc": "Renvoie la valeur maximale dans un champ.",
"kbn-esql-validation-autocomplete.esql.definitions.medianDeviationDoc": "Renvoie la médiane de chaque écart de point de données par rapport à la médiane de l'ensemble de l'échantillon.",
"kbn-esql-validation-autocomplete.esql.definitions.medianDoc": "Renvoie le 50e centile.",
"kbn-esql-validation-autocomplete.esql.definitions.metadataDoc": "Métadonnées",
"kbn-esql-validation-autocomplete.esql.definitions.minDoc": "Renvoie la valeur minimale dans un champ.",
- "kbn-esql-validation-autocomplete.esql.definitions.mvAvgDoc": "Convertit un champ multivalué en un champ à valeur unique comprenant la moyenne de toutes les valeurs.",
- "kbn-esql-validation-autocomplete.esql.definitions.mvConcatDoc": "Convertit un champ de type chaîne multivalué en un champ à valeur unique comprenant la concaténation de toutes les valeurs, séparées par un délimiteur",
- "kbn-esql-validation-autocomplete.esql.definitions.mvCountDoc": "Convertit un champ multivalué en un champ à valeur unique comprenant le total du nombre de valeurs",
- "kbn-esql-validation-autocomplete.esql.definitions.mvDedupeDoc": "Supprime les doublons d'un champ multivalué",
"kbn-esql-validation-autocomplete.esql.definitions.mvExpandDoc": "Développe des champs comportant des valeurs multiples en indiquant une valeur par ligne et en dupliquant les autres champs",
- "kbn-esql-validation-autocomplete.esql.definitions.mvFirstDoc": "Réduit un champ multivalué en un champ à valeur unique comprenant la première valeur.",
- "kbn-esql-validation-autocomplete.esql.definitions.mvLastDoc": "Réduit un champ multivalué en un champ à valeur unique comprenant la dernière valeur.",
- "kbn-esql-validation-autocomplete.esql.definitions.mvMaxDoc": "Convertit un champ multivalué en un champ à valeur unique comprenant la valeur maximale.",
- "kbn-esql-validation-autocomplete.esql.definitions.mvMedianDoc": "Convertit un champ multivalué en un champ à valeur unique comprenant la valeur médiane.",
- "kbn-esql-validation-autocomplete.esql.definitions.mvMinDoc": "Convertit un champ multivalué en un champ à valeur unique comprenant la valeur minimale.",
- "kbn-esql-validation-autocomplete.esql.definitions.mvSumDoc": "Convertit un champ multivalué en un champ à valeur unique comprenant la somme de toutes les valeurs.",
- "kbn-esql-validation-autocomplete.esql.definitions.nowDoc": "Renvoie la date et l'heure actuelles.",
"kbn-esql-validation-autocomplete.esql.definitions.onDoc": "Activé",
"kbn-esql-validation-autocomplete.esql.definitions.percentiletDoc": "Renvoie le n-ième centile d'un champ.",
- "kbn-esql-validation-autocomplete.esql.definitions.piDoc": "Le rapport entre la circonférence et le diamètre d'un cercle.",
- "kbn-esql-validation-autocomplete.esql.definitions.powDoc": "Renvoie la valeur d'une base (premier argument) élevée à une puissance (deuxième argument).",
"kbn-esql-validation-autocomplete.esql.definitions.renameDoc": "Attribue un nouveau nom à une ancienne colonne",
- "kbn-esql-validation-autocomplete.esql.definitions.replaceDoc": "La fonction remplace dans la chaîne (1er argument) toutes les correspondances avec l'expression régulière (2e argument) par la chaîne de remplacement (3e argument). Si l'un des arguments est NULL, le résultat est NULL.",
- "kbn-esql-validation-autocomplete.esql.definitions.rightDoc": "Renvoyer la sous-chaîne qui extrait la longueur des caractères de la chaîne en partant de la droite.",
- "kbn-esql-validation-autocomplete.esql.definitions.roundDoc": "Renvoie un nombre arrondi à la décimale, spécifié par la valeur entière la plus proche. La valeur par défaut est arrondie à un entier.",
"kbn-esql-validation-autocomplete.esql.definitions.rowDoc": "Renvoie une ligne contenant une ou plusieurs colonnes avec les valeurs que vous spécifiez. Cette commande peut s'avérer utile pour les tests.",
- "kbn-esql-validation-autocomplete.esql.definitions.rtrimDoc": "Supprime les espaces à la fin des chaînes.",
"kbn-esql-validation-autocomplete.esql.definitions.showDoc": "Renvoie des informations sur le déploiement et ses capacités",
- "kbn-esql-validation-autocomplete.esql.definitions.sinDoc": "Fonction trigonométrique sinus.",
- "kbn-esql-validation-autocomplete.esql.definitions.sinhDoc": "Fonction hyperbolique sinus.",
"kbn-esql-validation-autocomplete.esql.definitions.sortDoc": "Trie tous les résultats en fonction des champs spécifiés. Par défaut, les valeurs null sont considérées comme supérieures à toutes les autres valeurs. Avec l'ordre de tri croissant, les valeurs null sont classées en dernier. Avec l'ordre de tri décroissant, elles sont classées en premier. Pour modifier cet ordre, utilisez NULLS FIRST ou NULLS LAST",
- "kbn-esql-validation-autocomplete.esql.definitions.splitDoc": "Divise une chaîne de valeur unique en plusieurs chaînes.",
- "kbn-esql-validation-autocomplete.esql.definitions.sqrtDoc": "Renvoie la racine carrée d'un nombre. ",
- "kbn-esql-validation-autocomplete.esql.definitions.startsWithDoc": "Renvoie un booléen qui indique si une chaîne de mot-clés débute par une autre chaîne.",
"kbn-esql-validation-autocomplete.esql.definitions.statsDoc": "Calcule les statistiques agrégées, telles que la moyenne, le décompte et la somme, sur l'ensemble des résultats de recherche entrants. Comme pour l'agrégation SQL, si la commande stats est utilisée sans clause BY, une seule ligne est renvoyée, qui est l'agrégation de tout l'ensemble des résultats de recherche entrants. Lorsque vous utilisez une clause BY, une ligne est renvoyée pour chaque valeur distincte dans le champ spécifié dans la clause BY. La commande stats renvoie uniquement les champs dans l'agrégation, et vous pouvez utiliser un large éventail de fonctions statistiques avec la commande stats. Lorsque vous effectuez plusieurs agrégations, séparez chacune d'entre elle par une virgule.",
"kbn-esql-validation-autocomplete.esql.definitions.stCentroidDoc": "Renvoie le décompte des valeurs distinctes dans un champ.",
- "kbn-esql-validation-autocomplete.esql.definitions.substringDoc": "Renvoie la sous-chaîne d'une chaîne, délimitée en fonction d'une position de départ et d'une longueur facultative.",
"kbn-esql-validation-autocomplete.esql.definitions.sumDoc": "Renvoie la somme des valeurs dans un champ.",
- "kbn-esql-validation-autocomplete.esql.definitions.tanDoc": "Fonction trigonométrique tangente.",
- "kbn-esql-validation-autocomplete.esql.definitions.tanhDoc": "Fonction hyperbolique tangente.",
- "kbn-esql-validation-autocomplete.esql.definitions.tauDoc": "Le rapport entre la circonférence et le rayon d'un cercle.",
- "kbn-esql-validation-autocomplete.esql.definitions.toBooleanDoc": "Convertit en booléen.",
- "kbn-esql-validation-autocomplete.esql.definitions.toCartesianPointDoc": "Convertit la valeur d'une entrée en une valeur \"point\".",
- "kbn-esql-validation-autocomplete.esql.definitions.toCartesianshapeDoc": "Convertit la valeur d'une entrée en une valeur cartesian_shape.",
- "kbn-esql-validation-autocomplete.esql.definitions.toDateTimeDoc": "Convertit en date.",
- "kbn-esql-validation-autocomplete.esql.definitions.toDegreesDoc": "Convertit en degrés",
- "kbn-esql-validation-autocomplete.esql.definitions.toDoubleDoc": "Convertit en double.",
- "kbn-esql-validation-autocomplete.esql.definitions.toGeopointDoc": "Convertit en une valeur geo_point.",
- "kbn-esql-validation-autocomplete.esql.definitions.toGeoshapeDoc": "Convertit la valeur d'une entrée en une valeur geo_shape.",
- "kbn-esql-validation-autocomplete.esql.definitions.toIntegerDoc": "Convertit en nombre entier.",
- "kbn-esql-validation-autocomplete.esql.definitions.toIpDoc": "Convertit en ip.",
- "kbn-esql-validation-autocomplete.esql.definitions.toLongDoc": "Convertit en long.",
- "kbn-esql-validation-autocomplete.esql.definitions.toLowerDoc": "Renvoie une nouvelle chaîne représentant la chaîne d'entrée convertie en minuscules.",
- "kbn-esql-validation-autocomplete.esql.definitions.toRadiansDoc": "Convertit en radians",
- "kbn-esql-validation-autocomplete.esql.definitions.toStringDoc": "Convertit en chaîne.",
- "kbn-esql-validation-autocomplete.esql.definitions.toUnsignedLongDoc": "Convertit en long non signé.",
- "kbn-esql-validation-autocomplete.esql.definitions.toUpperDoc": "Renvoie une nouvelle chaîne représentant la chaîne d'entrée convertie en majuscules.",
- "kbn-esql-validation-autocomplete.esql.definitions.toVersionDoc": "Convertit en version.",
- "kbn-esql-validation-autocomplete.esql.definitions.trimDoc": "Supprime les espaces de début et de fin d'une chaîne.",
"kbn-esql-validation-autocomplete.esql.definitions.whereDoc": "Utilise \"predicate-expressions\" pour filtrer les résultats de recherche. Une expression predicate, lorsqu'elle est évaluée, renvoie TRUE ou FALSE. La commande where renvoie uniquement les résultats qui donnent la valeur TRUE. Par exemple, pour filtrer les résultats pour une valeur de champ spécifique",
"kbn-esql-validation-autocomplete.esql.definitions.withDoc": "Avec",
"kbn-esql-validation-autocomplete.esql.quickfix.replaceWithQuote": "Remplacer les guillemets par le signe \" (double)",
@@ -13870,7 +13800,6 @@
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.description": "D'abord, générez une clé d'API Elasticsearch. Cette clé {apiKeyName} permet d'activer les autorisations de lecture et d'écriture du connecteur pour qu'il puisse indexer les documents dans l'index {indexName} créé. Enregistrez cette clé en lieu sûr, car vous en aurez besoin pour configurer votre connecteur.",
"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.apiKey.description": "La clé d'API de ce connecteur natif {apiKeyName} est gérée en interne par Elasticsearch. Ce connecteur utilise cette clé d'API pour indexer les documents dans l'index {indexName}. Pour substituer votre clé d'API, cliquez sur \"Generate API key\" (Générer une clé d'API).",
"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.config.sourceSecurityDocumentationLinkLabel": "Authentification {name}",
- "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.connectorConnected": "Votre connecteur {name} s'est bien connecté à Search.",
"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.description": "Vous souhaitez héberger vous-même ce connecteur natif ? Convertissez-le en {link} afin qu'il soit autogéré sur votre propre infrastructure. Vous devez convertir ce connecteur si vous souhaitez personnaliser le code à l'aide de notre cadre Python.",
"xpack.enterpriseSearch.content.indices.configurationConnector.researchConfiguration.serviceDocumentationLinkLabel": "Documentation sur {name}",
"xpack.enterpriseSearch.content.indices.connectorScheduling.page.description": "Votre connecteur est désormais déployé. Vous pouvez planifier du contenu récurrent et accéder aux synchronisations de contrôle ici. Si vous souhaitez exécuter un test rapide, lancez une synchronisation unique à l'aide du bouton {sync}.",
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 7aad465a0b280..61111df3e6107 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -5054,27 +5054,15 @@
"kbn-esql-validation-autocomplete.esql.definition.orDoc": "または",
"kbn-esql-validation-autocomplete.esql.definition.rlikeDoc": "文字列の正規表現に基づいてデータをフィルター",
"kbn-esql-validation-autocomplete.esql.definition.subtractDoc": "減算(-)",
- "kbn-esql-validation-autocomplete.esql.definitions.absDoc": "絶対値を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.acosDoc": "逆余弦三角関数",
"kbn-esql-validation-autocomplete.esql.definitions.appendSeparatorDoc": "追加されたフィールドを区切る文字。デフォルトは空の文字列(\"\")です。",
"kbn-esql-validation-autocomplete.esql.definitions.asDoc": "として",
- "kbn-esql-validation-autocomplete.esql.definitions.asinDoc": "逆正弦三角関数",
- "kbn-esql-validation-autocomplete.esql.definitions.atan2Doc": "直交平面上の原点から点(x , y)に向かう光線と正のx軸のなす角",
- "kbn-esql-validation-autocomplete.esql.definitions.atanDoc": "逆正接三角関数",
"kbn-esql-validation-autocomplete.esql.definitions.autoBucketDoc": "指定された範囲とバケット目標に基づいて、日付を自動的にバケット化します。",
"kbn-esql-validation-autocomplete.esql.definitions.avgDoc": "フィールドの値の平均を返します",
"kbn-esql-validation-autocomplete.esql.definitions.byDoc": "グループ基準",
- "kbn-esql-validation-autocomplete.esql.definitions.caseDoc": "条件と値のペアを指定できます。この関数は、最初にtrueと評価された条件に属する値を返します。引数の数が奇数の場合、最後の引数は条件に一致しない場合に返されるデフォルト値になります。",
"kbn-esql-validation-autocomplete.esql.definitions.ccqAnyDoc": "エンリッチは任意のクラスターで発生します",
"kbn-esql-validation-autocomplete.esql.definitions.ccqCoordinatorDoc": "エンリッチは、ES|QLを受信する調整クラスターで実行されます",
"kbn-esql-validation-autocomplete.esql.definitions.ccqModeDoc": "クラスター横断クエリモード",
"kbn-esql-validation-autocomplete.esql.definitions.ccqRemoteDoc": "エンリッチはターゲットインデックスをホスティングするクラスターで発生します。",
- "kbn-esql-validation-autocomplete.esql.definitions.ceilDoc": "最も近い整数に数値を切り上げます。",
- "kbn-esql-validation-autocomplete.esql.definitions.cidrMatchDoc": "この関数は、IP型の最初のパラメーターを取り、その後にCIDR指定に対して評価された1つ以上のパラメーターを取ります。",
- "kbn-esql-validation-autocomplete.esql.definitions.coalesceDoc": "最初のNULL以外の値を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.concatDoc": "2つ以上の文字列を連結します。",
- "kbn-esql-validation-autocomplete.esql.definitions.cosDoc": "余弦三角関数",
- "kbn-esql-validation-autocomplete.esql.definitions.coshDoc": "余弦双曲線関数",
"kbn-esql-validation-autocomplete.esql.definitions.countDistinctDoc": "フィールド内の異なる値の数を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.countDoc": "フィールドの値の数を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.day": "日",
@@ -5093,87 +5081,29 @@
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.weeks": "週(複数)",
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.year": "年",
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.years": "年(複数)",
- "kbn-esql-validation-autocomplete.esql.definitions.dateExtractDoc": "年、月、日、時間など、日付の一部を抽出します。サポートされているフィールド型はjava.time.temporal.ChronoFieldで提供されている型です。",
- "kbn-esql-validation-autocomplete.esql.definitions.dateFormatDoc": "指定した書式の日付の文字列表現を返します。書式が指定されていない場合は、yyyy-MM-dd'T'HH:mm:ss.SSSZの書式が使用されます。",
- "kbn-esql-validation-autocomplete.esql.definitions.dateParseDoc": "文字列から日付を解析します。",
- "kbn-esql-validation-autocomplete.esql.definitions.dateTruncDoc": "最も近い区間まで日付を切り捨てます。区間はtimespanリテラル構文を使って表現できます。",
"kbn-esql-validation-autocomplete.esql.definitions.dissectDoc": "単一の文字列入力から、パターンに基づいて複数の文字列値を抽出",
"kbn-esql-validation-autocomplete.esql.definitions.dropDoc": "列を削除",
- "kbn-esql-validation-autocomplete.esql.definitions.eDoc": "Eulerの数値。",
- "kbn-esql-validation-autocomplete.esql.definitions.endsWithDoc": "キーワード文字列が他の文字列で終わるかどうかを示すブール値を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.enrichDoc": "別のテーブルでテーブルをエンリッチします。エンリッチを使用する前に、エンリッチポリシーを作成して実行する必要があります。",
"kbn-esql-validation-autocomplete.esql.definitions.evalDoc": "式を計算し、結果の値を検索結果フィールドに入力します。",
- "kbn-esql-validation-autocomplete.esql.definitions.floorDoc": "最も近い整数に数値を切り捨てます。",
"kbn-esql-validation-autocomplete.esql.definitions.fromDoc": "1つ以上のデータストリーム、インデックス、またはエイリアスからデータを取得します。クエリまたはサブクエリでは、最初にコマンドから使用する必要があります。先頭のパイプは不要です。たとえば、インデックスからデータを取得します。",
- "kbn-esql-validation-autocomplete.esql.definitions.greatestDoc": "多数の列から最大値を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.grokDoc": "単一の文字列入力から、パターンに基づいて複数の文字列値を抽出",
"kbn-esql-validation-autocomplete.esql.definitions.keepDoc": "フィールドでkeep句を適用して、入力テーブルのフィールドを並べ替えます",
- "kbn-esql-validation-autocomplete.esql.definitions.leastDoc": "多数の列から最小値を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.leftDoc": "stringから左から順にlength文字を抜き出したサブ文字列を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.lengthDoc": "文字列の文字数を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.limitDoc": "指定された「制限」に基づき、検索順序で、最初の検索結果を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.log10Doc": "底が10の対数を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.logDoc": "スカラー関数対数(底、値)は、引数で指定されている特定の底の値の対数を返します",
- "kbn-esql-validation-autocomplete.esql.definitions.ltrimDoc": "文字列から先頭の空白を取り除きます。",
"kbn-esql-validation-autocomplete.esql.definitions.maxDoc": "フィールドの最大値を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.medianDeviationDoc": "サンプル全体の中央値からの各データポイントの偏差の中央値を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.medianDoc": "50%パーセンタイルを返します。",
"kbn-esql-validation-autocomplete.esql.definitions.metadataDoc": "メタデータ",
"kbn-esql-validation-autocomplete.esql.definitions.minDoc": "フィールドの最小値を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvAvgDoc": "複数値フィールドを、すべての値の平均を含む単一値フィールドに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvConcatDoc": "複数値文字列フィールドを、区切り文字で区切られたすべての値を連結した単一値フィールドに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvCountDoc": "複数値フィールドを、値の数をカウントする単一値フィールドに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvDedupeDoc": "複数値フィールドから重複を削除します。",
"kbn-esql-validation-autocomplete.esql.definitions.mvExpandDoc": "複数値フィールドを値ごとに1行に展開し、他のフィールドを複製します",
- "kbn-esql-validation-autocomplete.esql.definitions.mvFirstDoc": "複数値フィールドを、最初の値を含む単一値フィールドに縮小します。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvLastDoc": "複数値フィールドを、最後の値を含む単一値フィールドに縮小します。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvMaxDoc": "複数値フィールドを、最大値を含む単一値フィールドに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvMedianDoc": "複数値フィールドを、中央値を含む単一値フィールドに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvMinDoc": "複数値フィールドを、最小値を含む単一値フィールドに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvSumDoc": "複数値フィールドを、すべての値の合計を含む単一値フィールドに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.nowDoc": "現在の日付と時刻を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.onDoc": "オン",
"kbn-esql-validation-autocomplete.esql.definitions.percentiletDoc": "フィールドのnパーセンタイルを返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.piDoc": "円の円周と直径の比率。",
- "kbn-esql-validation-autocomplete.esql.definitions.powDoc": "底(第1引数)を累乗(第2引数)した値を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.renameDoc": "古い列の名前を新しい列に変更",
- "kbn-esql-validation-autocomplete.esql.definitions.replaceDoc": "この関数は、文字列(第1引数)で、正規表現(第2引数)の任意の一致に置換文字列(第3引数)を代入します。いずれかの引数がNULLの場合、結果はNULLになります。",
- "kbn-esql-validation-autocomplete.esql.definitions.rightDoc": "stringのうち右から数えてlength文字までのサブ文字列を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.roundDoc": "最も近い整数値で指定された数字まで端数処理された数値を返します。デフォルトは整数になるように四捨五入されます。",
"kbn-esql-validation-autocomplete.esql.definitions.rowDoc": "指定した値の列を1つ以上含む行を作成します。これはテストの場合に便利です。",
- "kbn-esql-validation-autocomplete.esql.definitions.rtrimDoc": "文字列から末尾の空白を取り除きます。",
"kbn-esql-validation-autocomplete.esql.definitions.showDoc": "デプロイとその能力に関する情報を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.sinDoc": "正弦三角関数。",
- "kbn-esql-validation-autocomplete.esql.definitions.sinhDoc": "正弦双曲線関数。",
"kbn-esql-validation-autocomplete.esql.definitions.sortDoc": "すべての結果を指定されたフィールドで並べ替えます。デフォルトでは、null値は他のどの値よりも大きい値として扱われます。昇順のソートではnull値は最後にソートされ、降順のソートではnull値は最初にソートされます。NULLS FIRSTまたはNULLS LASTを指定することで変更できます。",
- "kbn-esql-validation-autocomplete.esql.definitions.splitDoc": "単一の値の文字列を複数の文字列に分割します。",
- "kbn-esql-validation-autocomplete.esql.definitions.sqrtDoc": "数値の平方根を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.startsWithDoc": "キーワード文字列が他の文字列で始まるかどうかを示すブール値を返します。",
"kbn-esql-validation-autocomplete.esql.definitions.statsDoc": "受信検索結果セットで、平均、カウント、合計などの集約統計情報を計算します。SQL集約と同様に、statsコマンドをBY句なしで使用した場合は、1行のみが返されます。これは、受信検索結果セット全体に対する集約です。BY句を使用すると、BY句で指定したフィールドの1つの値ごとに1行が返されます。statsコマンドは集約のフィールドのみを返します。statsコマンドではさまざまな統計関数を使用できます。複数の集約を実行するときには、各集約をカンマで区切ります。",
"kbn-esql-validation-autocomplete.esql.definitions.stCentroidDoc": "フィールド内の異なる値の数を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.substringDoc": "文字列のサブ文字列を、開始位置とオプションの長さで指定して返します。",
"kbn-esql-validation-autocomplete.esql.definitions.sumDoc": "フィールドの値の合計を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.tanDoc": "正接三角関数。",
- "kbn-esql-validation-autocomplete.esql.definitions.tanhDoc": "正接双曲線関数。",
- "kbn-esql-validation-autocomplete.esql.definitions.tauDoc": "円の円周と半径の比率。",
- "kbn-esql-validation-autocomplete.esql.definitions.toBooleanDoc": "ブール値に変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toCartesianPointDoc": "入力値をpoint値に変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toCartesianshapeDoc": "入力値をcartesian_shape値に変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toDateTimeDoc": "日付に変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toDegreesDoc": "度に変換します",
- "kbn-esql-validation-autocomplete.esql.definitions.toDoubleDoc": "doubleに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toGeopointDoc": "geo_pointに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toGeoshapeDoc": "入力値をgeo_shape値に変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toIntegerDoc": "整数に変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toIpDoc": "IPに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toLongDoc": "longに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toLowerDoc": "小文字に変換された入力文字列を表す新しい文字列を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toRadiansDoc": "ラジアンに変換します",
- "kbn-esql-validation-autocomplete.esql.definitions.toStringDoc": "文字列に変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toUnsignedLongDoc": "符号なしlongに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toUpperDoc": "大文字に変換された入力文字列を表す新しい文字列を返します。",
- "kbn-esql-validation-autocomplete.esql.definitions.toVersionDoc": "バージョンに変換します。",
- "kbn-esql-validation-autocomplete.esql.definitions.trimDoc": "文字列から先頭と末尾の空白を削除します。",
"kbn-esql-validation-autocomplete.esql.definitions.whereDoc": "「predicate-expressions」を使用して、検索結果をフィルターします。予測式は評価時にTRUEまたはFALSEを返します。whereコマンドはTRUEに評価される結果のみを返します。たとえば、特定のフィールド値の結果をフィルターします",
"kbn-esql-validation-autocomplete.esql.definitions.withDoc": "を使用して",
"kbn-esql-validation-autocomplete.esql.quickfix.replaceWithQuote": "引用符を\"(二重引用符)に変更",
@@ -13849,7 +13779,6 @@
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.description": "まず、Elasticsearch APIキーを生成します。この{apiKeyName}は、コネクターがドキュメントを作成された{indexName}インデックスにインデックスするための読み書き権限を有効にします。キーは安全な場所に保管してください。コネクターを構成するときに必要になります。",
"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.apiKey.description": "このネイティブコネクターのAPIキー{apiKeyName}は、Elasticsearchによって内部的に管理されています。コネクターは、このAPIキーを使用して、ドキュメントを\"{indexName}\"インデックスにインデックス化します。APIキーを展開するには、\"APIキーを生成\"をクリックしてください。",
"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.config.sourceSecurityDocumentationLinkLabel": "{name}認証",
- "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.connectorConnected": "コネクター{name}は、正常にSearchに接続されました。",
"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.description": "このセルフホスティングコネクターをカスタマイズしますか?独自のインフラで自己管理される{link}に変換します。Pythonフレームワークを使用してコードをカスタマイズしたい場合は、このコネクターを変換する必要があります。",
"xpack.enterpriseSearch.content.indices.configurationConnector.researchConfiguration.serviceDocumentationLinkLabel": "{name}ドキュメンテーション",
"xpack.enterpriseSearch.content.indices.connectorScheduling.page.description": "コネクターがデプロイされました。ここで、繰り返しコンテンツとアクセス制御同期をスケジュールします。簡易テストを実行する場合は、{sync}ボタンを使用してワンタイム同期を実行します。",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index c70ac8ffa2b99..828a4b28e299f 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -5065,27 +5065,15 @@
"kbn-esql-validation-autocomplete.esql.definition.orDoc": "或",
"kbn-esql-validation-autocomplete.esql.definition.rlikeDoc": "根据字符串正则表达式筛选数据",
"kbn-esql-validation-autocomplete.esql.definition.subtractDoc": "减 (-)",
- "kbn-esql-validation-autocomplete.esql.definitions.absDoc": "返回绝对值。",
- "kbn-esql-validation-autocomplete.esql.definitions.acosDoc": "反余弦三角函数",
"kbn-esql-validation-autocomplete.esql.definitions.appendSeparatorDoc": "分隔已追加字段的字符。默认为空字符串 (\"\")。",
"kbn-esql-validation-autocomplete.esql.definitions.asDoc": "作为",
- "kbn-esql-validation-autocomplete.esql.definitions.asinDoc": "反正弦三角函数",
- "kbn-esql-validation-autocomplete.esql.definitions.atan2Doc": "笛卡儿平面中正 x 轴与从原点到点 (x , y) 构成的射线之间的角度",
- "kbn-esql-validation-autocomplete.esql.definitions.atanDoc": "反正切三角函数",
"kbn-esql-validation-autocomplete.esql.definitions.autoBucketDoc": "根据给定范围和存储桶目标自动收集存储桶日期。",
"kbn-esql-validation-autocomplete.esql.definitions.avgDoc": "返回字段中的值的平均值",
"kbn-esql-validation-autocomplete.esql.definitions.byDoc": "依据",
- "kbn-esql-validation-autocomplete.esql.definitions.caseDoc": "接受成对的条件和值。此函数返回属于第一个评估为 `true` 的条件的值。如果参数数量为奇数,则最后一个参数为在无条件匹配时返回的默认值。",
"kbn-esql-validation-autocomplete.esql.definitions.ccqAnyDoc": "扩充在任何集群上发生",
"kbn-esql-validation-autocomplete.esql.definitions.ccqCoordinatorDoc": "扩充在接收 ES|QL 的协调集群上发生",
"kbn-esql-validation-autocomplete.esql.definitions.ccqModeDoc": "跨集群查询模式",
"kbn-esql-validation-autocomplete.esql.definitions.ccqRemoteDoc": "扩充在托管目标索引的集群上发生。",
- "kbn-esql-validation-autocomplete.esql.definitions.ceilDoc": "将数字四舍五入为最近的整数。",
- "kbn-esql-validation-autocomplete.esql.definitions.cidrMatchDoc": "此函数接受的第一个参数应为 IP 类型,后接一个或多个评估为 CIDR 规范的参数。",
- "kbn-esql-validation-autocomplete.esql.definitions.coalesceDoc": "返回第一个非 null 值。",
- "kbn-esql-validation-autocomplete.esql.definitions.concatDoc": "串联两个或多个字符串。",
- "kbn-esql-validation-autocomplete.esql.definitions.cosDoc": "余弦三角函数",
- "kbn-esql-validation-autocomplete.esql.definitions.coshDoc": "余弦双曲函数",
"kbn-esql-validation-autocomplete.esql.definitions.countDistinctDoc": "返回字段中不同值的计数。",
"kbn-esql-validation-autocomplete.esql.definitions.countDoc": "返回字段中的值的计数。",
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.day": "天",
@@ -5104,87 +5092,29 @@
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.weeks": "周(复数)",
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.year": "年",
"kbn-esql-validation-autocomplete.esql.definitions.dateDurationDefinition.years": "年(复数)",
- "kbn-esql-validation-autocomplete.esql.definitions.dateExtractDoc": "提取日期的某些部分,如年、月、日、小时。支持的字段类型为 java.time.temporal.ChronoField 提供的那些类型",
- "kbn-esql-validation-autocomplete.esql.definitions.dateFormatDoc": "以提供的格式返回日期的字符串表示形式。如果未指定格式,则使用“yyyy-MM-dd'T'HH:mm:ss.SSSZ”格式。",
- "kbn-esql-validation-autocomplete.esql.definitions.dateParseDoc": "解析字符串中的日期。",
- "kbn-esql-validation-autocomplete.esql.definitions.dateTruncDoc": "将日期向下舍入到最近的时间间隔。时间间隔可以用时间跨度文本语法表示。",
"kbn-esql-validation-autocomplete.esql.definitions.dissectDoc": "根据模式从单个字符串输入中提取多个字符串值",
"kbn-esql-validation-autocomplete.esql.definitions.dropDoc": "丢弃列",
- "kbn-esql-validation-autocomplete.esql.definitions.eDoc": "Euler 函数的编号。",
- "kbn-esql-validation-autocomplete.esql.definitions.endsWithDoc": "返回布尔值,指示关键字字符串是否以另一个字符串结尾:",
"kbn-esql-validation-autocomplete.esql.definitions.enrichDoc": "用其他表来扩充表。在使用扩充之前,您需要创建并执行扩充策略。",
"kbn-esql-validation-autocomplete.esql.definitions.evalDoc": "计算表达式并将生成的值置入搜索结果字段。",
- "kbn-esql-validation-autocomplete.esql.definitions.floorDoc": "将数字向下舍入到最近的整数。",
"kbn-esql-validation-autocomplete.esql.definitions.fromDoc": "从一个或多个数据流、索引或别名中检索数据。在查询或子查询中,必须先使用 from 命令,并且它不需要前导管道符。例如,要从索引中检索数据:",
- "kbn-esql-validation-autocomplete.esql.definitions.greatestDoc": "返回许多列中的最大值。",
"kbn-esql-validation-autocomplete.esql.definitions.grokDoc": "根据模式从单个字符串输入中提取多个字符串值",
"kbn-esql-validation-autocomplete.esql.definitions.keepDoc": "通过在字段中应用 keep 子句重新安排输入表中的字段",
- "kbn-esql-validation-autocomplete.esql.definitions.leastDoc": "返回许多列中的最小值。",
- "kbn-esql-validation-autocomplete.esql.definitions.leftDoc": "返回从字符串中提取长度字符的子字符串,从左侧开始。",
- "kbn-esql-validation-autocomplete.esql.definitions.lengthDoc": "返回字符串的字符长度。",
"kbn-esql-validation-autocomplete.esql.definitions.limitDoc": "根据指定的“限制”按搜索顺序返回第一个搜索结果。",
- "kbn-esql-validation-autocomplete.esql.definitions.log10Doc": "返回对数底数 10。",
- "kbn-esql-validation-autocomplete.esql.definitions.logDoc": "如参数中所指定,标量函数 log(based, value) 返回特定底数的值的对数",
- "kbn-esql-validation-autocomplete.esql.definitions.ltrimDoc": "从字符串中移除前导空格。",
"kbn-esql-validation-autocomplete.esql.definitions.maxDoc": "返回字段中的最大值。",
"kbn-esql-validation-autocomplete.esql.definitions.medianDeviationDoc": "返回每个数据点的中位数与整个样例的中位数的偏差。",
"kbn-esql-validation-autocomplete.esql.definitions.medianDoc": "返回 50% 百分位数。",
"kbn-esql-validation-autocomplete.esql.definitions.metadataDoc": "元数据",
"kbn-esql-validation-autocomplete.esql.definitions.minDoc": "返回字段中的最小值。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvAvgDoc": "将多值字段转换为包含所有值的平均值的单值字段。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvConcatDoc": "将多值字符串字段转换为单值字段,其中包含由分隔符分隔的所有值的串联形式",
- "kbn-esql-validation-autocomplete.esql.definitions.mvCountDoc": "将多值字段转换为包含值计数的单值字段",
- "kbn-esql-validation-autocomplete.esql.definitions.mvDedupeDoc": "移除多值字段中的重复项",
"kbn-esql-validation-autocomplete.esql.definitions.mvExpandDoc": "将多值字段扩展成每个值一行,从而复制其他字段",
- "kbn-esql-validation-autocomplete.esql.definitions.mvFirstDoc": "将多值字段缩减为包含第一个值的单值字段。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvLastDoc": "将多值字段缩减为包含最后一个值的单值字段。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvMaxDoc": "将多值字段转换为包含最大值的单值字段。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvMedianDoc": "将多值字段转换为包含中位数值的单值字段。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvMinDoc": "将多值字段转换为包含最小值的单值字段。",
- "kbn-esql-validation-autocomplete.esql.definitions.mvSumDoc": "将多值字段转换为包含所有值的总和的单值字段。",
- "kbn-esql-validation-autocomplete.esql.definitions.nowDoc": "返回当前日期和时间。",
"kbn-esql-validation-autocomplete.esql.definitions.onDoc": "开启",
"kbn-esql-validation-autocomplete.esql.definitions.percentiletDoc": "返回字段的第 n 个百分位。",
- "kbn-esql-validation-autocomplete.esql.definitions.piDoc": "圆的周长与其直径的比率。",
- "kbn-esql-validation-autocomplete.esql.definitions.powDoc": "返回提升为幂(第二个参数)的底数(第一个参数)的值。",
"kbn-esql-validation-autocomplete.esql.definitions.renameDoc": "将旧列重命名为新列",
- "kbn-esql-validation-autocomplete.esql.definitions.replaceDoc": "此函数将字符串(第 1 个参数)中正则表达式(第 2 个参数)的任何匹配项替换为替代字符串(第 3 个参数)。如果任何参数为 NULL,则结果为 NULL。",
- "kbn-esql-validation-autocomplete.esql.definitions.rightDoc": "返回从字符串中提取长度字符的子字符串,从右侧开始。",
- "kbn-esql-validation-autocomplete.esql.definitions.roundDoc": "返回四舍五入到小数(由最近的整数值指定)的数字。默认做法是四舍五入到整数。",
"kbn-esql-validation-autocomplete.esql.definitions.rowDoc": "生成一个行,其中包含一个或多个含有您指定的值的列。这可以用于测试。",
- "kbn-esql-validation-autocomplete.esql.definitions.rtrimDoc": "从字符串中移除尾随空格。",
"kbn-esql-validation-autocomplete.esql.definitions.showDoc": "返回有关部署及其功能的信息",
- "kbn-esql-validation-autocomplete.esql.definitions.sinDoc": "正弦三角函数。",
- "kbn-esql-validation-autocomplete.esql.definitions.sinhDoc": "正弦双曲函数。",
"kbn-esql-validation-autocomplete.esql.definitions.sortDoc": "按指定字段对所有结果排序。默认情况下,会将 null 值视为大于任何其他值。使用升序排序顺序时,会最后对 null 值排序,而使用降序排序顺序时,会首先对 null 值排序。您可以通过提供 NULLS FIRST 或 NULLS LAST 来更改该排序",
- "kbn-esql-validation-autocomplete.esql.definitions.splitDoc": "将单值字符串拆分成多个字符串。",
- "kbn-esql-validation-autocomplete.esql.definitions.sqrtDoc": "返回数字的平方根。",
- "kbn-esql-validation-autocomplete.esql.definitions.startsWithDoc": "返回指示关键字字符串是否以另一个字符串开头的布尔值。",
"kbn-esql-validation-autocomplete.esql.definitions.statsDoc": "对传入的搜索结果集计算汇总统计信息,如平均值、计数和总和。与 SQL 聚合类似,如果使用不含 BY 子句的 stats 命令,则只返回一行内容,即聚合传入的整个搜索结果集。使用 BY 子句时,将为在 BY 子句中指定的字段中的每个不同值返回一行内容。stats 命令仅返回聚合中的字段,并且您可以将一系列统计函数与 stats 命令搭配在一起使用。执行多个聚合时,请用逗号分隔每个聚合。",
"kbn-esql-validation-autocomplete.esql.definitions.stCentroidDoc": "返回字段中不同值的计数。",
- "kbn-esql-validation-autocomplete.esql.definitions.substringDoc": "返回字符串的子字符串,用起始位置和可选长度指定。",
"kbn-esql-validation-autocomplete.esql.definitions.sumDoc": "返回字段中的值的总和。",
- "kbn-esql-validation-autocomplete.esql.definitions.tanDoc": "正切三角函数。",
- "kbn-esql-validation-autocomplete.esql.definitions.tanhDoc": "正切双曲函数。",
- "kbn-esql-validation-autocomplete.esql.definitions.tauDoc": "圆的圆周长与其半径的比率。",
- "kbn-esql-validation-autocomplete.esql.definitions.toBooleanDoc": "转换为布尔值。",
- "kbn-esql-validation-autocomplete.esql.definitions.toCartesianPointDoc": "将输入值转换为 `point` 值。",
- "kbn-esql-validation-autocomplete.esql.definitions.toCartesianshapeDoc": "将输入值转换为 cartesian_shape 值。",
- "kbn-esql-validation-autocomplete.esql.definitions.toDateTimeDoc": "转换为日期。",
- "kbn-esql-validation-autocomplete.esql.definitions.toDegreesDoc": "转换为度",
- "kbn-esql-validation-autocomplete.esql.definitions.toDoubleDoc": "转换为双精度值。",
- "kbn-esql-validation-autocomplete.esql.definitions.toGeopointDoc": "转换为 geo_point。",
- "kbn-esql-validation-autocomplete.esql.definitions.toGeoshapeDoc": "将输入值转换为 geo_shape 值。",
- "kbn-esql-validation-autocomplete.esql.definitions.toIntegerDoc": "转换为整数。",
- "kbn-esql-validation-autocomplete.esql.definitions.toIpDoc": "转换为 IP。",
- "kbn-esql-validation-autocomplete.esql.definitions.toLongDoc": "转换为长整型。",
- "kbn-esql-validation-autocomplete.esql.definitions.toLowerDoc": "返回一个新字符串,表示已将输入字符串转为小写。",
- "kbn-esql-validation-autocomplete.esql.definitions.toRadiansDoc": "转换为弧度",
- "kbn-esql-validation-autocomplete.esql.definitions.toStringDoc": "转换为字符串。",
- "kbn-esql-validation-autocomplete.esql.definitions.toUnsignedLongDoc": "转换为无符号长整型。",
- "kbn-esql-validation-autocomplete.esql.definitions.toUpperDoc": "返回一个新字符串,表示已将输入字符串转为大写。",
- "kbn-esql-validation-autocomplete.esql.definitions.toVersionDoc": "转换为版本。",
- "kbn-esql-validation-autocomplete.esql.definitions.trimDoc": "从字符串中移除前导和尾随空格。",
"kbn-esql-validation-autocomplete.esql.definitions.whereDoc": "使用“predicate-expressions”可筛选搜索结果。进行计算时,谓词表达式将返回 TRUE 或 FALSE。where 命令仅返回计算结果为 TRUE 的结果。例如,筛选特定字段值的结果",
"kbn-esql-validation-autocomplete.esql.definitions.withDoc": "具有",
"kbn-esql-validation-autocomplete.esql.quickfix.replaceWithQuote": "将引号更改为 \"(双引号)",
@@ -13876,7 +13806,6 @@
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.description": "首先,生成一个 Elasticsearch API 密钥。此 {apiKeyName} 密钥将为连接器启用读取和写入权限,以便将文档索引到已创建的 {indexName} 索引。请将该密钥保存到安全位置,因为您需要它来配置连接器。",
"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.apiKey.description": "此本机连接器的 API 密钥 {apiKeyName} 由 Elasticsearch 内部托管。该连接器使用此 API 密钥将文档索引到 {indexName} 索引。要滚动更新 API 密钥,请单击“生成 API 密钥”。",
"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.config.sourceSecurityDocumentationLinkLabel": "{name} 身份验证",
- "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.connectorConnected": "您的连接器 {name} 已成功连接到 Search。",
"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.description": "是否要自我托管此本机连接器?将其转换为将在您自己的基础设施上进行自我管理的 {link}。如果希望使用我们的 Python 框架定制代码,您需要转换此连接器。",
"xpack.enterpriseSearch.content.indices.configurationConnector.researchConfiguration.serviceDocumentationLinkLabel": "{name} 文档",
"xpack.enterpriseSearch.content.indices.connectorScheduling.page.description": "现已部署您的连接器。在此处计划重复内容和访问控制同步。如果要运行快速测试,请使用 {sync} 按钮启动一次性同步。",
diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details_route.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details_route.tsx
index 116c97ef905d7..e195b12eea9e6 100644
--- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details_route.tsx
+++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details_route.tsx
@@ -130,20 +130,22 @@ export const RuleDetailsRoute: React.FunctionComponent =
return null;
};
- return rule && ruleType && actionTypes ? (
- <>
- {getLegacyUrlConflictCallout()}
-
- >
- ) : (
-
- );
+ if (rule && ruleType && actionTypes) {
+ return (
+ <>
+ {getLegacyUrlConflictCallout()}
+
+ >
+ );
+ }
+
+ return ;
};
export async function getRuleData(
diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_route.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_route.tsx
index f1df6af277549..2c7c5a7ac9267 100644
--- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_route.tsx
+++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_route.tsx
@@ -7,7 +7,7 @@
import { i18n } from '@kbn/i18n';
import { ToastsApi } from '@kbn/core/public';
-import React, { useState, useEffect, useRef, useCallback } from 'react';
+import React, { useState, useEffect, useRef, useCallback, Suspense } from 'react';
import { Rule, RuleSummary, RuleType } from '../../../../types';
import {
ComponentOpts as RuleApis,
@@ -76,17 +76,19 @@ export const RuleRoute: React.FunctionComponent = ({
);
return ruleSummary ? (
-
+ }>
+
+
) : (
);
diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts
index b71f659b10baa..546ee11fd4ea8 100644
--- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts
+++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts
@@ -319,9 +319,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
});
});
- // FLAKY: https://github.com/elastic/kibana/issues/172941
- // FLAKY: https://github.com/elastic/kibana/issues/173008
- describe.skip('Edit rule button', function () {
+ describe('Edit rule button', function () {
const ruleName = uuidv4();
const updatedRuleName = `Changed Rule Name ${ruleName}`;
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/create_data_view/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/create_data_view/main.ts
index c68f5bba43355..6fef99e59a9ef 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/create_data_view/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/create_data_view/main.ts
@@ -8,20 +8,32 @@
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
+
describe('main', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('can create an index_pattern with just a title', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -33,10 +45,10 @@ export default function ({ getService }: FtrProviderContext) {
it('returns back the created index_pattern object', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -52,10 +64,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can specify primitive optional attributes when creating an index pattern', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
const id = `test-id-${Date.now()}-${Math.random()}*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -74,10 +86,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can specify optional sourceFilters attribute when creating an index pattern', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -109,10 +121,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can specify optional fields attribute when creating an index pattern', async () => {
const title = `basic_index*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -140,10 +152,10 @@ export default function ({ getService }: FtrProviderContext) {
// TODO: Scripted fields code dropped since they are not supported in Serverless
it('can add fields created from es index', async () => {
const title = `basic_index*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -172,10 +184,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can add runtime fields', async () => {
const title = `basic_index*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -205,10 +217,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can specify optional typeMeta attribute when creating an index pattern', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -221,10 +233,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can specify optional fieldFormats attribute when creating an index pattern', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -244,10 +256,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can specify optional fieldFormats attribute when creating an index pattern', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -268,19 +280,19 @@ export default function ({ getService }: FtrProviderContext) {
describe('when creating index pattern with existing name', () => {
it('returns error, by default', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -293,20 +305,20 @@ export default function ({ getService }: FtrProviderContext) {
it('succeeds, override flag is set', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
timeFieldName: 'foo',
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/create_data_view/validation.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/create_data_view/validation.ts
index f4fc964092f65..eca1e01ac2b4e 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/create_data_view/validation.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/create_data_view/validation.ts
@@ -8,19 +8,30 @@
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('validation', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('returns error when index_pattern object is not provided', async () => {
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(400);
expect(response.body.statusCode).to.be(400);
@@ -30,10 +41,10 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns error on empty index_pattern object', async () => {
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {},
});
@@ -46,10 +57,10 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns error when "override" parameter is not a boolean', async () => {
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: 123,
[config.serviceKey]: {
@@ -65,10 +76,10 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns error when "refresh_fields" parameter is not a boolean', async () => {
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
refresh_fields: 123,
[config.serviceKey]: {
@@ -85,10 +96,10 @@ export default function ({ getService }: FtrProviderContext) {
it('returns an error when unknown runtime field type', async () => {
const title = `basic_index*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/delete_data_view/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/delete_data_view/errors.ts
index 16681d19c3e45..c4881e5be3b4b 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/delete_data_view/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/delete_data_view/errors.ts
@@ -8,30 +8,41 @@
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('returns 404 error on non-existing index_pattern', async () => {
const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.delete(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(404);
});
it('returns error when ID is too long', async () => {
const id = `xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.delete(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(400);
expect(response.body.message).to.be(
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/delete_data_view/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/delete_data_view/main.ts
index e0fea14780885..ea568a157779c 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/delete_data_view/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/delete_data_view/main.ts
@@ -8,50 +8,61 @@
import expect from '@kbn/expect';
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import { INITIAL_REST_VERSION } from '@kbn/data-views-plugin/server/constants';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('deletes an index_pattern', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response2.status).to.be(200);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.delete(`${config.path}/${response1.body[config.serviceKey].id}`)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
- const response4 = await supertest
+ const response4 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response4.status).to.be(404);
});
@@ -59,27 +70,27 @@ export default function ({ getService }: FtrProviderContext) {
it('returns nothing', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
},
});
- await supertest
+ await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
- const response2 = await supertest
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
+ const response2 = await supertestWithoutAuth
.delete(`${config.path}/${response1.body[config.serviceKey].id}`)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
// verify empty response
expect(Object.keys(response2.body).length).to.be(0);
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_view/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_view/errors.ts
index fd69fbaa7e46e..08cc5879b88fc 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_view/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_view/errors.ts
@@ -8,30 +8,41 @@
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('returns 404 error on non-existing index_pattern', async () => {
const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(404);
});
it('returns error when ID is too long', async () => {
const id = `xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(400);
expect(response.body.message).to.be(
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_view/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_view/main.ts
index d7f3d3b735746..8717717b63f7c 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_view/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_view/main.ts
@@ -8,29 +8,40 @@
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
+import { RoleCredentials, InternalRequestHeader } from '../../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('can retrieve an index_pattern', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response2.body[config.serviceKey].title).to.be(title);
});
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_views/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_views/main.ts
index 6b716616de8d7..9c4e6baff31b9 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_views/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/get_data_views/main.ts
@@ -8,18 +8,29 @@
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { dataViewConfig } from '../../constants';
+import { RoleCredentials, InternalRequestHeader } from '../../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
describe('get data views api', () => {
it('returns list of data views', async () => {
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(dataViewConfig.basePath)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(200);
expect(response.body).to.have.property(dataViewConfig.serviceKey);
expect(response.body[dataViewConfig.serviceKey]).to.be.an('array');
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/update_data_view/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/update_data_view/errors.ts
index 3bbe13af43896..fa488544147d6 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/update_data_view/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/update_data_view/errors.ts
@@ -6,21 +6,32 @@
*/
import expect from '@kbn/expect';
+import { RoleCredentials, InternalRequestHeader } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('returns error when index_pattern object is not provided', async () => {
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(`${config.path}/foo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(400);
expect(response.body.statusCode).to.be(400);
@@ -30,10 +41,10 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns error on non-existing index_pattern', async () => {
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(`${config.path}/non-existing-index-pattern`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {},
});
@@ -46,10 +57,10 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns error when "refresh_fields" parameter is not a boolean', async () => {
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(`${config.path}/foo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
refresh_fields: 123,
[config.serviceKey]: {
@@ -66,20 +77,20 @@ export default function ({ getService }: FtrProviderContext) {
it('returns success when update patch is empty', async () => {
const title1 = `foo-${Date.now()}-${Math.random()}*`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title: title1,
},
});
const id = response.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {},
});
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/update_data_view/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/update_data_view/main.ts
index 15e22957a2ca5..c407a8fb349c0 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/update_data_view/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/data_views_crud/update_data_view/main.ts
@@ -6,23 +6,34 @@
*/
import expect from '@kbn/expect';
+import { RoleCredentials, InternalRequestHeader } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('can update data view title', async () => {
const title1 = `foo-${Date.now()}-${Math.random()}*`;
const title2 = `bar-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title: title1,
@@ -32,10 +43,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.body[config.serviceKey].title).to.be(title1);
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title: title2,
@@ -44,10 +55,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.body[config.serviceKey].title).to.be(title2);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.body[config.serviceKey].title).to.be(title2);
});
@@ -56,10 +67,10 @@ export default function ({ getService }: FtrProviderContext) {
const title = `foo-${Date.now()}-${Math.random()}*`;
const name1 = 'good data view name';
const name2 = 'better data view name';
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -70,10 +81,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.body[config.serviceKey].name).to.be(name1);
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
name: name2,
@@ -82,20 +93,20 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.body[config.serviceKey].name).to.be(name2);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.body[config.serviceKey].name).to.be(name2);
});
it('can update data view timeFieldName', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -106,10 +117,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.body[config.serviceKey].timeFieldName).to.be('timeFieldName1');
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
timeFieldName: 'timeFieldName2',
@@ -118,20 +129,20 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.body[config.serviceKey].timeFieldName).to.be('timeFieldName2');
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.body[config.serviceKey].timeFieldName).to.be('timeFieldName2');
});
it('can update data view sourceFilters', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -150,10 +161,10 @@ export default function ({ getService }: FtrProviderContext) {
]);
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
sourceFilters: [
@@ -176,10 +187,10 @@ export default function ({ getService }: FtrProviderContext) {
},
]);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.body[config.serviceKey].sourceFilters).to.eql([
{
@@ -193,10 +204,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can update data view fieldFormats', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -221,10 +232,10 @@ export default function ({ getService }: FtrProviderContext) {
});
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
fieldFormats: {
@@ -247,10 +258,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.body[config.serviceKey].fieldFormats).to.eql({
a: {
@@ -264,10 +275,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can update data view type', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -278,10 +289,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.body[config.serviceKey].type).to.be('foo');
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
type: 'bar',
@@ -290,20 +301,20 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.body[config.serviceKey].type).to.be('bar');
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.body[config.serviceKey].type).to.be('bar');
});
it('can update data view typeMeta', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -314,10 +325,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.body[config.serviceKey].typeMeta).to.eql({ foo: 'bar' });
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
typeMeta: { foo: 'baz' },
@@ -326,20 +337,20 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.body[config.serviceKey].typeMeta).to.eql({ foo: 'baz' });
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.body[config.serviceKey].typeMeta).to.eql({ foo: 'baz' });
});
it('can update multiple data view fields at once', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -352,10 +363,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.body[config.serviceKey].typeMeta.foo).to.be('bar');
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
timeFieldName: 'timeFieldName2',
@@ -366,10 +377,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.body[config.serviceKey].timeFieldName).to.be('timeFieldName2');
expect(response2.body[config.serviceKey].typeMeta.baz).to.be('qux');
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.body[config.serviceKey].timeFieldName).to.be('timeFieldName2');
expect(response3.body[config.serviceKey].typeMeta.baz).to.be('qux');
@@ -377,10 +388,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can update runtime fields', async () => {
const title = `basic_index*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -407,10 +418,10 @@ export default function ({ getService }: FtrProviderContext) {
);
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
runtimeFieldMap: {
@@ -429,10 +440,10 @@ export default function ({ getService }: FtrProviderContext) {
);
expect(response2.body[config.serviceKey].runtimeFieldMap.runtimeFoo).to.be(undefined);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.body[config.serviceKey].runtimeFieldMap.runtimeBar.type).to.be(
'keyword'
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts
index 067c24d605e6c..67696a35641f9 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts
@@ -8,12 +8,23 @@
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
import { configArray } from '../constants';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('default index pattern api', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
const newId = () => `default-id-${Date.now()}-${Math.random()}`;
@@ -21,10 +32,10 @@ export default function ({ getService }: FtrProviderContext) {
const defaultId = newId();
const defaultPath = `${config.basePath}/default`;
const serviceKeyId = `${config.serviceKey}_id`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(defaultPath)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[serviceKeyId]: defaultId,
force: true,
@@ -32,43 +43,43 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.status).to.be(200);
expect(response1.body.acknowledged).to.be(true);
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.get(defaultPath)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response2.status).to.be(200);
expect(response2.body[serviceKeyId]).to.be(defaultId);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.post(defaultPath)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[serviceKeyId]: newId(),
// no force this time, so this new default shouldn't be set
});
expect(response3.status).to.be(200);
- const response4 = await supertest
+ const response4 = await supertestWithoutAuth
.get(defaultPath)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response4.body[serviceKeyId]).to.be(defaultId); // original default id is used
- const response5 = await supertest
+ const response5 = await supertestWithoutAuth
.post(defaultPath)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[serviceKeyId]: null,
force: true,
});
expect(response5.status).to.be(200);
- const response6 = await supertest
+ const response6 = await supertestWithoutAuth
.get(defaultPath)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
// TODO: The response comes back undefined in Serverless
const body = response6.body[serviceKeyId];
const expected = body === undefined ? null : body;
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/existing_indices_route/params.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/existing_indices_route/params.ts
index 60ca17d70cee0..a71796d1d948a 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/existing_indices_route/params.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/existing_indices_route/params.ts
@@ -9,80 +9,89 @@ import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import { INITIAL_REST_VERSION_INTERNAL } from '@kbn/data-views-plugin/server/constants';
import { EXISTING_INDICES_PATH } from '@kbn/data-views-plugin/common/constants';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
- const supertest = getService('supertest');
const randomness = getService('randomness');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('_existing_indices params', () => {
- before(() =>
- esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index')
- );
- after(() =>
- esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/basic_index')
- );
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
+ });
+ after(async () => {
+ await esArchiver.unload(
+ 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
+ );
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
it('requires a query param', () =>
- supertest
+ supertestWithoutAuth
.get(EXISTING_INDICES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({})
.expect(400));
it('accepts indices param as single index string', () =>
- supertest
+ supertestWithoutAuth
.get(EXISTING_INDICES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
indices: 'filebeat-*',
})
.expect(200));
it('accepts indices param as single index array', () =>
- supertest
+ supertestWithoutAuth
.get(EXISTING_INDICES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
indices: ['filebeat-*'],
})
.expect(200));
it('accepts indices param', () =>
- supertest
+ supertestWithoutAuth
.get(EXISTING_INDICES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
indices: ['filebeat-*', 'packetbeat-*'],
})
.expect(200));
it('rejects unexpected query params', () =>
- supertest
+ supertestWithoutAuth
.get(EXISTING_INDICES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
[randomness.word()]: randomness.word(),
})
.expect(400));
it('rejects a comma-separated list of indices', () =>
- supertest
+ supertestWithoutAuth
.get(EXISTING_INDICES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
indices: 'filebeat-*,packetbeat-*',
})
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/existing_indices_route/response.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/existing_indices_route/response.ts
index 8cea2292402c2..3ac93af8212a4 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/existing_indices_route/response.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/existing_indices_route/response.ts
@@ -9,26 +9,33 @@ import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import { INITIAL_REST_VERSION_INTERNAL } from '@kbn/data-views-plugin/server/constants';
import { EXISTING_INDICES_PATH } from '@kbn/data-views-plugin/common/constants';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('_existing_indices response', () => {
- before(() =>
- esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index')
- );
- after(() =>
- esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/basic_index')
- );
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
+ });
+ after(async () => {
+ esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
it('returns an array of existing indices', async () => {
- await supertest
+ await supertestWithoutAuth
.get(EXISTING_INDICES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
indices: ['basic_index', 'bad_index'],
})
@@ -36,11 +43,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns an empty array when no indices exist', async () => {
- await supertest
+ await supertestWithoutAuth
.get(EXISTING_INDICES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
indices: ['bad_index'],
})
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_api/update_fields/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_api/update_fields/errors.ts
index 2e8e8556b17e9..b7f4c9fd4520c 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_api/update_fields/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_api/update_fields/errors.ts
@@ -6,22 +6,33 @@
*/
import expect from '@kbn/expect';
+import { RoleCredentials, InternalRequestHeader } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('returns 404 error on non-existing index_pattern', async () => {
const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(`${config.path}/${id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {},
@@ -33,19 +44,19 @@ export default function ({ getService }: FtrProviderContext) {
it('returns error when "fields" payload attribute is invalid', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: 123,
});
@@ -59,20 +70,20 @@ export default function ({ getService }: FtrProviderContext) {
it('returns error if not changes are specified', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {},
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_api/update_fields/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_api/update_fields/main.ts
index 2e72648900747..ce2948193f744 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_api/update_fields/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_api/update_fields/main.ts
@@ -6,18 +6,29 @@
*/
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
-
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
const basicIndex = 'ba*ic_index';
let indexPattern: any;
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
+
configArray.forEach((config) => {
describe(config.name, () => {
before(async () => {
@@ -26,10 +37,10 @@ export default function ({ getService }: FtrProviderContext) {
);
indexPattern = (
- await supertest
+ await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -45,19 +56,19 @@ export default function ({ getService }: FtrProviderContext) {
);
if (indexPattern) {
- await supertest
+ await supertestWithoutAuth
.delete(`${config.path}/${indexPattern.id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
}
});
it('can update multiple fields', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -68,10 +79,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.body[config.serviceKey].fieldAttrs.foo).to.be(undefined);
expect(response1.body[config.serviceKey].fieldAttrs.bar).to.be(undefined);
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -89,10 +100,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.body[config.serviceKey].fieldAttrs.foo.customLabel).to.be('test');
expect(response2.body[config.serviceKey].fieldAttrs.bar.count).to.be(456);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldAttrs.foo.count).to.be(123);
@@ -103,10 +114,10 @@ export default function ({ getService }: FtrProviderContext) {
describe('count', () => {
it('can set field "count" attribute on non-existing field', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -116,10 +127,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.status).to.be(200);
expect(response1.body[config.serviceKey].fieldAttrs.foo).to.be(undefined);
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -131,10 +142,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
expect(response2.body[config.serviceKey].fieldAttrs.foo.count).to.be(123);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldAttrs.foo.count).to.be(123);
@@ -142,10 +153,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can update "count" attribute in index_pattern attribute map', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -160,10 +171,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.status).to.be(200);
expect(response1.body[config.serviceKey].fieldAttrs.foo.count).to.be(1);
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -175,10 +186,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
expect(response2.body[config.serviceKey].fieldAttrs.foo.count).to.be(2);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldAttrs.foo.count).to.be(2);
@@ -186,10 +197,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can delete "count" attribute from index_pattern attribute map', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -204,10 +215,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.status).to.be(200);
expect(response1.body[config.serviceKey].fieldAttrs.foo.count).to.be(1);
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -219,10 +230,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
expect(response2.body[config.serviceKey].fieldAttrs.foo.count).to.be(undefined);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldAttrs.foo.count).to.be(undefined);
@@ -232,10 +243,10 @@ export default function ({ getService }: FtrProviderContext) {
describe('customLabel', () => {
it('can set field "customLabel" attribute on non-existing field', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -245,10 +256,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.status).to.be(200);
expect(response1.body[config.serviceKey].fieldAttrs.foo).to.be(undefined);
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -260,10 +271,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
expect(response2.body[config.serviceKey].fieldAttrs.foo.customLabel).to.be('foo');
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldAttrs.foo.customLabel).to.be('foo');
@@ -271,10 +282,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can update "customLabel" attribute in index_pattern attribute map', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -289,10 +300,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.status).to.be(200);
expect(response1.body[config.serviceKey].fieldAttrs.foo.customLabel).to.be('foo');
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -304,10 +315,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
expect(response2.body[config.serviceKey].fieldAttrs.foo.customLabel).to.be('bar');
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldAttrs.foo.customLabel).to.be('bar');
@@ -315,10 +326,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can delete "customLabel" attribute from index_pattern attribute map', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -333,10 +344,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.status).to.be(200);
expect(response1.body[config.serviceKey].fieldAttrs.foo.customLabel).to.be('foo');
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -348,20 +359,20 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
expect(response2.body[config.serviceKey].fieldAttrs.foo.customLabel).to.be(undefined);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldAttrs.foo.customLabel).to.be(undefined);
});
it('can set field "customLabel" attribute on an existing field', async () => {
- await supertest
+ await supertestWithoutAuth
.post(`${config.path}/${indexPattern.id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -370,10 +381,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.get(`${config.path}/${indexPattern.id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response1.status).to.be(200);
expect(response1.body[config.serviceKey].fields.foo.customLabel).to.be('baz');
@@ -383,10 +394,10 @@ export default function ({ getService }: FtrProviderContext) {
describe('format', () => {
it('can set field "format" attribute on non-existing field', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -396,10 +407,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.status).to.be(200);
expect(response1.body[config.serviceKey].fieldFormats.foo).to.be(undefined);
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -417,10 +428,10 @@ export default function ({ getService }: FtrProviderContext) {
params: { baz: 'qux' },
});
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldFormats.foo).to.eql({
@@ -431,10 +442,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can update "format" attribute in index_pattern format map', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
@@ -457,10 +468,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -478,10 +489,10 @@ export default function ({ getService }: FtrProviderContext) {
params: { baz: 'qux-2' },
});
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldFormats.foo).to.eql({
@@ -491,10 +502,10 @@ export default function ({ getService }: FtrProviderContext) {
});
it('can remove "format" attribute from index_pattern format map', async () => {
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${indexPattern.id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
foo: {
@@ -506,10 +517,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
expect(response2.body[config.serviceKey].fieldFormats.foo).to.be(undefined);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${indexPattern.id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
expect(response3.body[config.serviceKey].fieldFormats.foo).to.be(undefined);
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/conflicts.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/conflicts.ts
index 915cce91ca0ee..9fc8c3bef2468 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/conflicts.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/conflicts.ts
@@ -9,27 +9,34 @@ import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import { INITIAL_REST_VERSION_INTERNAL } from '@kbn/data-views-plugin/server/constants';
import { FIELDS_FOR_WILDCARD_PATH } from '@kbn/data-views-plugin/common/constants';
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('conflicts', function () {
- before(() =>
- esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/conflicts')
- );
- after(() =>
- esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/conflicts')
- );
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/conflicts');
+ });
+ after(async () => {
+ await esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/conflicts');
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
it('flags fields with mismatched types as conflicting', () =>
- supertest
+ supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({ pattern: 'logs-2017.01.*' })
.expect(200)
.then((resp) => {
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/filter.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/filter.ts
index ff2ad5e5d00a1..66330938532d4 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/filter.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/filter.ts
@@ -10,14 +10,20 @@ import { INITIAL_REST_VERSION_INTERNAL } from '@kbn/data-views-plugin/server/con
import { FIELDS_FOR_WILDCARD_PATH } from '@kbn/data-views-plugin/common/constants';
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const es = getService('es');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('filter fields', () => {
before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
await es.index({
index: 'helloworld1',
refresh: true,
@@ -32,13 +38,16 @@ export default function ({ getService }: FtrProviderContext) {
body: { bye: 'world' },
});
});
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
it('can filter', async () => {
- const a = await supertest
+ const a = await supertestWithoutAuth
.put(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({ pattern: 'helloworld*' })
.send({ index_filter: { exists: { field: 'bye' } } });
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/params.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/params.ts
index 035ca1af4b5a8..63d5af2f940b0 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/params.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/params.ts
@@ -8,165 +8,186 @@
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import { INITIAL_REST_VERSION_INTERNAL } from '@kbn/data-views-plugin/server/constants';
import { FIELDS_FOR_WILDCARD_PATH } from '@kbn/data-views-plugin/common/constants';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
- const supertest = getService('supertest');
const randomness = getService('randomness');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('params', () => {
- before(() =>
- esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index')
- );
- after(() =>
- esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/basic_index')
- );
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
+ });
+ after(async () => {
+ await esArchiver.unload(
+ 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
+ );
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
- it('requires a pattern query param', () =>
- supertest
+ it('requires a pattern query param', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({})
- .expect(400));
+ .expect(400);
+ });
- it('accepts include_unmapped param', () =>
- supertest
+ it('accepts include_unmapped param', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
include_unmapped: true,
})
- .expect(200));
+ .expect(200);
+ });
- it('rejects unexpected query params', () =>
- supertest
+ it('rejects unexpected query params', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: randomness.word(),
[randomness.word()]: randomness.word(),
})
- .expect(400));
+ .expect(400);
+ });
describe('fields', () => {
- it('accepts a JSON formatted fields query param', () =>
- supertest
+ it('accepts a JSON formatted fields query param', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
fields: JSON.stringify(['baz']),
})
- .expect(200));
+ .expect(200);
+ });
- it('accepts meta_fields query param in string array', () =>
- supertest
+ it('accepts meta_fields query param in string array', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
fields: ['baz', 'foo'],
})
- .expect(200));
+ .expect(200);
+ });
- it('accepts single array fields query param', () =>
- supertest
+ it('accepts single array fields query param', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
fields: ['baz'],
})
- .expect(200));
+ .expect(200);
+ });
- it('accepts single fields query param', () =>
- supertest
+ it('accepts single fields query param', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
fields: 'baz',
})
- .expect(200));
+ .expect(200);
+ });
- it('rejects a comma-separated list of fields', () =>
- supertest
+ it('rejects a comma-separated list of fields', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
fields: 'foo,bar',
})
- .expect(400));
+ .expect(400);
+ });
});
describe('meta_fields', () => {
- it('accepts a JSON formatted meta_fields query param', () =>
- supertest
+ it('accepts a JSON formatted meta_fields query param', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
meta_fields: JSON.stringify(['meta']),
})
- .expect(200));
+ .expect(200);
+ });
- it('accepts meta_fields query param in string array', () =>
- supertest
+ it('accepts meta_fields query param in string array', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
meta_fields: ['_id', 'meta'],
})
- .expect(200));
+ .expect(200);
+ });
- it('accepts single meta_fields query param', () =>
- supertest
+ it('accepts single meta_fields query param', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
meta_fields: ['_id'],
})
- .expect(200));
+ .expect(200);
+ });
- it('rejects a comma-separated list of meta_fields', () =>
- supertest
+ it('rejects a comma-separated list of meta_fields', async () => {
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: '*',
meta_fields: 'foo,bar',
})
- .expect(400));
+ .expect(400);
+ });
});
});
}
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/response.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/response.ts
index a073dac456b7f..bb87fe8109d18 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/response.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/fields_for_wildcard_route/response.ts
@@ -10,12 +10,16 @@ import { INITIAL_REST_VERSION_INTERNAL } from '@kbn/data-views-plugin/server/con
import { FIELDS_FOR_WILDCARD_PATH } from '@kbn/data-views-plugin/common/constants';
import expect from '@kbn/expect';
import { sortBy } from 'lodash';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
const ensureFieldsAreSorted = (resp: { body: { fields: { name: string } } }) => {
expect(resp.body.fields).to.eql(sortBy(resp.body.fields, 'name'));
@@ -76,19 +80,24 @@ export default function ({ getService }: FtrProviderContext) {
];
describe('fields_for_wildcard_route response', () => {
- before(() =>
- esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index')
- );
- after(() =>
- esArchiver.unload('test/api_integration/fixtures/es_archiver/index_patterns/basic_index')
- );
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
+ });
+ after(async () => {
+ await esArchiver.unload(
+ 'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
+ );
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
it('returns a flattened version of the fields in es', async () => {
- await supertest
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({ pattern: 'basic_index' })
.expect(200, {
fields: testFields,
@@ -98,11 +107,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns a single field as requested', async () => {
- await supertest
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({ pattern: 'basic_index', fields: JSON.stringify(['bar']) })
.expect(200, {
fields: [testFields[0]],
@@ -111,11 +120,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it('always returns a field for all passed meta fields', async () => {
- await supertest
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: 'basic_index',
meta_fields: JSON.stringify(['_id', '_source', 'crazy_meta_field']),
@@ -206,11 +215,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns fields when one pattern exists and the other does not', async () => {
- await supertest
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({ pattern: 'bad_index,basic_index' })
.expect(200, {
fields: testFields,
@@ -219,21 +228,21 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns 404 when neither exists', async () => {
- await supertest
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({ pattern: 'bad_index,bad_index_2' })
.expect(404);
});
it('returns 404 when no patterns exist', async () => {
- await supertest
+ await supertestWithoutAuth
.get(FIELDS_FOR_WILDCARD_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.query({
pattern: 'bad_index',
})
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/has_user_index_pattern/has_user_index_pattern.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/has_user_index_pattern/has_user_index_pattern.ts
index 19f4d82d79a8e..d57b6f0e0ba1e 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/has_user_index_pattern/has_user_index_pattern.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/has_user_index_pattern/has_user_index_pattern.ts
@@ -13,15 +13,26 @@ import {
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
import { configArray } from '../constants';
+import { RoleCredentials, InternalRequestHeader } from '../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const es = getService('es');
- const svlCommonApi = getService('svlCommonApi');
const kibanaServer = getService('kibanaServer');
+ const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('has user index pattern API', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
beforeEach(async () => {
@@ -46,11 +57,11 @@ export default function ({ getService }: FtrProviderContext) {
// "index_not_found_exception: no such index [.kibana_ingest]",
// so it was switched to `savedObjects.cleanStandardList()`
await kibanaServer.savedObjects.cleanStandardList();
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(servicePath)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(200);
expect(response.body.result).to.be(false);
});
@@ -59,11 +70,11 @@ export default function ({ getService }: FtrProviderContext) {
await esArchiver.load(
'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
);
- await supertest
+ await supertestWithoutAuth
.post(config.path)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -71,11 +82,11 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(servicePath)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(200);
expect(response.body.result).to.be(true);
@@ -85,11 +96,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it('should return true if has user index pattern without data', async () => {
- await supertest
+ await supertestWithoutAuth
.post(config.path)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -98,11 +109,11 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(servicePath)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(200);
expect(response.body.result).to.be(true);
});
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/integration/integration.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/integration/integration.ts
index 8b9c215754f12..d9d1ef5a8aa5e 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/integration/integration.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/integration/integration.ts
@@ -7,18 +7,24 @@
import expect from '@kbn/expect';
import _ from 'lodash';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
/**
* Test usage of different index patterns APIs in combination
*/
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('integration', () => {
before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
});
@@ -26,14 +32,15 @@ export default function ({ getService }: FtrProviderContext) {
await esArchiver.unload(
'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
);
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
});
it('create an index pattern, add a runtime field, add a field formatter, then re-create the same index pattern', async () => {
const title = `basic_index*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post('/api/index_patterns/index_pattern')
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
index_pattern: {
@@ -41,10 +48,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
const id = response1.body.index_pattern.id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`/api/index_patterns/index_pattern/${id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeBar',
runtimeField: {
@@ -57,10 +64,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.post(`/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
runtimeBar: {
@@ -72,10 +79,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response3.status).to.be(200);
- const response4 = await supertest
+ const response4 = await supertestWithoutAuth
.post(`/api/index_patterns/index_pattern/${response1.body.index_pattern.id}/fields`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fields: {
runtimeBar: {
@@ -89,10 +96,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response4.status).to.be(200);
- const response5 = await supertest
+ const response5 = await supertestWithoutAuth
.get('/api/index_patterns/index_pattern/' + response1.body.index_pattern.id)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response5.status).to.be(200);
@@ -114,10 +121,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(resultIndexPattern.fieldAttrs.runtimeBar.customLabel).to.be('test');
// check that retrieved object is transient and a clone can be created
- const response6 = await supertest
+ const response6 = await supertestWithoutAuth
.post('/api/index_patterns/index_pattern')
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
index_pattern: resultIndexPattern,
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/create_runtime_field/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/create_runtime_field/errors.ts
index 6fa86503eb75a..a619b3f71bcb8 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/create_runtime_field/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/create_runtime_field/errors.ts
@@ -6,32 +6,43 @@
*/
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('returns an error field object is not provided', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title,
},
});
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({});
expect(response2.status).to.be(400);
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/create_runtime_field/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/create_runtime_field/main.ts
index 9b01977f2fdc5..4f36bd548456f 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/create_runtime_field/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/create_runtime_field/main.ts
@@ -6,16 +6,22 @@
*/
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
});
@@ -23,16 +29,17 @@ export default function ({ getService }: FtrProviderContext) {
await esArchiver.unload(
'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
);
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
});
configArray.forEach((config) => {
describe(config.name, () => {
it('can create a new runtime field', async () => {
const title = `basic_index*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -40,10 +47,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
const id = response1.body[config.serviceKey].id;
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeBar',
runtimeField: {
@@ -68,10 +75,10 @@ export default function ({ getService }: FtrProviderContext) {
it('newly created runtime field is available in the index_pattern object', async () => {
const title = `basic_index`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -79,10 +86,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- await supertest
+ await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeBar',
runtimeField: {
@@ -93,10 +100,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response2.status).to.be(200);
expect(response2.body[config.serviceKey]).to.not.be.empty();
@@ -108,10 +115,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(field.runtimeField.script.source).to.be("emit(doc['field_name'].value)");
expect(field.scripted).to.be(false);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeBar',
runtimeField: {
@@ -124,18 +131,18 @@ export default function ({ getService }: FtrProviderContext) {
expect(response3.status).to.be(400);
- await supertest
+ await supertestWithoutAuth
.delete(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
});
it('prevents field name collisions', async () => {
const title = `basic*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -143,10 +150,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeBar',
runtimeField: {
@@ -159,10 +166,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeBar',
runtimeField: {
@@ -175,10 +182,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response3.status).to.be(400);
- const response4 = await supertest
+ const response4 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeComposite',
runtimeField: {
@@ -199,10 +206,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response4.status).to.be(200);
- const response5 = await supertest
+ const response5 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeComposite',
runtimeField: {
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/delete_runtime_field/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/delete_runtime_field/errors.ts
index 6cdd3c1e042d4..06766d07d599a 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/delete_runtime_field/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/delete_runtime_field/errors.ts
@@ -6,15 +6,26 @@
*/
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
const basicIndex = 'b*sic_index';
let indexPattern: any;
@@ -26,10 +37,10 @@ export default function ({ getService }: FtrProviderContext) {
);
indexPattern = (
- await supertest
+ await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title: basicIndex,
@@ -44,38 +55,38 @@ export default function ({ getService }: FtrProviderContext) {
);
if (indexPattern) {
- await supertest
+ await supertestWithoutAuth
.delete(`${config.path}/${indexPattern.id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
}
});
it('returns 404 error on non-existing index_pattern', async () => {
const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.delete(`${config.path}/${id}/runtime_field/foo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(404);
});
it('returns 404 error on non-existing runtime field', async () => {
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.delete(`${config.path}/${indexPattern.id}/runtime_field/test`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response1.status).to.be(404);
});
it('returns error when ID is too long', async () => {
const id = `xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.delete(`${config.path}/${id}/runtime_field/foo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(400);
expect(response.body.message).to.be(
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/delete_runtime_field/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/delete_runtime_field/main.ts
index a93268adde3b5..43a22aa25d68a 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/delete_runtime_field/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/delete_runtime_field/main.ts
@@ -6,16 +6,21 @@
*/
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
-
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
});
@@ -23,16 +28,17 @@ export default function ({ getService }: FtrProviderContext) {
await esArchiver.unload(
'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
);
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
});
configArray.forEach((config) => {
describe(config.name, () => {
it('can delete a runtime field', async () => {
const title = `basic_index*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -48,32 +54,32 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(typeof response2.body[config.serviceKey].fields.runtimeBar).to.be('object');
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.delete(
`${config.path}/${response1.body[config.serviceKey].id}/runtime_field/runtimeBar`
)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response3.status).to.be(200);
- const response4 = await supertest
+ const response4 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(typeof response4.body[config.serviceKey].fields.runtimeBar).to.be('undefined');
- await supertest
+ await supertestWithoutAuth
.delete(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
});
});
});
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/get_runtime_field/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/get_runtime_field/errors.ts
index 19d329fe0f410..161144ac536cc 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/get_runtime_field/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/get_runtime_field/errors.ts
@@ -6,18 +6,30 @@
*/
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
const basicIndex = '*asic_index';
let indexPattern: any;
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
+
configArray.forEach((config) => {
describe(config.name, () => {
before(async () => {
@@ -26,10 +38,10 @@ export default function ({ getService }: FtrProviderContext) {
);
indexPattern = (
- await supertest
+ await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
[config.serviceKey]: {
title: basicIndex,
@@ -44,38 +56,38 @@ export default function ({ getService }: FtrProviderContext) {
);
if (indexPattern) {
- await supertest
+ await supertestWithoutAuth
.delete(`${config.path}/${indexPattern.id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
}
});
it('returns 404 error on non-existing index_pattern', async () => {
const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(`${config.path}/${id}/runtime_field/foo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(404);
});
it('returns 404 error on non-existing runtime field', async () => {
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.get(`${config.path}/${indexPattern.id}/runtime_field/sf`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response1.status).to.be(404);
});
it('returns error when ID is too long', async () => {
const id = `xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(`${config.path}/${id}/runtime_field/foo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(400);
expect(response.body.message).to.be(
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/get_runtime_field/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/get_runtime_field/main.ts
index 638c4f99bd509..8df5c5031833e 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/get_runtime_field/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/get_runtime_field/main.ts
@@ -6,16 +6,22 @@
*/
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
});
@@ -23,16 +29,17 @@ export default function ({ getService }: FtrProviderContext) {
await esArchiver.unload(
'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
);
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
});
configArray.forEach((config) => {
describe(config.name, () => {
it('can fetch a runtime field', async () => {
const title = `basic_index*`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -56,10 +63,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response1.status).to.be(200);
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field/runtimeFoo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
const field =
config.serviceKey === 'index_pattern' ? response2.body.field : response2.body.fields[0];
@@ -71,10 +78,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(field.type).to.be('string');
expect(field.scripted).to.be(false);
expect(field.runtimeField.script.source).to.be("emit(doc['field_name'].value)");
- await supertest
+ await supertestWithoutAuth
.delete(`${config.path}/${response1.body[config.serviceKey].id}`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
});
});
});
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/put_runtime_field/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/put_runtime_field/errors.ts
index 1141ca5db1ec0..70ea6cf04870e 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/put_runtime_field/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/put_runtime_field/errors.ts
@@ -6,16 +6,23 @@
*/
import expect from '@kbn/expect';
+import { RoleCredentials, InternalRequestHeader } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+
await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
});
@@ -23,16 +30,17 @@ export default function ({ getService }: FtrProviderContext) {
await esArchiver.unload(
'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
);
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
});
configArray.forEach((config) => {
describe(config.name, () => {
it('returns 404 error on non-existing index_pattern', async () => {
const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.put(`${config.path}/${id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeBar',
runtimeField: {
@@ -48,10 +56,10 @@ export default function ({ getService }: FtrProviderContext) {
it('returns error on non-runtime field update attempt', async () => {
const title = `basic_index`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -59,10 +67,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.put(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'bar',
runtimeField: {
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/put_runtime_field/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/put_runtime_field/main.ts
index 01cf160208898..bdc416e787c8b 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/put_runtime_field/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/put_runtime_field/main.ts
@@ -6,16 +6,22 @@
*/
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
});
@@ -23,16 +29,17 @@ export default function ({ getService }: FtrProviderContext) {
await esArchiver.unload(
'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
);
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
});
configArray.forEach((config) => {
describe(config.name, () => {
it('can overwrite an existing field', async () => {
const title = `basic_index`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -54,10 +61,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.put(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeFoo',
runtimeField: {
@@ -71,10 +78,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
expect(response2.body[config.serviceKey]).to.not.be.empty();
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field/runtimeFoo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
const field3 =
config.serviceKey === 'index_pattern' ? response3.body.field : response3.body.fields[0];
@@ -82,10 +89,10 @@ export default function ({ getService }: FtrProviderContext) {
expect(response3.status).to.be(200);
expect(field3.type).to.be('number');
- const response4 = await supertest
+ const response4 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field/runtimeBar`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
const field4 =
config.serviceKey === 'index_pattern' ? response4.body.field : response4.body.fields[0];
@@ -96,10 +103,10 @@ export default function ({ getService }: FtrProviderContext) {
it('can add a new runtime field', async () => {
const title = `basic_index`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -115,10 +122,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- await supertest
+ await supertestWithoutAuth
.put(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'runtimeBar',
runtimeField: {
@@ -129,10 +136,10 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field/runtimeBar`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
const field =
config.serviceKey === 'index_pattern' ? response2.body.field : response2.body.fields[0];
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/update_runtime_field/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/update_runtime_field/errors.ts
index 17e4711fdb9aa..0b53f20899cb7 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/update_runtime_field/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/update_runtime_field/errors.ts
@@ -8,20 +8,31 @@
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
configArray.forEach((config) => {
describe(config.name, () => {
it('returns 404 error on non-existing index_pattern', async () => {
const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(`${config.path}/${id}/runtime_field/foo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
runtimeField: {
type: 'keyword',
@@ -36,10 +47,10 @@ export default function ({ getService }: FtrProviderContext) {
it('returns error when field name is specified', async () => {
const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.post(`${config.path}/${id}/runtime_field/foo`)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
name: 'foo',
runtimeField: {
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/update_runtime_field/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/update_runtime_field/main.ts
index 385ae4f548440..a6afd3e7af639 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/update_runtime_field/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/runtime_fields_crud/update_runtime_field/main.ts
@@ -8,16 +8,22 @@
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import { INITIAL_REST_VERSION } from '@kbn/data-views-plugin/server/constants';
import expect from '@kbn/expect';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../../shared/services';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { configArray } from '../../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('main', () => {
before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
});
@@ -25,17 +31,18 @@ export default function ({ getService }: FtrProviderContext) {
await esArchiver.unload(
'test/api_integration/fixtures/es_archiver/index_patterns/basic_index'
);
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
});
configArray.forEach((config) => {
describe(config.name, () => {
it('can update an existing field', async () => {
const title = `basic_index`;
- const response1 = await supertest
+ const response1 = await supertestWithoutAuth
.post(config.path)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
override: true,
[config.serviceKey]: {
@@ -57,11 +64,11 @@ export default function ({ getService }: FtrProviderContext) {
},
});
- const response2 = await supertest
+ const response2 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field/runtimeFoo`)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
runtimeField: {
type: 'keyword',
@@ -73,11 +80,11 @@ export default function ({ getService }: FtrProviderContext) {
expect(response2.status).to.be(200);
- const response3 = await supertest
+ const response3 = await supertestWithoutAuth
.get(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field/runtimeFoo`)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
const field =
config.serviceKey === 'index_pattern' ? response3.body.field : response3.body.fields[0];
@@ -89,11 +96,11 @@ export default function ({ getService }: FtrProviderContext) {
expect(field.runtimeField.script.source).to.be("doc['something_new'].value");
// Partial update
- const response4 = await supertest
+ const response4 = await supertestWithoutAuth
.post(`${config.path}/${response1.body[config.serviceKey].id}/runtime_field/runtimeFoo`)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
runtimeField: {
script: {
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/swap_references/errors.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/swap_references/errors.ts
index 0762f52bd0c44..ed2259836b720 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/swap_references/errors.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/swap_references/errors.ts
@@ -8,32 +8,43 @@
import expect from '@kbn/expect';
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import { INITIAL_REST_VERSION } from '@kbn/data-views-plugin/server/constants';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
import { dataViewConfig } from '../constants';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
describe('errors', () => {
+ before(async () => {
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ });
+ after(async () => {
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
+ });
it('returns 404 error on non-existing index_pattern', async () => {
const id = `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-${Date.now()}`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(`${dataViewConfig.path}/${id}`)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(404);
});
it('returns error when ID is too long', async () => {
const id = `xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx`;
- const response = await supertest
+ const response = await supertestWithoutAuth
.get(`${dataViewConfig.path}/${id}`)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(response.status).to.be(400);
expect(response.body.message).to.be(
diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/swap_references/main.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/swap_references/main.ts
index a2184a294e67a..4e8a8518c643c 100644
--- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/swap_references/main.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/swap_references/main.ts
@@ -14,10 +14,14 @@ import {
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import { INITIAL_REST_VERSION } from '@kbn/data-views-plugin/server/constants';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
+import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services';
export default function ({ getService }: FtrProviderContext) {
- const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
+ const svlUserManager = getService('svlUserManager');
+ const supertestWithoutAuth = getService('supertestWithoutAuth');
+ let roleAuthc: RoleCredentials;
+ let internalReqHeader: InternalRequestHeader;
const title = 'logs-*';
const prevDataViewId = '91200a00-9efd-11e7-acb3-3dab96693fab';
const PREVIEW_PATH = `${DATA_VIEW_SWAP_REFERENCES_PATH}/_preview`;
@@ -26,20 +30,23 @@ export default function ({ getService }: FtrProviderContext) {
describe('main', () => {
const kibanaServer = getService('kibanaServer');
before(async () => {
- const result = await supertest
+ roleAuthc = await svlUserManager.createApiKeyForRole('admin');
+ internalReqHeader = svlCommonApi.getInternalRequestHeader();
+ const result = await supertestWithoutAuth
.post(DATA_VIEW_PATH)
.send({ data_view: { title } })
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
dataViewId = result.body.data_view.id;
});
after(async () => {
- await supertest
+ await supertestWithoutAuth
.delete(SPECIFIC_DATA_VIEW_PATH.replace('{id}', dataViewId))
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
+ await svlUserManager.invalidateApiKeyForRole(roleAuthc);
});
beforeEach(async () => {
await kibanaServer.importExport.load(
@@ -53,11 +60,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it('can preview', async () => {
- const res = await supertest
+ const res = await supertestWithoutAuth
.post(PREVIEW_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fromId: prevDataViewId,
toId: dataViewId,
@@ -66,11 +73,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it('can preview specifying type', async () => {
- const res = await supertest
+ const res = await supertestWithoutAuth
.post(PREVIEW_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fromId: prevDataViewId,
fromType: 'index-pattern',
@@ -80,11 +87,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it('can save changes', async () => {
- const res = await supertest
+ const res = await supertestWithoutAuth
.post(DATA_VIEW_SWAP_REFERENCES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fromId: prevDataViewId,
toId: dataViewId,
@@ -96,11 +103,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it('can save changes and remove old saved object', async () => {
- const res = await supertest
+ const res = await supertestWithoutAuth
.post(DATA_VIEW_SWAP_REFERENCES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fromId: prevDataViewId,
toId: dataViewId,
@@ -111,11 +118,11 @@ export default function ({ getService }: FtrProviderContext) {
expect(res.body.deleteStatus.remainingRefs).to.equal(0);
expect(res.body.deleteStatus.deletePerformed).to.equal(true);
- const res2 = await supertest
+ const res2 = await supertestWithoutAuth
.get(SPECIFIC_DATA_VIEW_PATH.replace('{id}', prevDataViewId))
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(res2).to.have.property('statusCode', 404);
});
@@ -133,11 +140,11 @@ export default function ({ getService }: FtrProviderContext) {
});
it("won't delete if reference remains", async () => {
- const res = await supertest
+ const res = await supertestWithoutAuth
.post(DATA_VIEW_SWAP_REFERENCES_PATH)
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader())
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader)
.send({
fromId: '8963ca30-3224-11e8-a572-ffca06da1357',
toId: '91200a00-9efd-11e7-acb3-3dab96693fab',
@@ -152,20 +159,20 @@ export default function ({ getService }: FtrProviderContext) {
it('can limit by id', async () => {
// confirm this will find two items
- const res = await supertest
+ const res = await supertestWithoutAuth
.post(PREVIEW_PATH)
.send({
fromId: '8963ca30-3224-11e8-a572-ffca06da1357',
toId: '91200a00-9efd-11e7-acb3-3dab96693fab',
})
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(res).to.have.property('status', 200);
expect(res.body.result.length).to.equal(2);
// limit to one item
- const res2 = await supertest
+ const res2 = await supertestWithoutAuth
.post(DATA_VIEW_SWAP_REFERENCES_PATH)
.send({
fromId: '8963ca30-3224-11e8-a572-ffca06da1357',
@@ -173,28 +180,28 @@ export default function ({ getService }: FtrProviderContext) {
forId: ['960372e0-3224-11e8-a572-ffca06da1357'],
})
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(res2).to.have.property('status', 200);
expect(res2.body.result.length).to.equal(1);
});
it('can limit by type', async () => {
// confirm this will find two items
- const res = await supertest
+ const res = await supertestWithoutAuth
.post(PREVIEW_PATH)
.send({
fromId: '8963ca30-3224-11e8-a572-ffca06da1357',
toId: '91200a00-9efd-11e7-acb3-3dab96693fab',
})
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(res).to.have.property('status', 200);
expect(res.body.result.length).to.equal(2);
// limit to one item
- const res2 = await supertest
+ const res2 = await supertestWithoutAuth
.post(DATA_VIEW_SWAP_REFERENCES_PATH)
.send({
fromId: '8963ca30-3224-11e8-a572-ffca06da1357',
@@ -202,8 +209,8 @@ export default function ({ getService }: FtrProviderContext) {
forType: 'search',
})
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION)
- // TODO: API requests in Serverless require internal request headers
- .set(svlCommonApi.getInternalRequestHeader());
+ .set(internalReqHeader)
+ .set(roleAuthc.apiKeyHeader);
expect(res2).to.have.property('status', 200);
expect(res2.body.result.length).to.equal(1);
});