diff --git a/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh b/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh index 63ed00a3513f9..ef4d69b2a295e 100755 --- a/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh +++ b/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh @@ -6,22 +6,16 @@ source .buildkite/scripts/common/util.sh echo --- Security Solution OpenAPI Code Generation -echo -e "\n[Security Solution OpenAPI Code Generation] OpenAPI Common Package" - +echo -e "\n[Security Solution OpenAPI Code Generation] OpenAPI Common Package\n" (cd packages/kbn-openapi-common && yarn openapi:generate) -check_for_changed_files "yarn openapi:generate" true echo -e "\n[Security Solution OpenAPI Code Generation] Lists Common Package\n" - (cd packages/kbn-securitysolution-lists-common && yarn openapi:generate) -check_for_changed_files "yarn openapi:generate" true - -echo -e "\n[Security Solution OpenAPI Code Generation] Exceptions Common Package" +echo -e "\n[Security Solution OpenAPI Code Generation] Exceptions Common Package\n" (cd packages/kbn-securitysolution-exceptions-common && yarn openapi:generate) -check_for_changed_files "yarn openapi:generate" true - -echo -e "\n[Security Solution OpenAPI Code Generation] Security Solution Plugin" +echo -e "\n[Security Solution OpenAPI Code Generation] Security Solution Plugin\n" (cd x-pack/plugins/security_solution && yarn openapi:generate) + check_for_changed_files "yarn openapi:generate" true \ No newline at end of file diff --git a/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh b/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh index 91ee63ab11185..798c3cdbb9b76 100755 --- a/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh +++ b/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh @@ -7,36 +7,27 @@ source .buildkite/scripts/common/util.sh echo --- Security Solution OpenAPI Bundling echo -e "\n[Security Solution OpenAPI Bundling] Detections API\n" - (cd x-pack/plugins/security_solution && yarn openapi:bundle:detections) -check_for_changed_files "yarn openapi:bundle:detections" true -echo -e "\n[Security Solution OpenAPI Bundling] Entity Analytics API\n" +echo -e "\n[Security Solution OpenAPI Bundling] Timeline API\n" +(cd x-pack/plugins/security_solution && yarn openapi:bundle:timeline) +echo -e "\n[Security Solution OpenAPI Bundling] Entity Analytics API\n" (cd x-pack/plugins/security_solution && yarn openapi:bundle:entity-analytics) -check_for_changed_files "yarn openapi:bundle:entity-analytics" true echo -e "\n[Security Solution OpenAPI Bundling] Lists API\n" - -echo -e "\n[Security Solution OpenAPI Bundling] Endpoint Management API\n" - -(cd x-pack/plugins/security_solution && yarn openapi:bundle:endpoint-management) -check_for_changed_files "yarn openapi:bundle:endpoint-management" true - (cd packages/kbn-securitysolution-lists-common && yarn openapi:bundle) -check_for_changed_files "yarn openapi:bundle" true echo -e "\n[Security Solution OpenAPI Bundling] Exceptions API\n" - (cd packages/kbn-securitysolution-exceptions-common && yarn openapi:bundle) -check_for_changed_files "yarn openapi:bundle" true -echo -e "\n[Security Solution OpenAPI Bundling] Elastic Assistant API\n" +echo -e "\n[Security Solution OpenAPI Bundling] Endpoint Management API\n" +(cd x-pack/plugins/security_solution && yarn openapi:bundle:endpoint-management) +echo -e "\n[Security Solution OpenAPI Bundling] Elastic Assistant API\n" (cd x-pack/packages/kbn-elastic-assistant-common && yarn openapi:bundle) -check_for_changed_files "yarn openapi:bundle" true echo -e "\n[Security Solution OpenAPI Bundling] Osquery API\n" - (cd x-pack/plugins/osquery && yarn openapi:bundle) + check_for_changed_files "yarn openapi:bundle" true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a92983d9532b5..d7055dbca4f44 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -46,6 +46,7 @@ x-pack/plugins/observability_solution/apm/ftr_e2e @elastic/obs-ux-infra_services x-pack/plugins/observability_solution/apm @elastic/obs-ux-infra_services-team packages/kbn-apm-synthtrace @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team packages/kbn-apm-synthtrace-client @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team +packages/kbn-apm-types @elastic/obs-ux-infra_services-team packages/kbn-apm-utils @elastic/obs-ux-infra_services-team test/plugin_functional/plugins/app_link_test @elastic/kibana-core x-pack/test/usage_collection/plugins/application_usage_test @elastic/kibana-core @@ -1739,8 +1740,9 @@ packages/react @elastic/appex-sharedux /plugins/data_views/docs/openapi @elastic/platform-docs oas_docs/.spectral.yaml @elastic/platform-docs oas_docs/kibana.info.serverless.yaml @elastic/platform-docs -oas_docs/kibana.serverless.yaml @elastic/platform-docs +oas_docs/kibana.info.yaml @elastic/platform-docs oas_docs/makefile @elastic/platform-docs +oas_docs/overlays @elastic/platform-docs # Plugin manifests /src/plugins/**/kibana.jsonc @elastic/kibana-core diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 4673c4326e10a..63847b91b45ce 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 7d97981deb4a8..c394dade7b1a7 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index 46dc8cf4c8304..e011f3cf5c85a 100644 --- a/api_docs/ai_assistant_management_selection.mdx +++ b/api_docs/ai_assistant_management_selection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection title: "aiAssistantManagementSelection" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementSelection plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection'] --- import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json'; diff --git a/api_docs/aiops.devdocs.json b/api_docs/aiops.devdocs.json index 770e4d7b465c1..47928bc65edd2 100644 --- a/api_docs/aiops.devdocs.json +++ b/api_docs/aiops.devdocs.json @@ -241,23 +241,11 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; }" ], "path": "x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts", diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 1243f0417a7b8..195d461850caa 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index d470045dba9d7..e99c9cbc5265d 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index ba245493d106a..f2bf80672c8de 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index 5d46b334c4485..e41ed73fa4b8d 100644 --- a/api_docs/apm_data_access.mdx +++ b/api_docs/apm_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess title: "apmDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the apmDataAccess plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/assets_data_access.mdx b/api_docs/assets_data_access.mdx index 404c68b3fa990..7af6e6386bd64 100644 --- a/api_docs/assets_data_access.mdx +++ b/api_docs/assets_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetsDataAccess title: "assetsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the assetsDataAccess plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetsDataAccess'] --- import assetsDataAccessObj from './assets_data_access.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 6e0a4c5762b01..fdb3e920c2bd1 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 7b736d92c7d06..a9a8766c35ad3 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 05f51d8433d33..68bf18b3f9b48 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index ece2eaad47219..a1e73caae4304 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 4066d1ae659c0..5264a27e8d44f 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 18e762c07be0b..d1dfcc350a094 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index e780f6d281789..759ca5892ce4b 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index 7c7b3675a8005..5eaca11ad270a 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 24a9a8faac300..2fea3205a50fd 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 75762b7bd7ec0..6b948f6657a03 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index df600df404f54..32de7c9e2c00f 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index efa9439976552..7b35543c77910 100644 --- a/api_docs/content_management.mdx +++ b/api_docs/content_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement title: "contentManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the contentManagement plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 19e64620bcc96..46750afc630b2 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index d7e132068f8fd..57c0cd4d7464c 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index c0e53b620e766..fed2ea68670d1 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 82262fdabb461..a57f0edbc2092 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 2382cc5caaf0f..3595c44c72919 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_quality.mdx b/api_docs/data_quality.mdx index 759a63f3c730e..428236b2c71ab 100644 --- a/api_docs/data_quality.mdx +++ b/api_docs/data_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataQuality title: "dataQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the dataQuality plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataQuality'] --- import dataQualityObj from './data_quality.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 0bdba1a7173d3..441470e2e3fc6 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 41085ad08472c..9208e4135958b 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index f4886ab64ea8b..da8cae9763b85 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 01919889e3538..f1e246efa1fa5 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 4f4d88620ad81..f088a1dd40d4b 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 3dc5e73c02863..dd78e6a4f4103 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index d5285fdc76b50..1c55fbfac4067 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index 7aa1a0a563b12..74420ce858df1 100644 --- a/api_docs/dataset_quality.mdx +++ b/api_docs/dataset_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/datasetQuality title: "datasetQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the datasetQuality plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality'] --- import datasetQualityObj from './dataset_quality.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 254238c3afb37..28ad1dbce6567 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index a356857d36bf9..288d9092d1011 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -1377,8 +1377,8 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedCellValueElementProps), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedCellValueElementProps) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedRowRenderer), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedRowRenderer) | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BeatFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=BeatFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=BeatFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=BeatFields) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [use_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx#:~:text=BrowserField), [use_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx#:~:text=BrowserField)+ 29 more | - | -| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields)+ 77 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [use_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx#:~:text=BrowserField), [use_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx#:~:text=BrowserField), [use_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx#:~:text=BrowserField), [use_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx#:~:text=BrowserField), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=BrowserField)+ 29 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields)+ 75 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyRequest), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyRequest) | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyResponse), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyResponse) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/types.ts#:~:text=SimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/types.ts#:~:text=SimpleSavedObject) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index d9069ead980de..8a86e1833baf5 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 4e34ac7486ff2..ab1606c9c1b35 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 7b2c6335ef8b9..5aa625a2605a2 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index a32e2d03d4ec0..16c642b6eb6f6 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/discover_shared.mdx b/api_docs/discover_shared.mdx index 5d72870a1145c..751c4e48ea500 100644 --- a/api_docs/discover_shared.mdx +++ b/api_docs/discover_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverShared title: "discoverShared" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverShared plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverShared'] --- import discoverSharedObj from './discover_shared.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index d386ecccede55..cc376175ae9d6 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index cdf8dfe9d6598..b049637feb903 100644 --- a/api_docs/elastic_assistant.mdx +++ b/api_docs/elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/elasticAssistant title: "elasticAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the elasticAssistant plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 006156ba9076e..8fc543875542e 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 69ce9c1f0f6ea..b999041af5f87 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index f32d9baf0a9c8..6602d24d2c96a 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 1025d301965da..a8e98c12ba6dc 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/entity_manager.devdocs.json b/api_docs/entity_manager.devdocs.json index 145b8f97ff63a..0ec36023ac35f 100644 --- a/api_docs/entity_manager.devdocs.json +++ b/api_docs/entity_manager.devdocs.json @@ -1,7 +1,64 @@ { "id": "entityManager", "client": { - "classes": [], + "classes": [ + { + "parentPluginId": "entityManager", + "id": "def-public.EntityManagerUnauthorizedError", + "type": "Class", + "tags": [], + "label": "EntityManagerUnauthorizedError", + "description": [], + "signature": [ + { + "pluginId": "entityManager", + "scope": "public", + "docId": "kibEntityManagerPluginApi", + "section": "def-public.EntityManagerUnauthorizedError", + "text": "EntityManagerUnauthorizedError" + }, + " extends Error" + ], + "path": "x-pack/plugins/observability_solution/entity_manager/public/lib/errors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "entityManager", + "id": "def-public.EntityManagerUnauthorizedError.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/plugins/observability_solution/entity_manager/public/lib/errors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "entityManager", + "id": "def-public.EntityManagerUnauthorizedError.Unnamed.$1", + "type": "string", + "tags": [], + "label": "message", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/observability_solution/entity_manager/public/lib/errors.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], "functions": [], "interfaces": [ { @@ -152,21 +209,6 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false - }, - { - "parentPluginId": "entityManager", - "id": "def-public.ERROR_USER_NOT_AUTHORIZED", - "type": "string", - "tags": [], - "label": "ERROR_USER_NOT_AUTHORIZED", - "description": [], - "signature": [ - "\"user_not_authorized\"" - ], - "path": "x-pack/plugins/observability_solution/entity_manager/common/errors.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/entity_manager.mdx b/api_docs/entity_manager.mdx index 71f30d30d171b..a992b1003346c 100644 --- a/api_docs/entity_manager.mdx +++ b/api_docs/entity_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/entityManager title: "entityManager" image: https://source.unsplash.com/400x175/?github description: API docs for the entityManager plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'entityManager'] --- import entityManagerObj from './entity_manager.devdocs.json'; @@ -21,10 +21,13 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 14 | 0 | 14 | 1 | +| 16 | 0 | 16 | 1 | ## Client +### Classes + + ### Interfaces diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 66ba96d6935d9..71c411556774d 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/esql.mdx b/api_docs/esql.mdx index 83c548844df5d..a2748717e7797 100644 --- a/api_docs/esql.mdx +++ b/api_docs/esql.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esql title: "esql" image: https://source.unsplash.com/400x175/?github description: API docs for the esql plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esql'] --- import esqlObj from './esql.devdocs.json'; diff --git a/api_docs/esql_data_grid.mdx b/api_docs/esql_data_grid.mdx index 9996c45f378c7..e54bb5fc6a5ac 100644 --- a/api_docs/esql_data_grid.mdx +++ b/api_docs/esql_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esqlDataGrid title: "esqlDataGrid" image: https://source.unsplash.com/400x175/?github description: API docs for the esqlDataGrid plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esqlDataGrid'] --- import esqlDataGridObj from './esql_data_grid.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index cce25a515112d..25b3e02bbf6f8 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx index 0cb37b54402cf..15468790f84c0 100644 --- a/api_docs/event_annotation_listing.mdx +++ b/api_docs/event_annotation_listing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotationListing title: "eventAnnotationListing" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotationListing plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index eab5ff2bd0eff..5821e5f1419ed 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index 519e9c0c2e269..9792e5ebb1b52 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 982745ba2ae08..b5aae123ab9ff 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 3d5ec7a07bc6a..f22a8cf506f62 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index af30fcec71591..448bc3fb19e3b 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 330b39092365b..556131a8d7615 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index d118612fe2a20..ce438cf419458 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index b226ec02edb21..20bde4fd07615 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index bc9f7fd265b14..797174c8c51e2 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 1339fdceacdd5..c411b83bf2264 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index ec3b35dd8382e..2f42031faffc4 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index dd70371ccdf99..1361c95024c9b 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index d970e9bd2e64b..33dfed0238c32 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index a31ba242a245b..53774caf41650 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 12be27753ef64..f740830bbc277 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 02b1eac5cfffa..3493e67dac2be 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index ba1e7ee0bdcb5..15a8a1cd216d4 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index fb418da077cb5..2becb2f032a4a 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/fields_metadata.mdx b/api_docs/fields_metadata.mdx index 92381696d887d..320f5dc8d5309 100644 --- a/api_docs/fields_metadata.mdx +++ b/api_docs/fields_metadata.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldsMetadata title: "fieldsMetadata" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldsMetadata plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldsMetadata'] --- import fieldsMetadataObj from './fields_metadata.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index 3c137b0954fae..9fdad3660c5a8 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.devdocs.json b/api_docs/files.devdocs.json index f66d17574d9a0..f3cc7d80e6a15 100644 --- a/api_docs/files.devdocs.json +++ b/api_docs/files.devdocs.json @@ -5400,6 +5400,10 @@ "plugin": "cases", "path": "x-pack/plugins/cases/server/files/index.test.ts" }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/files/index.test.ts" + }, { "plugin": "cases", "path": "x-pack/plugins/cases/server/files/index.test.ts" diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 9aa9464fd7b55..06ef242784597 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index b357847034c8b..0072e379a6e71 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 7a9eae15d00a4..253c0ede31062 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 48a860e5c9469..20c4709a63922 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index 986b5a2a4b621..82eee29554ece 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 91b93ede14445..3b1cc59bea371 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index cb784135c14fd..a6cc03bf651eb 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 5d77ced696775..b7e563d27be89 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 49f2066d86eb1..10d933d6cd889 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index dcd7eb400b2d3..10cbfdcf942fa 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx index b1de45de1896e..e915faf2f275e 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 554d69150deaf..8555a637ffc45 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/integration_assistant.mdx b/api_docs/integration_assistant.mdx index 6698d38d4f188..692fde1f7aafe 100644 --- a/api_docs/integration_assistant.mdx +++ b/api_docs/integration_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/integrationAssistant title: "integrationAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the integrationAssistant plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'integrationAssistant'] --- import integrationAssistantObj from './integration_assistant.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 6f00a4d1f8006..0aee1d54c30c4 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/investigate.mdx b/api_docs/investigate.mdx index f322e678b5049..e4643bad9f7b0 100644 --- a/api_docs/investigate.mdx +++ b/api_docs/investigate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/investigate title: "investigate" image: https://source.unsplash.com/400x175/?github description: API docs for the investigate plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigate'] --- import investigateObj from './investigate.devdocs.json'; diff --git a/api_docs/investigate_app.mdx b/api_docs/investigate_app.mdx index 2be9577c4431d..f9e29e443d87d 100644 --- a/api_docs/investigate_app.mdx +++ b/api_docs/investigate_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/investigateApp title: "investigateApp" image: https://source.unsplash.com/400x175/?github description: API docs for the investigateApp plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigateApp'] --- import investigateAppObj from './investigate_app.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index 875a1410f8007..7dd19612397d4 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index 75001dd0bfc0f..6954cd0e26860 100644 --- a/api_docs/kbn_actions_types.mdx +++ b/api_docs/kbn_actions_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-actions-types title: "@kbn/actions-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/actions-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index be7ae48dadec7..391edd1e088f2 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_pattern_analysis.mdx b/api_docs/kbn_aiops_log_pattern_analysis.mdx index 4214beeb13d6d..20e746c4d1359 100644 --- a/api_docs/kbn_aiops_log_pattern_analysis.mdx +++ b/api_docs/kbn_aiops_log_pattern_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-pattern-analysis title: "@kbn/aiops-log-pattern-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-pattern-analysis plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-pattern-analysis'] --- import kbnAiopsLogPatternAnalysisObj from './kbn_aiops_log_pattern_analysis.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_rate_analysis.mdx b/api_docs/kbn_aiops_log_rate_analysis.mdx index a2e78f7f3a667..f37e270544a74 100644 --- a/api_docs/kbn_aiops_log_rate_analysis.mdx +++ b/api_docs/kbn_aiops_log_rate_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-rate-analysis title: "@kbn/aiops-log-rate-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-rate-analysis plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-rate-analysis'] --- import kbnAiopsLogRateAnalysisObj from './kbn_aiops_log_rate_analysis.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index b0431b6106dab..5dd2cf1d579a4 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_comparators.mdx b/api_docs/kbn_alerting_comparators.mdx index 9eb7c4a8fc904..7de325c712393 100644 --- a/api_docs/kbn_alerting_comparators.mdx +++ b/api_docs/kbn_alerting_comparators.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-comparators title: "@kbn/alerting-comparators" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-comparators plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-comparators'] --- import kbnAlertingComparatorsObj from './kbn_alerting_comparators.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index 9ec4618474291..2ca543e2868b2 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index 2af04c72dead6..0dc5d17ebfeea 100644 --- a/api_docs/kbn_alerting_types.mdx +++ b/api_docs/kbn_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-types title: "@kbn/alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 7f6f5a6872583..9557f500103ef 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_grouping.mdx b/api_docs/kbn_alerts_grouping.mdx index 1f8d85bb5fd3d..bebd66657c5d2 100644 --- a/api_docs/kbn_alerts_grouping.mdx +++ b/api_docs/kbn_alerts_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-grouping title: "@kbn/alerts-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-grouping plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-grouping'] --- import kbnAlertsGroupingObj from './kbn_alerts_grouping.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index 4e41640bd9112..b5418d1b665c9 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index f8434010ccf48..97c3e909391a7 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index f1ab4a419a622..c36b701433393 100644 --- a/api_docs/kbn_analytics_collection_utils.mdx +++ b/api_docs/kbn_analytics_collection_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-collection-utils title: "@kbn/analytics-collection-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-collection-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.devdocs.json b/api_docs/kbn_apm_config_loader.devdocs.json index 81ea00f3dac6d..3af68277a32ea 100644 --- a/api_docs/kbn_apm_config_loader.devdocs.json +++ b/api_docs/kbn_apm_config_loader.devdocs.json @@ -9,18 +9,10 @@ "objects": [] }, "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { "classes": [ { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.ApmConfiguration", + "id": "def-server.ApmConfiguration", "type": "Class", "tags": [], "label": "ApmConfiguration", @@ -31,7 +23,7 @@ "children": [ { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.ApmConfiguration.Unnamed", + "id": "def-server.ApmConfiguration.Unnamed", "type": "Function", "tags": [], "label": "Constructor", @@ -45,7 +37,7 @@ "children": [ { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.ApmConfiguration.Unnamed.$1", + "id": "def-server.ApmConfiguration.Unnamed.$1", "type": "string", "tags": [], "label": "rootDir", @@ -60,7 +52,7 @@ }, { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.ApmConfiguration.Unnamed.$2", + "id": "def-server.ApmConfiguration.Unnamed.$2", "type": "Object", "tags": [], "label": "rawKibanaConfig", @@ -75,7 +67,7 @@ }, { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.ApmConfiguration.Unnamed.$3", + "id": "def-server.ApmConfiguration.Unnamed.$3", "type": "boolean", "tags": [], "label": "isDistributable", @@ -93,7 +85,7 @@ }, { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.ApmConfiguration.getConfig", + "id": "def-server.ApmConfiguration.getConfig", "type": "Function", "tags": [], "label": "getConfig", @@ -108,7 +100,7 @@ "children": [ { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.ApmConfiguration.getConfig.$1", + "id": "def-server.ApmConfiguration.getConfig.$1", "type": "string", "tags": [], "label": "serviceName", @@ -126,7 +118,7 @@ }, { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.ApmConfiguration.isUsersRedactionEnabled", + "id": "def-server.ApmConfiguration.isUsersRedactionEnabled", "type": "Function", "tags": [], "label": "isUsersRedactionEnabled", @@ -147,7 +139,7 @@ "functions": [ { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.getConfiguration", + "id": "def-server.getConfiguration", "type": "Function", "tags": [], "label": "getConfiguration", @@ -163,7 +155,7 @@ "children": [ { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.getConfiguration.$1", + "id": "def-server.getConfiguration.$1", "type": "string", "tags": [], "label": "serviceName", @@ -182,7 +174,7 @@ }, { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.initApm", + "id": "def-server.initApm", "type": "Function", "tags": [], "label": "initApm", @@ -196,7 +188,7 @@ "children": [ { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.initApm.$1", + "id": "def-server.initApm.$1", "type": "Array", "tags": [], "label": "argv", @@ -211,7 +203,7 @@ }, { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.initApm.$2", + "id": "def-server.initApm.$2", "type": "string", "tags": [], "label": "rootDir", @@ -226,7 +218,7 @@ }, { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.initApm.$3", + "id": "def-server.initApm.$3", "type": "boolean", "tags": [], "label": "isDistributable", @@ -241,7 +233,7 @@ }, { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.initApm.$4", + "id": "def-server.initApm.$4", "type": "string", "tags": [], "label": "serviceName", @@ -260,7 +252,7 @@ }, { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.shouldInstrumentClient", + "id": "def-server.shouldInstrumentClient", "type": "Function", "tags": [], "label": "shouldInstrumentClient", @@ -276,7 +268,7 @@ "children": [ { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.shouldInstrumentClient.$1", + "id": "def-server.shouldInstrumentClient.$1", "type": "Object", "tags": [], "label": "config", @@ -301,7 +293,7 @@ "objects": [ { "parentPluginId": "@kbn/apm-config-loader", - "id": "def-common.apmConfigSchema", + "id": "def-server.apmConfigSchema", "type": "Object", "tags": [], "label": "apmConfigSchema", @@ -386,5 +378,13 @@ "initialIsOpen": false } ] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] } } \ No newline at end of file diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 3eda2f4efff3e..d7891fe75514d 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; @@ -23,14 +23,14 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core |-------------------|-----------|------------------------|-----------------| | 18 | 0 | 18 | 0 | -## Common +## Server ### Objects - + ### Functions - + ### Classes - + diff --git a/api_docs/kbn_apm_data_view.mdx b/api_docs/kbn_apm_data_view.mdx index 50459cbc37289..c6d3530168b07 100644 --- a/api_docs/kbn_apm_data_view.mdx +++ b/api_docs/kbn_apm_data_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-data-view title: "@kbn/apm-data-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-data-view plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 03ad7f700589d..e2e251da6838a 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 12a255ab3a76b..dcd9ef93e8dca 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index edc744fe6fdd7..11fc4c3aaca31 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_avc_banner.mdx b/api_docs/kbn_avc_banner.mdx index 8d2071d53695f..77f658c1aa28b 100644 --- a/api_docs/kbn_avc_banner.mdx +++ b/api_docs/kbn_avc_banner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-avc-banner title: "@kbn/avc-banner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/avc-banner plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/avc-banner'] --- import kbnAvcBannerObj from './kbn_avc_banner.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 429bbe9006178..3963e33e3f91d 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_bfetch_error.mdx b/api_docs/kbn_bfetch_error.mdx index 7aedfb0634050..7979684006e64 100644 --- a/api_docs/kbn_bfetch_error.mdx +++ b/api_docs/kbn_bfetch_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-bfetch-error title: "@kbn/bfetch-error" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/bfetch-error plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bfetch-error'] --- import kbnBfetchErrorObj from './kbn_bfetch_error.devdocs.json'; diff --git a/api_docs/kbn_calculate_auto.mdx b/api_docs/kbn_calculate_auto.mdx index 34ec918e0239d..cb51561961230 100644 --- a/api_docs/kbn_calculate_auto.mdx +++ b/api_docs/kbn_calculate_auto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-auto title: "@kbn/calculate-auto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-auto plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-auto'] --- import kbnCalculateAutoObj from './kbn_calculate_auto.devdocs.json'; diff --git a/api_docs/kbn_calculate_width_from_char_count.mdx b/api_docs/kbn_calculate_width_from_char_count.mdx index 382023cd58319..4ea28e92020d7 100644 --- a/api_docs/kbn_calculate_width_from_char_count.mdx +++ b/api_docs/kbn_calculate_width_from_char_count.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-width-from-char-count title: "@kbn/calculate-width-from-char-count" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-width-from-char-count plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-width-from-char-count'] --- import kbnCalculateWidthFromCharCountObj from './kbn_calculate_width_from_char_count.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 0d2c30f73981f..dc0b7573ccbd9 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index ef43b568d06cd..7c73dede68129 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index 8d714e9cf959c..1bee56d7998c1 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 538fb0470de79..820b98339caef 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 3425182024f09..fd5581972dcb4 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index bcf3dcfd9745e..7686d6d38cff2 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 8fb138d3e21e9..46b425339690c 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 8da7b2e174f9d..00c87906ea5a3 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index e60af91339918..8036fbb79e18f 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index 804ff5407989e..bd352fb754b62 100644 --- a/api_docs/kbn_code_editor_mock.mdx +++ b/api_docs/kbn_code_editor_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mock title: "@kbn/code-editor-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mock plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mock'] --- import kbnCodeEditorMockObj from './kbn_code_editor_mock.devdocs.json'; diff --git a/api_docs/kbn_code_owners.mdx b/api_docs/kbn_code_owners.mdx index 448e719003a23..b3ce4e08512ca 100644 --- a/api_docs/kbn_code_owners.mdx +++ b/api_docs/kbn_code_owners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-owners title: "@kbn/code-owners" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-owners plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-owners'] --- import kbnCodeOwnersObj from './kbn_code_owners.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index a3a10a69261b2..9a5b94b724820 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 36fcaa786f888..ebfc90d0984e4 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index a2609f7dfa2c1..6f371dc959cbb 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 9a5cba0e5a3a7..a08ece7b7cab8 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index ccf0c2dd807b2..391ff1a604c7d 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index 6a21a5fd776b7..22e49932c4098 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index 8471a3f7dd97e..188e53504bb7e 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_common.mdx b/api_docs/kbn_content_management_table_list_view_common.mdx index 50c8d83754979..02a3120275cb8 100644 --- a/api_docs/kbn_content_management_table_list_view_common.mdx +++ b/api_docs/kbn_content_management_table_list_view_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-common title: "@kbn/content-management-table-list-view-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-common'] --- import kbnContentManagementTableListViewCommonObj from './kbn_content_management_table_list_view_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index b25e860fa3bf5..d8fbf620b43b1 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_user_profiles.mdx b/api_docs/kbn_content_management_user_profiles.mdx index 7c4172c98b453..cabf0c10e03dc 100644 --- a/api_docs/kbn_content_management_user_profiles.mdx +++ b/api_docs/kbn_content_management_user_profiles.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-user-profiles title: "@kbn/content-management-user-profiles" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-user-profiles plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-user-profiles'] --- import kbnContentManagementUserProfilesObj from './kbn_content_management_user_profiles.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index e45103c8204b9..a917d0fc31164 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.devdocs.json b/api_docs/kbn_core_analytics_browser.devdocs.json index 7947b4922115d..2ff35482ac18e 100644 --- a/api_docs/kbn_core_analytics_browser.devdocs.json +++ b/api_docs/kbn_core_analytics_browser.devdocs.json @@ -13,7 +13,10 @@ "description": [ "\nGeneral settings of the analytics client" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "AnalyticsClientInitContext" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -26,23 +29,7 @@ "description": [ "\nBoolean indicating if it's running in developer mode." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/core-analytics-browser", - "id": "def-public.AnalyticsClientInitContext.sendTo", - "type": "CompoundType", - "tags": [], - "label": "sendTo", - "description": [ - "\nSpecify if the shippers should send their data to the production or staging environments." - ], - "signature": [ - "\"production\" | \"staging\"" - ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -56,15 +43,9 @@ "\nApplication-provided logger." ], "signature": [ - { - "pluginId": "@kbn/logging", - "scope": "common", - "docId": "kibKbnLoggingPluginApi", - "section": "def-common.Logger", - "text": "Logger" - } + "Logger" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -81,16 +62,10 @@ "\nDefinition of a context provider" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -103,7 +78,7 @@ "description": [ "\nThe name of the provider." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -120,7 +95,7 @@ "Observable", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -135,16 +110,10 @@ ], "signature": [ "{ [Key in keyof Required]: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaValue", - "text": "SchemaValue" - }, + "SchemaValue", "; }" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -161,16 +130,10 @@ "\nDefinition of the full event structure" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.Event", - "text": "Event" - }, + "Event", "" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -183,7 +146,7 @@ "description": [ "\nThe time the event was generated in ISO format." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -196,7 +159,7 @@ "description": [ "\nThe event type." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -212,7 +175,7 @@ "signature": [ "Properties" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -226,15 +189,9 @@ "\nThe {@link EventContext} enriched during the processing pipeline." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventContext", - "text": "EventContext" - } + "EventContext" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -250,7 +207,10 @@ "description": [ "\nDefinition of the context that can be appended to the events through the {@link IAnalyticsClient.registerContextProvider}." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "signature": [ + "EventContext" + ], + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -266,7 +226,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -282,7 +242,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -298,7 +258,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -314,7 +274,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -330,7 +290,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -346,7 +306,7 @@ "signature": [ "boolean | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -362,7 +322,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -378,7 +338,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -394,7 +354,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -410,7 +370,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -426,7 +386,7 @@ "signature": [ "[key: string]: unknown" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -443,16 +403,10 @@ "\nDefinition of an Event Type." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -465,7 +419,7 @@ "description": [ "\nThe event type's unique name." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -480,16 +434,10 @@ ], "signature": [ "{ [Key in keyof Required]: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaValue", - "text": "SchemaValue" - }, + "SchemaValue", "; }" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -505,7 +453,10 @@ "description": [ "\nAnalytics client's public APIs" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "IAnalyticsClient" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -523,7 +474,7 @@ "signature": [ "(eventType: string, eventData: EventTypeData) => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": true, "references": [ @@ -1027,150 +978,6 @@ "plugin": "observabilityAIAssistant", "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts" }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, { "plugin": "@kbn/core-analytics-browser-mocks", "path": "packages/core/analytics/core-analytics-browser-mocks/src/analytics_service.mock.ts" @@ -1439,10 +1246,6 @@ "plugin": "actions", "path": "x-pack/plugins/actions/server/lib/action_executor.test.ts" }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/mocks.ts" - }, { "plugin": "@kbn/core-analytics-browser-internal", "path": "packages/core/analytics/core-analytics-browser-internal/src/analytics_service.test.mocks.ts" @@ -1497,7 +1300,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1514,7 +1317,7 @@ "signature": [ "EventTypeData" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1533,16 +1336,10 @@ ], "signature": [ "(eventTypeOps: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", ") => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1556,16 +1353,10 @@ "The definition of the event type {@link EventTypeOpts }." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1584,32 +1375,14 @@ ], "signature": [ "(Shipper: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", ", shipperConfig: ShipperConfig, opts?: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined) => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1623,16 +1396,10 @@ "The {@link IShipper } class to instantiate the shipper." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1649,7 +1416,7 @@ "signature": [ "ShipperConfig" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1664,16 +1431,10 @@ "Additional options to register the shipper {@link RegisterShipperOpts }." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": false @@ -1692,16 +1453,10 @@ ], "signature": [ "(optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1715,15 +1470,9 @@ "{@link OptInConfig }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - } + "OptInConfig" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1744,16 +1493,10 @@ ], "signature": [ "(contextProviderOpts: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", ") => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": true, "references": [ @@ -1873,18 +1616,6 @@ "plugin": "apm", "path": "x-pack/plugins/observability_solution/apm/public/analytics/register_service_inventory_view_type_context.ts" }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, { "plugin": "@kbn/core-analytics-browser-mocks", "path": "packages/core/analytics/core-analytics-browser-mocks/src/analytics_service.mock.ts" @@ -1989,10 +1720,6 @@ "plugin": "@kbn/core-status-server-internal", "path": "packages/core/status/core-status-server-internal/src/status_service.test.ts" }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/mocks.ts" - }, { "plugin": "@kbn/core-analytics-browser-internal", "path": "packages/core/analytics/core-analytics-browser-internal/src/analytics_service.test.mocks.ts" @@ -2045,16 +1772,10 @@ "{@link ContextProviderOpts }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2074,7 +1795,7 @@ "signature": [ "(contextProviderName: string) => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2090,7 +1811,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2110,16 +1831,10 @@ "signature": [ "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2135,7 +1850,7 @@ "signature": [ "() => Promise" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2153,7 +1868,7 @@ "signature": [ "() => Promise" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2171,7 +1886,10 @@ "description": [ "\nBasic structure of a Shipper" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "signature": [ + "IShipper" + ], + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2186,16 +1904,10 @@ ], "signature": [ "(events: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.Event", - "text": "Event" - }, + "Event", ">[]) => void" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2209,16 +1921,10 @@ "batched events {@link Event }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.Event", - "text": "Event" - }, + "Event", ">[]" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2238,7 +1944,7 @@ "signature": [ "(isOptedIn: boolean) => void" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2254,7 +1960,7 @@ "signature": [ "boolean" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2273,16 +1979,10 @@ ], "signature": [ "((newContext: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventContext", - "text": "EventContext" - }, + "EventContext", ") => void) | undefined" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2296,15 +1996,9 @@ "The full new context to set {@link EventContext }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventContext", - "text": "EventContext" - } + "EventContext" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2324,16 +2018,10 @@ "signature": [ "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", "> | undefined" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2349,7 +2037,7 @@ "signature": [ "() => Promise" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2367,7 +2055,7 @@ "signature": [ "() => void" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2419,7 +2107,10 @@ "description": [ "\nOptions for the optIn API" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "OptInConfig" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2433,15 +2124,9 @@ "\nControls the global enabled/disabled behaviour of the client and shippers." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfigPerType", - "text": "OptInConfigPerType" - } + "OptInConfigPerType" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2456,16 +2141,10 @@ ], "signature": [ "Record | undefined" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2481,7 +2160,10 @@ "description": [ "\nSets whether a type of event is enabled/disabled globally or per shipper." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "OptInConfigPerType" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2494,7 +2176,7 @@ "description": [ "\nThe event type is globally enabled." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2510,7 +2192,7 @@ "signature": [ "Record | undefined" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2526,7 +2208,10 @@ "description": [ "\nOptional options to register a shipper" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "RegisterShipperOpts" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2542,24 +2227,12 @@ "\nSchema to represent an array" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " extends ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMeta", - "text": "SchemaMeta" - }, + "SchemaMeta", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2575,7 +2248,7 @@ "signature": [ "\"array\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2590,72 +2263,24 @@ ], "signature": [ "{ type: \"pass_through\"; _meta: { description: string; } & ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMetaOptional", - "text": "SchemaMetaOptional" - }, + "SchemaMetaOptional", "; } | (unknown extends Value ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " | ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " | ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", " : NonNullable extends (infer U)[] | readonly (infer U)[] ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " : NonNullable extends Date ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", " : NonNullable extends object ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " : ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", ")" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2672,16 +2297,10 @@ "\nSchema to define a primitive value" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2696,31 +2315,13 @@ ], "signature": [ "NonNullable extends string | Date ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaStringTypes", - "text": "AllowedSchemaStringTypes" - }, + "AllowedSchemaStringTypes", " : NonNullable extends number ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaNumberTypes", - "text": "AllowedSchemaNumberTypes" - }, + "AllowedSchemaNumberTypes", " : NonNullable extends boolean ? \"boolean\" : ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaTypes", - "text": "AllowedSchemaTypes" - } + "AllowedSchemaTypes" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2735,16 +2336,10 @@ ], "signature": [ "{ description: string; } & ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMetaOptional", - "text": "SchemaMetaOptional" - }, + "SchemaMetaOptional", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2761,16 +2356,10 @@ "\nSchema meta with optional description" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMeta", - "text": "SchemaMeta" - }, + "SchemaMeta", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2785,16 +2374,10 @@ ], "signature": [ "({ description?: string | undefined; } & ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMetaOptional", - "text": "SchemaMetaOptional" - }, + "SchemaMetaOptional", ") | undefined" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2811,24 +2394,12 @@ "\nSchema to represent an object" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " extends ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMeta", - "text": "SchemaMeta" - }, + "SchemaMeta", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2843,16 +2414,10 @@ ], "signature": [ "{ [Key in keyof Required]: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaValue", - "text": "SchemaValue" - }, + "SchemaValue", "; }" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2869,16 +2434,10 @@ "\nConstructor of a {@link IShipper}" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2891,7 +2450,7 @@ "description": [ "\nThe shipper's unique name" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2907,7 +2466,7 @@ "signature": [ "any" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2923,7 +2482,7 @@ "signature": [ "Config" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2938,15 +2497,9 @@ "Common context {@link AnalyticsClientInitContext }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AnalyticsClientInitContext", - "text": "AnalyticsClientInitContext" - } + "AnalyticsClientInitContext" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2966,7 +2519,10 @@ "description": [ "\nShape of the events emitted by the telemetryCounter$ observable" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "signature": [ + "TelemetryCounter" + ], + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2982,7 +2538,7 @@ "signature": [ "\"succeeded\" | \"failed\" | \"enqueued\" | \"sent_to_shipper\" | \"dropped\"" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2995,7 +2551,7 @@ "description": [ "\nWho emitted the event? It can be \"client\" or the name of the shipper." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -3008,7 +2564,7 @@ "description": [ "\nThe event type the success/failure/drop event refers to." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -3021,7 +2577,7 @@ "description": [ "\nCode to provide additional information about the success or failure. Examples are 200/400/504/ValidationError/UnknownError" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -3034,7 +2590,7 @@ "description": [ "\nThe number of events that this counter refers to." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -3056,7 +2612,7 @@ "signature": [ "\"boolean\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3073,7 +2629,7 @@ "signature": [ "\"date\" | \"integer\" | \"long\" | \"short\" | \"byte\" | \"float\" | \"double\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3090,7 +2646,7 @@ "signature": [ "\"keyword\" | \"text\" | \"date\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3107,7 +2663,7 @@ "signature": [ "\"boolean\" | \"keyword\" | \"text\" | \"date\" | \"integer\" | \"long\" | \"short\" | \"byte\" | \"float\" | \"double\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3123,63 +2679,21 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; registerEventType: (eventTypeOps: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", ") => void; registerShipper: (Shipper: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", ", shipperConfig: ShipperConfig, opts?: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined) => void; registerContextProvider: (contextProviderOpts: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", ") => void; removeContextProvider: (contextProviderName: string) => void; }" ], "path": "packages/core/analytics/core-analytics-browser/src/types.ts", @@ -3198,23 +2712,11 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; }" ], "path": "packages/core/analytics/core-analytics-browser/src/types.ts", @@ -3234,7 +2736,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3251,7 +2753,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3267,31 +2769,13 @@ ], "signature": [ "Value extends string | Date ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaStringTypes", - "text": "AllowedSchemaStringTypes" - }, + "AllowedSchemaStringTypes", " : Value extends number ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaNumberTypes", - "text": "AllowedSchemaNumberTypes" - }, + "AllowedSchemaNumberTypes", " : Value extends boolean ? \"boolean\" : ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaTypes", - "text": "AllowedSchemaTypes" - } + "AllowedSchemaTypes" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3307,16 +2791,10 @@ ], "signature": [ "{ [Key in keyof Required]: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaValue", - "text": "SchemaValue" - }, + "SchemaValue", "; }" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3333,7 +2811,7 @@ "signature": [ "unknown extends Value ? { optional?: boolean | undefined; } : undefined extends Value ? { optional: true; } : { optional?: false | undefined; }" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3349,72 +2827,24 @@ ], "signature": [ "{ type: \"pass_through\"; _meta: { description: string; } & ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMetaOptional", - "text": "SchemaMetaOptional" - }, + "SchemaMetaOptional", "; } | (unknown extends Value ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " | ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " | ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", " : NonNullable extends (infer U)[] | readonly (infer U)[] ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " : NonNullable extends Date ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", " : NonNullable extends object ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " : ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", ")" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3431,7 +2861,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3448,7 +2878,7 @@ "signature": [ "\"succeeded\" | \"failed\" | \"enqueued\" | \"sent_to_shipper\" | \"dropped\"" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index b6241ca8cb289..b5b2e3d91fd06 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 101 | 0 | 0 | 0 | +| 100 | 0 | 0 | 0 | ## Client diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 91376aa7d2855..c56c48961098f 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index fe5210175cf62..bfba4c9373fbf 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.devdocs.json b/api_docs/kbn_core_analytics_server.devdocs.json index 3d8547c721ef1..d88810492946d 100644 --- a/api_docs/kbn_core_analytics_server.devdocs.json +++ b/api_docs/kbn_core_analytics_server.devdocs.json @@ -21,7 +21,10 @@ "description": [ "\nGeneral settings of the analytics client" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "AnalyticsClientInitContext" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -34,23 +37,7 @@ "description": [ "\nBoolean indicating if it's running in developer mode." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/core-analytics-server", - "id": "def-server.AnalyticsClientInitContext.sendTo", - "type": "CompoundType", - "tags": [], - "label": "sendTo", - "description": [ - "\nSpecify if the shippers should send their data to the production or staging environments." - ], - "signature": [ - "\"production\" | \"staging\"" - ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -64,15 +51,9 @@ "\nApplication-provided logger." ], "signature": [ - { - "pluginId": "@kbn/logging", - "scope": "common", - "docId": "kibKbnLoggingPluginApi", - "section": "def-common.Logger", - "text": "Logger" - } + "Logger" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -89,16 +70,10 @@ "\nDefinition of a context provider" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -111,7 +86,7 @@ "description": [ "\nThe name of the provider." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -128,7 +103,7 @@ "Observable", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -143,16 +118,10 @@ ], "signature": [ "{ [Key in keyof Required]: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaValue", - "text": "SchemaValue" - }, + "SchemaValue", "; }" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -169,16 +138,10 @@ "\nDefinition of the full event structure" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.Event", - "text": "Event" - }, + "Event", "" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -191,7 +154,7 @@ "description": [ "\nThe time the event was generated in ISO format." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -204,7 +167,7 @@ "description": [ "\nThe event type." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -220,7 +183,7 @@ "signature": [ "Properties" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -234,15 +197,9 @@ "\nThe {@link EventContext} enriched during the processing pipeline." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventContext", - "text": "EventContext" - } + "EventContext" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -258,7 +215,10 @@ "description": [ "\nDefinition of the context that can be appended to the events through the {@link IAnalyticsClient.registerContextProvider}." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "signature": [ + "EventContext" + ], + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -274,7 +234,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -290,7 +250,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -306,7 +266,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -322,7 +282,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -338,7 +298,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -354,7 +314,7 @@ "signature": [ "boolean | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -370,7 +330,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -386,7 +346,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -402,7 +362,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -418,7 +378,7 @@ "signature": [ "string | undefined" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -434,7 +394,7 @@ "signature": [ "[key: string]: unknown" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -451,16 +411,10 @@ "\nDefinition of an Event Type." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -473,7 +427,7 @@ "description": [ "\nThe event type's unique name." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -488,16 +442,10 @@ ], "signature": [ "{ [Key in keyof Required]: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaValue", - "text": "SchemaValue" - }, + "SchemaValue", "; }" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -513,7 +461,10 @@ "description": [ "\nAnalytics client's public APIs" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "IAnalyticsClient" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -531,7 +482,7 @@ "signature": [ "(eventType: string, eventData: EventTypeData) => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": true, "references": [ @@ -1035,150 +986,6 @@ "plugin": "observabilityAIAssistant", "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts" }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, { "plugin": "@kbn/core-analytics-browser-mocks", "path": "packages/core/analytics/core-analytics-browser-mocks/src/analytics_service.mock.ts" @@ -1447,10 +1254,6 @@ "plugin": "actions", "path": "x-pack/plugins/actions/server/lib/action_executor.test.ts" }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/mocks.ts" - }, { "plugin": "@kbn/core-analytics-browser-internal", "path": "packages/core/analytics/core-analytics-browser-internal/src/analytics_service.test.mocks.ts" @@ -1505,7 +1308,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1522,7 +1325,7 @@ "signature": [ "EventTypeData" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1541,16 +1344,10 @@ ], "signature": [ "(eventTypeOps: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", ") => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1564,16 +1361,10 @@ "The definition of the event type {@link EventTypeOpts }." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1592,32 +1383,14 @@ ], "signature": [ "(Shipper: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", ", shipperConfig: ShipperConfig, opts?: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined) => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1631,16 +1404,10 @@ "The {@link IShipper } class to instantiate the shipper." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1657,7 +1424,7 @@ "signature": [ "ShipperConfig" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1672,16 +1439,10 @@ "Additional options to register the shipper {@link RegisterShipperOpts }." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": false @@ -1700,16 +1461,10 @@ ], "signature": [ "(optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1723,15 +1478,9 @@ "{@link OptInConfig }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - } + "OptInConfig" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1752,16 +1501,10 @@ ], "signature": [ "(contextProviderOpts: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", ") => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": true, "references": [ @@ -1881,18 +1624,6 @@ "plugin": "apm", "path": "x-pack/plugins/observability_solution/apm/public/analytics/register_service_inventory_view_type_context.ts" }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/analytics_client.test.ts" - }, { "plugin": "@kbn/core-analytics-browser-mocks", "path": "packages/core/analytics/core-analytics-browser-mocks/src/analytics_service.mock.ts" @@ -1997,10 +1728,6 @@ "plugin": "@kbn/core-status-server-internal", "path": "packages/core/status/core-status-server-internal/src/status_service.test.ts" }, - { - "plugin": "@kbn/ebt", - "path": "packages/analytics/ebt/client/src/analytics_client/mocks.ts" - }, { "plugin": "@kbn/core-analytics-browser-internal", "path": "packages/core/analytics/core-analytics-browser-internal/src/analytics_service.test.mocks.ts" @@ -2053,16 +1780,10 @@ "{@link ContextProviderOpts }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2082,7 +1803,7 @@ "signature": [ "(contextProviderName: string) => void" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2098,7 +1819,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2118,16 +1839,10 @@ "signature": [ "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2143,7 +1858,7 @@ "signature": [ "() => Promise" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2161,7 +1876,7 @@ "signature": [ "() => Promise" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2179,7 +1894,10 @@ "description": [ "\nBasic structure of a Shipper" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "signature": [ + "IShipper" + ], + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2194,16 +1912,10 @@ ], "signature": [ "(events: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.Event", - "text": "Event" - }, + "Event", ">[]) => void" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2217,16 +1929,10 @@ "batched events {@link Event }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.Event", - "text": "Event" - }, + "Event", ">[]" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2246,7 +1952,7 @@ "signature": [ "(isOptedIn: boolean) => void" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2262,7 +1968,7 @@ "signature": [ "boolean" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2281,16 +1987,10 @@ ], "signature": [ "((newContext: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventContext", - "text": "EventContext" - }, + "EventContext", ") => void) | undefined" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2304,15 +2004,9 @@ "The full new context to set {@link EventContext }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventContext", - "text": "EventContext" - } + "EventContext" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2332,16 +2026,10 @@ "signature": [ "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", "> | undefined" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2357,7 +2045,7 @@ "signature": [ "() => Promise" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2375,7 +2063,7 @@ "signature": [ "() => void" ], - "path": "packages/analytics/ebt/client/src/shippers/types.ts", + "path": "node_modules/@elastic/ebt/client/src/shippers/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2393,7 +2081,10 @@ "description": [ "\nOptions for the optIn API" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "OptInConfig" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2407,15 +2098,9 @@ "\nControls the global enabled/disabled behaviour of the client and shippers." ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfigPerType", - "text": "OptInConfigPerType" - } + "OptInConfigPerType" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2430,16 +2115,10 @@ ], "signature": [ "Record | undefined" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2455,7 +2134,10 @@ "description": [ "\nSets whether a type of event is enabled/disabled globally or per shipper." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "OptInConfigPerType" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2468,7 +2150,7 @@ "description": [ "\nThe event type is globally enabled." ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2484,7 +2166,7 @@ "signature": [ "Record | undefined" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2500,7 +2182,10 @@ "description": [ "\nOptional options to register a shipper" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "signature": [ + "RegisterShipperOpts" + ], + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -2516,24 +2201,12 @@ "\nSchema to represent an array" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " extends ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMeta", - "text": "SchemaMeta" - }, + "SchemaMeta", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2549,7 +2222,7 @@ "signature": [ "\"array\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2564,72 +2237,24 @@ ], "signature": [ "{ type: \"pass_through\"; _meta: { description: string; } & ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMetaOptional", - "text": "SchemaMetaOptional" - }, + "SchemaMetaOptional", "; } | (unknown extends Value ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " | ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " | ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", " : NonNullable extends (infer U)[] | readonly (infer U)[] ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " : NonNullable extends Date ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", " : NonNullable extends object ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " : ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", ")" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2646,16 +2271,10 @@ "\nSchema to define a primitive value" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2670,31 +2289,13 @@ ], "signature": [ "NonNullable extends string | Date ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaStringTypes", - "text": "AllowedSchemaStringTypes" - }, + "AllowedSchemaStringTypes", " : NonNullable extends number ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaNumberTypes", - "text": "AllowedSchemaNumberTypes" - }, + "AllowedSchemaNumberTypes", " : NonNullable extends boolean ? \"boolean\" : ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaTypes", - "text": "AllowedSchemaTypes" - } + "AllowedSchemaTypes" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2709,16 +2310,10 @@ ], "signature": [ "{ description: string; } & ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMetaOptional", - "text": "SchemaMetaOptional" - }, + "SchemaMetaOptional", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2735,16 +2330,10 @@ "\nSchema meta with optional description" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMeta", - "text": "SchemaMeta" - }, + "SchemaMeta", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2759,16 +2348,10 @@ ], "signature": [ "({ description?: string | undefined; } & ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMetaOptional", - "text": "SchemaMetaOptional" - }, + "SchemaMetaOptional", ") | undefined" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2785,24 +2368,12 @@ "\nSchema to represent an object" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " extends ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMeta", - "text": "SchemaMeta" - }, + "SchemaMeta", "" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2817,16 +2388,10 @@ ], "signature": [ "{ [Key in keyof Required]: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaValue", - "text": "SchemaValue" - }, + "SchemaValue", "; }" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -2843,16 +2408,10 @@ "\nConstructor of a {@link IShipper}" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", "" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2865,7 +2424,7 @@ "description": [ "\nThe shipper's unique name" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2881,7 +2440,7 @@ "signature": [ "any" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2897,7 +2456,7 @@ "signature": [ "Config" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2912,15 +2471,9 @@ "Common context {@link AnalyticsClientInitContext }" ], "signature": [ - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AnalyticsClientInitContext", - "text": "AnalyticsClientInitContext" - } + "AnalyticsClientInitContext" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2940,7 +2493,10 @@ "description": [ "\nShape of the events emitted by the telemetryCounter$ observable" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "signature": [ + "TelemetryCounter" + ], + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2956,7 +2512,7 @@ "signature": [ "\"succeeded\" | \"failed\" | \"enqueued\" | \"sent_to_shipper\" | \"dropped\"" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2969,7 +2525,7 @@ "description": [ "\nWho emitted the event? It can be \"client\" or the name of the shipper." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2982,7 +2538,7 @@ "description": [ "\nThe event type the success/failure/drop event refers to." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -2995,7 +2551,7 @@ "description": [ "\nCode to provide additional information about the success or failure. Examples are 200/400/504/ValidationError/UnknownError" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false }, @@ -3008,7 +2564,7 @@ "description": [ "\nThe number of events that this counter refers to." ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false } @@ -3030,7 +2586,7 @@ "signature": [ "\"boolean\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3047,7 +2603,7 @@ "signature": [ "\"date\" | \"integer\" | \"long\" | \"short\" | \"byte\" | \"float\" | \"double\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3064,7 +2620,7 @@ "signature": [ "\"keyword\" | \"text\" | \"date\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3081,7 +2637,7 @@ "signature": [ "\"boolean\" | \"keyword\" | \"text\" | \"date\" | \"integer\" | \"long\" | \"short\" | \"byte\" | \"float\" | \"double\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3097,63 +2653,21 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; registerEventType: (eventTypeOps: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", ") => void; registerShipper: (Shipper: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", ", shipperConfig: ShipperConfig, opts?: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined) => void; registerContextProvider: (contextProviderOpts: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", ") => void; removeContextProvider: (contextProviderName: string) => void; }" ], "path": "packages/core/analytics/core-analytics-server/src/contracts.ts", @@ -3172,63 +2686,21 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; registerEventType: (eventTypeOps: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", ") => void; registerShipper: (Shipper: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", ", shipperConfig: ShipperConfig, opts?: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined) => void; registerContextProvider: (contextProviderOpts: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", ") => void; removeContextProvider: (contextProviderName: string) => void; }" ], "path": "packages/core/analytics/core-analytics-server/src/contracts.ts", @@ -3247,23 +2719,11 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; }" ], "path": "packages/core/analytics/core-analytics-server/src/contracts.ts", @@ -3283,7 +2743,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3300,7 +2760,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3316,31 +2776,13 @@ ], "signature": [ "Value extends string | Date ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaStringTypes", - "text": "AllowedSchemaStringTypes" - }, + "AllowedSchemaStringTypes", " : Value extends number ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaNumberTypes", - "text": "AllowedSchemaNumberTypes" - }, + "AllowedSchemaNumberTypes", " : Value extends boolean ? \"boolean\" : ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.AllowedSchemaTypes", - "text": "AllowedSchemaTypes" - } + "AllowedSchemaTypes" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3356,16 +2798,10 @@ ], "signature": [ "{ [Key in keyof Required]: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaValue", - "text": "SchemaValue" - }, + "SchemaValue", "; }" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3382,7 +2818,7 @@ "signature": [ "unknown extends Value ? { optional?: boolean | undefined; } : undefined extends Value ? { optional: true; } : { optional?: false | undefined; }" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3398,72 +2834,24 @@ ], "signature": [ "{ type: \"pass_through\"; _meta: { description: string; } & ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaMetaOptional", - "text": "SchemaMetaOptional" - }, + "SchemaMetaOptional", "; } | (unknown extends Value ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " | ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " | ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", " : NonNullable extends (infer U)[] | readonly (infer U)[] ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaArray", - "text": "SchemaArray" - }, + "SchemaArray", " : NonNullable extends Date ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", " : NonNullable extends object ? ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaObject", - "text": "SchemaObject" - }, + "SchemaObject", " : ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.SchemaChildValue", - "text": "SchemaChildValue" - }, + "SchemaChildValue", ")" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3480,7 +2868,7 @@ "signature": [ "string" ], - "path": "packages/analytics/ebt/client/src/analytics_client/types.ts", + "path": "node_modules/@elastic/ebt/client/src/analytics_client/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -3497,7 +2885,7 @@ "signature": [ "\"succeeded\" | \"failed\" | \"enqueued\" | \"sent_to_shipper\" | \"dropped\"" ], - "path": "packages/analytics/ebt/client/src/events/types.ts", + "path": "node_modules/@elastic/ebt/client/src/events/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 1a03f20dfc99d..a3c023118b0ba 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 100 | 0 | 0 | 0 | +| 99 | 0 | 0 | 0 | ## Server diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 511ecc7be6d3c..7905d0f914028 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index a5a1631a958b5..55091cf7ce397 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index b12ed025c58e2..55701f01cd9a0 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index 8d7373f033145..16e694f675ada 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index e98d295208ca7..eff713f8e2129 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index 14ad05dc499fb..6c20af0d4b716 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.devdocs.json b/api_docs/kbn_core_apps_browser_internal.devdocs.json index 55c6bb04db033..18fb1dea37623 100644 --- a/api_docs/kbn_core_apps_browser_internal.devdocs.json +++ b/api_docs/kbn_core_apps_browser_internal.devdocs.json @@ -363,23 +363,11 @@ "description": [], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; }" ], "path": "packages/core/apps/core-apps-browser-internal/src/core_app.ts", diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index eda5c7fbbf4bf..85adee9fccc28 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 31adc7add0377..8e7b1b4cdd4ba 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 5801e6c4c51ca..bc4eddec94574 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index f5cea3950f34e..671091c5b3e09 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 081488ab4b896..23fc874794842 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 50a36b006ece5..70be07ac048d0 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index e01206b59bbd3..2fdcaac2bc28b 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 6759ac841d615..995ec4c0c7215 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index d23c6e92f38bc..18a0249793d06 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index 5a486731b17ad..a82dafb111cb2 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 3ed8988623a57..511ad134eb3ee 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 7190d2a20f0d5..9ea4040b2be4e 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 01a3252c8a762..ad230e21b0d49 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 6b0654b0cc29b..c0142235a9289 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index f3851859bc80f..a28c2fe2d952d 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index ccf61dcfd8cb5..aa0cfc36dc686 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index f9ce5e189764e..9f274cb1bfa4c 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index 761cfad051b1d..b4fcefb84695e 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index 1ef494137a049..a85323730c90b 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index 2e955f2ab66a4..98f6a2cd33e97 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index e2f65f0746144..164aa24a8a934 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 07d289e9d0c60..d3e569853b085 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index 327e94bc0a23a..231f5ae8ebf3a 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 70421a30b8dca..8978e230e74b3 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index 6567c4bb9dc31..ee7d93f6d1e08 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 18f12bf471715..07a52e526f06e 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index 8b79d7beda3ca..b1df0002797e9 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 7cad7c4115700..6402bbf85035e 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 931d550ff5faf..b7a12bfc2367f 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 65f4b362e4c53..df3b388fe7a96 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index 854a1a6a1538f..e4bbb8e369753 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 360a64ca5d767..e08a01ee02728 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index 19632ff6dba2b..0a3fb1b17e173 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index 6ecc522559d7a..007b5b750a051 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index f979d572ec62d..1b2e74b3d560d 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index 49151ecc4f18d..bbfb4f72beb4d 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index c8ea31162da51..a46f9e036242e 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 95e16d5e7b40d..3b5ce1c0505c6 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index da7299c93558d..93e9fa55c0daa 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index c80d4fd932288..a04436c3af866 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 64db3639ff354..d1ad2d13c3724 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 7fdcb6435c9a9..3dc7e66d5e79a 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index 610f65e8db71e..3f237a5ab742e 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 1882a64591529..34e6095170721 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 3e176be3eddbf..33d0b3250edd0 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index 029cfa86fc6cc..0d67b764d10cb 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 2ca16f2d8cec9..39143cbdffeba 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 813bf0cb3b674..e84b9da070e93 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index c8eeef99cd18c..e597fbb890991 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index 99d3c64bcd234..734c54cbc5052 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 7cd9de70db514..c77b84d287c6a 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index f6fa63616a341..fae9d35eaa1e9 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 3db3fbab28446..5ea7a8bd28424 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index 5fb212a11d89e..e9c4c130f151e 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index cef994502e444..29019370253b1 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 3e373606d15a4..f3355a81da692 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index 7a57728a3b396..6fa02a6fb8f28 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 8e08360e695a4..b88c895d42b8d 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 431d7030eaef8..9d9ce60eba564 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 4a72bb1b0944a..5baf450d5a3b4 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 3d5fb301f8f1b..2115b79d86211 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index c2e129b450bb1..c7c13d3f2a9c6 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 47ded96f6288e..dbedd39795da9 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 2a204db8ffeaa..4e251535c3bc7 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index f70f85c071b6b..49f586853d550 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 285b53ea71e0e..6214001e8ee9f 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 3a9217dbe9732..f6856f68daf20 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 861fa65377f30..500025ca6133d 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index d70746e4df9bd..951b96c2dfe2f 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index 804d859c0a4f5..085acb3c00b4a 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.devdocs.json b/api_docs/kbn_core_lifecycle_browser.devdocs.json index de0a3acb01514..295994fc63a54 100644 --- a/api_docs/kbn_core_lifecycle_browser.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser.devdocs.json @@ -38,63 +38,21 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; registerEventType: (eventTypeOps: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", ") => void; registerShipper: (Shipper: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", ", shipperConfig: ShipperConfig, opts?: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined) => void; registerContextProvider: (contextProviderOpts: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", ") => void; removeContextProvider: (contextProviderName: string) => void; }" ], "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts", @@ -420,23 +378,11 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; }" ], "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 6dd50692711e4..524e138ceecd5 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index b6d5d7da93e67..9ee545865a254 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.devdocs.json b/api_docs/kbn_core_lifecycle_server.devdocs.json index 06d8f6a9bbfbc..bc9633a4c0006 100644 --- a/api_docs/kbn_core_lifecycle_server.devdocs.json +++ b/api_docs/kbn_core_lifecycle_server.devdocs.json @@ -36,63 +36,21 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; registerEventType: (eventTypeOps: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", ") => void; registerShipper: (Shipper: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", ", shipperConfig: ShipperConfig, opts?: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined) => void; registerContextProvider: (contextProviderOpts: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", ") => void; removeContextProvider: (contextProviderName: string) => void; }" ], "path": "packages/core/lifecycle/core-lifecycle-server/src/core_preboot.ts", @@ -211,63 +169,21 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; registerEventType: (eventTypeOps: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", ") => void; registerShipper: (Shipper: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", ", shipperConfig: ShipperConfig, opts?: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined) => void; registerContextProvider: (contextProviderOpts: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", ") => void; removeContextProvider: (contextProviderName: string) => void; }" ], "path": "packages/core/lifecycle/core-lifecycle-server/src/core_setup.ts", @@ -718,23 +634,11 @@ ], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; }" ], "path": "packages/core/lifecycle/core-lifecycle-server/src/core_start.ts", diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 2128422256f0c..b386e0557976c 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index abc667c047000..74795a91451a1 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 97575cdaf8c04..23d0a042b988f 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index cf17cbd49cfff..1715f707860fa 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index 782f8d6542561..e1a9ae9e7d7a7 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index d65f211942c45..91e279957e0e2 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index 5f6ec51418fa0..c0b745d9469b1 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index 9fbe1b4fa3738..ebae1fd1a8084 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 414689dfd3402..4c7968d1e051b 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 8b5177351f11c..e4d5327baa526 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index a3fd35284ae13..c24a69bc6a10b 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index aeca2bcde1d8b..ce7d9ee4d4dc9 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index 54ad2bb55f3b2..3a7671f18aeb2 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 1f5b50c809af3..4d7e776afe1eb 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 57b5ec43dea23..26dfeac08a5cf 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index dad22974c3106..cfd768dc24b86 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index f4974322986ea..68b225c332dc6 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 5665e226f51c2..d39cf23db48f6 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 3d4b7bc5e2ac3..37d3fc99ff219 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index da1e72b64af81..69f062ead8899 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index 0bb269573d411..012fd10f153da 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 1b024ad77bd36..e824ef11770d6 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index 6ea47f6456f8c..97a910ebce3d7 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 95e27629a1223..41a7ebedd8f44 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index 0e0ab116f5343..4967aa98ad239 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index 628bd4b04b8cd..2a39f3aad360f 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index a478dcbf9465a..a7afcee2b6f0d 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index 3543f9ba58209..5ea489116ec46 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index e7bee47ccd548..29146d6fc2aa8 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 1be698bbc5721..077a5219aa2fa 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 8be561c1b75ad..62745a0530a20 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 3051e30695647..31c33fbbc0b0b 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index 7b5933882fae8..b21a7545595e3 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 7cea7b9bdecb7..a92b245497d2d 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 559f79042b838..2917cf20409c6 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index 7eb95c62b312f..4dd973ec0fb7e 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index d8b0364a63dcc..690be2408f69e 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index a330f3fc0db4a..9c9e970ce4893 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index fcc8595bbb859..34d0a626ad38a 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index ad7cdc2315c30..4d23578f78d70 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index ca48f329f0b01..98ec26a82ad69 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index d8c558adc9487..87b91fef56c4a 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 75ebd577f1cf7..a5b497a7bb419 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index c991313f038c5..558e2fb648b07 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index 113b5d3c5f479..4e5deb1524f38 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index cc0aee6ac01f1..39dc535d6f194 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index d8d4e255be39a..1b8e9ecf30ed9 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 6ea999727dbda..cf5c4f599244d 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index 5de7b4a4c3b75..f2537964a457c 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 78671c2123532..2c649e3a7105f 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index d860bd85f9cf3..bd3bff31a4969 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index 0e4b476a178de..77695eeb5e8ef 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index 81340f13d8486..98bfab9d27aeb 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 12537a361d603..9f7c7f424c898 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index d70ed4cf4c1d2..fda8bea201dc9 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index 6ea17270993bb..7207dc9130f1b 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index f8ef237f37c84..ec46a4ec1a3ca 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index 3a2b394039903..84e2bb642ef5a 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index f9adabb4acacf..b955e81200dc5 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 91dd4db504cc1..2fe7aee9f2f7f 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 0992bb0e6c218..968eeb9eed438 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.devdocs.json b/api_docs/kbn_core_status_server_internal.devdocs.json index dddd1a97097d8..63c08a5cd2861 100644 --- a/api_docs/kbn_core_status_server_internal.devdocs.json +++ b/api_docs/kbn_core_status_server_internal.devdocs.json @@ -287,63 +287,21 @@ "description": [], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; registerEventType: (eventTypeOps: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.EventTypeOpts", - "text": "EventTypeOpts" - }, + "EventTypeOpts", ") => void; registerShipper: (Shipper: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ShipperClassConstructor", - "text": "ShipperClassConstructor" - }, + "ShipperClassConstructor", ", shipperConfig: ShipperConfig, opts?: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.RegisterShipperOpts", - "text": "RegisterShipperOpts" - }, + "RegisterShipperOpts", " | undefined) => void; registerContextProvider: (contextProviderOpts: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.ContextProviderOpts", - "text": "ContextProviderOpts" - }, + "ContextProviderOpts", ") => void; removeContextProvider: (contextProviderName: string) => void; }" ], "path": "packages/core/status/core-status-server-internal/src/status_service.ts", diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 2b8f03057d7d6..3adbc1626bfca 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 59ca40efcd57d..4503715ee12ec 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index ec0f8b225d7b3..a20e14d32879d 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index 95c3b396f80a4..3772660ef4c38 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index e32f4ae455f44..16bd64136cd4c 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 87453fd21b01b..2c55e0d48cbf3 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index d5177d2436814..2d602d6959f54 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 2b6f52ca52eb7..305fbd9d6aede 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 159801e5100cc..024eda799383f 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index fdfab56df8a35..bac57935e9e46 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index ef3ac3938bb76..3fc07fc9356ed 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 55797d5ac7776..95bca49e07c8f 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index c92c310a40b3d..5e669e63bf5fd 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index bfebfb7f3e814..10a082b373faa 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index 00389a16eb260..92056d70c1b03 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 9532d204c0fa1..72a387376ebff 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index 9de8decbd2a62..35c61959bf536 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 818b91a232963..e92a4f924a25c 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 67b118638d65e..7b56de1a8b347 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index d201a37c9db39..cac8ab6b1ee51 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser.mdx b/api_docs/kbn_core_user_profile_browser.mdx index b79c6ed7b2ad8..aea54b3c5b8fc 100644 --- a/api_docs/kbn_core_user_profile_browser.mdx +++ b/api_docs/kbn_core_user_profile_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser title: "@kbn/core-user-profile-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser'] --- import kbnCoreUserProfileBrowserObj from './kbn_core_user_profile_browser.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_internal.mdx b/api_docs/kbn_core_user_profile_browser_internal.mdx index 68e0443eabaca..2dc3215493571 100644 --- a/api_docs/kbn_core_user_profile_browser_internal.mdx +++ b/api_docs/kbn_core_user_profile_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-internal title: "@kbn/core-user-profile-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-internal'] --- import kbnCoreUserProfileBrowserInternalObj from './kbn_core_user_profile_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_mocks.mdx b/api_docs/kbn_core_user_profile_browser_mocks.mdx index 2fd7844d8b667..dfa7e9fc2e758 100644 --- a/api_docs/kbn_core_user_profile_browser_mocks.mdx +++ b/api_docs/kbn_core_user_profile_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-mocks title: "@kbn/core-user-profile-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-mocks'] --- import kbnCoreUserProfileBrowserMocksObj from './kbn_core_user_profile_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_common.mdx b/api_docs/kbn_core_user_profile_common.mdx index 445046bcfb406..2e06d121476ad 100644 --- a/api_docs/kbn_core_user_profile_common.mdx +++ b/api_docs/kbn_core_user_profile_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-common title: "@kbn/core-user-profile-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-common'] --- import kbnCoreUserProfileCommonObj from './kbn_core_user_profile_common.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server.mdx b/api_docs/kbn_core_user_profile_server.mdx index bb2b4d1d98b85..c9b1d3f8bb631 100644 --- a/api_docs/kbn_core_user_profile_server.mdx +++ b/api_docs/kbn_core_user_profile_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server title: "@kbn/core-user-profile-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server'] --- import kbnCoreUserProfileServerObj from './kbn_core_user_profile_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_internal.mdx b/api_docs/kbn_core_user_profile_server_internal.mdx index 648145a300e39..42d4dfde74910 100644 --- a/api_docs/kbn_core_user_profile_server_internal.mdx +++ b/api_docs/kbn_core_user_profile_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-internal title: "@kbn/core-user-profile-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-internal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-internal'] --- import kbnCoreUserProfileServerInternalObj from './kbn_core_user_profile_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_mocks.mdx b/api_docs/kbn_core_user_profile_server_mocks.mdx index b17e8b714cc1b..b2b172ab7573c 100644 --- a/api_docs/kbn_core_user_profile_server_mocks.mdx +++ b/api_docs/kbn_core_user_profile_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-mocks title: "@kbn/core-user-profile-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-mocks'] --- import kbnCoreUserProfileServerMocksObj from './kbn_core_user_profile_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index e552a3d3eaeaa..354e91babdd67 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 39eefe243f208..00cc0f33ff8ca 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index b8a0cc2d5f766..5aebe415f2d64 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index a6434ae5fc75b..851d0bdc2dc3a 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_icons.mdx b/api_docs/kbn_custom_icons.mdx index 7b08c4ac57e1d..1b90d8cb7fd8a 100644 --- a/api_docs/kbn_custom_icons.mdx +++ b/api_docs/kbn_custom_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-icons title: "@kbn/custom-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-icons plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-icons'] --- import kbnCustomIconsObj from './kbn_custom_icons.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index f7542d8729623..20b03159eb028 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 33cca2139dac4..c55234df617e8 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_forge.mdx b/api_docs/kbn_data_forge.mdx index 4f39850c75424..38759e9a766f6 100644 --- a/api_docs/kbn_data_forge.mdx +++ b/api_docs/kbn_data_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-forge title: "@kbn/data-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-forge plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-forge'] --- import kbnDataForgeObj from './kbn_data_forge.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index 44981977919b5..3b65a80daa262 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_data_stream_adapter.mdx b/api_docs/kbn_data_stream_adapter.mdx index 1acfdf6490d1d..879bc689099bd 100644 --- a/api_docs/kbn_data_stream_adapter.mdx +++ b/api_docs/kbn_data_stream_adapter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-stream-adapter title: "@kbn/data-stream-adapter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-stream-adapter plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-stream-adapter'] --- import kbnDataStreamAdapterObj from './kbn_data_stream_adapter.devdocs.json'; diff --git a/api_docs/kbn_data_view_utils.mdx b/api_docs/kbn_data_view_utils.mdx index 902777dcf3e38..61c7cd85c2e8a 100644 --- a/api_docs/kbn_data_view_utils.mdx +++ b/api_docs/kbn_data_view_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-view-utils title: "@kbn/data-view-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-view-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-view-utils'] --- import kbnDataViewUtilsObj from './kbn_data_view_utils.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 904c026e73bc0..0a56f13311eda 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index 523faf00e20a8..a3fc2cc2cfce1 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index 1df804579b87f..3b5b138f9f123 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx index 5ef95ed7ed41f..72da07c03c3c5 100644 --- a/api_docs/kbn_deeplinks_fleet.mdx +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-fleet title: "@kbn/deeplinks-fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-fleet plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 2db9a33551eca..3ffd767d46b58 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index 50690bc0236ec..2c08b2a130fc6 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index b269a81c0d3d0..1ba8d402e0b68 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index 34d9608a369b2..59efc45580545 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx index 3fcd5ad29e59e..47708265bfbc9 100644 --- a/api_docs/kbn_deeplinks_security.mdx +++ b/api_docs/kbn_deeplinks_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-security title: "@kbn/deeplinks-security" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-security plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] --- import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx index fc6dcf2fd9210..881ba3ef671a5 100644 --- a/api_docs/kbn_deeplinks_shared.mdx +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-shared title: "@kbn/deeplinks-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-shared plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] --- import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index d01c598379102..feece7b451687 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index 74e469f21d33f..1c8c332b72815 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index 486aacb1058bd..2fff94670b39d 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index 8e278606ef5c5..5b596063fe405 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 5cb51db937593..a9633013803ee 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 93fca28e724e1..c77ced15aeb4d 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 97cb166861df6..a6518165afdd4 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index bac986a33549d..4c582dfae3afd 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 4383e3ca9e60a..3702aa5c157f2 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 9398b9da2b34b..df696bff0b20e 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.devdocs.json b/api_docs/kbn_docs_utils.devdocs.json index da6dd5935a733..1afbc1016d3d3 100644 --- a/api_docs/kbn_docs_utils.devdocs.json +++ b/api_docs/kbn_docs_utils.devdocs.json @@ -9,19 +9,11 @@ "objects": [] }, "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { "classes": [], "functions": [ { "parentPluginId": "@kbn/docs-utils", - "id": "def-common.findPlugins", + "id": "def-server.findPlugins", "type": "Function", "tags": [], "label": "findPlugins", @@ -37,7 +29,7 @@ "children": [ { "parentPluginId": "@kbn/docs-utils", - "id": "def-common.findPlugins.$1", + "id": "def-server.findPlugins.$1", "type": "Array", "tags": [], "label": "pluginOrPackageFilter", @@ -56,7 +48,7 @@ }, { "parentPluginId": "@kbn/docs-utils", - "id": "def-common.findTeamPlugins", + "id": "def-server.findTeamPlugins", "type": "Function", "tags": [], "label": "findTeamPlugins", @@ -72,7 +64,7 @@ "children": [ { "parentPluginId": "@kbn/docs-utils", - "id": "def-common.findTeamPlugins.$1", + "id": "def-server.findTeamPlugins.$1", "type": "string", "tags": [], "label": "team", @@ -91,7 +83,7 @@ }, { "parentPluginId": "@kbn/docs-utils", - "id": "def-common.runBuildApiDocsCli", + "id": "def-server.runBuildApiDocsCli", "type": "Function", "tags": [], "label": "runBuildApiDocsCli", @@ -111,5 +103,13 @@ "enums": [], "misc": [], "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] } } \ No newline at end of file diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 8b19ce5140ade..6639ee0673221 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; @@ -23,8 +23,8 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban |-------------------|-----------|------------------------|-----------------| | 5 | 0 | 5 | 1 | -## Common +## Server ### Functions - + diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index ec06d911e71dd..3a2016ae678c6 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.devdocs.json b/api_docs/kbn_ebt_tools.devdocs.json index 44363fefececf..4accaa3356967 100644 --- a/api_docs/kbn_ebt_tools.devdocs.json +++ b/api_docs/kbn_ebt_tools.devdocs.json @@ -64,13 +64,7 @@ ], "signature": [ "(analytics: Pick<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.IAnalyticsClient", - "text": "IAnalyticsClient" - }, + "IAnalyticsClient", ", \"registerEventType\">) => void" ], "path": "packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts", @@ -88,13 +82,7 @@ ], "signature": [ "Pick<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.IAnalyticsClient", - "text": "IAnalyticsClient" - }, + "IAnalyticsClient", ", \"registerEventType\">" ], "path": "packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts", @@ -117,13 +105,7 @@ ], "signature": [ "(analytics: Pick<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.IAnalyticsClient", - "text": "IAnalyticsClient" - }, + "IAnalyticsClient", ", \"reportEvent\">, eventData: ", { "pluginId": "@kbn/ebt-tools", @@ -149,13 +131,7 @@ ], "signature": [ "Pick<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.IAnalyticsClient", - "text": "IAnalyticsClient" - }, + "IAnalyticsClient", ", \"reportEvent\">" ], "path": "packages/kbn-ebt-tools/src/performance_metric_events/helpers.ts", diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 20c2d479d7132..78fd52bffc735 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 57eca41526b8e..da3abe3790c23 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_agent_utils.mdx b/api_docs/kbn_elastic_agent_utils.mdx index 278dcd540da9d..9272a8fe364c1 100644 --- a/api_docs/kbn_elastic_agent_utils.mdx +++ b/api_docs/kbn_elastic_agent_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-agent-utils title: "@kbn/elastic-agent-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-agent-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-agent-utils'] --- import kbnElasticAgentUtilsObj from './kbn_elastic_agent_utils.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index 9f2d48fb85bdf..54405de5f412d 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant_common.devdocs.json b/api_docs/kbn_elastic_assistant_common.devdocs.json index 7ba7ee84ca6e9..703a1f2b44cd4 100644 --- a/api_docs/kbn_elastic_assistant_common.devdocs.json +++ b/api_docs/kbn_elastic_assistant_common.devdocs.json @@ -4205,7 +4205,7 @@ "\nDefault features available to the elastic assistant" ], "signature": [ - "{ readonly assistantKnowledgeBaseByDefault: false; readonly assistantModelEvaluation: false; readonly assistantBedrockChat: false; }" + "{ readonly assistantKnowledgeBaseByDefault: false; readonly assistantModelEvaluation: false; readonly assistantBedrockChat: true; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts", "deprecated": false, diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index d09ea433dfe84..a3be49909b28f 100644 --- a/api_docs/kbn_elastic_assistant_common.mdx +++ b/api_docs/kbn_elastic_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant-common title: "@kbn/elastic-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_entities_schema.devdocs.json b/api_docs/kbn_entities_schema.devdocs.json index f8a943faf01b5..5a095101476e4 100644 --- a/api_docs/kbn_entities_schema.devdocs.json +++ b/api_docs/kbn_entities_schema.devdocs.json @@ -18,7 +18,41 @@ }, "common": { "classes": [], - "functions": [], + "functions": [ + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.durationSchemaWithMinimum", + "type": "Function", + "tags": [], + "label": "durationSchemaWithMinimum", + "description": [], + "signature": [ + "(minimumMinutes: number) => Zod.ZodEffects" + ], + "path": "x-pack/packages/kbn-entities-schema/src/schema/common.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.durationSchemaWithMinimum.$1", + "type": "number", + "tags": [], + "label": "minimumMinutes", + "description": [], + "signature": [ + "number" + ], + "path": "x-pack/packages/kbn-entities-schema/src/schema/common.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], "interfaces": [], "enums": [ { @@ -43,7 +77,7 @@ "label": "EntityDefinition", "description": [], "signature": [ - "{ id: string; type: string; version: string; name: string; history: { interval: moment.Duration; timestampField: string; settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: moment.Duration | undefined; backfillFrequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; filter?: string | undefined; description?: string | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", + "{ id: string; type: string; version: string; name: string; history: { interval: string; settings: { lookbackPeriod: string; frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }; timestampField: string; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; filter?: string | undefined; description?: string | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", { "pluginId": "@kbn/entities-schema", "scope": "common", @@ -236,7 +270,7 @@ "label": "durationSchema", "description": [], "signature": [ - "Zod.ZodEffects" + "Zod.ZodString" ], "path": "x-pack/packages/kbn-entities-schema/src/schema/common.ts", "deprecated": false, @@ -291,7 +325,7 @@ "section": "def-common.BasicAggregations", "text": "BasicAggregations" }, - "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }>, \"many\">>; staticFields: Zod.ZodOptional>; managed: Zod.ZodDefault>; history: Zod.ZodObject<{ timestampField: Zod.ZodString; interval: Zod.ZodEffects, moment.Duration, string>; settings: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; backfillSyncDelay: Zod.ZodOptional; backfillLookbackPeriod: Zod.ZodOptional>; backfillFrequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: moment.Duration | undefined; backfillFrequency?: string | undefined; }, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { interval: moment.Duration; timestampField: string; settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: moment.Duration | undefined; backfillFrequency?: string | undefined; } | undefined; }, { interval: string; timestampField: string; settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; } | undefined; }>; latest: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; }, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; } | undefined; }, { settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; } | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; type: string; version: string; name: string; history: { interval: moment.Duration; timestampField: string; settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: moment.Duration | undefined; backfillFrequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; filter?: string | undefined; description?: string | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", + "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }>, \"many\">>; staticFields: Zod.ZodOptional>; managed: Zod.ZodDefault>; history: Zod.ZodObject<{ timestampField: Zod.ZodString; interval: Zod.ZodEffects; settings: Zod.ZodEffects; syncDelay: Zod.ZodOptional; lookbackPeriod: Zod.ZodDefault>; frequency: Zod.ZodOptional; backfillSyncDelay: Zod.ZodOptional; backfillLookbackPeriod: Zod.ZodOptional; backfillFrequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { lookbackPeriod: string; frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; lookbackPeriod?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }>>, { lookbackPeriod: string; frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; lookbackPeriod?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; } | undefined>; }, \"strip\", Zod.ZodTypeAny, { interval: string; settings: { lookbackPeriod: string; frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }; timestampField: string; }, { interval: string; timestampField: string; settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; lookbackPeriod?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; } | undefined; }>; latest: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; }, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; } | undefined; }, { settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; } | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; type: string; version: string; name: string; history: { interval: string; settings: { lookbackPeriod: string; frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }; timestampField: string; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; filter?: string | undefined; description?: string | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", { "pluginId": "@kbn/entities-schema", "scope": "common", @@ -299,7 +333,7 @@ "section": "def-common.BasicAggregations", "text": "BasicAggregations" }, - "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }[] | undefined; metadata?: ({ destination: string; limit: number; source: string; } | { source: string; destination: string; limit: number; })[] | undefined; latest?: { settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; } | undefined; } | undefined; staticFields?: Record | undefined; }, { id: string; type: string; version: string; name: string; history: { interval: string; timestampField: string; settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; } | undefined; }; indexPatterns: string[]; identityFields: (string | { field: string; optional: boolean; })[]; displayNameTemplate: string; filter?: string | undefined; description?: string | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", + "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }[] | undefined; metadata?: ({ destination: string; limit: number; source: string; } | { source: string; destination: string; limit: number; })[] | undefined; latest?: { settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; } | undefined; } | undefined; staticFields?: Record | undefined; }, { id: string; type: string; version: string; name: string; history: { interval: string; timestampField: string; settings?: { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; lookbackPeriod?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; } | undefined; }; indexPatterns: string[]; identityFields: (string | { field: string; optional: boolean; })[]; displayNameTemplate: string; filter?: string | undefined; description?: string | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", { "pluginId": "@kbn/entities-schema", "scope": "common", @@ -374,6 +408,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.historySettingsSchema", + "type": "Object", + "tags": [], + "label": "historySettingsSchema", + "description": [], + "signature": [ + "Zod.ZodEffects; syncDelay: Zod.ZodOptional; lookbackPeriod: Zod.ZodDefault>; frequency: Zod.ZodOptional; backfillSyncDelay: Zod.ZodOptional; backfillLookbackPeriod: Zod.ZodOptional; backfillFrequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { lookbackPeriod: string; frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; lookbackPeriod?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }>>, { lookbackPeriod: string; frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; }, { frequency?: string | undefined; syncDelay?: string | undefined; syncField?: string | undefined; lookbackPeriod?: string | undefined; backfillSyncDelay?: string | undefined; backfillLookbackPeriod?: string | undefined; backfillFrequency?: string | undefined; } | undefined>" + ], + "path": "x-pack/packages/kbn-entities-schema/src/schema/common.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/entities-schema", "id": "def-common.identityFieldsSchema", diff --git a/api_docs/kbn_entities_schema.mdx b/api_docs/kbn_entities_schema.mdx index 7c817b8381226..0e1d28098a824 100644 --- a/api_docs/kbn_entities_schema.mdx +++ b/api_docs/kbn_entities_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-entities-schema title: "@kbn/entities-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/entities-schema plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/entities-schema'] --- import kbnEntitiesSchemaObj from './kbn_entities_schema.devdocs.json'; @@ -21,13 +21,16 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 23 | 0 | 23 | 0 | +| 26 | 0 | 26 | 0 | ## Common ### Objects +### Functions + + ### Enums diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index a271f46def043..214a8ad72f817 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index fe3b02e1c0dc8..5773b1879d55a 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 39c3f2ec4badd..6dbe382f3f03f 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 0c289846574ee..9b3298d3d8676 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index d311d2550b77d..60356753323cd 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 21e23b12943a4..b7aa16b6b2e66 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index e502b160b9ff5..bb4444bab7146 100644 --- a/api_docs/kbn_esql_ast.mdx +++ b/api_docs/kbn_esql_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-ast title: "@kbn/esql-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-ast plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index bf4b7665b7797..70edfdeeee18f 100644 --- a/api_docs/kbn_esql_utils.mdx +++ b/api_docs/kbn_esql_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-utils title: "@kbn/esql-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index 6aaab51bcdff2..2f4602125a193 100644 --- a/api_docs/kbn_esql_validation_autocomplete.mdx +++ b/api_docs/kbn_esql_validation_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-validation-autocomplete title: "@kbn/esql-validation-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-validation-autocomplete plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 0a48132690e74..db36114f70d72 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index 48af2667571b7..9139481567930 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index bfc01bbba333b..2049c52301262 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index c7473b6186af5..c0b0c5a080cef 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index ef16b59aafc46..59dc098e2d068 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index f1a04c25c8d04..48990a149ad1c 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_formatters.mdx b/api_docs/kbn_formatters.mdx index 100c126e5fa13..e34d143b66d96 100644 --- a/api_docs/kbn_formatters.mdx +++ b/api_docs/kbn_formatters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-formatters title: "@kbn/formatters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/formatters plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/formatters'] --- import kbnFormattersObj from './kbn_formatters.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index de9c05b48031a..23dfe1b591029 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index 3093134dc68ea..871fe27927658 100644 --- a/api_docs/kbn_ftr_common_functional_ui_services.mdx +++ b/api_docs/kbn_ftr_common_functional_ui_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-ui-services title: "@kbn/ftr-common-functional-ui-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-ui-services plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-ui-services'] --- import kbnFtrCommonFunctionalUiServicesObj from './kbn_ftr_common_functional_ui_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index e65436c9b7199..fda7a7ac727b5 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index 5faf8b64345da..f6ec1aa4942ff 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index b70c342917440..2211492963085 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_grouping.mdx b/api_docs/kbn_grouping.mdx index a5eb7dd72f378..26c22b58035c3 100644 --- a/api_docs/kbn_grouping.mdx +++ b/api_docs/kbn_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-grouping title: "@kbn/grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/grouping plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/grouping'] --- import kbnGroupingObj from './kbn_grouping.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 6f7cbe11af0a2..a7c6b987506a0 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index b9c50d7e674cd..61c6732cdfcd4 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index 29443897a35fd..f565f144f55e0 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index eb8ec77be9b0c..08d70dbda6cc4 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 6b5d84df88f2a..b5b2e23b0e391 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index fa228667a6e10..633e4743e068a 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index a836477cbf880..1567b6dc094a0 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index 7e83473ded804..3c0c936343d50 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index e10e6308767a6..6eb81da9ddf16 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_management.mdx b/api_docs/kbn_index_management.mdx index 78f667ca3b5aa..b31e60a771f9a 100644 --- a/api_docs/kbn_index_management.mdx +++ b/api_docs/kbn_index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-management title: "@kbn/index-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-management plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management'] --- import kbnIndexManagementObj from './kbn_index_management.devdocs.json'; diff --git a/api_docs/kbn_inference_integration_flyout.mdx b/api_docs/kbn_inference_integration_flyout.mdx index 0e5b996614bcb..4ab881401629d 100644 --- a/api_docs/kbn_inference_integration_flyout.mdx +++ b/api_docs/kbn_inference_integration_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference_integration_flyout title: "@kbn/inference_integration_flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference_integration_flyout plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference_integration_flyout'] --- import kbnInferenceIntegrationFlyoutObj from './kbn_inference_integration_flyout.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index 2f5713a560cb7..ab95f21675339 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 375b18041dee7..9afb2ace22add 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 19bad669a4907..2af389c7744bc 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_ipynb.mdx b/api_docs/kbn_ipynb.mdx index c687476587f57..bb4afd28e8217 100644 --- a/api_docs/kbn_ipynb.mdx +++ b/api_docs/kbn_ipynb.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ipynb title: "@kbn/ipynb" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ipynb plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ipynb'] --- import kbnIpynbObj from './kbn_ipynb.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index bc7ba4c9059d8..90b37498d26ae 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index fbb57a16110f7..0e5eea496469a 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index 3fc4877551468..6ba93c58e4482 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_json_schemas.mdx b/api_docs/kbn_json_schemas.mdx index b340ed96bc5f3..19e7c60427595 100644 --- a/api_docs/kbn_json_schemas.mdx +++ b/api_docs/kbn_json_schemas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-schemas title: "@kbn/json-schemas" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-schemas plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-schemas'] --- import kbnJsonSchemasObj from './kbn_json_schemas.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 63b30528b6c16..3e95aba1cf0b9 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index 95737e90d1f4a..e220688d38087 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index 0947e84df8a5d..7670e0d43d0ad 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_lens_formula_docs.mdx b/api_docs/kbn_lens_formula_docs.mdx index c55d2157d3856..4ca520a65926b 100644 --- a/api_docs/kbn_lens_formula_docs.mdx +++ b/api_docs/kbn_lens_formula_docs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-formula-docs title: "@kbn/lens-formula-docs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-formula-docs plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-formula-docs'] --- import kbnLensFormulaDocsObj from './kbn_lens_formula_docs.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 517e89359c988..c5307109b670a 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index be848204da64d..cb90d4b810342 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_content_badge.mdx b/api_docs/kbn_managed_content_badge.mdx index 7e1b6808281f3..0467c4a466e17 100644 --- a/api_docs/kbn_managed_content_badge.mdx +++ b/api_docs/kbn_managed_content_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-content-badge title: "@kbn/managed-content-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-content-badge plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-content-badge'] --- import kbnManagedContentBadgeObj from './kbn_managed_content_badge.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index 07e0b131490ad..8086b61bb2e28 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index 4c7fdde6e16e8..1cd7ba9911d9b 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index d329595d4105d..30dffcc876a54 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index aeced829bc8ef..70763d0b25267 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index cf057f90d2e7f..97fac3292f4c0 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index 324ca6a3720ce..4c98218aaa495 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index 5545c7ed0a820..0923c34f8129e 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index 88900122ca9bd..84ebb57b997b4 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 0f93901a5854a..cd3360e9fa88b 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index 159bac4f7118d..d8386339ed357 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index ec11d18de12f7..25a47343eba81 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index 0f0e12cc8fbb0..49641710d83dd 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index 07ecec37d32e0..8e6d61bc9f487 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 36bdad273646b..03b640eb7b6e3 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index 1aed3d15aa103..2bc705f8aee9a 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index f111626328740..0371132f74f6d 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index 07ca3a4cd8bc0..0ffa23e91f349 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_cancellable_search.mdx b/api_docs/kbn_ml_cancellable_search.mdx index 63f8011ddd6df..cf20fd2deb0eb 100644 --- a/api_docs/kbn_ml_cancellable_search.mdx +++ b/api_docs/kbn_ml_cancellable_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-cancellable-search title: "@kbn/ml-cancellable-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-cancellable-search plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-cancellable-search'] --- import kbnMlCancellableSearchObj from './kbn_ml_cancellable_search.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index 7bef7dcbd56cd..76218b1fc75f0 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 5a3c2b9acb8f9..2f5032a4516bb 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index c1308977a1a5f..48fe5ab837721 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index d4294b7a56337..c024022721ff0 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index ad669b61d48c9..65d4c142ae313 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 8c44aceb446f9..c74c7e7db1049 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index 1440e21ad6309..be163bdf86264 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 4b81f36a8ae27..dfde51856a67c 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index f1e03f2258d67..32fdc5f6a5747 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 044db1fca16c7..a15bbde96f51a 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index 91bfac7e5e409..74652218b0d5d 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index 4e45555b68565..ec9d380ee1744 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 8eb0bb825352a..6798e7b4d65d6 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index d4484218862ae..118b2e767db7b 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index fc667de3cb96e..024b172af528e 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index 9a64aa0240097..27f912784b201 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index 7495d7f88b6a5..2fc1435757a5b 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index c1aa39132a3c5..4df6c75f4cb85 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index eb591caba86f0..3c77532ed2288 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_time_buckets.mdx b/api_docs/kbn_ml_time_buckets.mdx index c8877f11557ec..9033be728dc96 100644 --- a/api_docs/kbn_ml_time_buckets.mdx +++ b/api_docs/kbn_ml_time_buckets.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-time-buckets title: "@kbn/ml-time-buckets" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-time-buckets plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-time-buckets'] --- import kbnMlTimeBucketsObj from './kbn_ml_time_buckets.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.devdocs.json b/api_docs/kbn_ml_trained_models_utils.devdocs.json index ae77700bbd77e..e8158b9a149ec 100644 --- a/api_docs/kbn_ml_trained_models_utils.devdocs.json +++ b/api_docs/kbn_ml_trained_models_utils.devdocs.json @@ -459,7 +459,7 @@ "label": "InferenceAPIConfigResponse", "description": [], "signature": [ - "{ model_id: string; task_type: \"sparse_embedding\" | \"text_embedding\"; task_settings: { model?: string | undefined; }; } & ", + "{ inference_id: string; task_type: \"sparse_embedding\" | \"text_embedding\"; task_settings: { model?: string | undefined; }; } & ", "InferenceServiceSettings" ], "path": "x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts", diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 9e319294ce668..14c75d20bf72e 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_ui_actions.mdx b/api_docs/kbn_ml_ui_actions.mdx index 6b4b3598b9042..3716fc0eb1187 100644 --- a/api_docs/kbn_ml_ui_actions.mdx +++ b/api_docs/kbn_ml_ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-ui-actions title: "@kbn/ml-ui-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-ui-actions plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-ui-actions'] --- import kbnMlUiActionsObj from './kbn_ml_ui_actions.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index d6285e2d73708..b04874db14a9d 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index cd97aa589cf1c..17112ef2122b9 100644 --- a/api_docs/kbn_mock_idp_utils.mdx +++ b/api_docs/kbn_mock_idp_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mock-idp-utils title: "@kbn/mock-idp-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mock-idp-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mock-idp-utils'] --- import kbnMockIdpUtilsObj from './kbn_mock_idp_utils.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 22cf7b21798a8..26bc748ab2ed1 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index 35540943db54e..88e051bf6492d 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index 7e78fae26a19e..929d7f97239a3 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_rule_utils.mdx b/api_docs/kbn_observability_alerting_rule_utils.mdx index cdb6f37acbde2..d5f3604bf61f8 100644 --- a/api_docs/kbn_observability_alerting_rule_utils.mdx +++ b/api_docs/kbn_observability_alerting_rule_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-rule-utils title: "@kbn/observability-alerting-rule-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-rule-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-rule-utils'] --- import kbnObservabilityAlertingRuleUtilsObj from './kbn_observability_alerting_rule_utils.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index 62715488ea384..54116c2d3cc2a 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx index fad3b2e3c122a..29d58c5478d84 100644 --- a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx +++ b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-get-padded-alert-time-range-util title: "@kbn/observability-get-padded-alert-time-range-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-get-padded-alert-time-range-util plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-get-padded-alert-time-range-util'] --- import kbnObservabilityGetPaddedAlertTimeRangeUtilObj from './kbn_observability_get_padded_alert_time_range_util.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.devdocs.json b/api_docs/kbn_openapi_bundler.devdocs.json index dd50a60833f72..9d455aa69f752 100644 --- a/api_docs/kbn_openapi_bundler.devdocs.json +++ b/api_docs/kbn_openapi_bundler.devdocs.json @@ -209,9 +209,7 @@ "label": "options", "description": [], "signature": [ - "{ mergedSpecInfo?: Partial<", - "OpenAPIV3", - ".InfoObject> | undefined; } | undefined" + "MergerOptions | undefined" ], "path": "packages/kbn-openapi-bundler/src/openapi_merger.ts", "deprecated": false, diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index 8a121034c3140..63372b1210d96 100644 --- a/api_docs/kbn_openapi_bundler.mdx +++ b/api_docs/kbn_openapi_bundler.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-bundler title: "@kbn/openapi-bundler" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-bundler plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-bundler'] --- import kbnOpenapiBundlerObj from './kbn_openapi_bundler.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index ce0bd2c505dac..ef42b97d161ed 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 88891905f3227..8ff9bf100e506 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index 13dc97e915ffb..037622fd31c00 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index afa97bbb88cd7..ba5dce47ca90c 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_panel_loader.mdx b/api_docs/kbn_panel_loader.mdx index f27e8c87612c8..afaefffa851a0 100644 --- a/api_docs/kbn_panel_loader.mdx +++ b/api_docs/kbn_panel_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-panel-loader title: "@kbn/panel-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/panel-loader plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/panel-loader'] --- import kbnPanelLoaderObj from './kbn_panel_loader.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 972c14dbf3bcf..ced9ea2096371 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_check.devdocs.json b/api_docs/kbn_plugin_check.devdocs.json index 28ee612a740a9..794be230733e3 100644 --- a/api_docs/kbn_plugin_check.devdocs.json +++ b/api_docs/kbn_plugin_check.devdocs.json @@ -9,19 +9,11 @@ "objects": [] }, "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { "classes": [], "functions": [ { "parentPluginId": "@kbn/plugin-check", - "id": "def-common.runPluginCheckCli", + "id": "def-server.runPluginCheckCli", "type": "Function", "tags": [], "label": "runPluginCheckCli", @@ -43,5 +35,13 @@ "enums": [], "misc": [], "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] } } \ No newline at end of file diff --git a/api_docs/kbn_plugin_check.mdx b/api_docs/kbn_plugin_check.mdx index d38e52315ac85..a304910a3b910 100644 --- a/api_docs/kbn_plugin_check.mdx +++ b/api_docs/kbn_plugin_check.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-check title: "@kbn/plugin-check" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-check plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-check'] --- import kbnPluginCheckObj from './kbn_plugin_check.devdocs.json'; @@ -23,8 +23,8 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh |-------------------|-----------|------------------------|-----------------| | 1 | 0 | 0 | 0 | -## Common +## Server ### Functions - + diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 44029ed794bd4..d5bbad482ee41 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index cb8e508211b59..3c7a419673b26 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index 6217bb699b25c..4e68a0fefd030 100644 --- a/api_docs/kbn_presentation_containers.mdx +++ b/api_docs/kbn_presentation_containers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-containers title: "@kbn/presentation-containers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-containers plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index bc7fe94ff1495..ed6992cac46ed 100644 --- a/api_docs/kbn_presentation_publishing.mdx +++ b/api_docs/kbn_presentation_publishing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-publishing title: "@kbn/presentation-publishing" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-publishing plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index f44bfa36edafa..e2fd9d147e53c 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index d0317fb886b8d..50dd8c3b2b1e3 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index c67cee09b34f0..028e42093ac0c 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_hooks.mdx b/api_docs/kbn_react_hooks.mdx index 6c09de91e2e03..9c5f50ccf4a76 100644 --- a/api_docs/kbn_react_hooks.mdx +++ b/api_docs/kbn_react_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-hooks title: "@kbn/react-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-hooks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-hooks'] --- import kbnReactHooksObj from './kbn_react_hooks.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index eacf24e2ff5a4..dccb65f1c17d0 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index f84e3a0ac4ff9..94ef39a423494 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index 33a83393e1057..efc90b0f417cc 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index f842545a09b73..441d7749cd2db 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index 38a9d4bc4945a..0c164461e518d 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 006305524b986..ffafc49224a26 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_recently_accessed.mdx b/api_docs/kbn_recently_accessed.mdx index adf8fe5077fa0..c7b17419dfd44 100644 --- a/api_docs/kbn_recently_accessed.mdx +++ b/api_docs/kbn_recently_accessed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-recently-accessed title: "@kbn/recently-accessed" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/recently-accessed plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/recently-accessed'] --- import kbnRecentlyAccessedObj from './kbn_recently_accessed.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index d93d2db17f124..7b6772c584e41 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index 812e529b58efb..3d658d9ffdddd 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index 9ce6f4ea5a7a1..fb99cfdec10b6 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 7b94869efb09a..2d16f740bc07e 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index 9ba7494da69ef..f351d40946874 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_csv_share_panel.mdx b/api_docs/kbn_reporting_csv_share_panel.mdx index a79dff7d86168..403f39c790a03 100644 --- a/api_docs/kbn_reporting_csv_share_panel.mdx +++ b/api_docs/kbn_reporting_csv_share_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-csv-share-panel title: "@kbn/reporting-csv-share-panel" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-csv-share-panel plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-csv-share-panel'] --- import kbnReportingCsvSharePanelObj from './kbn_reporting_csv_share_panel.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 028eb8ebfb66f..af23e79a469bb 100644 --- a/api_docs/kbn_reporting_export_types_csv.mdx +++ b/api_docs/kbn_reporting_export_types_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv title: "@kbn/reporting-export-types-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv'] --- import kbnReportingExportTypesCsvObj from './kbn_reporting_export_types_csv.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv_common.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index 61ec22de4468d..b1d4296f5e470 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.mdx +++ b/api_docs/kbn_reporting_export_types_csv_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv-common title: "@kbn/reporting-export-types-csv-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index 645cdbb215dae..e7beab352a9d8 100644 --- a/api_docs/kbn_reporting_export_types_pdf.mdx +++ b/api_docs/kbn_reporting_export_types_pdf.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf title: "@kbn/reporting-export-types-pdf" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf'] --- import kbnReportingExportTypesPdfObj from './kbn_reporting_export_types_pdf.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf_common.mdx b/api_docs/kbn_reporting_export_types_pdf_common.mdx index 632048c6cc368..cffb408f513cf 100644 --- a/api_docs/kbn_reporting_export_types_pdf_common.mdx +++ b/api_docs/kbn_reporting_export_types_pdf_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf-common title: "@kbn/reporting-export-types-pdf-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf-common'] --- import kbnReportingExportTypesPdfCommonObj from './kbn_reporting_export_types_pdf_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index d82740a0f278d..303cf833316b1 100644 --- a/api_docs/kbn_reporting_export_types_png.mdx +++ b/api_docs/kbn_reporting_export_types_png.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png title: "@kbn/reporting-export-types-png" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png'] --- import kbnReportingExportTypesPngObj from './kbn_reporting_export_types_png.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png_common.mdx b/api_docs/kbn_reporting_export_types_png_common.mdx index ba95ffa1cfc0d..1a1566dfdb2de 100644 --- a/api_docs/kbn_reporting_export_types_png_common.mdx +++ b/api_docs/kbn_reporting_export_types_png_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png-common title: "@kbn/reporting-export-types-png-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png-common'] --- import kbnReportingExportTypesPngCommonObj from './kbn_reporting_export_types_png_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index 026322d91d840..c46ded0081348 100644 --- a/api_docs/kbn_reporting_mocks_server.mdx +++ b/api_docs/kbn_reporting_mocks_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-mocks-server title: "@kbn/reporting-mocks-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-mocks-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-mocks-server'] --- import kbnReportingMocksServerObj from './kbn_reporting_mocks_server.devdocs.json'; diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index f3591af2062cb..4f4dfad73e355 100644 --- a/api_docs/kbn_reporting_public.mdx +++ b/api_docs/kbn_reporting_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-public title: "@kbn/reporting-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-public plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index fa3d83f3456be..83f3afe2c13e6 100644 --- a/api_docs/kbn_reporting_server.mdx +++ b/api_docs/kbn_reporting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-server title: "@kbn/reporting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index b37c848c7bf7e..293cdb3f68109 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_response_ops_feature_flag_service.mdx b/api_docs/kbn_response_ops_feature_flag_service.mdx index b08ec20208150..4393498ff91dc 100644 --- a/api_docs/kbn_response_ops_feature_flag_service.mdx +++ b/api_docs/kbn_response_ops_feature_flag_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-response-ops-feature-flag-service title: "@kbn/response-ops-feature-flag-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/response-ops-feature-flag-service plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/response-ops-feature-flag-service'] --- import kbnResponseOpsFeatureFlagServiceObj from './kbn_response_ops_feature_flag_service.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 974db7be301fc..3b29506dff6b4 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rollup.mdx b/api_docs/kbn_rollup.mdx index 8da8bb52414c1..0867f1c9369bf 100644 --- a/api_docs/kbn_rollup.mdx +++ b/api_docs/kbn_rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rollup title: "@kbn/rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rollup plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rollup'] --- import kbnRollupObj from './kbn_rollup.devdocs.json'; diff --git a/api_docs/kbn_router_to_openapispec.mdx b/api_docs/kbn_router_to_openapispec.mdx index 867fb75bc08bb..d789d5bfd8a3a 100644 --- a/api_docs/kbn_router_to_openapispec.mdx +++ b/api_docs/kbn_router_to_openapispec.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-to-openapispec title: "@kbn/router-to-openapispec" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-to-openapispec plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-to-openapispec'] --- import kbnRouterToOpenapispecObj from './kbn_router_to_openapispec.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index e5c4d33708fa6..78b4382721823 100644 --- a/api_docs/kbn_router_utils.mdx +++ b/api_docs/kbn_router_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-utils title: "@kbn/router-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-utils'] --- import kbnRouterUtilsObj from './kbn_router_utils.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index a6cc8683ff9ae..bda7ef8e0a1f0 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 95fd393e44a4f..7795583ec45dd 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index a679e730118ea..baadb225583bf 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 66282e92d3e78..7d2c51b325582 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 87a453cb6f887..8a3844dadafb8 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index 5737a07c0c185..564f4b36cb698 100644 --- a/api_docs/kbn_search_errors.mdx +++ b/api_docs/kbn_search_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-errors title: "@kbn/search-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-errors plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-errors'] --- import kbnSearchErrorsObj from './kbn_search_errors.devdocs.json'; diff --git a/api_docs/kbn_search_index_documents.mdx b/api_docs/kbn_search_index_documents.mdx index 3ea0bb629272f..84fea22378875 100644 --- a/api_docs/kbn_search_index_documents.mdx +++ b/api_docs/kbn_search_index_documents.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-index-documents title: "@kbn/search-index-documents" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-index-documents plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-index-documents'] --- import kbnSearchIndexDocumentsObj from './kbn_search_index_documents.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index 5aba9be63c6dd..b191268b3cb33 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_search_types.mdx b/api_docs/kbn_search_types.mdx index 12032fac42b29..f394b99c94901 100644 --- a/api_docs/kbn_search_types.mdx +++ b/api_docs/kbn_search_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-types title: "@kbn/search-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-types'] --- import kbnSearchTypesObj from './kbn_search_types.devdocs.json'; diff --git a/api_docs/kbn_security_api_key_management.mdx b/api_docs/kbn_security_api_key_management.mdx index c86e68d54c29d..2eb562193e339 100644 --- a/api_docs/kbn_security_api_key_management.mdx +++ b/api_docs/kbn_security_api_key_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-api-key-management title: "@kbn/security-api-key-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-api-key-management plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-api-key-management'] --- import kbnSecurityApiKeyManagementObj from './kbn_security_api_key_management.devdocs.json'; diff --git a/api_docs/kbn_security_form_components.mdx b/api_docs/kbn_security_form_components.mdx index 7b198b475a80e..bf4a92d130b9e 100644 --- a/api_docs/kbn_security_form_components.mdx +++ b/api_docs/kbn_security_form_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-form-components title: "@kbn/security-form-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-form-components plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-form-components'] --- import kbnSecurityFormComponentsObj from './kbn_security_form_components.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index 2f3f370a8ab7e..2fcb13a1a3456 100644 --- a/api_docs/kbn_security_hardening.mdx +++ b/api_docs/kbn_security_hardening.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-hardening title: "@kbn/security-hardening" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-hardening plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index 3780a1ccc3385..209c94c1cafd8 100644 --- a/api_docs/kbn_security_plugin_types_common.mdx +++ b/api_docs/kbn_security_plugin_types_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-common title: "@kbn/security-plugin-types-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-common plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index 1d33d2dac7e4e..7efc0945c6521 100644 --- a/api_docs/kbn_security_plugin_types_public.mdx +++ b/api_docs/kbn_security_plugin_types_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-public title: "@kbn/security-plugin-types-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-public plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 4757c78e20b3f..110dab7edfefd 100644 --- a/api_docs/kbn_security_plugin_types_server.mdx +++ b/api_docs/kbn_security_plugin_types_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-server title: "@kbn/security-plugin-types-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-server plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-server'] --- import kbnSecurityPluginTypesServerObj from './kbn_security_plugin_types_server.devdocs.json'; diff --git a/api_docs/kbn_security_solution_distribution_bar.mdx b/api_docs/kbn_security_solution_distribution_bar.mdx index b77937713a907..a7ad5cee91d93 100644 --- a/api_docs/kbn_security_solution_distribution_bar.mdx +++ b/api_docs/kbn_security_solution_distribution_bar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-distribution-bar title: "@kbn/security-solution-distribution-bar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-distribution-bar plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-distribution-bar'] --- import kbnSecuritySolutionDistributionBarObj from './kbn_security_solution_distribution_bar.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index 9bbd43a24c5f9..058af61f8d3fc 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index 92584d4409be9..5eef877c71008 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index 3cd265269307f..9c76278af9872 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index de2793747d980..6f16696c117a2 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 19b4a0b3e6400..fee771529f127 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index 3485fc785d757..2af0ae0037ad5 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index 75b5ccd664a22..500b77aaf7b1d 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index f60e142b97e7c..0a6cfd0d1b6d0 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 209c3b94362b1..b117d7c0ae109 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 9a9009639d6b2..fdc95a7810371 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index ab5a7ad4b3891..28329127d58a1 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 283f95e6b8938..9b6b929396f09 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 8cb9ba4f73ee6..120fd26fba15f 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 6ac434bf9620d..8c22e571f8960 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 53590adc56bb2..48f000f70e0aa 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 16e3ce5f61dfe..bf022848eecf6 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index d8445ab2f6b3d..7ee1d0ec68e11 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 8d69beb152f0c..e9fe834b133a9 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 61c5a898e4f83..81073b2927b1d 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index cced6ca3a4a8b..8ccbaf0361813 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index a1ecb4fdbdca6..6bb092a12ae7c 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index 20039ef8e7788..a0fe0bce4e42f 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 3736aba4bc108..6349f2b4b11b5 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository_utils.mdx b/api_docs/kbn_server_route_repository_utils.mdx index a941fd4c47aed..81e983e6b57d7 100644 --- a/api_docs/kbn_server_route_repository_utils.mdx +++ b/api_docs/kbn_server_route_repository_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository-utils title: "@kbn/server-route-repository-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository-utils'] --- import kbnServerRouteRepositoryUtilsObj from './kbn_server_route_repository_utils.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index 1b837eb871f5a..8b8c906355978 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index 7ca21f443fcdf..df533b85c5b19 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 4dbe840bc7698..69544abab6e7c 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index 573885b39cc53..d678e2306b550 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index 025595e572c15..1bebed52b87d9 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index 698fa0856fdce..722a951d8351b 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index d64bf1aee4050..5c89af7b238b8 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index f5a5349d4638a..5f8093e3e31ba 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index a239fefd7c0dd..df6e0aea3a374 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index a5f0a4ef5332d..996484c227a74 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 30f5e477058eb..23a059e33a60c 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index d604b6cd95066..607c0bd176ff9 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index daed35ea7a120..f1c65abe9ff40 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index 1c506b14f754d..20fdce1b2e1a8 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 1d66ca2e75ebd..17bbbd7cae18a 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index fa6fb520e28a8..026c09dde0a6f 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index f0b649fa9031b..d3bc2976b10d3 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index 36ecaa0275b50..6c88df056d2b4 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index 85ed33fc09dc4..9f2ce087132c6 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index 8a89c96505336..2a5376b5c5b2f 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index fdc2e20bbde02..d257b36dc6693 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index ea81428223d7c..dfdba1b2c7abd 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index 8e42f780ddda8..e4f4b3f0bb641 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index b235f6470d42f..523c6314e8985 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 4beb17231d7f2..0a4b4035c90e7 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 0921d8191775e..b5ec40633c53c 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index a64436a339a06..a6ec49f1663a6 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index da79f5ff595d0..9c3ff4a420a93 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index b917beea797db..25dcd6e69af3f 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index f319c3039d9c5..e805136792b6e 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index 9c46fd9872c5a..ce0956dadffe1 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 0b3eaf5f757f2..c16dd9bcd8a97 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 6318decfa8881..62929995d0a8a 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index e4e0854ca28fa..5a3d12fbb9331 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index 17790a97e02a6..88940cdfe3ee2 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index ff836719c97a9..d930fd497fe1d 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 96e45e580ee53..a7eae9f5c3ed2 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index fd976f45b320c..42305ec6a12bb 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index f01e1c43068ff..aea15e89b1a57 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index a67ff92ec019a..dfd8806776503 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index 5dd276f15d771..a6a6bc3e93c9e 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 3ff8a5ab02963..33a4372366999 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index 279f00e7c449c..73d984f3eb530 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index ba40e9463f47a..570e4dc255e76 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_tabbed_modal.mdx b/api_docs/kbn_shared_ux_tabbed_modal.mdx index c8b7d347c88c1..cc41790677454 100644 --- a/api_docs/kbn_shared_ux_tabbed_modal.mdx +++ b/api_docs/kbn_shared_ux_tabbed_modal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-tabbed-modal title: "@kbn/shared-ux-tabbed-modal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-tabbed-modal plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-tabbed-modal'] --- import kbnSharedUxTabbedModalObj from './kbn_shared_ux_tabbed_modal.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index cc36e5fdb791f..4eceae03d4422 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index f413f73a2bab7..99c2cbb42a832 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 5564a362e5211..caea418957b06 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_predicates.mdx b/api_docs/kbn_sort_predicates.mdx index 19fbfc97e3ef4..2a134eb795e31 100644 --- a/api_docs/kbn_sort_predicates.mdx +++ b/api_docs/kbn_sort_predicates.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-predicates title: "@kbn/sort-predicates" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-predicates plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates'] --- import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index b72c562ca5948..2ff937e13c85b 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index 7cf8007a52e87..3dd24aa4ecdea 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 47159bb8644d0..f1940c6d7b00d 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_synthetics_e2e.mdx b/api_docs/kbn_synthetics_e2e.mdx index c2f6a4a0123d5..0beadefdcc823 100644 --- a/api_docs/kbn_synthetics_e2e.mdx +++ b/api_docs/kbn_synthetics_e2e.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-synthetics-e2e title: "@kbn/synthetics-e2e" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/synthetics-e2e plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/synthetics-e2e'] --- import kbnSyntheticsE2eObj from './kbn_synthetics_e2e.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 71fa7cf6939b0..48d32907a7633 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index be84022c6db56..f1a0102f45b01 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index c49ad8ff85630..ea7ee1c3b93cd 100644 --- a/api_docs/kbn_test_eui_helpers.mdx +++ b/api_docs/kbn_test_eui_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-eui-helpers title: "@kbn/test-eui-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-eui-helpers plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers'] --- import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 2a17d9c56167e..f49a4b32c4662 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 60fe07d885d2d..1a975da9dab0f 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index 22bc53369724f..56cf5325ebd28 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx index 47d52748f0702..5d2b0d03c0a27 100644 --- a/api_docs/kbn_timerange.mdx +++ b/api_docs/kbn_timerange.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-timerange title: "@kbn/timerange" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/timerange plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/timerange'] --- import kbnTimerangeObj from './kbn_timerange.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index f8e4b1091a979..52b7d71162298 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index 179834d98308e..5e8f1a20a3e29 100644 --- a/api_docs/kbn_triggers_actions_ui_types.mdx +++ b/api_docs/kbn_triggers_actions_ui_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types title: "@kbn/triggers-actions-ui-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/triggers-actions-ui-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_try_in_console.mdx b/api_docs/kbn_try_in_console.mdx index 8647728297d20..5e06938618aed 100644 --- a/api_docs/kbn_try_in_console.mdx +++ b/api_docs/kbn_try_in_console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-try-in-console title: "@kbn/try-in-console" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/try-in-console plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/try-in-console'] --- import kbnTryInConsoleObj from './kbn_try_in_console.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index 69eda1e8d167c..6fd82772eb35a 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 5b7dd288a863c..c4f8689fc5744 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index c6086babb0e21..0845e505fc039 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index c151bbe1aad8a..05097a5a53c5d 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 2a3bda01cc90b..750cf483e1f9b 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index 02a286e80f249..040623daed125 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index 7c57764f5f633..3698f4ae6522a 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index ef43dc8a26d00..9586b19ef3c54 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index fd8203e8416cc..f0ea72c2b5e73 100644 --- a/api_docs/kbn_unsaved_changes_badge.mdx +++ b/api_docs/kbn_unsaved_changes_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge title: "@kbn/unsaved-changes-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-badge plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_prompt.mdx b/api_docs/kbn_unsaved_changes_prompt.mdx index b7e0c373a71c4..1a8d360c1dca9 100644 --- a/api_docs/kbn_unsaved_changes_prompt.mdx +++ b/api_docs/kbn_unsaved_changes_prompt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-prompt title: "@kbn/unsaved-changes-prompt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-prompt plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-prompt'] --- import kbnUnsavedChangesPromptObj from './kbn_unsaved_changes_prompt.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index eecba58bee1e9..e90cceb7197b1 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index ddc43f4a20ddb..355d2c4f60152 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 1bd54fa05b410..8475c36801278 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 5b3282ae53511..5b15749fa5539 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index af072dcd84be0..3e8f6d6d31ede 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index af876c9fb9162..ce3695c5e3d8a 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index c7d6a35813cca..59512fbd07447 100644 --- a/api_docs/kbn_visualization_utils.mdx +++ b/api_docs/kbn_visualization_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-utils title: "@kbn/visualization-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils'] --- import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index 27530bc3b18b9..c80379deb7e04 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index f4d2ffb84418f..3e9d8fb8d4767 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod.mdx b/api_docs/kbn_zod.mdx index 8d5019013a074..f7328c48bfe0d 100644 --- a/api_docs/kbn_zod.mdx +++ b/api_docs/kbn_zod.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod title: "@kbn/zod" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod'] --- import kbnZodObj from './kbn_zod.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index cce4d5f49b71c..a7d420fe20770 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 749249956e629..ad350fb11a12b 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index b72630cf865ec..66fcd75c06a70 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 8a83a2c7f7e08..0be9836d1d030 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 84cd8defd9c1d..42a3031dd30c6 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 5ddbda38d0597..4589ba956f902 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index 973d4071627bd..be5eb71ecb725 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 7a6912604a729..8322c96ca7c6e 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index cfbe979c479d9..7e39844d48256 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index 3c2d62943f21b..2e6f4a9a90980 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 6316f62bf017e..86d07e214acef 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_data_access.mdx b/api_docs/logs_data_access.mdx index c3960b87f142f..0501691dfdcd2 100644 --- a/api_docs/logs_data_access.mdx +++ b/api_docs/logs_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsDataAccess title: "logsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the logsDataAccess plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsDataAccess'] --- import logsDataAccessObj from './logs_data_access.devdocs.json'; diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index 85e1147bb218b..9cf7b160dfb93 100644 --- a/api_docs/logs_explorer.mdx +++ b/api_docs/logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsExplorer title: "logsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logsExplorer plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index ab5bc47310224..b33738e320389 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 5cd7585d22877..8b042db3c541c 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 12ac5e462cb7e..44ec688a4d564 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 7f6101dcf82bb..d268e3ea1510a 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index 0e3285a0ece95..77b2e3225986f 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 3e6cc39d1e3fc..abb92576992d9 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index 85db8c0d75c82..087715c8d5666 100644 --- a/api_docs/mock_idp_plugin.mdx +++ b/api_docs/mock_idp_plugin.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin title: "mockIdpPlugin" image: https://source.unsplash.com/400x175/?github description: API docs for the mockIdpPlugin plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin'] --- import mockIdpPluginObj from './mock_idp_plugin.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index bf0a0e7711bbc..dbc516f4d7305 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 2e4e3940de656..b27ae4b42ddc0 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 44cd383ea44d2..25d3aca4e4958 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index a6abb78971590..6fc1783772d64 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index f770c3ceb6639..10b589b7663c4 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index bb8e3ea372653..129bdcf64cef0 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 95163a8cdc78e..560494a1d76ff 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 53272cae2b032..32f2b29f02f74 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index 4734c8ba1ef93..62b78a0852563 100644 --- a/api_docs/observability_a_i_assistant_app.mdx +++ b/api_docs/observability_a_i_assistant_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp title: "observabilityAIAssistantApp" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistantApp plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index 58ab4f18ce903..72f60f083cae2 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index afe593fc1bdf7..a71eac4fbb9c9 100644 --- a/api_docs/observability_logs_explorer.mdx +++ b/api_docs/observability_logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogsExplorer title: "observabilityLogsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogsExplorer plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogsExplorer'] --- import observabilityLogsExplorerObj from './observability_logs_explorer.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index 166c98a8d0414..689ecd0e3f4e6 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index 9f9952b34daae..48a4b5df508f1 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 46a4d920372d9..2082ca6d4235f 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index 2260fa50a9f6b..cc36fdf0e1800 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 16b8a6f43a2e7..e7ed5e8f1f393 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 827 | 703 | 43 | +| 826 | 702 | 44 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 51628 | 241 | 38443 | 1894 | +| 51479 | 241 | 38448 | 1894 | ## Plugin Directory @@ -74,7 +74,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 19 | 0 | 19 | 2 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 53 | 0 | 46 | 1 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | Adds dashboards for discovering and managing Enterprise Search products. | 5 | 0 | 5 | 0 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Entity manager plugin for entity assets (inventory, topology, etc) | 14 | 0 | 14 | 1 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Entity manager plugin for entity assets (inventory, topology, etc) | 16 | 0 | 16 | 1 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 99 | 3 | 97 | 3 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 29 | 0 | 10 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 2 | 0 | 2 | 0 | @@ -283,10 +283,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 49 | 0 | 33 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 30 | 0 | 30 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 195 | 1 | 128 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 101 | 0 | 0 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 100 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 100 | 0 | 0 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 99 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 5 | 0 | 5 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 103 | 0 | 27 | 0 | @@ -486,13 +486,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/docs](https://github.com/orgs/elastic/teams/docs) | - | 78 | 0 | 78 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 5 | 0 | 5 | 1 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 41 | 0 | 27 | 6 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 152 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 33 | 0 | 24 | 1 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 13 | 0 | 5 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 35 | 0 | 34 | 0 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 156 | 0 | 130 | 9 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 354 | 0 | 328 | 0 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 23 | 0 | 23 | 0 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 26 | 0 | 26 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 54 | 0 | 39 | 7 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 32 | 0 | 19 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 11 | 0 | 6 | 0 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 55c668514a9da..e573d3a289c6b 100644 --- a/api_docs/presentation_panel.mdx +++ b/api_docs/presentation_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationPanel title: "presentationPanel" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationPanel plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.devdocs.json'; diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 7e331bd9d9133..9c46ec7318a27 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 30c86563ce5ea..ad050177e4060 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index f4949a4add1c8..ea0336757577b 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 34e1d922745f8..2c654b3342a8a 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index ec57e374979a2..3e758f52c440f 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 27bf229ad7626..296676d2f4694 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 0ad9bd6b51ae9..3390c6a7db0e6 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 494213fd4d0d3..39c8d8e93b2ee 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index b642c08004f8c..0fd60f971f1fc 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index d21ffc70c9127..2525b57694e08 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 57334b10b1138..0044fb7f939d1 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index bb0f244de624f..b2ac368c8277b 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index c87afb8d72e35..783f60994d125 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 909039407ae1b..b623228e1fa2f 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 0f50c3d008c2b..c89972a58b842 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 5cc2dc069127e..bc1f29a7afa3b 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx index 4856f7fae9040..8504887cdbc36 100644 --- a/api_docs/search_connectors.mdx +++ b/api_docs/search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors title: "searchConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the searchConnectors plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_homepage.mdx b/api_docs/search_homepage.mdx index ee829fbe14bfd..90527b6af2bbd 100644 --- a/api_docs/search_homepage.mdx +++ b/api_docs/search_homepage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchHomepage title: "searchHomepage" image: https://source.unsplash.com/400x175/?github description: API docs for the searchHomepage plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchHomepage'] --- import searchHomepageObj from './search_homepage.devdocs.json'; diff --git a/api_docs/search_inference_endpoints.mdx b/api_docs/search_inference_endpoints.mdx index 155fcbd0938ed..4515a2e78f514 100644 --- a/api_docs/search_inference_endpoints.mdx +++ b/api_docs/search_inference_endpoints.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchInferenceEndpoints title: "searchInferenceEndpoints" image: https://source.unsplash.com/400x175/?github description: API docs for the searchInferenceEndpoints plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchInferenceEndpoints'] --- import searchInferenceEndpointsObj from './search_inference_endpoints.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index 8974f0b57aa83..01188384b25cf 100644 --- a/api_docs/search_notebooks.mdx +++ b/api_docs/search_notebooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks title: "searchNotebooks" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNotebooks plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index 9e82cc3351afd..d7ec6fa6ea83b 100644 --- a/api_docs/search_playground.mdx +++ b/api_docs/search_playground.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground title: "searchPlayground" image: https://source.unsplash.com/400x175/?github description: API docs for the searchPlayground plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 486e8e38763cb..f5896c16d8ce1 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 0ea62472d498e..4f45187b433b2 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -485,7 +485,7 @@ "\nExperimental flag needed to enable the link" ], "signature": [ - "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"assistantBedrockChat\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsSentinelOneProcessesEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"responseActionScanEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"securitySolutionNotesEnabled\" | \"entityAlertPreviewDisabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"manualRuleRunEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | undefined" + "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"assistantBedrockChat\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsSentinelOneProcessesEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"responseActionScanEnabled\" | \"alertsPageChartsEnabled\" | \"securitySolutionNotesEnabled\" | \"entityAlertPreviewDisabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"manualRuleRunEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | \"dataIngestionHubEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -565,7 +565,7 @@ "\nExperimental flag needed to disable the link. Opposite of experimentalKey" ], "signature": [ - "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"assistantBedrockChat\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsSentinelOneProcessesEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"responseActionScanEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"securitySolutionNotesEnabled\" | \"entityAlertPreviewDisabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"manualRuleRunEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | undefined" + "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"assistantBedrockChat\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsSentinelOneProcessesEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"responseActionScanEnabled\" | \"alertsPageChartsEnabled\" | \"securitySolutionNotesEnabled\" | \"entityAlertPreviewDisabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"manualRuleRunEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | \"dataIngestionHubEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -1932,7 +1932,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly assistantBedrockChat: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; }" + "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly assistantBedrockChat: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; readonly dataIngestionHubEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -3039,7 +3039,7 @@ "\nThe security solution generic experimental features" ], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly assistantBedrockChat: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; }" + "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly assistantBedrockChat: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; readonly dataIngestionHubEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/server/plugin_contract.ts", "deprecated": false, @@ -3215,7 +3215,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly assistantBedrockChat: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; }" + "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly assistantBedrockChat: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; readonly dataIngestionHubEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, @@ -3281,7 +3281,7 @@ "\nA list of allowed values that can be used in `xpack.securitySolution.enableExperimental`.\nThis object is then used to validate and parse the value entered." ], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: true; readonly responseActionsSentinelOneGetFileEnabled: true; readonly responseActionsSentinelOneKillProcessEnabled: false; readonly responseActionsSentinelOneProcessesEnabled: false; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: true; readonly responseActionScanEnabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly securitySolutionNotesEnabled: false; readonly entityAlertPreviewDisabled: false; readonly assistantModelEvaluation: false; readonly assistantKnowledgeBaseByDefault: false; readonly assistantBedrockChat: false; readonly newUserDetailsFlyoutManagedUser: false; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: true; readonly jamfDataInAnalyzerEnabled: false; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineDisabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly prebuiltRulesCustomizationEnabled: false; readonly malwareOnWriteScanOptionAvailable: true; readonly unifiedManifestEnabled: true; readonly valueListItemsModalEnabled: true; readonly manualRuleRunEnabled: false; readonly filterProcessDescendantsForEventFiltersEnabled: false; }" + "{ readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: true; readonly responseActionsSentinelOneGetFileEnabled: true; readonly responseActionsSentinelOneKillProcessEnabled: false; readonly responseActionsSentinelOneProcessesEnabled: false; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: true; readonly responseActionScanEnabled: false; readonly alertsPageChartsEnabled: true; readonly securitySolutionNotesEnabled: false; readonly entityAlertPreviewDisabled: false; readonly assistantModelEvaluation: false; readonly assistantKnowledgeBaseByDefault: false; readonly assistantBedrockChat: true; readonly newUserDetailsFlyoutManagedUser: false; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: true; readonly jamfDataInAnalyzerEnabled: false; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineDisabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly prebuiltRulesCustomizationEnabled: false; readonly malwareOnWriteScanOptionAvailable: true; readonly unifiedManifestEnabled: true; readonly valueListItemsModalEnabled: true; readonly manualRuleRunEnabled: false; readonly filterProcessDescendantsForEventFiltersEnabled: false; readonly dataIngestionHubEnabled: false; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 2ff1d891e1531..bc47994fc9efa 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index 6e7875dc114b4..52ebb64b02aeb 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index fb0d9f4aba9b2..f4b49f9f9d91c 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index 9cc17bcb892f6..126f38401b347 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index 8303f92a8a9a5..b73d5c1a84008 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index d27e3005894e9..0f6d7290ce003 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index aff1d8c19d971..4fbd090371881 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index c8a246cbd5837..6ab160a03e05d 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index 53700201ee04f..ec4c3dcb85ab2 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index ee0b493ce76e3..876fcbea23741 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 52c8505216554..2c1537cfa54ae 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index feabc736b6631..4e3c66e0a8e81 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 5476d109c1431..a27dbaf7a9f76 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index de5ecb3c0e1ad..b748756648d35 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 8f6f39ff22ff0..c04570e6d31c2 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 7e7429f228cae..9ff4ca1385337 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 2039d2bd3f325..58430e970b49f 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index e531c635e9d91..a1903aff59002 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 6f88699be8732..8fff89ee6dec8 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json index 94d368b31abaa..94b9066784f4e 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -3636,18 +3636,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx" @@ -3704,14 +3692,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts" @@ -3760,6 +3740,26 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts" @@ -4055,11 +4055,11 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx" }, { "plugin": "securitySolution", @@ -4067,31 +4067,11 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" }, { "plugin": "securitySolution", @@ -4161,6 +4141,18 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/flyout/document_details/shared/context.tsx" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/utils.ts" diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index bff6be0c92a2e..f2ca6609d2bcc 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 7d961eec5568c..95df150988cc9 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 357698033c16a..3c73082ac97dd 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 8ce65408cac17..ac46711599f0e 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 06a761e387c10..ff9a063159749 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index 6873230f999ff..ee16441e66b45 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index f827f569bd53f..600ae991b6ba8 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.devdocs.json b/api_docs/unified_search.devdocs.json index 90db05c3662ca..d961a5ce4e80a 100644 --- a/api_docs/unified_search.devdocs.json +++ b/api_docs/unified_search.devdocs.json @@ -620,7 +620,7 @@ }, "[] | undefined; iconType?: ", "IconType", - " | undefined; dataTestSubj?: string | undefined; showSaveQuery?: boolean | undefined; customSubmitButton?: React.ReactNode; dataViewPickerOverride?: React.ReactNode; screenTitle?: string | undefined; showQueryMenu?: boolean | undefined; showQueryInput?: boolean | undefined; showFilterBar?: boolean | undefined; showDatePicker?: boolean | undefined; showAutoRefreshOnly?: boolean | undefined; additionalQueryBarMenuItems?: ", + " | undefined; showQueryInput?: boolean | undefined; dataTestSubj?: string | undefined; showSaveQuery?: boolean | undefined; customSubmitButton?: React.ReactNode; dataViewPickerOverride?: React.ReactNode; screenTitle?: string | undefined; showQueryMenu?: boolean | undefined; showFilterBar?: boolean | undefined; showDatePicker?: boolean | undefined; showAutoRefreshOnly?: boolean | undefined; additionalQueryBarMenuItems?: ", "AdditionalQueryBarMenuItems", " | undefined; filtersForSuggestions?: ", { @@ -1592,23 +1592,11 @@ "description": [], "signature": [ "{ optIn: (optInConfig: ", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.OptInConfig", - "text": "OptInConfig" - }, + "OptInConfig", ") => void; reportEvent: (eventType: string, eventData: EventTypeData) => void; readonly telemetryCounter$: ", "Observable", "<", - { - "pluginId": "@kbn/ebt", - "scope": "common", - "docId": "kibKbnEbtPluginApi", - "section": "def-common.TelemetryCounter", - "text": "TelemetryCounter" - }, + "TelemetryCounter", ">; }" ], "path": "src/plugins/unified_search/public/types.ts", diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index e8ba15514e456..d287c7819a613 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 3b5eb21b2a594..f00034330ebce 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index f629fe28c3f15..85cc363c0114e 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 66a7300fb1bbb..ae54e4e5649a7 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.devdocs.json b/api_docs/usage_collection.devdocs.json index af090a71c02da..b1395ec0602f2 100644 --- a/api_docs/usage_collection.devdocs.json +++ b/api_docs/usage_collection.devdocs.json @@ -1882,7 +1882,7 @@ "signature": [ "\"boolean\" | \"keyword\" | \"text\" | \"date\" | \"integer\" | \"long\" | \"short\" | \"byte\" | \"float\" | \"double\"" ], - "path": "packages/analytics/ebt/client/src/schema/types.ts", + "path": "node_modules/@elastic/ebt/client/src/schema/types.d.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 6a4287a5b89ce..ee976cf2cdd2a 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index 49ee2b2a2d8cb..1220278c061be 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 64f4590c4e8db..a4e674961a40b 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index d4158d4d9d695..f31f7cbfde210 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index c9f718e456b4a..9e76049923243 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index a73a6bf09359d..e114470372ab6 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index a00ef9f73d6b1..b2596325d3c2b 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index d80ca5455c75a..4b49c8a725594 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index dea362715607c..5e9451ad9e730 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 4854c14bb51c7..26247a2c08163 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 82c7940c8c6cd..395445ad212c8 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 8ae3570a2fe59..d117a12c22196 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 18d7faaade251..eb96e26e0b104 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2024-07-31 +date: 2024-08-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/docs/CHANGELOG.asciidoc b/docs/CHANGELOG.asciidoc index 6b515415fe731..479987758b25a 100644 --- a/docs/CHANGELOG.asciidoc +++ b/docs/CHANGELOG.asciidoc @@ -105,6 +105,8 @@ The 8.14.3 release includes the following bug fixes and known issues. include::CHANGELOG.asciidoc[tag=known-issue-186969] +include::CHANGELOG.asciidoc[tag=known-issue-189394] + [discrete] [[known-185691]] .When using the Observability AI Assistant with the OpenAI connector, function calling will result in an error @@ -146,6 +148,8 @@ The 8.14.2 release includes the following bug fixes and known issues. include::CHANGELOG.asciidoc[tag=known-issue-186969] +include::CHANGELOG.asciidoc[tag=known-issue-189394] + [float] [[fixes-v8.14.2]] === Bug Fixes @@ -170,6 +174,8 @@ The 8.14.1 release includes the following bug fixes and known issues. include::CHANGELOG.asciidoc[tag=known-issue-186969] +include::CHANGELOG.asciidoc[tag=known-issue-189394] + [float] [[fixes-v8.14.1]] === Bug Fixes @@ -194,7 +200,6 @@ For information about the {kib} 8.14.0 release, review the following information === Known issues // tag::known-issue-186969[] -[discrete] .Creating or editing APM, {observability} and {stack-monitor-app} rules fails [%collapsible] ==== @@ -208,9 +213,33 @@ This known issue impacts only {observability}, {stack-monitor-app}, and APM and *Workaround* + To work around this issue for {observability} and APM and {user-experience} rules, create them from the {observability} *Alerts* page. Refer to <> and {observability-guide}/create-alerts-rules.html[Create and manage {observability} rules]. + +*Resolved* + +This issue is resolved in 8.15.0. ==== // end::known-issue-186969[] +// tag::known-issue-189394[] +.{webhook-cm} connector fails to send HTTP headers +[%collapsible] +==== +*Details* + +If you configured the {webhook-cm} connector to send key-value pairs as headers, that information is not sent unles you have also enabled the basic authentication option for the connector. +Refer to https://github.com/elastic/kibana/issues/189394[#189394]. + +*Impact* + +The impact of this issue will vary depending on the purpose of your headers. +For example, if you added an `ApiKey` authorization header, you might receive a `401` authorization error since it's no longer sent by the connector. + +*Workaround* + +To work around this issue, enable the *Require authentication for this webhook* option, which is the `hasAuth` property in the API. +You must then provide a username and password for authentication. + +*Resolved* + +This issue is resolved in 8.15.0. +==== +// end::known-issue-189394[] + [float] [[breaking-changes-8.14.0]] === Breaking changes diff --git a/docs/spaces/images/space-management.png b/docs/spaces/images/space-management.png index 2668758a98f4c..bbb0164009e53 100644 Binary files a/docs/spaces/images/space-management.png and b/docs/spaces/images/space-management.png differ diff --git a/docs/user/images/array-in-metrics.png b/docs/user/images/array-in-metrics.png new file mode 100644 index 0000000000000..e7bd84a46af2d Binary files /dev/null and b/docs/user/images/array-in-metrics.png differ diff --git a/docs/user/images/create-simple-api-key.png b/docs/user/images/create-simple-api-key.png new file mode 100644 index 0000000000000..d30271401fe7b Binary files /dev/null and b/docs/user/images/create-simple-api-key.png differ diff --git a/docs/user/images/dashboard-creator-filter.png b/docs/user/images/dashboard-creator-filter.png new file mode 100644 index 0000000000000..69534b06b8bd3 Binary files /dev/null and b/docs/user/images/dashboard-creator-filter.png differ diff --git a/docs/user/images/dashboard-creator.png b/docs/user/images/dashboard-creator.png new file mode 100644 index 0000000000000..3b77ac7995b87 Binary files /dev/null and b/docs/user/images/dashboard-creator.png differ diff --git a/docs/user/images/dashboard-last-editor.png b/docs/user/images/dashboard-last-editor.png new file mode 100644 index 0000000000000..1b4062e90c273 Binary files /dev/null and b/docs/user/images/dashboard-last-editor.png differ diff --git a/docs/user/images/esql-field-statistics.png b/docs/user/images/esql-field-statistics.png new file mode 100644 index 0000000000000..0dfbfeeed67cf Binary files /dev/null and b/docs/user/images/esql-field-statistics.png differ diff --git a/docs/user/images/field-statistics-esql.png b/docs/user/images/field-statistics-esql.png new file mode 100644 index 0000000000000..f94a5dfd5b06d Binary files /dev/null and b/docs/user/images/field-statistics-esql.png differ diff --git a/docs/user/images/field-statistics-panel-in-dashboards.png b/docs/user/images/field-statistics-panel-in-dashboards.png new file mode 100644 index 0000000000000..32d6cdcf0051e Binary files /dev/null and b/docs/user/images/field-statistics-panel-in-dashboards.png differ diff --git a/docs/user/images/integrations-in-esql.png b/docs/user/images/integrations-in-esql.png new file mode 100644 index 0000000000000..1a45b223d9888 Binary files /dev/null and b/docs/user/images/integrations-in-esql.png differ diff --git a/docs/user/images/obs-log-rate-analysis-insigths.png b/docs/user/images/obs-log-rate-analysis-insigths.png new file mode 100644 index 0000000000000..d87707d1fcd84 Binary files /dev/null and b/docs/user/images/obs-log-rate-analysis-insigths.png differ diff --git a/docs/user/images/share-modal.png b/docs/user/images/share-modal.png new file mode 100644 index 0000000000000..d8bd1faf1498a Binary files /dev/null and b/docs/user/images/share-modal.png differ diff --git a/docs/user/images/statistics-in-legends.png b/docs/user/images/statistics-in-legends.png new file mode 100644 index 0000000000000..64e8826a49884 Binary files /dev/null and b/docs/user/images/statistics-in-legends.png differ diff --git a/docs/user/images/statistics-in-legends2.png b/docs/user/images/statistics-in-legends2.png new file mode 100644 index 0000000000000..8fecabb9f9425 Binary files /dev/null and b/docs/user/images/statistics-in-legends2.png differ diff --git a/docs/user/whats-new.asciidoc b/docs/user/whats-new.asciidoc index 112dc7e0b1ed8..3410a889c8f26 100644 --- a/docs/user/whats-new.asciidoc +++ b/docs/user/whats-new.asciidoc @@ -1,156 +1,198 @@ [[whats-new]] -== What's new in 8.14 +== What's new in 8.15 -Here are the highlights of what's new and improved in 8.14. +Here are the highlights of what's new and improved in 8.15. For detailed information about this release, check the <>. -Previous versions: {kibana-ref-all}/8.13/whats-new.html[8.13] | {kibana-ref-all}/8.12/whats-new.html[8.12] | {kibana-ref-all}/8.11/whats-new.html[8.11] | {kibana-ref-all}/8.10/whats-new.html[8.10] | {kibana-ref-all}/8.9/whats-new.html[8.9] | {kibana-ref-all}/8.8/whats-new.html[8.8] | {kibana-ref-all}/8.7/whats-new.html[8.7] | {kibana-ref-all}/8.6/whats-new.html[8.6] | {kibana-ref-all}/8.5/whats-new.html[8.5] | {kibana-ref-all}/8.4/whats-new.html[8.4] | {kibana-ref-all}/8.3/whats-new.html[8.3] | {kibana-ref-all}/8.2/whats-new.html[8.2] | {kibana-ref-all}/8.1/whats-new.html[8.1] | {kibana-ref-all}/8.0/whats-new.html[8.0] +Previous versions: {kibana-ref-all}/8.14/whats-new.html[8.14] | {kibana-ref-all}/8.13/whats-new.html[8.13] | {kibana-ref-all}/8.12/whats-new.html[8.12] | {kibana-ref-all}/8.11/whats-new.html[8.11] | {kibana-ref-all}/8.10/whats-new.html[8.10] | {kibana-ref-all}/8.9/whats-new.html[8.9] | {kibana-ref-all}/8.8/whats-new.html[8.8] | {kibana-ref-all}/8.7/whats-new.html[8.7] | {kibana-ref-all}/8.6/whats-new.html[8.6] | {kibana-ref-all}/8.5/whats-new.html[8.5] | {kibana-ref-all}/8.4/whats-new.html[8.4] | {kibana-ref-all}/8.3/whats-new.html[8.3] | {kibana-ref-all}/8.2/whats-new.html[8.2] | {kibana-ref-all}/8.1/whats-new.html[8.1] | {kibana-ref-all}/8.0/whats-new.html[8.0] + [discrete] -=== Discover +=== Analyst Experience [discrete] -==== Transitioning {esql} from Tech Preview to General Availability! +==== View dashboard creator and last editor -{esql} offers a streamlined way to filter, transform, and analyze data in {es}. Its intuitive design, utilizing "pipes" (|) for step-by-step data exploration, enables you to easily compose powerful queries for detailed analysis. Whether you're a developer, SRE, or Security Analyst, {esql} empowers you to uncover specific events, perform robust statistical analyses, and create compelling visualizations. As we move from tech preview to general availability, discover the enhanced capabilities of {esql} and elevate your data operations. +You can now see who created and who last updated a dashboard. -[discrete] -==== {esql} Query History +You can find the creator information right from the dashboard list. + +image::images/dashboard-creator.png[Dashboard creator column in dashboard list] + +Quickly find all dashboards created by the same user with a simple filter. -We've enhanced the {esql} editor to improve your workflow. You can now view and re-run your last 20 {esql} queries directly within Discover, {esql} charts, alerts, and maps. This feature makes it easier to manage your queries and streamline your tasks. +image::images/dashboard-creator-filter.png[Filtering dashboards by creator] -[role="screenshot"] -image::images/query-history-in-discover.png[An image of an ES|QL query history in Discover.] +Note that the creator information will be visible only for dashboards created on or after version 8.14. -[role="screenshot"] -image::images/query-history-in-dashboard.png[An image of the auto option.] +You can also see who last updated a dashboard by clicking the dashboard information icon from the dashboard list. The creator is also visible next to it. This information is immutable and cannot be changed. + +image::images/dashboard-last-editor.png[Dashboard details panel with the name of the last editor] [discrete] -==== Document comparison mode in Discover & {esql} +==== Field statistics in Dashboards + +It's now easier than ever to include your field statistics view from **Discover** into **Dashboards**. While running investigations, it is very common that you need to see some field information, such as unique values and their distribution, to make sense of the data. Select the fields that you want with your ES|QL query and get the document count, values, and distribution in your dashboard so you don't have to navigate back and forth to **Discover** to see this information. -You can now select and compare documents or fields. This functionality streamlines analysis and troubleshooting tasks by allowing you to perform detailed comparisons, such as diffing SIP messages of a certain ID across multiple documents in {es}. +image::https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt9bc52ff7851acc52/669a4f6a490fbc64fa22f279/field-statistics.gif[Showing field statistics panel in Dashboards] [discrete] -==== Storing {esql} visualizations in saved searches +==== Statistics in legends + +Accelerate time to insights by summarizing the values of your charts using average, minimum, maximum, median, and variance, among many others. You can add these statistics for **Lens** and ES|QL visualizations. It is important to note that these statistics are computed using the data points from the chart considering the aggregation used and not the raw data. In the following example, the chart shows the median memory per host, so the Max = 15.3KB for the first series (artifacts.elastic.co) is the maximum value of the median memory per host. + +image::images/statistics-in-legends.png[Statistics in legends] -Changes to {esql} charts in Discover can now be saved along with {esql} query syntax, allowing you to share and manage your Discover views with ease. +You can find the option to select statistics for your legends along with an explanation for each calculation when editing your visualization, as shown in the following image. -[role="screenshot"] -image::images/esql-viz-saved-search.png[An image of {esql} visualization in saved search.] +image::images/statistics-in-legends2.png[Select statistics in legends] [discrete] -==== {esql} field statistics in Unified Field List +==== Array of values for Metrics -Seeing data statistics while crafting queries can be useful to understand the data batter. To enhance this experience, we've added field stats to the sidebar field popover in {esql} mode, similar to what's available in Discover data view mode. +The new **Metrics** now supports fields that show an array of values. -[role="screenshot"] -image::images/esql-field-stats.png[An image of the new field stats sidebar popover.] +image::images/array-in-metrics.png[A metric showing an array of values, width=35%] [discrete] -==== Custom data view field descriptions +==== Push flyout for Discover document viewer -We've implemented a much-requested feature that allows you to add custom descriptions to data view fields. This enhancement is going to make a significant difference in how you manage and understand your data in Kibana. You'll see these descriptions in the Unified Field List popover in Discover and Lens, enhancing your user experience. +You can now seamlessly view document details and the main table simultaneously in **Discover** with the new _push_ flyout. You can adjust the width of the flyout to suit your needs and explore your data much more easily. -[role="screenshot"] -image::images/custom-descriptions.png[An image of a custom data view field description.] +image::https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltb40a408acf4ab688/669a58ea9fecd85219d58ed2/discover-push-flyout.gif[Resizable push flyout in Discover] [discrete] -=== Dashboard +==== Integrations support in the ES|QL editor when using FROM command. + +We're excited to announce enhanced support for integrations in the ES|QL editor with the *FROM* command. Previously, you could only access indices, but now you can also view a list of installed integrations directly within the editor. This improvement streamlines your workflow, making it easier to manage and utilize various integrations while working with your data. + +image::images/integrations-in-esql.png[Accessing an integration from ES|QL] [discrete] -==== Links panel Generally Available +==== Field statistics in ES|QL -You can now easily navigate from one dashboard to another using the links panel. Better organize your dashboards and make them more performant by chunking them in multiple dashboards with fewer visualizations and linking them together. You can carry over your filters, query and time range when navigating to other related dashboards. Display your links horizontally or vertically as it better suits your dashboard layout. You can also use the links panel to include external links in your dashboards. For example, to your wiki page or other applications. Decide whether you want to open the links in the same browser tab or in a new one. +Field statistics are now available in ES|QL. This feature is designed to provide comprehensive insights for each data field. With this enhancement, you can access detailed statistics such as distributions, averages, and other key metrics, helping you quickly understand your data. This makes data exploration and quality assessment more efficient, providing deeper insights and streamlining the analysis of field-level data in ES|QL. -[role="screenshot"] -image::images/links-panel.gif[A gif of the links panel in action.] +image::images/field-statistics-esql.png[Field statistics in ES|QL] [discrete] -==== Controls apply button +==== Filter UX improvements in ES|QL + +We're thrilled to unveil a complete overhaul of filtering in the ES|QL UX. Now, you can seamlessly filter data by browsing a time series chart, allowing for quick and intuitive time-based filtering. Interactive chart filtering lets you refine your data directly by clicking on any chart, while creating WHERE clause filters from the Discover table or sidebar has never been easier. These enhancements streamline data exploration and analysis, making your ES|QL experience more efficient and user-friendly than ever. + +*Filter by clicking a chart:* + +image::https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt965a5190f246f7c8/669a7d41e5f7c84793b031cb/filter-by-clicking-chart.gif[Filter by clicking a chart] + +*Filter by browsing a time series chart:* + +image::https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blta20c9a93dded707c/669a7d40843f93a02fe51013/filter-by-brushing-time-series.gif[Filter by browsing a time series chart] + +*Create WHERE clause filters from Discover table or sidebar:* -Controls are a popular way for users to filter their dashboards. Most of the time, users need to filter several of these controls to get the results they are looking for. In order to optimize performance and minimize the number of queries sent to get the data, we added the option to add a button so the controls selection will not be applied until the user clicks on it. That allows users to filter by multiple fields before sending any new requests to fetch the dashboard data. +image::https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt50ac35ab3af29ff8/669a7d4006a6fafe4c7cb39d/create-where-clause-filters-from-sidebar.gif[Create WHERE clause filters from Discover table or sidebar] -[role="screenshot"] -image::images/controls-apply-button.png[An image of the new controls apply button in the UI.] +[discrete] +=== Alerting, cases, and connectors -This option is off by default and dashboard authors can decide to enable this button by switching off “Apply selections automatically” from the Controls settings. +[discrete] +==== Case templates -[role="screenshot"] -image::images/control-settings.png[An image of the control settings in the UI.] +{kib} cases offer a new powerful capability to enhance the efficiency of your analyst teams with <>. +You can manage multiple templates, each of which can be used to auto-populate values in a case with pre-defined knowledge. +This streamlines the investigative process and significantly reduces time to resolution. [discrete] -==== Gauge chart +==== Case custom fields are GA -Users can now easily build beautiful and fully functional gauge charts from Lens. The revamped gauges will adapt to the field selected suggesting automatic minimum, maximum and goal values. The gauge charts in Lens will allow users to migrate from TSVB more easily. Users can select five different types of gauge charts: semicircular, circular, arc, vertical or horizontal. +In 8.11, <> were added to cases and they are now moving from technical preview to general availability. +You can set custom field values in your templates to enhance consistency across cases. + +[discrete] +==== {sn} additional fields -[role="screenshot"] -image::images/gauge-chart.png[An image of the new gauge chats.] +You can now create enriched {sn} tickets based on detected alerts with a more comprehensive structure that matches the {sn} ticket scheme. +A new JSON field is now available as part of the {sn} action, which enables you to send any field from {kib} alerts to {sn} tickets. [discrete] -==== Region map goes GA +==== {webhook-cm} SSL auth support -Users don’t need to navigate the complexity of the Maps app (meant to be used by more advanced geo users) to build a simple map. They can easily do it now from the Lens editor. +It's common for organizations to integrate with third parties using secured authentication. +Currently, most of the available case connectors use basic authentication (user and passwords or tokens), which might not be sufficient to meet organization security policies. +With this release, the <> now supports client certification, which enables you to leverage the connector for secured integration with third parties. -[role="screenshot"] -image::images/region-map.png[An image of the region map.] +The {webhook-cm} connector also moves from technical preview to general availability in this release. [discrete] === Machine Learning [discrete] -==== Cohere reranking +==== Improved UX for Log Pattern Analysis in Discover + +Analyze large volumes of logs efficiently, in very short times with Log Pattern Analysis in **Discover**. In 8.15, we redesigned the Log Pattern Analysis user flow in **Discover** to make it easier to use. Discover log patterns with one click for the message field (and other applicable text fields) and easily filter in and out logs to drastically reduce MTTR. + +image::https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt7e63d7e764ab183e/669a807bd316c7015db35458/ml-log-pattern-analysis.gif[New log pattern analysis interface] + +[discrete] +==== ES|QL support for field statistics in Discover -In 8.14, we have further enhanced Elastic’s inference API by adding support for Cohere’s foundation link:https://cohere.com/blog/rerank-3[Rerank 3 model] rerank-english-v.3.0. This is a natural next step following support for Cohere’s embeddings in 8.13. Elastic is the only vector database that supports Cohere Rerank 3. +The Field statistics functionality now supports ES|QL, Elastic's primary query language. -Reranking adds semantic precision on your search results, bumping the most relevant ones to the top of the list. Reranking is two-stage (or multi-stage) by nature and this is very powerful as it gives you flexibility, depending on your use case: You can easily combine it as an additional step without making changes to your current approach. Whether this is vector search, BM25 or hybrid search, reranking will deliver semantic relevance gains at the top of your search results list. +image::images/esql-field-statistics.png[Field statistics in ES|QL] -This is particularly important for Retrieval Augmented Generation (RAG), given the LLM’s costs and context windows limits. +[discrete] +==== Field statistics embeddable panel in Dashboards + +You can now add field statistics panels with ES|QL support straight within your dashboards, eliminating the need to transition between **Discover** and **Dashboards**. + +image::images/field-statistics-panel-in-dashboards.png[Field statistics embeddable panel in Dashboards] [discrete] -==== Inference API: RBAC +==== Log Rate Analysis contextual insights in serverless Observability + +You can now see insights in natural language, for example for the root cause of a log rate change or threshold alert, in Log Rate Analysis. This feature is currently only available for Observability serverless projects. -Use the new `inference_user` and `inference_admin` built-in roles to easily manage authorization for the inference API and `trained_models` API. The roles include the `manage_inference` and `monitor_inference` privileges which give full access and read access respectively to the inference endpoints. +image::images/obs-log-rate-analysis-insigths.png[Log Rate Analysis contextual insights in serverless Observability] [discrete] -==== AIOps: Log Pattern Analysis is Generally Available +==== Anthropic integration with the Inference API -In 8.14 Log Pattern Analysis becomes GA. Log Pattern Analysis enables faster and smarter investigation across thousands of log messages in order to analyze, troubleshoot and identify the root cause of an incident. Combine it with Anomaly Detection and our other AIOps features to drastically reduce the MTTR. +The inference API provides a seamless, intuitive interface to perform inference and other tasks against proprietary, hosted, and integrated external services. In 8.15, we're extending it to support Anthropic's chat completion API. [discrete] -==== Query history in {esql} data visualizer +==== Support for reranking with the Inference API -We have enhanced the {esql} editor to improve usability and support your workflows. You can now view and re-run your last 20 {esql} queries directly within the {esql} Data Visualizer. +In 8.15, we're also extending the inference API with the ability to host cross encoder models in Elastic and perform the reranking task. -[role="screenshot"] -image::images/esql-data-viz.png[An image of data visualizer for ES|QL.] +[discrete] +=== Global Experience [discrete] -=== Alerting +==== Simplified Sharing + +You can now share a dashboard, search, or lens object in one click. When sharing an object, the most common actions are directly presented to you, and a short link is automatically generated, making it simpler than ever to share your work. + +image::images/share-modal.png[New object share modal, width=50%] [discrete] -==== Kibana case actions +==== “My dashboards” filter -Alerting rules now support a new action that enables you to create cases automatically when alerts are detected. -The case action can aggregate alerts and group them by any alert field and time window. -For example, you can specify that all alerts that are detected by a certain alerting rule in a given time window (for example 7 days) with the same user will be assigned automatically to the same case. For more information, check out <>. +The days of manually scrolling through an endless list of dashboards are behind you. You can now filter by creator to go directly to the dashboards created by a specific teammate. -[role="screenshot"] -image::images/case-action.gif[A gif showing the new case action.] +NOTE: Only dashboards created on or after 8.14 will have a creator. [discrete] -==== {stack-manage-app} Alerts page +==== Quick API keys -A new alerts page is now available to manage alerts as part of the *{stack-manage-app}* menu. The new page enables you to filter alerts by rule type and solution and get a unified view of the alerts that you have authority to view within the space. +Many API keys don’t require custom settings, so we made it simple to generate a standard key. From the **Endpoints & API keys** top menu in Search, you can create a key in seconds. -[role="screenshot"] -image::images/alerts.gif[A looping gif of the new alerts page.] +image::images/create-simple-api-key.png[Shortcut to create an API key, width=60%] [discrete] -==== Jira additional fields support +=== Platform Security -With this Jira connector enhancement, alerts can create enriched Jira issues with a more comprehensive structure that matches the Jira ticket scheme. -A new JSON field is now supported as part of the Jira action so you can define any field to be sent from Kibana alerts to Jira tickets. For more information, check out <>. +[discrete] +==== Filtering by User in Kibana Audit Logs -[role="screenshot"] -image::images/jira-connector.png[An image of the new jira connector panel, width =60%] \ No newline at end of file +We are pleased to share that ignoring events by user in Kibana audit logs is now possible. This enhancement will give you more flexibility to reduce the overall number of events logged by the Kibana audit logs service and to control the volume of data being generated in audit logs. While we currently offer a number of ways to do this using the `xpack.security.audit.ignore_filters.[]` configuration setting, there wasn't an easy option to filter by user. With this addition, you can configure Kibana audit logs to ignore events based on values from the following fields: users, spaces, outcomes, categories, types and actions. \ No newline at end of file diff --git a/examples/controls_example/common/options_list/ip_search.test.ts b/examples/controls_example/common/options_list/ip_search.test.ts new file mode 100644 index 0000000000000..1c935b1875311 --- /dev/null +++ b/examples/controls_example/common/options_list/ip_search.test.ts @@ -0,0 +1,129 @@ +/* + * 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 { getIpRangeQuery, getIpSegments, getMinMaxIp } from './ip_search'; + +describe('test IP search functionality', () => { + test('get IP segments', () => { + expect(getIpSegments('')).toStrictEqual({ segments: [''], type: 'unknown' }); + expect(getIpSegments('test')).toStrictEqual({ segments: ['test'], type: 'unknown' }); + expect(getIpSegments('123.456')).toStrictEqual({ segments: ['123', '456'], type: 'ipv4' }); + expect(getIpSegments('123..456...')).toStrictEqual({ segments: ['123', '456'], type: 'ipv4' }); + expect(getIpSegments('abc:def:')).toStrictEqual({ segments: ['abc', 'def'], type: 'ipv6' }); + expect(getIpSegments(':::x:::abc:::def:::')).toStrictEqual({ + segments: ['x', 'abc', 'def'], + type: 'ipv6', + }); + }); + + test('get min/max IP', () => { + expect(getMinMaxIp('ipv4', ['123'])).toStrictEqual({ + min: '123.0.0.0', + max: '123.255.255.255', + }); + expect(getMinMaxIp('ipv4', ['123', '456', '789'])).toStrictEqual({ + min: '123.456.789.0', + max: '123.456.789.255', + }); + expect(getMinMaxIp('ipv6', ['abc', 'def'])).toStrictEqual({ + min: 'abc:def::', + max: 'abc:def:ffff:ffff:ffff:ffff:ffff:ffff', + }); + expect(getMinMaxIp('ipv6', ['a', 'b', 'c', 'd', 'e', 'f', 'g'])).toStrictEqual({ + min: 'a:b:c:d:e:f:g::', + max: 'a:b:c:d:e:f:g:ffff', + }); + }); + + test('get IP range query', () => { + // invalid searches + expect(getIpRangeQuery('xyz')).toStrictEqual({ + validSearch: false, + }); + expect(getIpRangeQuery('123.456.OVER 9000')).toStrictEqual({ + validSearch: false, + }); + expect(getIpRangeQuery('abc:def:ghi')).toStrictEqual({ + validSearch: false, + }); + + // full IP searches + expect(getIpRangeQuery('1.2.3.4')).toStrictEqual({ + validSearch: true, + rangeQuery: [ + { + key: 'ipv4', + mask: '1.2.3.4/32', + }, + ], + }); + expect(getIpRangeQuery('1.2.3.256')).toStrictEqual({ + validSearch: false, + rangeQuery: undefined, + }); + expect(getIpRangeQuery('fbbe:a363:9e14:987c:49cf:d4d0:d8c8:bc42')).toStrictEqual({ + validSearch: true, + rangeQuery: [ + { + key: 'ipv6', + mask: 'fbbe:a363:9e14:987c:49cf:d4d0:d8c8:bc42/128', + }, + ], + }); + + // partial IP searches - ipv4 + const partialIpv4 = getIpRangeQuery('12.34.'); + expect(partialIpv4.validSearch).toBe(true); + expect(partialIpv4.rangeQuery?.[0]).toStrictEqual({ + key: 'ipv4', + from: '12.34.0.0', + to: '12.34.255.255', + }); + expect(getIpRangeQuery('123.456.7')).toStrictEqual({ + validSearch: false, + rangeQuery: [], + }); + expect(getIpRangeQuery('12:34.56')).toStrictEqual({ + validSearch: false, + rangeQuery: [], + }); + + // partial IP searches - ipv6 + const partialIpv6 = getIpRangeQuery('fbbe:a363:9e14:987c:49cf'); + expect(partialIpv6.validSearch).toBe(true); + expect(partialIpv6.rangeQuery?.[0]).toStrictEqual({ + key: 'ipv6', + from: 'fbbe:a363:9e14:987c:49cf::', + to: 'fbbe:a363:9e14:987c:49cf:ffff:ffff:ffff', + }); + + // partial IP searches - unknown type + let partialUnknownIp = getIpRangeQuery('1234'); + expect(partialUnknownIp.validSearch).toBe(true); + expect(partialUnknownIp.rangeQuery?.length).toBe(1); + expect(partialUnknownIp.rangeQuery?.[0]).toStrictEqual({ + key: 'ipv6', + from: '1234::', + to: '1234:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + }); + + partialUnknownIp = getIpRangeQuery('123'); + expect(partialUnknownIp.validSearch).toBe(true); + expect(partialUnknownIp.rangeQuery?.length).toBe(2); + expect(partialUnknownIp.rangeQuery?.[0]).toStrictEqual({ + key: 'ipv4', + from: '123.0.0.0', + to: '123.255.255.255', + }); + expect(partialUnknownIp.rangeQuery?.[1]).toStrictEqual({ + key: 'ipv6', + from: '123::', + to: '123:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + }); + }); +}); diff --git a/examples/controls_example/common/options_list/ip_search.ts b/examples/controls_example/common/options_list/ip_search.ts new file mode 100644 index 0000000000000..565c2ed2a1df6 --- /dev/null +++ b/examples/controls_example/common/options_list/ip_search.ts @@ -0,0 +1,122 @@ +/* + * 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 ipaddr from 'ipaddr.js'; + +export interface IpRangeQuery { + validSearch: boolean; + rangeQuery?: Array<{ key: string; from: string; to: string } | { key: string; mask: string }>; +} +interface IpSegments { + segments: string[]; + type: 'ipv4' | 'ipv6' | 'unknown'; +} + +export const getIsValidFullIp = (searchString: string) => { + return ipaddr.IPv4.isValidFourPartDecimal(searchString) || ipaddr.IPv6.isValid(searchString); +}; + +export const getIpSegments = (searchString: string): IpSegments => { + if (searchString.indexOf('.') !== -1) { + // ipv4 takes priority - so if search string contains both `.` and `:` then it will just be an invalid ipv4 search + const ipv4Segments = searchString.split('.').filter((segment) => segment !== ''); + return { segments: ipv4Segments, type: 'ipv4' }; + } else if (searchString.indexOf(':') !== -1) { + // note that currently, because of the logic of splitting here, searching for shorthand IPv6 IPs is not supported (for example, + // must search for `59fb:0:0:0:0:1005:cc57:6571` and not `59fb::1005:cc57:6571` to get the expected match) + const ipv6Segments = searchString.split(':').filter((segment) => segment !== ''); + return { segments: ipv6Segments, type: 'ipv6' }; + } + return { segments: [searchString], type: 'unknown' }; +}; + +export const getMinMaxIp = ( + type: 'ipv4' | 'ipv6', + segments: IpSegments['segments'] +): { min: string; max: string } => { + const isIpv4 = type === 'ipv4'; + const minIp = isIpv4 + ? segments.concat(Array(4 - segments.length).fill('0')).join('.') + : segments.join(':') + '::'; + const maxIp = isIpv4 + ? segments.concat(Array(4 - segments.length).fill('255')).join('.') + : segments.concat(Array(8 - segments.length).fill('ffff')).join(':'); + return { + min: minIp, + max: maxIp, + }; +}; + +const buildFullIpSearchRangeQuery = (segments: IpSegments): IpRangeQuery['rangeQuery'] => { + const { type: ipType, segments: ipSegments } = segments; + + const isIpv4 = ipType === 'ipv4'; + const searchIp = ipSegments.join(isIpv4 ? '.' : ':'); + if (ipaddr.isValid(searchIp)) { + return [ + { + key: ipType, + mask: isIpv4 ? searchIp + '/32' : searchIp + '/128', + }, + ]; + } + return undefined; +}; + +const buildPartialIpSearchRangeQuery = (segments: IpSegments): IpRangeQuery['rangeQuery'] => { + const { type: ipType, segments: ipSegments } = segments; + + const ranges = []; + if (ipType === 'unknown' || ipType === 'ipv4') { + const { min: minIpv4, max: maxIpv4 } = getMinMaxIp('ipv4', ipSegments); + + if (ipaddr.isValid(minIpv4) && ipaddr.isValid(maxIpv4)) { + ranges.push({ + key: 'ipv4', + from: minIpv4, + to: maxIpv4, + }); + } + } + + if (ipType === 'unknown' || ipType === 'ipv6') { + const { min: minIpv6, max: maxIpv6 } = getMinMaxIp('ipv6', ipSegments); + + if (ipaddr.isValid(minIpv6) && ipaddr.isValid(maxIpv6)) { + ranges.push({ + key: 'ipv6', + from: minIpv6, + to: maxIpv6, + }); + } + } + + return ranges; +}; + +export const getIpRangeQuery = (searchString: string): IpRangeQuery => { + if (searchString.match(/^[A-Fa-f0-9.:]*$/) === null) { + return { validSearch: false }; + } + + const ipSegments = getIpSegments(searchString); + if (ipSegments.type === 'ipv4' && ipSegments.segments.length === 4) { + const ipv4RangeQuery = buildFullIpSearchRangeQuery(ipSegments); + return { validSearch: Boolean(ipv4RangeQuery), rangeQuery: ipv4RangeQuery }; + } + if (ipSegments.type === 'ipv6' && ipSegments.segments.length === 8) { + const ipv6RangeQuery = buildFullIpSearchRangeQuery(ipSegments); + return { validSearch: Boolean(ipv6RangeQuery), rangeQuery: ipv6RangeQuery }; + } + + const partialRangeQuery = buildPartialIpSearchRangeQuery(ipSegments); + return { + validSearch: !(partialRangeQuery?.length === 0), + rangeQuery: partialRangeQuery, + }; +}; diff --git a/examples/controls_example/common/options_list/options_list_selections.ts b/examples/controls_example/common/options_list/options_list_selections.ts new file mode 100644 index 0000000000000..1db66f3749e61 --- /dev/null +++ b/examples/controls_example/common/options_list/options_list_selections.ts @@ -0,0 +1,19 @@ +/* + * 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 { DataViewField } from '@kbn/data-views-plugin/common'; + +export type OptionsListSelection = string | number; + +export const getSelectionAsFieldType = ( + field: DataViewField, + key: string +): OptionsListSelection => { + const storeAsNumber = field.type === 'number' || field.type === 'date'; + return storeAsNumber ? +key : key; +}; diff --git a/examples/controls_example/common/options_list/suggestions_searching.test.ts b/examples/controls_example/common/options_list/suggestions_searching.test.ts new file mode 100644 index 0000000000000..fc78b3f97440d --- /dev/null +++ b/examples/controls_example/common/options_list/suggestions_searching.test.ts @@ -0,0 +1,118 @@ +/* + * 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 { isValidSearch } from './suggestions_searching'; + +describe('test validity of search strings', () => { + describe('number field', () => { + it('valid search - basic integer', () => { + expect(isValidSearch({ searchString: '123', fieldType: 'number' })).toBe(true); + }); + + it('valid search - floating point number', () => { + expect(isValidSearch({ searchString: '12.34', fieldType: 'number' })).toBe(true); + }); + + it('valid search - negative number', () => { + expect(isValidSearch({ searchString: '-42', fieldType: 'number' })).toBe(true); + }); + + it('invalid search - invalid character search string', () => { + expect(isValidSearch({ searchString: '1!a23', fieldType: 'number' })).toBe(false); + }); + }); + + // we do not currently support searching date fields, so they will always be invalid + describe('date field', () => { + it('invalid search - formatted date', () => { + expect(isValidSearch({ searchString: 'December 12, 2023', fieldType: 'date' })).toBe(false); + }); + + it('invalid search - invalid character search string', () => { + expect(isValidSearch({ searchString: '!!12/12/23?', fieldType: 'date' })).toBe(false); + }); + }); + + // only testing exact match validity here - the remainder of testing is covered by ./ip_search.test.ts + describe('ip field', () => { + it('valid search - ipv4', () => { + expect( + isValidSearch({ + searchString: '1.2.3.4', + fieldType: 'ip', + searchTechnique: 'exact', + }) + ).toBe(true); + }); + + it('valid search - full ipv6', () => { + expect( + isValidSearch({ + searchString: 'fbbe:a363:9e14:987c:49cf:d4d0:d8c8:bc42', + fieldType: 'ip', + searchTechnique: 'exact', + }) + ).toBe(true); + }); + + it('valid search - partial ipv6', () => { + expect( + isValidSearch({ + searchString: 'fbbe:a363::', + fieldType: 'ip', + searchTechnique: 'exact', + }) + ).toBe(true); + }); + + it('invalid search - invalid character search string', () => { + expect( + isValidSearch({ + searchString: '!!123.abc?', + fieldType: 'ip', + searchTechnique: 'exact', + }) + ).toBe(false); + }); + + it('invalid search - ipv4', () => { + expect( + isValidSearch({ + searchString: '1.2.3.256', + fieldType: 'ip', + searchTechnique: 'exact', + }) + ).toBe(false); + }); + + it('invalid search - ipv6', () => { + expect( + isValidSearch({ + searchString: '::fbbe:a363::', + fieldType: 'ip', + searchTechnique: 'exact', + }) + ).toBe(false); + }); + }); + + // string field searches can never be invalid + describe('string field', () => { + it('valid search - basic search string', () => { + expect(isValidSearch({ searchString: 'abc', fieldType: 'string' })).toBe(true); + }); + + it('valid search - numeric search string', () => { + expect(isValidSearch({ searchString: '123', fieldType: 'string' })).toBe(true); + }); + + it('valid search - complex search string', () => { + expect(isValidSearch({ searchString: '!+@abc*&[]', fieldType: 'string' })).toBe(true); + }); + }); +}); diff --git a/examples/controls_example/common/options_list/suggestions_searching.ts b/examples/controls_example/common/options_list/suggestions_searching.ts new file mode 100644 index 0000000000000..c4b115e659b0c --- /dev/null +++ b/examples/controls_example/common/options_list/suggestions_searching.ts @@ -0,0 +1,69 @@ +/* + * 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 { getIpRangeQuery, getIsValidFullIp } from './ip_search'; + +export type OptionsListSearchTechnique = 'prefix' | 'wildcard' | 'exact'; + +export const getDefaultSearchTechnique = (type: string): OptionsListSearchTechnique | undefined => { + const compatibleSearchTechniques = getCompatibleSearchTechniques(type); + return compatibleSearchTechniques.length > 0 ? compatibleSearchTechniques[0] : undefined; +}; + +export const getCompatibleSearchTechniques = (type?: string): OptionsListSearchTechnique[] => { + switch (type) { + case 'string': { + return ['prefix', 'wildcard', 'exact']; + } + case 'ip': { + return ['prefix', 'exact']; + } + case 'number': { + return ['exact']; + } + default: { + return []; + } + } +}; + +export const isValidSearch = ({ + searchString, + fieldType, + searchTechnique, +}: { + searchString?: string; + fieldType?: string; + searchTechnique?: OptionsListSearchTechnique; +}): boolean => { + if (!searchString || searchString.length === 0) return true; + + switch (fieldType) { + case 'number': { + return !isNaN(Number(searchString)); + } + case 'date': { + /** searching is not currently supported for date fields */ + return false; + } + case 'ip': { + if (searchTechnique === 'exact') { + /** + * exact match searching will throw an error if the search string isn't a **full** IP, + * so we need a slightly different validity check here than for other search techniques + */ + return getIsValidFullIp(searchString); + } + return getIpRangeQuery(searchString).validSearch; + } + default: { + /** string searches are always considered to be valid */ + return true; + } + } +}; diff --git a/examples/controls_example/common/options_list/suggestions_sorting.ts b/examples/controls_example/common/options_list/suggestions_sorting.ts new file mode 100644 index 0000000000000..a66fe1bdf2891 --- /dev/null +++ b/examples/controls_example/common/options_list/suggestions_sorting.ts @@ -0,0 +1,32 @@ +/* + * 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 { Direction } from '@elastic/eui'; + +export type OptionsListSortBy = '_count' | '_key'; + +export const OPTIONS_LIST_DEFAULT_SORT: OptionsListSortingType = { + by: '_count', + direction: 'desc', +}; + +export interface OptionsListSortingType { + by: OptionsListSortBy; + direction: Direction; +} + +export const getCompatibleSortingTypes = (type?: string): OptionsListSortBy[] => { + switch (type) { + case 'ip': { + return ['_count']; + } + default: { + return ['_count', '_key']; + } + } +}; diff --git a/examples/controls_example/public/app/react_control_example.tsx b/examples/controls_example/public/app/react_control_example.tsx index 7cd1b3e115b28..8e24eb10cbabd 100644 --- a/examples/controls_example/public/app/react_control_example.tsx +++ b/examples/controls_example/public/app/react_control_example.tsx @@ -40,6 +40,7 @@ import { import { toMountPoint } from '@kbn/react-kibana-mount'; import { ControlGroupApi } from '../react_controls/control_group/types'; +import { OPTIONS_LIST_CONTROL_TYPE } from '../react_controls/data_controls/options_list_control/constants'; import { RANGE_SLIDER_CONTROL_TYPE } from '../react_controls/data_controls/range_slider/types'; import { SEARCH_CONTROL_TYPE } from '../react_controls/data_controls/search_control/types'; import { TIMESLIDER_CONTROL_TYPE } from '../react_controls/timeslider_control/types'; @@ -58,13 +59,14 @@ const toggleViewButtons = [ }, ]; +const optionsListId = 'optionsList1'; const searchControlId = 'searchControl1'; const rangeSliderControlId = 'rangeSliderControl1'; const timesliderControlId = 'timesliderControl1'; const controlGroupPanels = { [searchControlId]: { type: SEARCH_CONTROL_TYPE, - order: 2, + order: 3, grow: true, width: 'medium', explicitInput: { @@ -92,12 +94,25 @@ const controlGroupPanels = { }, [timesliderControlId]: { type: TIMESLIDER_CONTROL_TYPE, - order: 0, + order: 4, grow: true, width: 'medium', explicitInput: { id: timesliderControlId, - title: 'Time slider', + enhancements: {}, + }, + }, + [optionsListId]: { + type: OPTIONS_LIST_CONTROL_TYPE, + order: 2, + grow: true, + width: 'medium', + explicitInput: { + id: searchControlId, + fieldName: 'agent.keyword', + title: 'Agent', + grow: true, + width: 'medium', enhancements: {}, }, }, @@ -386,6 +401,11 @@ export const ReactControlExample = ({ type: 'index-pattern', id: WEB_LOGS_DATA_VIEW_ID, }, + { + name: `controlGroup_${optionsListId}:optionsListControlDataView`, + type: 'index-pattern', + id: WEB_LOGS_DATA_VIEW_ID, + }, ], }), })} diff --git a/examples/controls_example/public/plugin.tsx b/examples/controls_example/public/plugin.tsx index 64f6686e92c8c..15f587033cb81 100644 --- a/examples/controls_example/public/plugin.tsx +++ b/examples/controls_example/public/plugin.tsx @@ -17,6 +17,7 @@ import { PLUGIN_ID } from './constants'; import img from './control_group_image.png'; import { EditControlAction } from './react_controls/actions/edit_control_action'; import { registerControlFactory } from './react_controls/control_factory_registry'; +import { OPTIONS_LIST_CONTROL_TYPE } from './react_controls/data_controls/options_list_control/constants'; import { RANGE_SLIDER_CONTROL_TYPE } from './react_controls/data_controls/range_slider/types'; import { SEARCH_CONTROL_TYPE } from './react_controls/data_controls/search_control/types'; import { TIMESLIDER_CONTROL_TYPE } from './react_controls/timeslider_control/types'; @@ -50,13 +51,14 @@ export class ControlsExamplePlugin }); }); - registerControlFactory(RANGE_SLIDER_CONTROL_TYPE, async () => { - const [{ getRangesliderControlFactory }, [coreStart, depsStart]] = await Promise.all([ - import('./react_controls/data_controls/range_slider/get_range_slider_control_factory'), + registerControlFactory(OPTIONS_LIST_CONTROL_TYPE, async () => { + const [{ getOptionsListControlFactory }, [coreStart, depsStart]] = await Promise.all([ + import( + './react_controls/data_controls/options_list_control/get_options_list_control_factory' + ), core.getStartServices(), ]); - - return getRangesliderControlFactory({ + return getOptionsListControlFactory({ core: coreStart, data: depsStart.data, dataViews: depsStart.data.dataViews, @@ -72,7 +74,21 @@ export class ControlsExamplePlugin return getSearchEmbeddableFactory({ core: coreStart, - dataViewsService: depsStart.data.dataViews, + data: depsStart.data, + dataViews: depsStart.data.dataViews, + }); + }); + + registerControlFactory(RANGE_SLIDER_CONTROL_TYPE, async () => { + const [{ getRangesliderControlFactory }, [coreStart, depsStart]] = await Promise.all([ + import('./react_controls/data_controls/range_slider/get_range_slider_control_factory'), + core.getStartServices(), + ]); + + return getRangesliderControlFactory({ + core: coreStart, + data: depsStart.data, + dataViews: depsStart.data.dataViews, }); }); diff --git a/examples/controls_example/public/react_controls/components/control_panel.tsx b/examples/controls_example/public/react_controls/components/control_panel.tsx index 7127f158511be..4d858d25aa45b 100644 --- a/examples/controls_example/public/react_controls/components/control_panel.tsx +++ b/examples/controls_example/public/react_controls/components/control_panel.tsx @@ -19,6 +19,7 @@ import { EuiIcon, EuiToolTip, } from '@elastic/eui'; +import { DEFAULT_CONTROL_WIDTH } from '@kbn/controls-plugin/common'; import { ViewMode } from '@kbn/embeddable-plugin/public'; import { i18n } from '@kbn/i18n'; import { @@ -119,6 +120,7 @@ export const ControlPanel = (activeIndex ?? -1), diff --git a/examples/controls_example/public/react_controls/components/control_setting_tooltip_label.tsx b/examples/controls_example/public/react_controls/components/control_setting_tooltip_label.tsx new file mode 100644 index 0000000000000..91b40e6a95e67 --- /dev/null +++ b/examples/controls_example/public/react_controls/components/control_setting_tooltip_label.tsx @@ -0,0 +1,32 @@ +/* + * 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 React from 'react'; + +import { EuiFlexGroup, EuiFlexItem, EuiIconTip } from '@elastic/eui'; +import { css } from '@emotion/react'; + +export const ControlSettingTooltipLabel = ({ + label, + tooltip, +}: { + label: string; + tooltip: string; +}) => ( + + {label} + + + + +); diff --git a/examples/controls_example/public/react_controls/control_group/get_control_group_factory.tsx b/examples/controls_example/public/react_controls/control_group/get_control_group_factory.tsx index 84bf9c949210a..64e452aae1180 100644 --- a/examples/controls_example/public/react_controls/control_group/get_control_group_factory.tsx +++ b/examples/controls_example/public/react_controls/control_group/get_control_group_factory.tsx @@ -83,6 +83,7 @@ export const getControlGroupEmbeddableFactory = (services: { const labelPosition$ = new BehaviorSubject( // TODO: Rename `ControlStyle` initialLabelPosition ?? DEFAULT_CONTROL_STYLE // TODO: Rename `DEFAULT_CONTROL_STYLE` ); + const allowExpensiveQueries$ = new BehaviorSubject(true); /** TODO: Handle loading; loading should be true if any child is loading */ const dataLoading$ = new BehaviorSubject(false); @@ -114,6 +115,7 @@ export const getControlGroupEmbeddableFactory = (services: { ), ignoreParentSettings$, autoApplySelections$, + allowExpensiveQueries$, unsavedChanges, resetUnsavedChanges: () => { // TODO: Implement this @@ -167,6 +169,22 @@ export const getControlGroupEmbeddableFactory = (services: { dataViews.next(newDataViews) ); + /** Fetch the allowExpensiveQuries setting for the children to use if necessary */ + try { + const { allowExpensiveQueries } = await services.core.http.get<{ + allowExpensiveQueries: boolean; + // TODO: Rename this route as part of https://github.com/elastic/kibana/issues/174961 + }>('/internal/controls/optionsList/getExpensiveQueriesSetting', { + version: '1', + }); + if (!allowExpensiveQueries) { + // only set if this returns false, since it defaults to true + allowExpensiveQueries$.next(allowExpensiveQueries); + } + } catch { + // do nothing - default to true on error (which it was initialized to) + } + return { api, Component: () => { diff --git a/examples/controls_example/public/react_controls/control_group/types.ts b/examples/controls_example/public/react_controls/control_group/types.ts index cfbd525dab704..9d1a390125dad 100644 --- a/examples/controls_example/public/react_controls/control_group/types.ts +++ b/examples/controls_example/public/react_controls/control_group/types.ts @@ -58,6 +58,7 @@ export type ControlGroupApi = PresentationContainer & autoApplySelections$: PublishingSubject; controlFetch$: (controlUuid: string) => Observable; ignoreParentSettings$: PublishingSubject; + allowExpensiveQueries$: PublishingSubject; untilInitialized: () => Promise; }; diff --git a/examples/controls_example/public/react_controls/data_controls/data_control_editor.test.tsx b/examples/controls_example/public/react_controls/data_controls/data_control_editor.test.tsx index d90e5349f36d8..5cf4a86752240 100644 --- a/examples/controls_example/public/react_controls/data_controls/data_control_editor.test.tsx +++ b/examples/controls_example/public/react_controls/data_controls/data_control_editor.test.tsx @@ -30,7 +30,7 @@ import { getMockedOptionsListControlFactory, getMockedRangeSliderControlFactory, getMockedSearchControlFactory, -} from './mocks/data_control_mocks'; +} from './mocks/factory_mocks'; import { ControlFactory } from '../types'; import { DataControlApi, DefaultDataControlState } from './types'; diff --git a/examples/controls_example/public/react_controls/data_controls/data_control_editor.tsx b/examples/controls_example/public/react_controls/data_controls/data_control_editor.tsx index 6776a24e1874d..53a25073375bf 100644 --- a/examples/controls_example/public/react_controls/data_controls/data_control_editor.tsx +++ b/examples/controls_example/public/react_controls/data_controls/data_control_editor.tsx @@ -5,7 +5,7 @@ * Side Public License, v 1. */ -import React, { useEffect, useMemo, useState } from 'react'; +import React, { useMemo, useState } from 'react'; import useAsync from 'react-use/lib/useAsync'; import { @@ -146,7 +146,7 @@ export const DataControlEditor = ( initialState.controlType ); - const [controlEditorValid, setControlEditorValid] = useState(false); + const [controlOptionsValid, setControlOptionsValid] = useState(true); /** TODO: Make `editorConfig` work when refactoring the `ControlGroupRenderer` */ // const editorConfig = controlGroup.getEditorConfig(); @@ -181,19 +181,13 @@ export const DataControlEditor = { - setControlEditorValid( - Boolean(editorState.fieldName) && Boolean(selectedDataView) && Boolean(selectedControlType) - ); - }, [editorState.fieldName, setControlEditorValid, selectedDataView, selectedControlType]); - const CustomSettingsComponent = useMemo(() => { if (!selectedControlType || !editorState.fieldName || !fieldRegistry) return; - const controlFactory = getControlFactory(selectedControlType) as DataControlFactory; const CustomSettings = controlFactory.CustomOptionsComponent; if (!CustomSettings) return; + return ( setEditorState({ ...editorState, ...newState })} - setControlEditorValid={setControlEditorValid} + setControlEditorValid={setControlOptionsValid} + parentApi={controlGroup} /> ); - }, [fieldRegistry, selectedControlType, editorState]); + }, [fieldRegistry, selectedControlType, initialState, editorState, controlGroup]); return ( <> @@ -295,6 +291,8 @@ export const DataControlEditor = @@ -407,7 +405,14 @@ export const DataControlEditor = { onSave(editorState, selectedControlType!); }} diff --git a/examples/controls_example/public/react_controls/data_controls/initialize_data_control.ts b/examples/controls_example/public/react_controls/data_controls/initialize_data_control.ts index 1055047779f71..42119456bc0ef 100644 --- a/examples/controls_example/public/react_controls/data_controls/initialize_data_control.ts +++ b/examples/controls_example/public/react_controls/data_controls/initialize_data_control.ts @@ -10,7 +10,11 @@ import { isEqual } from 'lodash'; import { BehaviorSubject, combineLatest, first, switchMap } from 'rxjs'; import { CoreStart } from '@kbn/core-lifecycle-browser'; -import { DataView, DATA_VIEW_SAVED_OBJECT_TYPE } from '@kbn/data-views-plugin/common'; +import { + DataView, + DataViewField, + DATA_VIEW_SAVED_OBJECT_TYPE, +} from '@kbn/data-views-plugin/common'; import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { Filter } from '@kbn/es-query'; import { SerializedPanelState } from '@kbn/presentation-containers'; @@ -21,12 +25,16 @@ import { ControlGroupApi } from '../control_group/types'; import { initializeDefaultControlApi } from '../initialize_default_control_api'; import { ControlApiInitialization, ControlStateManager, DefaultControlState } from '../types'; import { openDataControlEditor } from './open_data_control_editor'; -import { DataControlApi, DefaultDataControlState } from './types'; +import { DataControlApi, DataControlFieldFormatter, DefaultDataControlState } from './types'; export const initializeDataControl = ( controlId: string, controlType: string, state: DefaultDataControlState, + /** + * `This state manager` should only include the state that the data control editor is + * responsible for managing + */ editorStateManager: ControlStateManager, controlGroup: ControlGroupApi, services: { @@ -49,6 +57,10 @@ export const initializeDataControl = ( const fieldName = new BehaviorSubject(state.fieldName); const dataViews = new BehaviorSubject(undefined); const filters$ = new BehaviorSubject(undefined); + const field$ = new BehaviorSubject(undefined); + const fieldFormatter = new BehaviorSubject((toFormat: any) => + String(toFormat) + ); const stateManager: ControlStateManager = { ...defaultControl.stateManager, @@ -106,7 +118,13 @@ export const initializeDataControl = ( } else { clearBlockingError(); } + + field$.next(field); defaultPanelTitle.next(field ? field.displayName || field.name : nextFieldName); + const spec = field?.toSpec(); + if (spec) { + fieldFormatter.next(dataView.getFormatterForField(spec).getConverterFor('text')); + } } ); @@ -116,6 +134,7 @@ export const initializeDataControl = ( ...stateManager, ...editorStateManager, } as ControlStateManager; + const initialState = ( Object.keys(mergedStateManager) as Array ).reduce((prev, key) => { @@ -158,6 +177,8 @@ export const initializeDataControl = ( panelTitle, defaultPanelTitle, dataViews, + field$, + fieldFormatter, onEdit, filters$, setOutputFilter: (newFilter: Filter | undefined) => { diff --git a/examples/controls_example/public/react_controls/data_controls/mocks/api_mocks.tsx b/examples/controls_example/public/react_controls/data_controls/mocks/api_mocks.tsx new file mode 100644 index 0000000000000..7f08a96e0ad71 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/mocks/api_mocks.tsx @@ -0,0 +1,46 @@ +/* + * 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 { BehaviorSubject } from 'rxjs'; + +import { OptionsListSuggestions } from '@kbn/controls-plugin/common/options_list/types'; +import { DataViewField } from '@kbn/data-views-plugin/common'; + +import { OptionsListSelection } from '../../../../common/options_list/options_list_selections'; +import { OptionsListSearchTechnique } from '../../../../common/options_list/suggestions_searching'; +import { OptionsListSortingType } from '../../../../common/options_list/suggestions_sorting'; +import { OptionsListDisplaySettings } from '../options_list_control/types'; + +export const getOptionsListMocks = () => { + return { + api: { + uuid: 'testControl', + field$: new BehaviorSubject({ type: 'string' } as DataViewField), + availableOptions$: new BehaviorSubject(undefined), + invalidSelections$: new BehaviorSubject>(new Set([])), + totalCardinality$: new BehaviorSubject(undefined), + dataLoading: new BehaviorSubject(false), + parentApi: { + allowExpensiveQueries$: new BehaviorSubject(true), + }, + fieldFormatter: new BehaviorSubject((value: string | number) => String(value)), + makeSelection: jest.fn(), + }, + stateManager: { + searchString: new BehaviorSubject(''), + searchStringValid: new BehaviorSubject(true), + fieldName: new BehaviorSubject('field'), + exclude: new BehaviorSubject(undefined), + existsSelected: new BehaviorSubject(undefined), + sort: new BehaviorSubject(undefined), + selectedOptions: new BehaviorSubject(undefined), + searchTechnique: new BehaviorSubject(undefined), + }, + displaySettings: {} as OptionsListDisplaySettings, + }; +}; diff --git a/examples/controls_example/public/react_controls/data_controls/mocks/data_control_mocks.tsx b/examples/controls_example/public/react_controls/data_controls/mocks/factory_mocks.tsx similarity index 100% rename from examples/controls_example/public/react_controls/data_controls/mocks/data_control_mocks.tsx rename to examples/controls_example/public/react_controls/data_controls/mocks/factory_mocks.tsx diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list.scss b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list.scss new file mode 100644 index 0000000000000..029edd5a8a363 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list.scss @@ -0,0 +1,90 @@ +.optionsList__inputButtonOverride { + max-inline-size: 100% !important; + + .euiButtonEmpty { + border-end-start-radius: 0 !important; + border-start-start-radius: 0 !important; + } +} + +.optionsList--filterBtn { + font-weight: $euiFontWeightRegular !important; + color: $euiTextSubduedColor !important; + + .optionsList--selectionText { + flex-grow: 1; + text-align: left; + } + + .optionsList__selections { + overflow: hidden !important; + } + + .optionsList__filter { + color: $euiTextColor; + font-weight: $euiFontWeightMedium; + } + + .optionsList__filterInvalid { + color: $euiColorWarningText; + } + + .optionsList__negateLabel { + font-weight: $euiFontWeightSemiBold; + font-size: $euiSizeM; + color: $euiColorDanger; + } +} + +.optionsList--sortPopover { + width: $euiSizeXL * 7; +} + +.optionsList__existsFilter { + font-style: italic; + font-weight: $euiFontWeightMedium; +} + +.optionsList__popover { + .optionsList__actions { + padding: 0 $euiSizeS; + border-bottom: $euiBorderThin; + border-color: darken($euiColorLightestShade, 2%); + + .optionsList__searchRow { + padding-top: $euiSizeS + } + + .optionsList__actionsRow { + margin: calc($euiSizeS / 2) 0 !important; + + .optionsList__actionBarDivider { + height: $euiSize; + border-right: $euiBorderThin; + } + } + } + + .optionsList-control-ignored-selection-title { + padding-left: $euiSizeM; + } + + .optionsList__selectionInvalid { + color: $euiColorWarningText; + } + + .optionslist--loadingMoreGroupLabel { + text-align: center; + padding: $euiSizeM; + font-style: italic; + height: $euiSizeXXL !important; + } + + .optionslist--endOfOptionsGroupLabel { + text-align: center; + font-size: $euiSizeM; + height: auto !important; + color: $euiTextSubduedColor; + padding: $euiSizeM; + } +} diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_control.test.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_control.test.tsx new file mode 100644 index 0000000000000..c18233d85fc62 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_control.test.tsx @@ -0,0 +1,120 @@ +/* + * 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 React from 'react'; + +import { DataViewField } from '@kbn/data-views-plugin/common'; +import { render } from '@testing-library/react'; +import { ControlStateManager } from '../../../types'; +import { getOptionsListMocks } from '../../mocks/api_mocks'; +import { OptionsListControlContext } from '../options_list_context_provider'; +import { OptionsListComponentApi, OptionsListComponentState } from '../types'; +import { OptionsListControl } from './options_list_control'; + +describe('Options list control', () => { + const mountComponent = ({ + api, + displaySettings, + stateManager, + }: { + api: any; + displaySettings: any; + stateManager: any; + }) => { + return render( + , + }} + > + + + ); + }; + + test('if exclude = false and existsSelected = true, then the option should read "Exists"', async () => { + const mocks = getOptionsListMocks(); + mocks.api.uuid = 'testExists'; + mocks.stateManager.exclude.next(false); + mocks.stateManager.existsSelected.next(true); + const control = mountComponent(mocks); + const existsOption = control.getByTestId('optionsList-control-testExists'); + expect(existsOption).toHaveTextContent('Exists'); + }); + + test('if exclude = true and existsSelected = true, then the option should read "Does not exist"', async () => { + const mocks = getOptionsListMocks(); + mocks.api.uuid = 'testDoesNotExist'; + mocks.stateManager.exclude.next(true); + mocks.stateManager.existsSelected.next(true); + const control = mountComponent(mocks); + const existsOption = control.getByTestId('optionsList-control-testDoesNotExist'); + expect(existsOption).toHaveTextContent('DOES NOT Exist'); + }); + + describe('renders proper delimiter', () => { + test('keyword field', async () => { + const mocks = getOptionsListMocks(); + mocks.api.uuid = 'testDelimiter'; + mocks.api.availableOptions$.next([ + { value: 'woof', docCount: 5 }, + { value: 'bark', docCount: 10 }, + { value: 'meow', docCount: 12 }, + ]); + mocks.stateManager.selectedOptions.next(['woof', 'bark']); + mocks.api.field$.next({ + name: 'Test keyword field', + type: 'keyword', + } as DataViewField); + const control = mountComponent(mocks); + const selections = control.getByTestId('optionsListSelections'); + expect(selections.textContent).toBe('woof, bark '); + }); + }); + + test('number field', async () => { + const mocks = getOptionsListMocks(); + mocks.api.uuid = 'testDelimiter'; + mocks.api.availableOptions$.next([ + { value: 1, docCount: 5 }, + { value: 2, docCount: 10 }, + { value: 3, docCount: 12 }, + ]); + mocks.stateManager.selectedOptions.next([1, 2]); + mocks.api.field$.next({ + name: 'Test keyword field', + type: 'number', + } as DataViewField); + const control = mountComponent(mocks); + const selections = control.getByTestId('optionsListSelections'); + expect(selections.textContent).toBe('1; 2 '); + }); + + test('should display invalid state', async () => { + const mocks = getOptionsListMocks(); + mocks.api.uuid = 'testInvalid'; + mocks.api.availableOptions$.next([ + { value: 'woof', docCount: 5 }, + { value: 'bark', docCount: 10 }, + { value: 'meow', docCount: 12 }, + ]); + mocks.stateManager.selectedOptions.next(['woof', 'bark']); + mocks.api.invalidSelections$.next(new Set(['woof'])); + mocks.api.field$.next({ + name: 'Test keyword field', + type: 'number', + } as DataViewField); + + const control = mountComponent(mocks); + expect( + control.queryByTestId('optionsList__invalidSelectionsToken-testInvalid') + ).toBeInTheDocument(); + }); +}); diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_control.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_control.tsx new file mode 100644 index 0000000000000..998ca612a34fb --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_control.tsx @@ -0,0 +1,198 @@ +/* + * 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 { isEmpty } from 'lodash'; +import React, { useMemo, useState } from 'react'; + +import { + EuiFilterButton, + EuiFilterGroup, + EuiFlexGroup, + EuiFlexItem, + EuiInputPopover, + EuiToken, + EuiToolTip, + htmlIdGenerator, +} from '@elastic/eui'; +import { + useBatchedOptionalPublishingSubjects, + useBatchedPublishingSubjects, +} from '@kbn/presentation-publishing'; + +import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections'; +import { MIN_POPOVER_WIDTH } from '../constants'; +import { useOptionsListContext } from '../options_list_context_provider'; +import { OptionsListPopover } from './options_list_popover'; +import { OptionsListStrings } from '../options_list_strings'; + +import './options_list.scss'; + +export const OptionsListControl = ({ + controlPanelClassName, +}: { + controlPanelClassName: string; +}) => { + const popoverId = useMemo(() => htmlIdGenerator()(), []); + const { api, stateManager, displaySettings } = useOptionsListContext(); + + const [isPopoverOpen, setPopoverOpen] = useState(false); + const [ + excludeSelected, + existsSelected, + selectedOptions, + invalidSelections, + field, + loading, + panelTitle, + fieldFormatter, + ] = useBatchedPublishingSubjects( + stateManager.exclude, + stateManager.existsSelected, + stateManager.selectedOptions, + api.invalidSelections$, + api.field$, + api.dataLoading, + api.panelTitle, + api.fieldFormatter + ); + const [defaultPanelTitle] = useBatchedOptionalPublishingSubjects(api.defaultPanelTitle); + + const delimiter = useMemo(() => OptionsListStrings.control.getSeparator(field?.type), [field]); + + const { hasSelections, selectionDisplayNode, selectedOptionsCount } = useMemo(() => { + return { + hasSelections: !isEmpty(selectedOptions), + selectedOptionsCount: selectedOptions?.length, + selectionDisplayNode: ( + + +
+ {excludeSelected && ( + <> + + {existsSelected + ? OptionsListStrings.control.getExcludeExists() + : OptionsListStrings.control.getNegate()} + {' '} + + )} + {existsSelected ? ( + + {OptionsListStrings.controlAndPopover.getExists(+Boolean(excludeSelected))} + + ) : ( + <> + {selectedOptions?.length + ? selectedOptions.map((value: OptionsListSelection, i, { length }) => { + const text = `${fieldFormatter(value)}${ + i + 1 === length ? '' : delimiter + } `; + const isInvalid = invalidSelections?.has(value); + return ( + + {text} + + ); + }) + : null} + + )} +
+
+ {invalidSelections && invalidSelections.size > 0 && ( + + + + + + )} +
+ ), + }; + }, [ + selectedOptions, + excludeSelected, + existsSelected, + fieldFormatter, + delimiter, + invalidSelections, + api.uuid, + ]); + + const button = ( + <> + setPopoverOpen(!isPopoverOpen)} + isSelected={isPopoverOpen} + numActiveFilters={selectedOptionsCount} + hasActiveFilters={Boolean(selectedOptionsCount)} + textProps={{ className: 'optionsList--selectionText' }} + aria-label={panelTitle ?? defaultPanelTitle} + aria-expanded={isPopoverOpen} + aria-controls={popoverId} + role="combobox" + > + {hasSelections || existsSelected + ? selectionDisplayNode + : displaySettings.placeholder ?? OptionsListStrings.control.getPlaceholder()} + + + ); + + return ( + + setPopoverOpen(false)} + panelClassName="optionsList__popoverOverride" + panelProps={{ + title: panelTitle ?? defaultPanelTitle, + 'aria-label': OptionsListStrings.popover.getAriaLabel(panelTitle ?? defaultPanelTitle!), + }} + > + + + + ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx new file mode 100644 index 0000000000000..5023a5d276eb5 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx @@ -0,0 +1,261 @@ +/* + * 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 React from 'react'; + +import userEvent from '@testing-library/user-event'; +import { DataViewField } from '@kbn/data-views-plugin/common'; +import { act, render } from '@testing-library/react'; + +import { getMockedControlGroupApi } from '../../../mocks/control_mocks'; +import { CustomOptionsComponentProps, DefaultDataControlState } from '../../types'; +import { OptionsListControlState } from '../types'; +import { OptionsListEditorOptions } from './options_list_editor_options'; +import { ControlGroupApi } from '../../../control_group/types'; +import { BehaviorSubject } from 'rxjs'; + +describe('Options list sorting button', () => { + const getMockedState = ( + overwrite?: Partial + ): State => { + return { + dataViewId: 'testDataViewId', + fieldName: 'fieldName', + ...overwrite, + } as State; + }; + + const updateState = jest.fn(); + const mountComponent = ({ + initialState, + field, + parentApi = getMockedControlGroupApi(), + }: Pick & { + parentApi?: ControlGroupApi; + }) => { + const component = render( + + ); + return component; + }; + + test('run past timeout', () => { + const component = mountComponent({ + initialState: getMockedState({ runPastTimeout: false }), + field: { type: 'string' } as DataViewField, + }); + const toggle = component.getByTestId('optionsListControl__runPastTimeoutAdditionalSetting'); + expect(toggle.getAttribute('aria-checked')).toBe('false'); + userEvent.click(toggle); + expect(updateState).toBeCalledWith({ runPastTimeout: true }); + expect(toggle.getAttribute('aria-checked')).toBe('true'); + }); + + test('selection options', () => { + const component = mountComponent({ + initialState: getMockedState({ singleSelect: true }), + field: { type: 'string' } as DataViewField, + }); + + const multiSelect = component.container.querySelector('input#multi'); + expect(multiSelect).not.toBeChecked(); + expect(component.container.querySelector('input#single')).toBeChecked(); + + userEvent.click(multiSelect!); + expect(updateState).toBeCalledWith({ singleSelect: false }); + expect(multiSelect).toBeChecked(); + expect(component.container.querySelector('input#single')).not.toBeChecked(); + }); + + describe('custom search options', () => { + test('do not show custom search options when `allowExpensiveQueries` is false', async () => { + const allowExpensiveQueries$ = new BehaviorSubject(false); + const controlGroupApi = getMockedControlGroupApi(undefined, { allowExpensiveQueries$ }); + const component = mountComponent({ + initialState: getMockedState(), + field: { type: 'string' } as DataViewField, + parentApi: controlGroupApi, + }); + expect( + component.queryByTestId('optionsListControl__searchOptionsRadioGroup') + ).not.toBeInTheDocument(); + + act(() => allowExpensiveQueries$.next(true)); + expect( + component.queryByTestId('optionsListControl__searchOptionsRadioGroup') + ).toBeInTheDocument(); + }); + + test('string field has three custom search options', async () => { + const component = mountComponent({ + initialState: getMockedState(), + field: { type: 'string' } as DataViewField, + }); + expect( + component.queryByTestId('optionsListControl__searchOptionsRadioGroup') + ).toBeInTheDocument(); + const validTechniques = ['prefix', 'exact', 'wildcard']; + validTechniques.forEach((technique) => { + expect( + component.queryByTestId(`optionsListControl__${technique}SearchOptionAdditionalSetting`) + ).toBeInTheDocument(); + }); + }); + + test('IP field has two custom search options', async () => { + const component = mountComponent({ + initialState: getMockedState(), + field: { type: 'ip' } as DataViewField, + }); + expect( + component.queryByTestId('optionsListControl__searchOptionsRadioGroup') + ).toBeInTheDocument(); + const validTechniques = ['prefix', 'exact']; + validTechniques.forEach((technique) => { + expect( + component.queryByTestId(`optionsListControl__${technique}SearchOptionAdditionalSetting`) + ).toBeInTheDocument(); + }); + }); + + test('number field does not have custom search options', async () => { + const component = mountComponent({ + initialState: getMockedState(), + field: { type: 'number' } as DataViewField, + }); + expect( + component.queryByTestId('optionsListControl__searchOptionsRadioGroup') + ).not.toBeInTheDocument(); + }); + + test('date field does not have custom search options', async () => { + const component = mountComponent({ + initialState: getMockedState(), + field: { type: 'date' } as DataViewField, + }); + expect( + component.queryByTestId('optionsListControl__searchOptionsRadioGroup') + ).not.toBeInTheDocument(); + }); + + describe('responds to field type changing', () => { + test('reset back to initial state when valid', async () => { + const initialState = getMockedState({ searchTechnique: 'exact' }); + const parentApi = getMockedControlGroupApi(); + const component = render( + + ); + + /** loads initial state properly */ + expect(component.container.querySelector('input#prefix')).not.toBeChecked(); + expect(component.container.querySelector('input#exact')).toBeChecked(); + expect(component.container.querySelector('input#wildcard')).not.toBeChecked(); + + /** responds to the field type changing */ + component.rerender( + + ); + + expect(updateState).toBeCalledWith({ searchTechnique: 'exact' }); + expect(component.container.querySelector('input#prefix')).not.toBeChecked(); + expect(component.container.querySelector('input#exact')).toBeChecked(); + expect(component.container.querySelector('input#wildcard')).toBeNull(); + }); + + test('if the current selection is valid, send that to the parent editor state', async () => { + const initialState = getMockedState(); + const parentApi = getMockedControlGroupApi(); + const component = render( + + ); + + /** loads default compatible search technique properly */ + expect(component.container.querySelector('input#prefix')).toBeChecked(); + expect(component.container.querySelector('input#exact')).not.toBeChecked(); + expect(component.container.querySelector('input#wildcard')).not.toBeChecked(); + + /** responds to change in search technique */ + const exactSearch = component.container.querySelector('input#exact'); + userEvent.click(exactSearch!); + expect(updateState).toBeCalledWith({ searchTechnique: 'exact' }); + expect(component.container.querySelector('input#prefix')).not.toBeChecked(); + expect(exactSearch).toBeChecked(); + expect(component.container.querySelector('input#wildcard')).not.toBeChecked(); + + /** responds to the field type changing */ + component.rerender( + + ); + + expect(updateState).toBeCalledWith({ searchTechnique: 'exact' }); + }); + + test('if neither the initial or current search technique is valid, revert to the default', async () => { + const initialState = getMockedState({ searchTechnique: 'wildcard' }); + const parentApi = getMockedControlGroupApi(); + const component = render( + + ); + + /** responds to change in search technique */ + const prefixSearch = component.container.querySelector('input#prefix'); + userEvent.click(prefixSearch!); + expect(updateState).toBeCalledWith({ searchTechnique: 'prefix' }); + + /** responds to the field type changing */ + component.rerender( + + ); + + expect(updateState).toBeCalledWith({ searchTechnique: 'exact' }); + }); + }); + }); +}); diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_editor_options.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_editor_options.tsx new file mode 100644 index 0000000000000..3374104c7dabb --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_editor_options.tsx @@ -0,0 +1,175 @@ +/* + * 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 React, { useEffect, useMemo, useState } from 'react'; + +import { EuiFormRow, EuiRadioGroup, EuiSwitch } from '@elastic/eui'; +import { useStateFromPublishingSubject } from '@kbn/presentation-publishing'; + +import { + getCompatibleSearchTechniques, + OptionsListSearchTechnique, +} from '../../../../../common/options_list/suggestions_searching'; +import { ControlSettingTooltipLabel } from '../../../components/control_setting_tooltip_label'; +import { CustomOptionsComponentProps } from '../../types'; +import { DEFAULT_SEARCH_TECHNIQUE } from '../constants'; +import { OptionsListControlState } from '../types'; +import { OptionsListStrings } from '../options_list_strings'; + +const selectionOptions = [ + { + id: 'multi', + label: OptionsListStrings.editor.selectionTypes.multi.getLabel(), + 'data-test-subj': 'optionsListControl__multiSearchOptionAdditionalSetting', + }, + { + id: 'single', + label: OptionsListStrings.editor.selectionTypes.single.getLabel(), + 'data-test-subj': 'optionsListControl__singleSearchOptionAdditionalSetting', + }, +]; + +const allSearchOptions = [ + { + id: 'prefix', + label: ( + + ), + 'data-test-subj': 'optionsListControl__prefixSearchOptionAdditionalSetting', + }, + { + id: 'wildcard', + label: ( + + ), + 'data-test-subj': 'optionsListControl__wildcardSearchOptionAdditionalSetting', + }, + { + id: 'exact', + label: ( + + ), + 'data-test-subj': 'optionsListControl__exactSearchOptionAdditionalSetting', + }, +]; + +export const OptionsListEditorOptions = ({ + initialState, + field, + updateState, + parentApi, +}: CustomOptionsComponentProps) => { + const allowExpensiveQueries = useStateFromPublishingSubject(parentApi.allowExpensiveQueries$); + + const [singleSelect, setSingleSelect] = useState(initialState.singleSelect ?? false); + const [runPastTimeout, setRunPastTimeout] = useState( + initialState.runPastTimeout ?? false + ); + const [searchTechnique, setSearchTechnique] = useState( + initialState.searchTechnique ?? DEFAULT_SEARCH_TECHNIQUE + ); + + const compatibleSearchTechniques = useMemo( + () => getCompatibleSearchTechniques(field.type), + [field.type] + ); + + const searchOptions = useMemo(() => { + return allSearchOptions.filter((searchOption) => { + return compatibleSearchTechniques.includes(searchOption.id as OptionsListSearchTechnique); + }); + }, [compatibleSearchTechniques]); + + useEffect(() => { + /** + * when field type changes, ensure that the selected search technique is still valid; + * if the selected search technique **isn't** valid, reset it to the default + */ + const initialSearchTechniqueValid = + initialState.searchTechnique && + compatibleSearchTechniques.includes(initialState.searchTechnique); + const currentSearchTechniqueValid = compatibleSearchTechniques.includes(searchTechnique); + + if (initialSearchTechniqueValid) { + // reset back to initial state if possible on field change + setSearchTechnique(initialState.searchTechnique!); + updateState({ searchTechnique: initialState.searchTechnique }); + } else if (currentSearchTechniqueValid) { + // otherwise, if the current selection is valid, send that to the parent editor state + updateState({ searchTechnique }); + } else { + // finally, if neither the initial or current search technique is valid, revert to the default + setSearchTechnique(compatibleSearchTechniques[0]); + updateState({ searchTechnique: compatibleSearchTechniques[0] }); + } + + // Note: We only want to call this when compatible search techniques changes + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [compatibleSearchTechniques]); + + return ( + <> + + { + const newSingleSelect = id === 'single'; + setSingleSelect(newSingleSelect); + updateState({ singleSelect: newSingleSelect }); + }} + /> + + {allowExpensiveQueries && compatibleSearchTechniques.length > 1 && ( + + { + const newSearchTechnique = id as OptionsListSearchTechnique; + setSearchTechnique(newSearchTechnique); + updateState({ searchTechnique: newSearchTechnique }); + }} + /> + + )} + + + } + checked={runPastTimeout} + onChange={() => { + const newRunPastTimeout = !runPastTimeout; + setRunPastTimeout(newRunPastTimeout); + updateState({ runPastTimeout: newRunPastTimeout }); + }} + data-test-subj={'optionsListControl__runPastTimeoutAdditionalSetting'} + /> + + + ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover.test.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover.test.tsx new file mode 100644 index 0000000000000..05d601e093a4e --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover.test.tsx @@ -0,0 +1,365 @@ +/* + * 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 React from 'react'; + +import { DataViewField } from '@kbn/data-views-plugin/common'; +import { act, render, RenderResult, within } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; + +import { BehaviorSubject } from 'rxjs'; +import { ControlStateManager } from '../../../types'; +import { getOptionsListMocks } from '../../mocks/api_mocks'; +import { OptionsListControlContext } from '../options_list_context_provider'; +import { + OptionsListComponentApi, + OptionsListComponentState, + OptionsListDisplaySettings, +} from '../types'; +import { OptionsListPopover } from './options_list_popover'; + +describe('Options list popover', () => { + const waitOneTick = () => act(() => new Promise((resolve) => setTimeout(resolve, 0))); + + const mountComponent = ({ + api, + displaySettings, + stateManager, + }: { + api: any; + displaySettings: any; + stateManager: any; + }) => { + return render( + , + }} + > + + + ); + }; + + const clickShowOnlySelections = (popover: RenderResult) => { + const showOnlySelectedButton = popover.getByTestId('optionsList-control-show-only-selected'); + userEvent.click(showOnlySelectedButton); + }; + + test('no available options', async () => { + const mocks = getOptionsListMocks(); + mocks.api.availableOptions$.next([]); + const popover = mountComponent(mocks); + + const availableOptionsDiv = popover.getByTestId('optionsList-control-available-options'); + const noOptionsDiv = within(availableOptionsDiv).getByTestId( + 'optionsList-control-noSelectionsMessage' + ); + expect(noOptionsDiv).toBeInTheDocument(); + }); + + test('clicking options calls `makeSelection`', async () => { + const mocks = getOptionsListMocks(); + mocks.api.availableOptions$.next([ + { value: 'woof', docCount: 5 }, + { value: 'bark', docCount: 10 }, + { value: 'meow', docCount: 12 }, + ]); + const popover = mountComponent(mocks); + + const existsOption = popover.getByTestId('optionsList-control-selection-exists'); + userEvent.click(existsOption); + expect(mocks.api.makeSelection).toBeCalledWith('exists-option', false); + + let woofOption = popover.getByTestId('optionsList-control-selection-woof'); + userEvent.click(woofOption); + expect(mocks.api.makeSelection).toBeCalledWith('woof', false); + + // simulate `makeSelection` + mocks.stateManager.selectedOptions.next(['woof']); + await waitOneTick(); + + clickShowOnlySelections(popover); + woofOption = popover.getByTestId('optionsList-control-selection-woof'); + userEvent.click(woofOption); + expect(mocks.api.makeSelection).toBeCalledWith('woof', true); + }); + + describe('show only selected', () => { + test('show only selected options', async () => { + const mocks = getOptionsListMocks(); + const selections = ['woof', 'bark']; + mocks.api.availableOptions$.next([ + { value: 'woof', docCount: 5 }, + { value: 'bark', docCount: 10 }, + { value: 'meow', docCount: 12 }, + ]); + const popover = mountComponent(mocks); + mocks.stateManager.selectedOptions.next(selections); + await waitOneTick(); + + clickShowOnlySelections(popover); + const availableOptionsDiv = popover.getByTestId('optionsList-control-available-options'); + const availableOptionsList = within(availableOptionsDiv).getByRole('listbox'); + const availableOptions = within(availableOptionsList).getAllByRole('option'); + availableOptions.forEach((child, i) => { + expect(child).toHaveTextContent(`${selections[i]}. Checked option.`); + }); + }); + + test('display error message when the show only selected toggle is true but there are no selections', async () => { + const mocks = getOptionsListMocks(); + mocks.api.availableOptions$.next([ + { value: 'woof', docCount: 5 }, + { value: 'bark', docCount: 10 }, + { value: 'meow', docCount: 12 }, + ]); + mocks.stateManager.selectedOptions.next([]); + const popover = mountComponent(mocks); + + clickShowOnlySelections(popover); + const availableOptionsDiv = popover.getByTestId('optionsList-control-available-options'); + const noSelectionsDiv = within(availableOptionsDiv).getByTestId( + 'optionsList-control-selectionsEmptyMessage' + ); + expect(noSelectionsDiv).toBeInTheDocument(); + }); + + test('disable search and sort when show only selected toggle is true', async () => { + const mocks = getOptionsListMocks(); + mocks.api.availableOptions$.next([ + { value: 'woof', docCount: 5 }, + { value: 'bark', docCount: 10 }, + { value: 'meow', docCount: 12 }, + ]); + mocks.stateManager.selectedOptions.next(['woof', 'bark']); + const popover = mountComponent(mocks); + + let searchBox = popover.getByTestId('optionsList-control-search-input'); + let sortButton = popover.getByTestId('optionsListControl__sortingOptionsButton'); + expect(searchBox).not.toBeDisabled(); + expect(sortButton).not.toBeDisabled(); + + clickShowOnlySelections(popover); + searchBox = popover.getByTestId('optionsList-control-search-input'); + sortButton = popover.getByTestId('optionsListControl__sortingOptionsButton'); + expect(searchBox).toBeDisabled(); + expect(sortButton).toBeDisabled(); + }); + }); + + describe('invalid selections', () => { + test('test single invalid selection', async () => { + const mocks = getOptionsListMocks(); + mocks.api.availableOptions$.next([ + { value: 'woof', docCount: 5 }, + { value: 'bark', docCount: 75 }, + ]); + const popover = mountComponent(mocks); + mocks.stateManager.selectedOptions.next(['woof', 'bark']); + mocks.api.invalidSelections$.next(new Set(['woof'])); + await waitOneTick(); + + const validSelection = popover.getByTestId('optionsList-control-selection-bark'); + expect(validSelection).toHaveTextContent('bark. Checked option.'); + expect( + within(validSelection).getByTestId('optionsList-document-count-badge') + ).toHaveTextContent('75'); + const title = popover.getByTestId('optionList__invalidSelectionLabel'); + expect(title).toHaveTextContent('Invalid selection'); + const invalidSelection = popover.getByTestId('optionsList-control-invalid-selection-woof'); + expect(invalidSelection).toHaveTextContent('woof. Checked option.'); + expect(invalidSelection).toHaveClass('optionsList__selectionInvalid'); + }); + + test('test title when multiple invalid selections', async () => { + const mocks = getOptionsListMocks(); + mocks.api.availableOptions$.next([ + { value: 'woof', docCount: 5 }, + { value: 'bark', docCount: 75 }, + ]); + mocks.stateManager.selectedOptions.next(['bark', 'woof', 'meow']); + mocks.api.invalidSelections$.next(new Set(['woof', 'meow'])); + const popover = mountComponent(mocks); + + const title = popover.getByTestId('optionList__invalidSelectionLabel'); + expect(title).toHaveTextContent('Invalid selections'); + }); + }); + + describe('include/exclude toggle', () => { + test('should default to exclude = false', async () => { + const mocks = getOptionsListMocks(); + const popover = mountComponent(mocks); + const includeButton = popover.getByTestId('optionsList__includeResults'); + const excludeButton = popover.getByTestId('optionsList__excludeResults'); + expect(includeButton).toHaveAttribute('aria-pressed', 'true'); + expect(excludeButton).toHaveAttribute('aria-pressed', 'false'); + }); + + test('if exclude = true, select appropriate button in button group', async () => { + const mocks = getOptionsListMocks(); + const popover = mountComponent(mocks); + mocks.stateManager.exclude.next(true); + await waitOneTick(); + + const includeButton = popover.getByTestId('optionsList__includeResults'); + const excludeButton = popover.getByTestId('optionsList__excludeResults'); + expect(includeButton).toHaveAttribute('aria-pressed', 'false'); + expect(excludeButton).toHaveAttribute('aria-pressed', 'true'); + }); + }); + + describe('"Exists" option', () => { + test('if existsSelected = false and no suggestions, then "Exists" does not show up', async () => { + const mocks = getOptionsListMocks(); + mocks.api.availableOptions$.next([]); + const popover = mountComponent(mocks); + + mocks.stateManager.existsSelected.next(false); + await waitOneTick(); + + const existsOption = popover.queryByTestId('optionsList-control-selection-exists'); + expect(existsOption).toBeNull(); + }); + + test('if existsSelected = true, "Exists" is the only option when "Show only selected options" is toggled', async () => { + const mocks = getOptionsListMocks(); + mocks.api.availableOptions$.next([ + { value: 'woof', docCount: 5 }, + { value: 'bark', docCount: 75 }, + ]); + const popover = mountComponent(mocks); + + mocks.stateManager.existsSelected.next(true); + await waitOneTick(); + clickShowOnlySelections(popover); + + const availableOptionsDiv = popover.getByTestId('optionsList-control-available-options'); + const availableOptionsList = within(availableOptionsDiv).getByRole('listbox'); + const availableOptions = within(availableOptionsList).getAllByRole('option'); + expect(availableOptions[0]).toHaveTextContent('Exists. Checked option.'); + }); + }); + + describe('field formatter', () => { + const mocks = getOptionsListMocks(); + const mockedFormatter = jest + .fn() + .mockImplementation((value: string | number) => `formatted:${value}`); + mocks.api.fieldFormatter = new BehaviorSubject( + mockedFormatter as (value: string | number) => string + ); + + afterEach(() => { + mockedFormatter.mockClear(); + }); + + test('uses field formatter on suggestions', async () => { + mocks.api.availableOptions$.next([ + { value: 1000, docCount: 1 }, + { value: 123456789, docCount: 4 }, + ]); + mocks.api.field$.next({ + name: 'Test number field', + type: 'number', + } as DataViewField); + const popover = mountComponent(mocks); + + expect(mockedFormatter).toHaveBeenNthCalledWith(1, 1000); + expect(mockedFormatter).toHaveBeenNthCalledWith(2, 123456789); + const options = await popover.findAllByRole('option'); + expect(options[0].textContent).toEqual('Exists'); + expect( + options[1].getElementsByClassName('euiSelectableListItem__text')[0].textContent + ).toEqual('formatted:1000'); + expect( + options[2].getElementsByClassName('euiSelectableListItem__text')[0].textContent + ).toEqual('formatted:123456789'); + }); + + test('converts string to number for date field', async () => { + mocks.api.availableOptions$.next([ + { value: 1721283696000, docCount: 1 }, + { value: 1721295533000, docCount: 2 }, + ]); + mocks.api.field$.next({ + name: 'Test date field', + type: 'date', + } as DataViewField); + + mountComponent(mocks); + expect(mockedFormatter).toHaveBeenNthCalledWith(1, 1721283696000); + expect(mockedFormatter).toHaveBeenNthCalledWith(2, 1721295533000); + }); + }); + + describe('allow expensive queries warning', () => { + test('ensure warning icon does not show up when testAllowExpensiveQueries = true/undefined', async () => { + const mocks = getOptionsListMocks(); + mocks.api.field$.next({ + name: 'Test keyword field', + type: 'keyword', + } as DataViewField); + const popover = mountComponent(mocks); + const warning = popover.queryByTestId('optionsList-allow-expensive-queries-warning'); + expect(warning).toBeNull(); + }); + + test('ensure warning icon shows up when testAllowExpensiveQueries = false', async () => { + const mocks = getOptionsListMocks(); + mocks.api.field$.next({ + name: 'Test keyword field', + type: 'keyword', + } as DataViewField); + mocks.api.parentApi.allowExpensiveQueries$.next(false); + const popover = mountComponent(mocks); + const warning = popover.getByTestId('optionsList-allow-expensive-queries-warning'); + expect(warning).toBeInstanceOf(HTMLDivElement); + }); + }); + + describe('advanced settings', () => { + const ensureComponentIsHidden = async ({ + displaySettings, + testSubject, + }: { + displaySettings: Partial; + testSubject: string; + }) => { + const mocks = getOptionsListMocks(); + mocks.displaySettings = displaySettings; + const popover = mountComponent(mocks); + const test = popover.queryByTestId(testSubject); + expect(test).toBeNull(); + }; + + test('can hide exists option', async () => { + ensureComponentIsHidden({ + displaySettings: { hideExists: true }, + testSubject: 'optionsList-control-selection-exists', + }); + }); + + test('can hide include/exclude toggle', async () => { + ensureComponentIsHidden({ + displaySettings: { hideExclude: true }, + testSubject: 'optionsList__includeExcludeButtonGroup', + }); + }); + + test('can hide sorting button', async () => { + ensureComponentIsHidden({ + displaySettings: { hideSort: true }, + testSubject: 'optionsListControl__sortingOptionsButton', + }); + }); + }); +}); diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover.tsx new file mode 100644 index 0000000000000..1f6168e5de1f2 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover.tsx @@ -0,0 +1,54 @@ +/* + * 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 React, { useState } from 'react'; + +import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; +import { OptionsListPopoverActionBar } from './options_list_popover_action_bar'; +import { useOptionsListContext } from '../options_list_context_provider'; +import { OptionsListPopoverFooter } from './options_list_popover_footer'; +import { OptionsListPopoverInvalidSelections } from './options_list_popover_invalid_selections'; +import { OptionsListPopoverSuggestions } from './options_list_popover_suggestions'; + +export const OptionsListPopover = () => { + const { api, displaySettings } = useOptionsListContext(); + + const [field, availableOptions, invalidSelections, loading] = useBatchedPublishingSubjects( + api.field$, + api.availableOptions$, + api.invalidSelections$, + api.dataLoading + ); + const [showOnlySelected, setShowOnlySelected] = useState(false); + + return ( +
+ {field?.type !== 'boolean' && !displaySettings.hideActionBar && ( + + )} +
+ + {!showOnlySelected && invalidSelections && invalidSelections.size !== 0 && ( + + )} +
+ {!displaySettings.hideExclude && } +
+ ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx new file mode 100644 index 0000000000000..73843ae90d9b3 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx @@ -0,0 +1,157 @@ +/* + * 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 React, { useMemo } from 'react'; + +import { + EuiButtonIcon, + EuiFieldSearch, + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiText, + EuiToolTip, +} from '@elastic/eui'; +import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; + +import { getCompatibleSearchTechniques } from '../../../../../common/options_list/suggestions_searching'; +import { useOptionsListContext } from '../options_list_context_provider'; +import { OptionsListPopoverSortingButton } from './options_list_popover_sorting_button'; +import { OptionsListStrings } from '../options_list_strings'; + +interface OptionsListPopoverProps { + showOnlySelected: boolean; + setShowOnlySelected: (value: boolean) => void; +} + +export const OptionsListPopoverActionBar = ({ + showOnlySelected, + setShowOnlySelected, +}: OptionsListPopoverProps) => { + const { api, stateManager, displaySettings } = useOptionsListContext(); + + const [ + searchString, + searchTechnique, + searchStringValid, + invalidSelections, + totalCardinality, + field, + allowExpensiveQueries, + ] = useBatchedPublishingSubjects( + stateManager.searchString, + stateManager.searchTechnique, + stateManager.searchStringValid, + api.invalidSelections$, + api.totalCardinality$, + api.field$, + api.parentApi.allowExpensiveQueries$ + ); + + const compatibleSearchTechniques = useMemo(() => { + if (!field) return []; + return getCompatibleSearchTechniques(field.type); + }, [field]); + + const defaultSearchTechnique = useMemo( + () => searchTechnique ?? compatibleSearchTechniques[0], + [searchTechnique, compatibleSearchTechniques] + ); + + return ( +
+ {compatibleSearchTechniques.length > 0 && ( + + { + stateManager.searchString.next(event.target.value); + }} + value={searchString} + data-test-subj="optionsList-control-search-input" + placeholder={OptionsListStrings.popover.getSearchPlaceholder( + allowExpensiveQueries ? defaultSearchTechnique : 'exact' + )} + /> + + )} + + + {allowExpensiveQueries && ( + + + {OptionsListStrings.popover.getCardinalityLabel(totalCardinality)} + + + )} + {invalidSelections && invalidSelections.size > 0 && ( + <> + {allowExpensiveQueries && ( + +
+ + )} + + + {OptionsListStrings.popover.getInvalidSelectionsLabel(invalidSelections.size)} + + + + )} + + + + + setShowOnlySelected(!showOnlySelected)} + data-test-subj="optionsList-control-show-only-selected" + aria-label={ + showOnlySelected + ? OptionsListStrings.popover.getAllOptionsButtonTitle() + : OptionsListStrings.popover.getSelectedOptionsButtonTitle() + } + /> + + + {!displaySettings.hideSort && ( + + + + )} + + + + +
+ ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx new file mode 100644 index 0000000000000..a6950d2cfd4b0 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx @@ -0,0 +1,55 @@ +/* + * 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 React, { useMemo } from 'react'; + +import { EuiIcon, EuiSelectableMessage, EuiSpacer } from '@elastic/eui'; +import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; + +import { useOptionsListContext } from '../options_list_context_provider'; +import { OptionsListStrings } from '../options_list_strings'; + +export const OptionsListPopoverEmptyMessage = ({ + showOnlySelected, +}: { + showOnlySelected: boolean; +}) => { + const { api, stateManager } = useOptionsListContext(); + + const [searchTechnique, searchStringValid, field] = useBatchedPublishingSubjects( + stateManager.searchTechnique, + stateManager.searchStringValid, + api.field$ + ); + + const noResultsMessage = useMemo(() => { + if (showOnlySelected) { + return OptionsListStrings.popover.getSelectionsEmptyMessage(); + } + if (!searchStringValid && field && searchTechnique) { + return OptionsListStrings.popover.getInvalidSearchMessage(field.type); + } + return OptionsListStrings.popover.getEmptyMessage(); + }, [showOnlySelected, field, searchStringValid, searchTechnique]); + + return ( + + + + {noResultsMessage} + + ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_footer.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_footer.tsx new file mode 100644 index 0000000000000..aa38330908762 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_footer.tsx @@ -0,0 +1,102 @@ +/* + * 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 React from 'react'; + +import { + EuiButtonGroup, + EuiFlexGroup, + EuiFlexItem, + EuiIconTip, + EuiPopoverFooter, + EuiProgress, + useEuiBackgroundColor, + useEuiPaddingSize, +} from '@elastic/eui'; +import { css } from '@emotion/react'; +import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; + +import { useOptionsListContext } from '../options_list_context_provider'; +import { OptionsListStrings } from '../options_list_strings'; + +const aggregationToggleButtons = [ + { + id: 'optionsList__includeResults', + key: 'optionsList__includeResults', + label: OptionsListStrings.popover.getIncludeLabel(), + }, + { + id: 'optionsList__excludeResults', + key: 'optionsList__excludeResults', + label: OptionsListStrings.popover.getExcludeLabel(), + }, +]; + +export const OptionsListPopoverFooter = () => { + const { api, stateManager } = useOptionsListContext(); + + const [exclude, loading, allowExpensiveQueries] = useBatchedPublishingSubjects( + stateManager.exclude, + api.dataLoading, + api.parentApi.allowExpensiveQueries$ + ); + + return ( + <> + + {loading && ( +
+ +
+ )} + + + + + stateManager.exclude.next(optionId === 'optionsList__excludeResults') + } + buttonSize="compressed" + data-test-subj="optionsList__includeExcludeButtonGroup" + /> + + {!allowExpensiveQueries && ( + + + + )} + +
+ + ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx new file mode 100644 index 0000000000000..19443cc9879f1 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx @@ -0,0 +1,101 @@ +/* + * 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 React, { useEffect, useState } from 'react'; + +import { + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiScreenReaderOnly, + EuiSelectable, + EuiSelectableOption, + EuiSpacer, + EuiTitle, +} from '@elastic/eui'; +import { + useBatchedPublishingSubjects, + useStateFromPublishingSubject, +} from '@kbn/presentation-publishing'; + +import { useOptionsListContext } from '../options_list_context_provider'; +import { OptionsListStrings } from '../options_list_strings'; + +export const OptionsListPopoverInvalidSelections = () => { + const { api } = useOptionsListContext(); + + const [invalidSelections, fieldFormatter] = useBatchedPublishingSubjects( + api.invalidSelections$, + api.fieldFormatter + ); + const defaultPanelTitle = useStateFromPublishingSubject(api.defaultPanelTitle); + + const [selectableOptions, setSelectableOptions] = useState([]); // will be set in following useEffect + useEffect(() => { + /* This useEffect makes selectableOptions responsive to unchecking options */ + const options: EuiSelectableOption[] = Array.from(invalidSelections).map((key) => { + return { + key: String(key), + label: fieldFormatter(key), + checked: 'on', + className: 'optionsList__selectionInvalid', + 'data-test-subj': `optionsList-control-invalid-selection-${key}`, + prepend: ( + +
+ {OptionsListStrings.popover.getInvalidSelectionScreenReaderText()} + {'" "'} {/* Adds a pause for the screen reader */} +
+
+ ), + }; + }); + setSelectableOptions(options); + }, [fieldFormatter, invalidSelections]); + + return ( + <> + + + + + + + + + + + + { + setSelectableOptions(newSuggestions); + api.deselectOption(changedOption.key); + }} + > + {(list) => list} + + + ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx new file mode 100644 index 0000000000000..c86aa85b9116e --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx @@ -0,0 +1,121 @@ +/* + * 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 React from 'react'; + +import { DataViewField } from '@kbn/data-views-plugin/common'; +import { render, within } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; + +import { ControlStateManager } from '../../../types'; +import { getOptionsListMocks } from '../../mocks/api_mocks'; +import { OptionsListControlContext } from '../options_list_context_provider'; +import { OptionsListComponentApi, OptionsListComponentState } from '../types'; +import { OptionsListPopoverSortingButton } from './options_list_popover_sorting_button'; + +describe('Options list sorting button', () => { + const mountComponent = ({ + api, + displaySettings, + stateManager, + }: { + api: any; + displaySettings: any; + stateManager: any; + }) => { + const component = render( + , + }} + > + + + ); + + // open the popover for testing by clicking on the button + const sortButton = component.getByTestId('optionsListControl__sortingOptionsButton'); + userEvent.click(sortButton); + + return component; + }; + + test('when sorting suggestions, show both sorting types for keyword field', async () => { + const mocks = getOptionsListMocks(); + mocks.api.field$.next({ + name: 'Test keyword field', + type: 'keyword', + } as DataViewField); + const component = mountComponent(mocks); + + const sortingOptionsDiv = component.getByTestId('optionsListControl__sortingOptions'); + const optionsText = within(sortingOptionsDiv) + .getAllByRole('option') + .map((el) => el.textContent); + expect(optionsText).toEqual(['By document count. Checked option.', 'Alphabetically']); + }); + + test('sorting popover selects appropriate sorting type on load', async () => { + const mocks = getOptionsListMocks(); + mocks.api.field$.next({ + name: 'Test keyword field', + type: 'keyword', + } as DataViewField); + mocks.stateManager.sort.next({ by: '_key', direction: 'asc' }); + const component = mountComponent(mocks); + + const sortingOptionsDiv = component.getByTestId('optionsListControl__sortingOptions'); + const optionsText = within(sortingOptionsDiv) + .getAllByRole('option') + .map((el) => el.textContent); + expect(optionsText).toEqual(['By document count', 'Alphabetically. Checked option.']); + + const ascendingButton = component.getByTestId('optionsList__sortOrder_asc'); + expect(ascendingButton).toHaveClass('euiButtonGroupButton-isSelected'); + const descendingButton = component.getByTestId('optionsList__sortOrder_desc'); + expect(descendingButton).not.toHaveClass('euiButtonGroupButton-isSelected'); + }); + + test('when sorting suggestions, only show document count sorting for IP fields', async () => { + const mocks = getOptionsListMocks(); + mocks.api.field$.next({ name: 'Test IP field', type: 'ip' } as DataViewField); + const component = mountComponent(mocks); + + const sortingOptionsDiv = component.getByTestId('optionsListControl__sortingOptions'); + const optionsText = within(sortingOptionsDiv) + .getAllByRole('option') + .map((el) => el.textContent); + expect(optionsText).toEqual(['By document count. Checked option.']); + }); + + test('when sorting suggestions, show "By date" sorting option for date fields', async () => { + const mocks = getOptionsListMocks(); + mocks.api.field$.next({ name: 'Test date field', type: 'date' } as DataViewField); + const component = mountComponent(mocks); + + const sortingOptionsDiv = component.getByTestId('optionsListControl__sortingOptions'); + const optionsText = within(sortingOptionsDiv) + .getAllByRole('option') + .map((el) => el.textContent); + expect(optionsText).toEqual(['By document count. Checked option.', 'By date']); + }); + + test('when sorting suggestions, show "Numerically" sorting option for number fields', async () => { + const mocks = getOptionsListMocks(); + mocks.api.field$.next({ name: 'Test number field', type: 'number' } as DataViewField); + const component = mountComponent(mocks); + + const sortingOptionsDiv = component.getByTestId('optionsListControl__sortingOptions'); + const optionsText = within(sortingOptionsDiv) + .getAllByRole('option') + .map((el) => el.textContent); + expect(optionsText).toEqual(['By document count. Checked option.', 'Numerically']); + }); +}); diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx new file mode 100644 index 0000000000000..b8a0823dea393 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx @@ -0,0 +1,160 @@ +/* + * 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 React, { useCallback, useMemo, useState } from 'react'; + +import { + Direction, + EuiButtonGroup, + EuiButtonGroupOptionProps, + EuiButtonIcon, + EuiFlexGroup, + EuiFlexItem, + EuiPopover, + EuiPopoverTitle, + EuiSelectable, + EuiSelectableOption, + EuiToolTip, +} from '@elastic/eui'; +import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; + +import { + getCompatibleSortingTypes, + OptionsListSortBy, + OPTIONS_LIST_DEFAULT_SORT, +} from '../../../../../common/options_list/suggestions_sorting'; +import { useOptionsListContext } from '../options_list_context_provider'; +import { OptionsListStrings } from '../options_list_strings'; + +type SortByItem = EuiSelectableOption & { + data: { sortBy: OptionsListSortBy }; +}; + +const sortOrderOptions: EuiButtonGroupOptionProps[] = [ + { + id: 'asc', + iconType: `sortAscending`, + 'data-test-subj': `optionsList__sortOrder_asc`, + label: OptionsListStrings.editorAndPopover.sortOrder.asc.getSortOrderLabel(), + }, + { + id: 'desc', + iconType: `sortDescending`, + 'data-test-subj': `optionsList__sortOrder_desc`, + label: OptionsListStrings.editorAndPopover.sortOrder.desc.getSortOrderLabel(), + }, +]; + +export const OptionsListPopoverSortingButton = ({ + showOnlySelected, +}: { + showOnlySelected: boolean; +}) => { + const { api, stateManager } = useOptionsListContext(); + + const [isSortingPopoverOpen, setIsSortingPopoverOpen] = useState(false); + const [sort, field] = useBatchedPublishingSubjects(stateManager.sort, api.field$); + + const selectedSort = useMemo(() => sort ?? OPTIONS_LIST_DEFAULT_SORT, [sort]); + + const [sortByOptions, setSortByOptions] = useState(() => { + return getCompatibleSortingTypes(field?.type).map((key) => { + return { + onFocusBadge: false, + data: { sortBy: key }, + checked: key === selectedSort.by ? 'on' : undefined, + 'data-test-subj': `optionsList__sortBy_${key}`, + label: OptionsListStrings.editorAndPopover.sortBy[key].getSortByLabel(field?.type), + } as SortByItem; + }); + }); + + const onSortByChange = useCallback( + (updatedOptions: SortByItem[]) => { + setSortByOptions(updatedOptions); + const selectedOption = updatedOptions.find(({ checked }) => checked === 'on'); + if (selectedOption) { + stateManager.sort.next({ + ...selectedSort, + by: selectedOption.data.sortBy, + }); + } + }, + [selectedSort, stateManager.sort] + ); + + const SortButton = () => ( + setIsSortingPopoverOpen(!isSortingPopoverOpen)} + aria-label={OptionsListStrings.popover.getSortPopoverDescription()} + /> + ); + + return ( + + + + } + panelPaddingSize="none" + isOpen={isSortingPopoverOpen} + aria-labelledby="optionsList_sortingOptions" + closePopover={() => setIsSortingPopoverOpen(false)} + panelClassName={'optionsList--sortPopover'} + > + + + + {OptionsListStrings.popover.getSortPopoverTitle()} + + { + stateManager.sort.next({ + ...selectedSort, + direction: value as Direction, + }); + }} + /> + + + + + {(list) => list} + + + + ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx new file mode 100644 index 0000000000000..79cb490dbf19b --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx @@ -0,0 +1,46 @@ +/* + * 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 React from 'react'; + +import { css } from '@emotion/react'; +import { EuiScreenReaderOnly, EuiText, EuiToolTip, useEuiTheme } from '@elastic/eui'; + +import { OptionsListStrings } from '../options_list_strings'; + +export const OptionsListPopoverSuggestionBadge = ({ documentCount }: { documentCount: number }) => { + const { euiTheme } = useEuiTheme(); + + return ( + <> + + + {`${documentCount.toLocaleString()}`} + + + +
+ {'" "'} {/* Adds a pause for the screen reader */} + {OptionsListStrings.popover.getDocumentCountScreenReaderText(documentCount)} +
+
+ + ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx new file mode 100644 index 0000000000000..3fdce47271873 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx @@ -0,0 +1,208 @@ +/* + * 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 React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; + +import { EuiHighlight, EuiSelectable } from '@elastic/eui'; +import { EuiSelectableOption } from '@elastic/eui/src/components/selectable/selectable_option'; +import { OptionsListSuggestions } from '@kbn/controls-plugin/common/options_list/types'; +import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; +import { euiThemeVars } from '@kbn/ui-theme'; + +import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections'; +import { MAX_OPTIONS_LIST_REQUEST_SIZE } from '../constants'; +import { useOptionsListContext } from '../options_list_context_provider'; +import { OptionsListStrings } from '../options_list_strings'; +import { OptionsListPopoverEmptyMessage } from './options_list_popover_empty_message'; +import { OptionsListPopoverSuggestionBadge } from './options_list_popover_suggestion_badge'; + +interface OptionsListPopoverSuggestionsProps { + showOnlySelected: boolean; +} + +export const OptionsListPopoverSuggestions = ({ + showOnlySelected, +}: OptionsListPopoverSuggestionsProps) => { + const { + api, + stateManager, + displaySettings: { hideExists }, + } = useOptionsListContext(); + + const [ + sort, + searchString, + existsSelected, + searchTechnique, + selectedOptions, + fieldName, + invalidSelections, + availableOptions, + totalCardinality, + loading, + fieldFormatter, + allowExpensiveQueries, + ] = useBatchedPublishingSubjects( + stateManager.sort, + stateManager.searchString, + stateManager.existsSelected, + stateManager.searchTechnique, + stateManager.selectedOptions, + stateManager.fieldName, + api.invalidSelections$, + api.availableOptions$, + api.totalCardinality$, + api.dataLoading, + api.fieldFormatter, + api.parentApi.allowExpensiveQueries$ + ); + + const listRef = useRef(null); + + const canLoadMoreSuggestions = useMemo( + () => + allowExpensiveQueries && totalCardinality && !showOnlySelected // && searchString.valid + ? (availableOptions ?? []).length < + Math.min(totalCardinality, MAX_OPTIONS_LIST_REQUEST_SIZE) + : false, + [availableOptions, totalCardinality, showOnlySelected, allowExpensiveQueries] + ); + + const suggestions = useMemo(() => { + return (showOnlySelected ? selectedOptions : availableOptions) ?? []; + }, [availableOptions, selectedOptions, showOnlySelected]); + + const existsSelectableOption = useMemo(() => { + if (hideExists || (!existsSelected && (showOnlySelected || suggestions?.length === 0))) return; + + return { + key: 'exists-option', + checked: existsSelected ? 'on' : undefined, + label: OptionsListStrings.controlAndPopover.getExists(), + className: 'optionsList__existsFilter', + 'data-test-subj': 'optionsList-control-selection-exists', + }; + }, [suggestions, existsSelected, showOnlySelected, hideExists]); + + const [selectableOptions, setSelectableOptions] = useState([]); // will be set in following useEffect + useEffect(() => { + /* This useEffect makes selectableOptions responsive to search, show only selected, and clear selections */ + const options: EuiSelectableOption[] = suggestions.map((suggestion) => { + if (typeof suggestion !== 'object') { + // this means that `showOnlySelected` is true, and doc count is not known when this is the case + suggestion = { value: suggestion }; + } + + return { + key: String(suggestion.value), + label: String(fieldFormatter(suggestion.value) ?? suggestion.value), + checked: (selectedOptions ?? []).includes(suggestion.value) ? 'on' : undefined, + 'data-test-subj': `optionsList-control-selection-${suggestion.value}`, + className: + showOnlySelected && invalidSelections.has(suggestion.value) + ? 'optionsList__selectionInvalid' + : 'optionsList__validSuggestion', + append: + !showOnlySelected && suggestion?.docCount ? ( + + ) : undefined, + } as EuiSelectableOption; + }); + + if (canLoadMoreSuggestions) { + options.push({ + key: 'loading-option', + className: 'optionslist--loadingMoreGroupLabel', + label: OptionsListStrings.popover.getLoadingMoreMessage(), + isGroupLabel: true, + }); + } else if (options.length === MAX_OPTIONS_LIST_REQUEST_SIZE) { + options.push({ + key: 'no-more-option', + className: 'optionslist--endOfOptionsGroupLabel', + label: OptionsListStrings.popover.getAtEndOfOptionsMessage(), + isGroupLabel: true, + }); + } + setSelectableOptions(existsSelectableOption ? [existsSelectableOption, ...options] : options); + }, [ + suggestions, + availableOptions, + showOnlySelected, + selectedOptions, + invalidSelections, + existsSelectableOption, + canLoadMoreSuggestions, + fieldFormatter, + ]); + + const loadMoreOptions = useCallback(() => { + const listbox = listRef.current?.querySelector('.euiSelectableList__list'); + if (!listbox) return; + + const { scrollTop, scrollHeight, clientHeight } = listbox; + if (scrollTop + clientHeight >= scrollHeight - parseInt(euiThemeVars.euiSizeXXL, 10)) { + // reached the "bottom" of the list, where euiSizeXXL acts as a "margin of error" so that the user doesn't + // have to scroll **all the way** to the bottom in order to load more options + stateManager.requestSize.next(totalCardinality ?? MAX_OPTIONS_LIST_REQUEST_SIZE); + api.loadMoreSubject.next(null); // trigger refetch with loadMoreSubject + } + }, [api.loadMoreSubject, stateManager.requestSize, totalCardinality]); + + const renderOption = useCallback( + (option, searchStringValue) => { + if (!allowExpensiveQueries || searchTechnique === 'exact') return option.label; + + return ( + + {option.label} + + ); + }, + [searchTechnique, allowExpensiveQueries] + ); + + useEffect(() => { + const container = listRef.current; + if (!loading && canLoadMoreSuggestions) { + container?.addEventListener('scroll', loadMoreOptions, true); + return () => { + container?.removeEventListener('scroll', loadMoreOptions, true); + }; + } + }, [loadMoreOptions, loading, canLoadMoreSuggestions]); + + useEffect(() => { + // scroll back to the top when changing the sorting or the search string + const listbox = listRef.current?.querySelector('.euiSelectableList__list'); + listbox?.scrollTo({ top: 0 }); + }, [sort, searchString]); + + return ( + <> +
+ renderOption(option, searchString)} + listProps={{ onFocusBadge: false }} + aria-label={OptionsListStrings.popover.getSuggestionsAriaLabel( + fieldName, + selectableOptions.length + )} + emptyMessage={} + onChange={(newSuggestions, _, changedOption) => { + setSelectableOptions(newSuggestions); + api.makeSelection(changedOption.key, showOnlySelected); + }} + > + {(list) => list} + +
+ + ); +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/constants.ts b/examples/controls_example/public/react_controls/data_controls/options_list_control/constants.ts new file mode 100644 index 0000000000000..6400e7b8efa42 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/constants.ts @@ -0,0 +1,23 @@ +/* + * 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 { OPTIONS_LIST_CONTROL } from '@kbn/controls-plugin/common'; +import { OptionsListSearchTechnique } from '@kbn/controls-plugin/common/options_list/suggestions_searching'; +import { OptionsListSortingType } from '@kbn/controls-plugin/common/options_list/suggestions_sorting'; + +export const OPTIONS_LIST_CONTROL_TYPE = OPTIONS_LIST_CONTROL; +export const DEFAULT_SEARCH_TECHNIQUE: OptionsListSearchTechnique = 'prefix'; +export const OPTIONS_LIST_DEFAULT_SORT: OptionsListSortingType = { + by: '_count', + direction: 'desc', +}; + +export const MIN_POPOVER_WIDTH = 300; + +export const MIN_OPTIONS_LIST_REQUEST_SIZE = 10; +export const MAX_OPTIONS_LIST_REQUEST_SIZE = 1000; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/fetch_and_validate.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/fetch_and_validate.tsx new file mode 100644 index 0000000000000..5ed0d00623706 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/fetch_and_validate.tsx @@ -0,0 +1,121 @@ +/* + * 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 { + BehaviorSubject, + combineLatest, + debounceTime, + Observable, + switchMap, + tap, + withLatestFrom, +} from 'rxjs'; + +import { OptionsListSuccessResponse } from '@kbn/controls-plugin/common/options_list/types'; + +import { isValidSearch } from '../../../../common/options_list/suggestions_searching'; +import { ControlFetchContext } from '../../control_group/control_fetch'; +import { ControlStateManager } from '../../types'; +import { DataControlServices } from '../types'; +import { OptionsListFetchCache } from './options_list_fetch_cache'; +import { OptionsListComponentApi, OptionsListComponentState, OptionsListControlApi } from './types'; + +export function fetchAndValidate$({ + api, + services, + stateManager, +}: { + api: Pick & + Pick & { + controlFetch$: Observable; + loadingSuggestions$: BehaviorSubject; + debouncedSearchString: Observable; + }; + services: DataControlServices; + stateManager: ControlStateManager; +}): Observable { + const requestCache = new OptionsListFetchCache(); + let abortController: AbortController | undefined; + + return combineLatest([ + api.dataViews, + api.field$, + api.controlFetch$, + api.parentApi.allowExpensiveQueries$, + api.debouncedSearchString, + stateManager.sort, + stateManager.searchTechnique, + // cannot use requestSize directly, because we need to be able to reset the size to the default without refetching + api.loadMoreSubject.pipe(debounceTime(100)), // debounce load more so "loading" state briefly shows + ]).pipe( + tap(() => { + // abort any in progress requests + if (abortController) { + abortController.abort(); + abortController = undefined; + } + }), + withLatestFrom( + stateManager.requestSize, + stateManager.runPastTimeout, + stateManager.selectedOptions + ), + switchMap( + async ([ + [ + dataViews, + field, + controlFetchContext, + allowExpensiveQueries, + searchString, + sort, + searchTechnique, + ], + requestSize, + runPastTimeout, + selectedOptions, + ]) => { + const dataView = dataViews?.[0]; + if ( + !dataView || + !field || + !isValidSearch({ searchString, fieldType: field.type, searchTechnique }) + ) { + return { suggestions: [] }; + } + + /** Fetch the suggestions list + perform validation */ + api.loadingSuggestions$.next(true); + + const request = { + sort, + dataView, + searchString, + runPastTimeout, + searchTechnique, + selectedOptions, + field: field.toSpec(), + size: requestSize, + allowExpensiveQueries, + ...controlFetchContext, + }; + + const newAbortController = new AbortController(); + abortController = newAbortController; + try { + return await requestCache.runFetchRequest(request, newAbortController.signal, services); + } catch (error) { + return { error }; + } + } + ), + tap(() => { + api.loadingSuggestions$.next(false); + }) + ); +} diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx new file mode 100644 index 0000000000000..d74070b980769 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx @@ -0,0 +1,347 @@ +/* + * 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 React from 'react'; + +import { coreMock } from '@kbn/core/public/mocks'; +import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; +import { DataView } from '@kbn/data-views-plugin/common'; +import { createStubDataView } from '@kbn/data-views-plugin/common/data_view.stub'; +import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; +import { act, render, waitFor } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; + +import { getMockedBuildApi, getMockedControlGroupApi } from '../../mocks/control_mocks'; +import { getOptionsListControlFactory } from './get_options_list_control_factory'; + +describe('Options List Control Api', () => { + const uuid = 'myControl1'; + const controlGroupApi = getMockedControlGroupApi(); + const mockDataViews = dataViewPluginMocks.createStartContract(); + const mockCore = coreMock.createStart(); + + const waitOneTick = () => act(() => new Promise((resolve) => setTimeout(resolve, 0))); + + mockDataViews.get = jest.fn().mockImplementation(async (id: string): Promise => { + if (id !== 'myDataViewId') { + throw new Error(`Simulated error: no data view found for id ${id}`); + } + const stubDataView = createStubDataView({ + spec: { + id: 'myDataViewId', + fields: { + myFieldName: { + name: 'myFieldName', + customLabel: 'My field name', + type: 'string', + esTypes: ['keyword'], + aggregatable: true, + searchable: true, + }, + }, + title: 'logstash-*', + timeFieldName: '@timestamp', + }, + }); + stubDataView.getFormatterForField = jest.fn().mockImplementation(() => { + return { + getConverterFor: () => { + return (value: string) => `${value}:formatted`; + }, + toJSON: (value: any) => JSON.stringify(value), + }; + }); + return stubDataView; + }); + + const factory = getOptionsListControlFactory({ + core: mockCore, + data: dataPluginMock.createStartContract(), + dataViews: mockDataViews, + }); + + describe('filters$', () => { + test('should not set filters$ when selectedOptions is not provided', async () => { + const { api } = await factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + }, + getMockedBuildApi(uuid, factory, controlGroupApi), + uuid, + controlGroupApi + ); + expect(api.filters$.value).toBeUndefined(); + }); + + test('should set filters$ when selectedOptions is provided', async () => { + const { api } = await factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + selectedOptions: ['cool', 'test'], + }, + getMockedBuildApi(uuid, factory, controlGroupApi), + uuid, + controlGroupApi + ); + expect(api.filters$.value).toEqual([ + { + meta: { + index: 'myDataViewId', + key: 'myFieldName', + params: ['cool', 'test'], + type: 'phrases', + }, + query: { + bool: { + minimum_should_match: 1, + should: [ + { + match_phrase: { + myFieldName: 'cool', + }, + }, + { + match_phrase: { + myFieldName: 'test', + }, + }, + ], + }, + }, + }, + ]); + }); + + test('should set filters$ when exists is selected', async () => { + const { api } = await factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + existsSelected: true, + }, + getMockedBuildApi(uuid, factory, controlGroupApi), + uuid, + controlGroupApi + ); + expect(api.filters$.value).toEqual([ + { + meta: { + index: 'myDataViewId', + key: 'myFieldName', + }, + query: { + exists: { + field: 'myFieldName', + }, + }, + }, + ]); + }); + + test('should set filters$ when exclude is selected', async () => { + const { api } = await factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + existsSelected: true, + exclude: true, + }, + getMockedBuildApi(uuid, factory, controlGroupApi), + uuid, + controlGroupApi + ); + expect(api.filters$.value).toEqual([ + { + meta: { + index: 'myDataViewId', + key: 'myFieldName', + negate: true, + }, + query: { + exists: { + field: 'myFieldName', + }, + }, + }, + ]); + }); + }); + + describe('make selection', () => { + beforeAll(() => { + mockCore.http.fetch = jest.fn().mockResolvedValue({ + suggestions: [ + { value: 'woof', docCount: 10 }, + { value: 'bark', docCount: 15 }, + { value: 'meow', docCount: 12 }, + ], + }); + }); + + test('clicking another option unselects "Exists"', async () => { + const { Component } = await factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + existsSelected: true, + }, + getMockedBuildApi(uuid, factory, controlGroupApi), + uuid, + controlGroupApi + ); + + const control = render(); + userEvent.click(control.getByTestId(`optionsList-control-${uuid}`)); + await waitFor(() => { + expect(control.getAllByRole('option').length).toBe(4); + }); + + expect(control.getByTestId('optionsList-control-selection-exists')).toBeChecked(); + const option = control.getByTestId('optionsList-control-selection-woof'); + userEvent.click(option); + await waitOneTick(); + expect(control.getByTestId('optionsList-control-selection-exists')).not.toBeChecked(); + expect(option).toBeChecked(); + }); + + test('clicking "Exists" unselects all other selections', async () => { + const { Component } = await factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + selectedOptions: ['woof', 'bark'], + }, + getMockedBuildApi(uuid, factory, controlGroupApi), + uuid, + controlGroupApi + ); + + const control = render(); + userEvent.click(control.getByTestId(`optionsList-control-${uuid}`)); + await waitFor(() => { + expect(control.getAllByRole('option').length).toEqual(4); + }); + + const existsOption = control.getByTestId('optionsList-control-selection-exists'); + expect(existsOption).not.toBeChecked(); + expect(control.getByTestId('optionsList-control-selection-woof')).toBeChecked(); + expect(control.getByTestId('optionsList-control-selection-bark')).toBeChecked(); + expect(control.getByTestId('optionsList-control-selection-meow')).not.toBeChecked(); + + userEvent.click(existsOption); + await waitOneTick(); + expect(existsOption).toBeChecked(); + expect(control.getByTestId('optionsList-control-selection-woof')).not.toBeChecked(); + expect(control.getByTestId('optionsList-control-selection-bark')).not.toBeChecked(); + expect(control.getByTestId('optionsList-control-selection-meow')).not.toBeChecked(); + }); + + test('deselects when showOnlySelected is true', async () => { + const { Component, api } = await factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + selectedOptions: ['woof', 'bark'], + }, + getMockedBuildApi(uuid, factory, controlGroupApi), + uuid, + controlGroupApi + ); + + const control = render(); + userEvent.click(control.getByTestId(`optionsList-control-${uuid}`)); + await waitFor(() => { + expect(control.getAllByRole('option').length).toEqual(4); + }); + userEvent.click(control.getByTestId('optionsList-control-show-only-selected')); + + expect(control.getByTestId('optionsList-control-selection-woof')).toBeChecked(); + expect(control.getByTestId('optionsList-control-selection-bark')).toBeChecked(); + expect(control.queryByTestId('optionsList-control-selection-meow')).toBeNull(); + + userEvent.click(control.getByTestId('optionsList-control-selection-bark')); + await waitOneTick(); + expect(control.getByTestId('optionsList-control-selection-woof')).toBeChecked(); + expect(control.queryByTestId('optionsList-control-selection-bark')).toBeNull(); + expect(control.queryByTestId('optionsList-control-selection-meow')).toBeNull(); + + expect(api.filters$.value).toEqual([ + { + meta: { + index: 'myDataViewId', + key: 'myFieldName', + }, + query: { + match_phrase: { + myFieldName: 'woof', + }, + }, + }, + ]); + }); + + test('replace selection when singleSelect is true', async () => { + const { Component, api } = await factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + singleSelect: true, + selectedOptions: ['woof'], + }, + getMockedBuildApi(uuid, factory, controlGroupApi), + uuid, + controlGroupApi + ); + + const control = render(); + + expect(api.filters$.value).toEqual([ + { + meta: { + index: 'myDataViewId', + key: 'myFieldName', + }, + query: { + match_phrase: { + myFieldName: 'woof', + }, + }, + }, + ]); + + userEvent.click(control.getByTestId(`optionsList-control-${uuid}`)); + await waitFor(() => { + expect(control.getAllByRole('option').length).toEqual(4); + }); + expect(control.getByTestId('optionsList-control-selection-woof')).toBeChecked(); + expect(control.queryByTestId('optionsList-control-selection-bark')).not.toBeChecked(); + expect(control.queryByTestId('optionsList-control-selection-meow')).not.toBeChecked(); + userEvent.click(control.getByTestId('optionsList-control-selection-bark')); + await waitOneTick(); + expect(control.getByTestId('optionsList-control-selection-woof')).not.toBeChecked(); + expect(control.queryByTestId('optionsList-control-selection-bark')).toBeChecked(); + expect(control.queryByTestId('optionsList-control-selection-meow')).not.toBeChecked(); + + expect(api.filters$.value).toEqual([ + { + meta: { + index: 'myDataViewId', + key: 'myFieldName', + }, + query: { + match_phrase: { + myFieldName: 'bark', + }, + }, + }, + ]); + }); + }); +}); diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/get_options_list_control_factory.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/get_options_list_control_factory.tsx new file mode 100644 index 0000000000000..22927cadf3cb1 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/get_options_list_control_factory.tsx @@ -0,0 +1,410 @@ +/* + * 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 React, { useEffect } from 'react'; +import deepEqual from 'react-fast-compare'; +import { BehaviorSubject, combineLatest, debounceTime, filter, skip } from 'rxjs'; + +import { OptionsListSearchTechnique } from '@kbn/controls-plugin/common/options_list/suggestions_searching'; +import { OptionsListSortingType } from '@kbn/controls-plugin/common/options_list/suggestions_sorting'; +import { + OptionsListSuccessResponse, + OptionsListSuggestions, +} from '@kbn/controls-plugin/common/options_list/types'; +import { buildExistsFilter, buildPhraseFilter, buildPhrasesFilter, Filter } from '@kbn/es-query'; +import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; + +import { + getSelectionAsFieldType, + OptionsListSelection, +} from '../../../../common/options_list/options_list_selections'; +import { isValidSearch } from '../../../../common/options_list/suggestions_searching'; +import { initializeDataControl } from '../initialize_data_control'; +import { DataControlFactory, DataControlServices } from '../types'; +import { OptionsListControl } from './components/options_list_control'; +import { OptionsListEditorOptions } from './components/options_list_editor_options'; +import { + DEFAULT_SEARCH_TECHNIQUE, + MIN_OPTIONS_LIST_REQUEST_SIZE, + OPTIONS_LIST_CONTROL_TYPE, + OPTIONS_LIST_DEFAULT_SORT, +} from './constants'; +import { fetchAndValidate$ } from './fetch_and_validate'; +import { OptionsListControlContext } from './options_list_context_provider'; +import { OptionsListStrings } from './options_list_strings'; +import { OptionsListControlApi, OptionsListControlState } from './types'; + +export const getOptionsListControlFactory = ( + services: DataControlServices +): DataControlFactory => { + return { + type: OPTIONS_LIST_CONTROL_TYPE, + getIconType: () => 'editorChecklist', + getDisplayName: OptionsListStrings.control.getDisplayName, + isFieldCompatible: (field) => { + return ( + !field.spec.scripted && + field.aggregatable && + ['string', 'boolean', 'ip', 'date', 'number'].includes(field.type) + ); + }, + CustomOptionsComponent: OptionsListEditorOptions, + buildControl: async (initialState, buildApi, uuid, controlGroupApi) => { + /** Serializable state - i.e. the state that is saved with the control */ + const searchTechnique$ = new BehaviorSubject( + initialState.searchTechnique ?? DEFAULT_SEARCH_TECHNIQUE + ); + const runPastTimeout$ = new BehaviorSubject(initialState.runPastTimeout); + const singleSelect$ = new BehaviorSubject(initialState.singleSelect); + const selections$ = new BehaviorSubject( + initialState.selectedOptions ?? [] + ); + const sort$ = new BehaviorSubject( + initialState.sort ?? OPTIONS_LIST_DEFAULT_SORT + ); + const existsSelected$ = new BehaviorSubject(initialState.existsSelected); + const excludeSelected$ = new BehaviorSubject(initialState.exclude); + + /** Creation options state - cannot currently be changed after creation, but need subjects for comparators */ + const placeholder$ = new BehaviorSubject(initialState.placeholder); + const hideActionBar$ = new BehaviorSubject(initialState.hideActionBar); + const hideExclude$ = new BehaviorSubject(initialState.hideExclude); + const hideExists$ = new BehaviorSubject(initialState.hideExists); + const hideSort$ = new BehaviorSubject(initialState.hideSort); + + /** Runtime / component state - none of this is serialized */ + const searchString$ = new BehaviorSubject(''); + const searchStringValid$ = new BehaviorSubject(true); + const requestSize$ = new BehaviorSubject(MIN_OPTIONS_LIST_REQUEST_SIZE); + + const availableOptions$ = new BehaviorSubject(undefined); + const invalidSelections$ = new BehaviorSubject>(new Set()); + const totalCardinality$ = new BehaviorSubject(0); + + const dataControl = initializeDataControl< + Pick + >( + uuid, + OPTIONS_LIST_CONTROL_TYPE, + initialState, + { searchTechnique: searchTechnique$, singleSelect: singleSelect$ }, + controlGroupApi, + services + ); + + const stateManager = { + ...dataControl.stateManager, + exclude: excludeSelected$, + existsSelected: existsSelected$, + searchTechnique: searchTechnique$, + selectedOptions: selections$, + singleSelect: singleSelect$, + sort: sort$, + searchString: searchString$, + searchStringValid: searchStringValid$, + runPastTimeout: runPastTimeout$, + requestSize: requestSize$, + }; + + /** Handle loading state; since suggestion fetching and validation are tied, only need one loading subject */ + const loadingSuggestions$ = new BehaviorSubject(false); + const dataLoadingSubscription = loadingSuggestions$ + .pipe( + debounceTime(100) // debounce set loading so that it doesn't flash as the user types + ) + .subscribe((isLoading) => { + dataControl.api.setDataLoading(isLoading); + }); + + /** Debounce the search string changes to reduce the number of fetch requests */ + const debouncedSearchString = stateManager.searchString.pipe(debounceTime(100)); + + /** Validate the search string as the user types */ + const validSearchStringSubscription = combineLatest([ + debouncedSearchString, + dataControl.api.field$, + searchTechnique$, + ]).subscribe(([newSearchString, field, searchTechnique]) => { + searchStringValid$.next( + isValidSearch({ + searchString: newSearchString, + fieldType: field?.type, + searchTechnique, + }) + ); + }); + + /** Clear state when the field changes */ + const fieldChangedSubscription = combineLatest([ + dataControl.stateManager.fieldName, + dataControl.stateManager.dataViewId, + ]) + .pipe( + skip(1) // skip first, since this represents initialization + ) + .subscribe(() => { + searchString$.next(''); + selections$.next(undefined); + existsSelected$.next(false); + excludeSelected$.next(false); + requestSize$.next(MIN_OPTIONS_LIST_REQUEST_SIZE); + sort$.next(OPTIONS_LIST_DEFAULT_SORT); + }); + + /** Fetch the suggestions and perform validation */ + const loadMoreSubject = new BehaviorSubject(null); + const fetchSubscription = fetchAndValidate$({ + services, + api: { + ...dataControl.api, + loadMoreSubject, + loadingSuggestions$, + debouncedSearchString, + parentApi: controlGroupApi, + controlFetch$: controlGroupApi.controlFetch$(uuid), + }, + stateManager, + }).subscribe((result) => { + // if there was an error during fetch, set blocking error and return early + if (Object.hasOwn(result, 'error')) { + dataControl.api.setBlockingError((result as { error: Error }).error); + return; + } else if (dataControl.api.blockingError.getValue()) { + // otherwise, if there was a previous error, clear it + dataControl.api.setBlockingError(undefined); + } + + // fetch was successful so set all attributes from result + const successResponse = result as OptionsListSuccessResponse; + availableOptions$.next(successResponse.suggestions); + totalCardinality$.next(successResponse.totalCardinality ?? 0); + invalidSelections$.next(new Set(successResponse.invalidSelections ?? [])); + + // reset the request size back to the minimum (if it's not already) + if (stateManager.requestSize.getValue() !== MIN_OPTIONS_LIST_REQUEST_SIZE) { + stateManager.requestSize.next(MIN_OPTIONS_LIST_REQUEST_SIZE); + } + }); + + /** Remove all other selections if this control becomes a single select */ + const singleSelectSubscription = singleSelect$ + .pipe(filter((singleSelect) => Boolean(singleSelect))) + .subscribe(() => { + const currentSelections = selections$.getValue() ?? []; + if (currentSelections.length > 1) selections$.next([currentSelections[0]]); + }); + + /** Output filters when selections change */ + const outputFilterSubscription = combineLatest([ + dataControl.api.dataViews, + dataControl.stateManager.fieldName, + selections$, + existsSelected$, + excludeSelected$, + ]).subscribe(([dataViews, fieldName, selections, existsSelected, exclude]) => { + const dataView = dataViews?.[0]; + const field = dataView && fieldName ? dataView.getFieldByName(fieldName) : undefined; + + if (!dataView || !field) return; + + let newFilter: Filter | undefined; + if (existsSelected) { + newFilter = buildExistsFilter(field, dataView); + } else if (selections && selections.length > 0) { + newFilter = + selections.length === 1 + ? buildPhraseFilter(field, selections[0], dataView) + : buildPhrasesFilter(field, selections, dataView); + } + if (newFilter) { + newFilter.meta.key = field?.name; + if (exclude) newFilter.meta.negate = true; + } + api.setOutputFilter(newFilter); + }); + + const api = buildApi( + { + ...dataControl.api, + getTypeDisplayName: OptionsListStrings.control.getDisplayName, + serializeState: () => { + const { rawState: dataControlState, references } = dataControl.serialize(); + return { + rawState: { + ...dataControlState, + searchTechnique: searchTechnique$.getValue(), + runPastTimeout: runPastTimeout$.getValue(), + singleSelect: singleSelect$.getValue(), + selections: selections$.getValue(), + sort: sort$.getValue(), + existsSelected: existsSelected$.getValue(), + exclude: excludeSelected$.getValue(), + + // serialize state that cannot be changed to keep it consistent + placeholder: placeholder$.getValue(), + hideActionBar: hideActionBar$.getValue(), + hideExclude: hideExclude$.getValue(), + hideExists: hideExists$.getValue(), + hideSort: hideSort$.getValue(), + }, + references, // does not have any references other than those provided by the data control serializer + }; + }, + clearSelections: () => { + if (selections$.getValue()?.length) selections$.next([]); + if (existsSelected$.getValue()) existsSelected$.next(false); + if (invalidSelections$.getValue().size) invalidSelections$.next(new Set([])); + }, + }, + { + ...dataControl.comparators, + exclude: [excludeSelected$, (selected) => excludeSelected$.next(selected)], + existsSelected: [existsSelected$, (selected) => existsSelected$.next(selected)], + runPastTimeout: [runPastTimeout$, (runPast) => runPastTimeout$.next(runPast)], + searchTechnique: [ + searchTechnique$, + (technique) => searchTechnique$.next(technique), + (a, b) => (a ?? DEFAULT_SEARCH_TECHNIQUE) === (b ?? DEFAULT_SEARCH_TECHNIQUE), + ], + selectedOptions: [ + selections$, + (selections) => selections$.next(selections), + (a, b) => deepEqual(a ?? [], b ?? []), + ], + singleSelect: [singleSelect$, (selected) => singleSelect$.next(selected)], + sort: [ + sort$, + (sort) => sort$.next(sort), + (a, b) => (a ?? OPTIONS_LIST_DEFAULT_SORT) === (b ?? OPTIONS_LIST_DEFAULT_SORT), + ], + + /** This state cannot currently be changed after the control is created */ + placeholder: [placeholder$, (placeholder) => placeholder$.next(placeholder)], + hideActionBar: [hideActionBar$, (hideActionBar) => hideActionBar$.next(hideActionBar)], + hideExclude: [hideExclude$, (hideExclude) => hideExclude$.next(hideExclude)], + hideExists: [hideExists$, (hideExists) => hideExists$.next(hideExists)], + hideSort: [hideSort$, (hideSort) => hideSort$.next(hideSort)], + } + ); + + const componentApi = { + ...api, + selections$, + loadMoreSubject, + totalCardinality$, + availableOptions$, + invalidSelections$, + deselectOption: (key: string | undefined) => { + const field = api.field$.getValue(); + if (!key || !field) { + api.setBlockingError( + new Error(OptionsListStrings.control.getInvalidSelectionMessage()) + ); + return; + } + + const keyAsType = getSelectionAsFieldType(field, key); + + // delete from selections + const selectedOptions = selections$.getValue() ?? []; + const itemIndex = (selections$.getValue() ?? []).indexOf(keyAsType); + if (itemIndex !== -1) { + const newSelections = [...selectedOptions]; + newSelections.splice(itemIndex, 1); + selections$.next(newSelections); + } + // delete from invalid selections + const currentInvalid = invalidSelections$.getValue(); + if (currentInvalid.has(keyAsType)) { + currentInvalid.delete(keyAsType); + invalidSelections$.next(new Set(currentInvalid)); + } + }, + makeSelection: (key: string | undefined, showOnlySelected: boolean) => { + const field = api.field$.getValue(); + if (!key || !field) { + api.setBlockingError( + new Error(OptionsListStrings.control.getInvalidSelectionMessage()) + ); + return; + } + + const existsSelected = Boolean(existsSelected$.getValue()); + const selectedOptions = selections$.getValue() ?? []; + const singleSelect = singleSelect$.getValue(); + + // the order of these checks matters, so be careful if rearranging them + const keyAsType = getSelectionAsFieldType(field, key); + if (key === 'exists-option') { + // if selecting exists, then deselect everything else + existsSelected$.next(!existsSelected); + if (!existsSelected) { + selections$.next([]); + invalidSelections$.next(new Set([])); + } + } else if (showOnlySelected || selectedOptions.includes(keyAsType)) { + componentApi.deselectOption(key); + } else if (singleSelect) { + // replace selection + selections$.next([keyAsType]); + if (existsSelected) existsSelected$.next(false); + } else { + // select option + if (!selectedOptions) selections$.next([]); + if (existsSelected) existsSelected$.next(false); + selections$.next([...selectedOptions, keyAsType]); + } + }, + }; + + if (initialState.selectedOptions?.length || initialState.existsSelected) { + // has selections, so wait for initialization of filters + await dataControl.untilFiltersInitialized(); + } + + return { + api, + Component: ({ className: controlPanelClassName }) => { + useEffect(() => { + return () => { + // on unmount, clean up all subscriptions + dataLoadingSubscription.unsubscribe(); + fetchSubscription.unsubscribe(); + fieldChangedSubscription.unsubscribe(); + outputFilterSubscription.unsubscribe(); + singleSelectSubscription.unsubscribe(); + validSearchStringSubscription.unsubscribe(); + }; + }, []); + + /** Get display settings - if these are ever made editable, should be part of stateManager instead */ + const [placeholder, hideActionBar, hideExclude, hideExists, hideSort] = + useBatchedPublishingSubjects( + placeholder$, + hideActionBar$, + hideExclude$, + hideExists$, + hideSort$ + ); + + return ( + + + + ); + }, + }; + }, + }; +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/options_list_context_provider.tsx b/examples/controls_example/public/react_controls/data_controls/options_list_control/options_list_context_provider.tsx new file mode 100644 index 0000000000000..71783210bddfb --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/options_list_context_provider.tsx @@ -0,0 +1,34 @@ +/* + * 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 React, { useContext } from 'react'; + +import { ControlStateManager } from '../../types'; +import { + OptionsListComponentApi, + OptionsListComponentState, + OptionsListDisplaySettings, +} from './types'; + +export const OptionsListControlContext = React.createContext< + | { + api: OptionsListComponentApi; + stateManager: ControlStateManager; + displaySettings: OptionsListDisplaySettings; + } + | undefined +>(undefined); + +export const useOptionsListContext = () => { + const optionsListContext = useContext(OptionsListControlContext); + if (!optionsListContext) + throw new Error( + 'No OptionsListControlContext.Provider found when calling useOptionsListContext.' + ); + return optionsListContext; +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/options_list_fetch_cache.ts b/examples/controls_example/public/react_controls/data_controls/options_list_control/options_list_fetch_cache.ts new file mode 100644 index 0000000000000..84f9d2fc5e206 --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/options_list_fetch_cache.ts @@ -0,0 +1,122 @@ +/* + * 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 LRUCache from 'lru-cache'; +import hash from 'object-hash'; + +import dateMath from '@kbn/datemath'; + +import { + type OptionsListFailureResponse, + type OptionsListRequest, + type OptionsListResponse, + type OptionsListSuccessResponse, +} from '@kbn/controls-plugin/common/options_list/types'; +import { getEsQueryConfig } from '@kbn/data-plugin/public'; +import { buildEsQuery } from '@kbn/es-query'; +import { DataControlServices } from '../types'; + +const REQUEST_CACHE_SIZE = 50; // only store a max of 50 responses +const REQUEST_CACHE_TTL = 1000 * 60; // time to live = 1 minute + +const optionsListResponseWasFailure = ( + response: OptionsListResponse +): response is OptionsListFailureResponse => { + return (response as OptionsListFailureResponse).error !== undefined; +}; + +export class OptionsListFetchCache { + private cache: LRUCache; + + constructor() { + this.cache = new LRUCache({ + max: REQUEST_CACHE_SIZE, + maxAge: REQUEST_CACHE_TTL, + }); + } + + private getRequestHash = (request: OptionsListRequest) => { + const { + size, + sort, + query, + filters, + timeRange, + searchString, + runPastTimeout, + selectedOptions, + searchTechnique, + field: { name: fieldName }, + dataView: { title: dataViewTitle }, + } = request; + return hash({ + // round timeRange to the minute to avoid cache misses + timeRange: timeRange + ? JSON.stringify({ + from: dateMath.parse(timeRange.from)!.startOf('minute').toISOString(), + to: dateMath.parse(timeRange.to)!.endOf('minute').toISOString(), + }) + : [], + selectedOptions, + filters, + query, + sort, + searchTechnique, + runPastTimeout, + dataViewTitle, + searchString: searchString ?? '', + fieldName, + size, + }); + }; + + public async runFetchRequest( + request: OptionsListRequest, + abortSignal: AbortSignal, + services: DataControlServices + ): Promise { + const requestHash = this.getRequestHash(request); + + if (this.cache.has(requestHash)) { + return Promise.resolve(this.cache.get(requestHash)!); + } else { + const index = request.dataView.getIndexPattern(); + + const timeService = services.data.query.timefilter.timefilter; + const { query, filters, dataView, timeRange, field, ...passThroughProps } = request; + const timeFilter = timeRange ? timeService.createFilter(dataView, timeRange) : undefined; + const filtersToUse = [...(filters ?? []), ...(timeFilter ? [timeFilter] : [])]; + const config = getEsQueryConfig(services.core.uiSettings); + const esFilters = [buildEsQuery(dataView, query ?? [], filtersToUse ?? [], config)]; + + const requestBody = { + ...passThroughProps, + filters: esFilters, + fieldName: field.name, + fieldSpec: field, + runtimeFieldMap: dataView.toSpec?.().runtimeFieldMap, + }; + + const result = await services.core.http.fetch( + `/internal/controls/optionsList/${index}`, + { + version: '1', + body: JSON.stringify(requestBody), + signal: abortSignal, + method: 'POST', + } + ); + + if (!optionsListResponseWasFailure(result)) { + // only add the success responses to the cache + this.cache.set(requestHash, result); + } + return result; + } + } +} diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/options_list_strings.ts b/examples/controls_example/public/react_controls/data_controls/options_list_control/options_list_strings.ts new file mode 100644 index 0000000000000..5bf1c4c92239a --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/options_list_strings.ts @@ -0,0 +1,323 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { OptionsListSearchTechnique } from '../../../../common/options_list/suggestions_searching'; + +export const OptionsListStrings = { + control: { + getDisplayName: () => + i18n.translate('controls.optionsList.displayName', { + defaultMessage: 'Options list', + }), + getSeparator: (type?: string) => { + if (['date', 'number'].includes(type ?? '')) { + return i18n.translate('controls.optionsList.control.dateSeparator', { + defaultMessage: '; ', + }); + } + return i18n.translate('controls.optionsList.control.separator', { + defaultMessage: ', ', + }); + }, + getPlaceholder: () => + i18n.translate('controls.optionsList.control.placeholder', { + defaultMessage: 'Any', + }), + getNegate: () => + i18n.translate('controls.optionsList.control.negate', { + defaultMessage: 'NOT', + }), + getExcludeExists: () => + i18n.translate('controls.optionsList.control.excludeExists', { + defaultMessage: 'DOES NOT', + }), + getInvalidSelectionWarningLabel: (invalidSelectionCount: number) => + i18n.translate('controls.optionsList.control.invalidSelectionWarningLabel', { + defaultMessage: + '{invalidSelectionCount} {invalidSelectionCount, plural, one {selection returns} other {selections return}} no results.', + values: { + invalidSelectionCount, + }, + }), + getInvalidSelectionMessage: () => + i18n.translate('controls.optionsList.popover.selectionError', { + defaultMessage: 'There was an error when making your selection', + }), + }, + editor: { + getSelectionOptionsTitle: () => + i18n.translate('controls.optionsList.editor.selectionOptionsTitle', { + defaultMessage: 'Selections', + }), + selectionTypes: { + multi: { + getLabel: () => + i18n.translate('controls.optionsList.editor.multiSelectLabel', { + defaultMessage: 'Allow multiple selections', + }), + }, + single: { + getLabel: () => + i18n.translate('controls.optionsList.editor.singleSelectLabel', { + defaultMessage: 'Only allow a single selection', + }), + }, + }, + getSearchOptionsTitle: () => + i18n.translate('controls.optionsList.editor.searchOptionsTitle', { + defaultMessage: `Searching`, + }), + searchTypes: { + prefix: { + getLabel: () => + i18n.translate('controls.optionsList.editor.prefixSearchLabel', { + defaultMessage: 'Prefix', + }), + getTooltip: () => + i18n.translate('controls.optionsList.editor.prefixSearchTooltip', { + defaultMessage: 'Matches values that begin with the given search string.', + }), + }, + wildcard: { + getLabel: () => + i18n.translate('controls.optionsList.editor.wildcardSearchLabel', { + defaultMessage: 'Contains', + }), + getTooltip: () => + i18n.translate('controls.optionsList.editor.wildcardSearchTooltip', { + defaultMessage: + 'Matches values that contain the given search string. Results might take longer to populate.', + }), + }, + exact: { + getLabel: () => + i18n.translate('controls.optionsList.editor.exactSearchLabel', { + defaultMessage: 'Exact', + }), + getTooltip: () => + i18n.translate('controls.optionsList.editor.exactSearchTooltip', { + defaultMessage: + 'Matches values that are equal to the given search string. Returns results quickly.', + }), + }, + }, + getAdditionalSettingsTitle: () => + i18n.translate('controls.optionsList.editor.additionalSettingsTitle', { + defaultMessage: `Additional settings`, + }), + getRunPastTimeoutTitle: () => + i18n.translate('controls.optionsList.editor.runPastTimeout', { + defaultMessage: 'Ignore timeout for results', + }), + getRunPastTimeoutTooltip: () => + i18n.translate('controls.optionsList.editor.runPastTimeout.tooltip', { + defaultMessage: + 'Wait to display results until the list is complete. This setting is useful for large data sets, but the results might take longer to populate.', + }), + }, + popover: { + getAriaLabel: (fieldName: string) => + i18n.translate('controls.optionsList.popover.ariaLabel', { + defaultMessage: 'Popover for {fieldName} control', + values: { fieldName }, + }), + getSuggestionsAriaLabel: (fieldName: string, optionCount: number) => + i18n.translate('controls.optionsList.popover.suggestionsAriaLabel', { + defaultMessage: + 'Available {optionCount, plural, one {option} other {options}} for {fieldName}', + values: { fieldName, optionCount }, + }), + getAllowExpensiveQueriesWarning: () => + i18n.translate('controls.optionsList.popover.allowExpensiveQueriesWarning', { + defaultMessage: + 'The cluster setting to allow expensive queries is off, so some features are disabled.', + }), + getLoadingMoreMessage: () => + i18n.translate('controls.optionsList.popover.loadingMore', { + defaultMessage: 'Loading more options...', + }), + getAtEndOfOptionsMessage: () => + i18n.translate('controls.optionsList.popover.endOfOptions', { + defaultMessage: + 'The top 1,000 available options are displayed. View more options by searching for the name.', + }), + getEmptyMessage: () => + i18n.translate('controls.optionsList.popover.empty', { + defaultMessage: 'No options found', + }), + getSelectionsEmptyMessage: () => + i18n.translate('controls.optionsList.popover.selectionsEmpty', { + defaultMessage: 'You have no selections', + }), + getInvalidSearchMessage: (fieldType: string) => { + switch (fieldType) { + case 'ip': { + return i18n.translate('controls.optionsList.popover.invalidSearch.ip', { + defaultMessage: 'Your search is not a valid IP address.', + }); + } + case 'number': { + return i18n.translate('controls.optionsList.popover.invalidSearch.number', { + defaultMessage: 'Your search is not a valid number.', + }); + } + default: { + // this shouldn't happen, but giving a fallback error message just in case + return i18n.translate('controls.optionsList.popover.invalidSearch.invalidCharacters', { + defaultMessage: 'Your search contains invalid characters.', + }); + } + } + }, + getAllOptionsButtonTitle: () => + i18n.translate('controls.optionsList.popover.allOptionsTitle', { + defaultMessage: 'Show all options', + }), + getSelectedOptionsButtonTitle: () => + i18n.translate('controls.optionsList.popover.selectedOptionsTitle', { + defaultMessage: 'Show only selected options', + }), + getSearchPlaceholder: (searchTechnique?: OptionsListSearchTechnique) => { + switch (searchTechnique) { + case 'prefix': { + return i18n.translate('controls.optionsList.popover.prefixSearchPlaceholder', { + defaultMessage: 'Starts with...', + }); + } + case 'wildcard': { + return i18n.translate('controls.optionsList.popover.wildcardSearchPlaceholder', { + defaultMessage: 'Contains...', + }); + } + case 'exact': { + return i18n.translate('controls.optionsList.popover.exactSearchPlaceholder', { + defaultMessage: 'Equals...', + }); + } + } + }, + getCardinalityLabel: (totalOptions: number) => + i18n.translate('controls.optionsList.popover.cardinalityLabel', { + defaultMessage: + '{totalOptions, number} {totalOptions, plural, one {option} other {options}}', + values: { totalOptions }, + }), + getInvalidSelectionsSectionAriaLabel: (fieldName: string, invalidSelectionCount: number) => + i18n.translate('controls.optionsList.popover.invalidSelectionsAriaLabel', { + defaultMessage: + 'Invalid {invalidSelectionCount, plural, one {selection} other {selections}} for {fieldName}', + values: { fieldName, invalidSelectionCount }, + }), + getInvalidSelectionsSectionTitle: (invalidSelectionCount: number) => + i18n.translate('controls.optionsList.popover.invalidSelectionsSectionTitle', { + defaultMessage: + 'Invalid {invalidSelectionCount, plural, one {selection} other {selections}}', + values: { invalidSelectionCount }, + }), + getInvalidSelectionsLabel: (selectedOptions: number) => + i18n.translate('controls.optionsList.popover.invalidSelectionsLabel', { + defaultMessage: + '{selectedOptions} {selectedOptions, plural, one {selection} other {selections}} invalid', + values: { selectedOptions }, + }), + getInvalidSelectionScreenReaderText: () => + i18n.translate('controls.optionsList.popover.invalidSelectionScreenReaderText', { + defaultMessage: 'Invalid selection.', + }), + getIncludeLabel: () => + i18n.translate('controls.optionsList.popover.includeLabel', { + defaultMessage: 'Include', + }), + getExcludeLabel: () => + i18n.translate('controls.optionsList.popover.excludeLabel', { + defaultMessage: 'Exclude', + }), + getIncludeExcludeLegend: () => + i18n.translate('controls.optionsList.popover.excludeOptionsLegend', { + defaultMessage: 'Include or exclude selections', + }), + getSortPopoverTitle: () => + i18n.translate('controls.optionsList.popover.sortTitle', { + defaultMessage: 'Sort', + }), + getSortPopoverDescription: () => + i18n.translate('controls.optionsList.popover.sortDescription', { + defaultMessage: 'Define the sort order', + }), + getSortDisabledTooltip: () => + i18n.translate('controls.optionsList.popover.sortDisabledTooltip', { + defaultMessage: 'Sorting is ignored when “Show only selected” is true', + }), + getDocumentCountTooltip: (documentCount: number) => + i18n.translate('controls.optionsList.popover.documentCountTooltip', { + defaultMessage: + 'This value appears in {documentCount, number} {documentCount, plural, one {document} other {documents}}', + values: { documentCount }, + }), + getDocumentCountScreenReaderText: (documentCount: number) => + i18n.translate('controls.optionsList.popover.documentCountScreenReaderText', { + defaultMessage: + 'Appears in {documentCount, number} {documentCount, plural, one {document} other {documents}}', + values: { documentCount }, + }), + }, + controlAndPopover: { + getExists: (negate: number = +false) => + i18n.translate('controls.optionsList.controlAndPopover.exists', { + defaultMessage: '{negate, plural, one {Exist} other {Exists}}', + values: { negate }, + }), + }, + editorAndPopover: { + getSortDirectionLegend: () => + i18n.translate('controls.optionsList.popover.sortDirections', { + defaultMessage: 'Sort directions', + }), + sortBy: { + _count: { + getSortByLabel: () => + i18n.translate('controls.optionsList.popover.sortBy.docCount', { + defaultMessage: 'By document count', + }), + }, + _key: { + getSortByLabel: (type?: string) => { + switch (type) { + case 'date': + return i18n.translate('controls.optionsList.popover.sortBy.date', { + defaultMessage: 'By date', + }); + case 'number': + return i18n.translate('controls.optionsList.popover.sortBy.numeric', { + defaultMessage: 'Numerically', + }); + default: + return i18n.translate('controls.optionsList.popover.sortBy.alphabetical', { + defaultMessage: 'Alphabetically', + }); + } + }, + }, + }, + sortOrder: { + asc: { + getSortOrderLabel: () => + i18n.translate('controls.optionsList.popover.sortOrder.asc', { + defaultMessage: 'Ascending', + }), + }, + desc: { + getSortOrderLabel: () => + i18n.translate('controls.optionsList.popover.sortOrder.desc', { + defaultMessage: 'Descending', + }), + }, + }, + }, +}; diff --git a/examples/controls_example/public/react_controls/data_controls/options_list_control/types.ts b/examples/controls_example/public/react_controls/data_controls/options_list_control/types.ts new file mode 100644 index 0000000000000..3fba2f6908d0c --- /dev/null +++ b/examples/controls_example/public/react_controls/data_controls/options_list_control/types.ts @@ -0,0 +1,59 @@ +/* + * 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 { BehaviorSubject } from 'rxjs'; + +import { OptionsListSearchTechnique } from '@kbn/controls-plugin/common/options_list/suggestions_searching'; +import { OptionsListSortingType } from '@kbn/controls-plugin/common/options_list/suggestions_sorting'; +import { OptionsListSuggestions } from '@kbn/controls-plugin/common/options_list/types'; +import { PublishingSubject } from '@kbn/presentation-publishing'; + +import { OptionsListSelection } from '../../../../common/options_list/options_list_selections'; +import { DataControlApi, DefaultDataControlState } from '../types'; + +export interface OptionsListDisplaySettings { + placeholder?: string; + hideActionBar?: boolean; + hideExclude?: boolean; + hideExists?: boolean; + hideSort?: boolean; +} + +export interface OptionsListControlState + extends DefaultDataControlState, + OptionsListDisplaySettings { + searchTechnique?: OptionsListSearchTechnique; + sort?: OptionsListSortingType; + selectedOptions?: OptionsListSelection[]; + existsSelected?: boolean; + runPastTimeout?: boolean; + singleSelect?: boolean; + exclude?: boolean; +} + +export type OptionsListControlApi = DataControlApi; + +export interface OptionsListComponentState + extends Omit { + searchString: string; + searchStringValid: boolean; + requestSize: number; +} + +interface PublishesOptions { + availableOptions$: PublishingSubject; + invalidSelections$: PublishingSubject>; + totalCardinality$: PublishingSubject; +} + +export type OptionsListComponentApi = OptionsListControlApi & + PublishesOptions & { + deselectOption: (key: string | undefined) => void; + makeSelection: (key: string | undefined, showOnlySelected: boolean) => void; + loadMoreSubject: BehaviorSubject; + }; diff --git a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx index 3746d81f44473..110de033520de 100644 --- a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx +++ b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx @@ -7,22 +7,19 @@ */ import React from 'react'; -import { BehaviorSubject, of } from 'rxjs'; +import { of } from 'rxjs'; import { estypes } from '@elastic/elasticsearch'; import { coreMock } from '@kbn/core/public/mocks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; +import { DataViewField } from '@kbn/data-views-plugin/common'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; -import { TimeRange } from '@kbn/es-query'; import { SerializedPanelState } from '@kbn/presentation-containers'; -import { StateComparators } from '@kbn/presentation-publishing'; import { fireEvent, render, waitFor } from '@testing-library/react'; -import { ControlFetchContext } from '../../control_group/control_fetch'; -import { ControlGroupApi } from '../../control_group/types'; -import { ControlApiRegistration } from '../../types'; +import { getMockedBuildApi, getMockedControlGroupApi } from '../../mocks/control_mocks'; import { getRangesliderControlFactory } from './get_range_slider_control_factory'; -import { RangesliderControlApi, RangesliderControlState } from './types'; +import { RangesliderControlState } from './types'; const DEFAULT_TOTAL_RESULTS = 20; const DEFAULT_MIN = 0; @@ -30,14 +27,9 @@ const DEFAULT_MAX = 1000; describe('RangesliderControlApi', () => { const uuid = 'myControl1'; - const dashboardApi = { - timeRange$: new BehaviorSubject(undefined), - }; - const controlGroupApi = { - controlFetch$: () => new BehaviorSubject({}), - ignoreParentSettings$: new BehaviorSubject(undefined), - parentApi: dashboardApi, - } as unknown as ControlGroupApi; + + const controlGroupApi = getMockedControlGroupApi(); + const dataStartServiceMock = dataPluginMock.createStartContract(); let totalResults = DEFAULT_TOTAL_RESULTS; let min: estypes.AggregationsSingleMetricAggregateBase['value'] = DEFAULT_MIN; @@ -62,8 +54,8 @@ describe('RangesliderControlApi', () => { }; }); const mockDataViews = dataViewPluginMocks.createStartContract(); - // @ts-ignore - mockDataViews.get = async (id: string): Promise => { + + mockDataViews.get = jest.fn().mockImplementation(async (id: string): Promise => { if (id !== 'myDataViewId') { throw new Error(`no data view found for id ${id}`); } @@ -74,7 +66,8 @@ describe('RangesliderControlApi', () => { { displayName: 'My field name', name: 'myFieldName', - type: 'string', + type: 'number', + toSpec: jest.fn(), }, ].find((field) => fieldName === field.name); }, @@ -86,7 +79,8 @@ describe('RangesliderControlApi', () => { }; }, } as unknown as DataView; - }; + }); + const factory = getRangesliderControlFactory({ core: coreMock.createStart(), data: dataStartServiceMock, @@ -99,28 +93,14 @@ describe('RangesliderControlApi', () => { max = DEFAULT_MAX; }); - function buildApiMock( - api: ControlApiRegistration, - nextComparitors: StateComparators - ) { - return { - ...api, - uuid, - parentApi: controlGroupApi, - unsavedChanges: new BehaviorSubject | undefined>(undefined), - resetUnsavedChanges: () => {}, - type: factory.type, - }; - } - - describe('on initialize', () => { + describe('filters$', () => { test('should not set filters$ when value is not provided', async () => { const { api } = await factory.buildControl( { dataViewId: 'myDataView', fieldName: 'myFieldName', }, - buildApiMock, + getMockedBuildApi(uuid, factory, controlGroupApi), uuid, controlGroupApi ); @@ -134,7 +114,7 @@ describe('RangesliderControlApi', () => { fieldName: 'myFieldName', value: ['5', '10'], }, - buildApiMock, + getMockedBuildApi(uuid, factory, controlGroupApi), uuid, controlGroupApi ); @@ -169,7 +149,7 @@ describe('RangesliderControlApi', () => { fieldName: 'myFieldName', value: ['5', '10'], }, - buildApiMock, + getMockedBuildApi(uuid, factory, controlGroupApi), uuid, controlGroupApi ); @@ -191,7 +171,7 @@ describe('RangesliderControlApi', () => { fieldName: 'myFieldName', value: ['5', '10'], }, - buildApiMock, + getMockedBuildApi(uuid, factory, controlGroupApi), uuid, controlGroupApi ); @@ -209,7 +189,7 @@ describe('RangesliderControlApi', () => { dataViewId: 'myDataViewId', fieldName: 'myFieldName', }, - buildApiMock, + getMockedBuildApi(uuid, factory, controlGroupApi), uuid, controlGroupApi ); @@ -230,7 +210,7 @@ describe('RangesliderControlApi', () => { dataViewId: 'myDataViewId', fieldName: 'myFieldName', }, - buildApiMock, + getMockedBuildApi(uuid, factory, controlGroupApi), uuid, controlGroupApi ); @@ -245,7 +225,7 @@ describe('RangesliderControlApi', () => { fieldName: 'myFieldName', step: 1024, }, - buildApiMock, + getMockedBuildApi(uuid, factory, controlGroupApi), uuid, controlGroupApi ); @@ -259,9 +239,11 @@ describe('RangesliderControlApi', () => { const CustomSettings = factory.CustomOptionsComponent!; const component = render( ); expect( @@ -274,9 +256,11 @@ describe('RangesliderControlApi', () => { const CustomSettings = factory.CustomOptionsComponent!; const component = render( ); @@ -285,7 +269,7 @@ describe('RangesliderControlApi', () => { }); expect(setControlEditorValid).toBeCalledWith(false); fireEvent.change(component.getByTestId('rangeSliderControl__stepAdditionalSetting'), { - target: { value: '' }, + target: { value: undefined }, }); expect(setControlEditorValid).toBeCalledWith(false); fireEvent.change(component.getByTestId('rangeSliderControl__stepAdditionalSetting'), { diff --git a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx index 4db429ba7cb68..8893d114c98f3 100644 --- a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx +++ b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx @@ -6,13 +6,13 @@ * Side Public License, v 1. */ -import React, { useEffect, useMemo } from 'react'; +import React, { useEffect, useState } from 'react'; import { EuiFieldNumber, EuiFormRow } from '@elastic/eui'; import { buildRangeFilter, Filter, RangeFilterParams } from '@kbn/es-query'; import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { BehaviorSubject, combineLatest, map, skip } from 'rxjs'; import { initializeDataControl } from '../initialize_data_control'; -import { DataControlFactory } from '../types'; +import { DataControlFactory, DataControlServices } from '../types'; import { RangeSliderControl } from './components/range_slider_control'; import { hasNoResults$ } from './has_no_results'; import { minMax$ } from './min_max'; @@ -22,11 +22,10 @@ import { RangesliderControlState, RangeValue, RANGE_SLIDER_CONTROL_TYPE, - Services, } from './types'; export const getRangesliderControlFactory = ( - services: Services + services: DataControlServices ): DataControlFactory => { return { type: RANGE_SLIDER_CONTROL_TYPE, @@ -35,8 +34,9 @@ export const getRangesliderControlFactory = ( isFieldCompatible: (field) => { return field.aggregatable && field.type === 'number'; }, - CustomOptionsComponent: ({ currentState, updateState, setControlEditorValid }) => { - const step = currentState.step ?? 1; + CustomOptionsComponent: ({ initialState, updateState, setControlEditorValid }) => { + const [step, setStep] = useState(initialState.step ?? 1); + return ( <> @@ -44,6 +44,7 @@ export const getRangesliderControlFactory = ( value={step} onChange={(event) => { const newStep = event.target.valueAsNumber; + setStep(newStep); updateState({ step: newStep }); setControlEditorValid(newStep > 0); }} @@ -66,13 +67,12 @@ export const getRangesliderControlFactory = ( value$.next(nextValue); } - const dataControl = initializeDataControl>( + const dataControl = initializeDataControl>( uuid, RANGE_SLIDER_CONTROL_TYPE, initialState, { step: step$, - value: value$, }, controlGroupApi, services @@ -207,11 +207,10 @@ export const getRangesliderControlFactory = ( return { api, Component: ({ className: controlPanelClassName }) => { - const [dataLoading, dataViews, fieldName, max, min, selectionHasNotResults, step, value] = + const [dataLoading, fieldFormatter, max, min, selectionHasNotResults, step, value] = useBatchedPublishingSubjects( dataLoading$, - dataControl.api.dataViews, - dataControl.stateManager.fieldName, + dataControl.api.fieldFormatter, max$, min$, selectionHasNoResults$, @@ -229,17 +228,6 @@ export const getRangesliderControlFactory = ( }; }, []); - const fieldFormatter = useMemo(() => { - const dataView = dataViews?.[0]; - if (!dataView) { - return undefined; - } - const fieldSpec = dataView.getFieldByName(fieldName); - return fieldSpec - ? dataView.getFormatterForField(fieldSpec).getConverterFor('text') - : undefined; - }, [dataViews, fieldName]); - return ( => { +export const getSearchControlFactory = ( + services: DataControlServices +): DataControlFactory => { return { type: SEARCH_CONTROL_TYPE, getIconType: () => 'search', @@ -65,8 +59,11 @@ export const getSearchControlFactory = ({ (field.spec.esTypes ?? []).includes('text') ); }, - CustomOptionsComponent: ({ currentState, updateState }) => { - const searchTechnique = currentState.searchTechnique ?? DEFAULT_SEARCH_TECHNIQUE; + CustomOptionsComponent: ({ initialState, updateState }) => { + const [searchTechnique, setSearchTechnique] = useState( + initialState.searchTechnique ?? DEFAULT_SEARCH_TECHNIQUE + ); + return ( { const newSearchTechnique = id as SearchControlTechniques; + setSearchTechnique(newSearchTechnique); updateState({ searchTechnique: newSearchTechnique }); }} /> @@ -93,10 +91,7 @@ export const getSearchControlFactory = ({ initialState, editorStateManager, parentApi, - { - core, - dataViews: dataViewsService, - } + services ); const api = buildApi( diff --git a/examples/controls_example/public/react_controls/data_controls/types.ts b/examples/controls_example/public/react_controls/data_controls/types.ts index b3379889f4223..db4cba8773232 100644 --- a/examples/controls_example/public/react_controls/data_controls/types.ts +++ b/examples/controls_example/public/react_controls/data_controls/types.ts @@ -6,34 +6,54 @@ * Side Public License, v 1. */ +import { CoreStart } from '@kbn/core/public'; +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { DataViewField } from '@kbn/data-views-plugin/common'; +import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { Filter } from '@kbn/es-query'; +import { FieldFormatConvertFunction } from '@kbn/field-formats-plugin/common'; import { HasEditCapabilities, PublishesDataViews, PublishesFilters, PublishesPanelTitle, + PublishingSubject, } from '@kbn/presentation-publishing'; +import { ControlGroupApi } from '../control_group/types'; import { ControlFactory, DefaultControlApi, DefaultControlState } from '../types'; +export type DataControlFieldFormatter = FieldFormatConvertFunction | ((toFormat: any) => string); + +export interface PublishesField { + field$: PublishingSubject; + fieldFormatter: PublishingSubject; +} + export type DataControlApi = DefaultControlApi & Omit & // control titles cannot be hidden HasEditCapabilities & PublishesDataViews & + PublishesField & PublishesFilters & { setOutputFilter: (filter: Filter | undefined) => void; // a control should only ever output a **single** filter }; +export interface CustomOptionsComponentProps< + State extends DefaultDataControlState = DefaultDataControlState +> { + initialState: Omit; + field: DataViewField; + updateState: (newState: Partial) => void; + setControlEditorValid: (valid: boolean) => void; + parentApi: ControlGroupApi; +} + export interface DataControlFactory< State extends DefaultDataControlState = DefaultDataControlState, Api extends DataControlApi = DataControlApi > extends ControlFactory { isFieldCompatible: (field: DataViewField) => boolean; - CustomOptionsComponent?: React.FC<{ - currentState: Partial; - updateState: (newState: Partial) => void; - setControlEditorValid: (valid: boolean) => void; - }>; + CustomOptionsComponent?: React.FC>; } export const isDataControlFactory = ( @@ -47,3 +67,9 @@ export interface DefaultDataControlState extends DefaultControlState { fieldName: string; title?: string; // custom control label } + +export interface DataControlServices { + core: CoreStart; + data: DataPublicPluginStart; + dataViews: DataViewsPublicPluginStart; +} diff --git a/examples/controls_example/public/react_controls/mocks/control_mocks.ts b/examples/controls_example/public/react_controls/mocks/control_mocks.ts new file mode 100644 index 0000000000000..fb484013f7ccc --- /dev/null +++ b/examples/controls_example/public/react_controls/mocks/control_mocks.ts @@ -0,0 +1,47 @@ +/* + * 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 { TimeRange } from '@kbn/es-query'; +import { PublishesUnifiedSearch, StateComparators } from '@kbn/presentation-publishing'; +import { BehaviorSubject } from 'rxjs'; +import { ControlFetchContext } from '../control_group/control_fetch/control_fetch'; +import { ControlGroupApi } from '../control_group/types'; +import { ControlApiRegistration, ControlFactory, DefaultControlApi } from '../types'; + +export const getMockedControlGroupApi = ( + dashboardApi: Partial = { + timeRange$: new BehaviorSubject(undefined), + }, + overwriteApi?: Partial +) => { + return { + parentApi: dashboardApi, + autoApplySelections$: new BehaviorSubject(true), + ignoreParentSettings$: new BehaviorSubject(undefined), + controlFetch$: () => new BehaviorSubject({}), + allowExpensiveQueries$: new BehaviorSubject(true), + ...overwriteApi, + } as unknown as ControlGroupApi; +}; + +export const getMockedBuildApi = + ( + uuid: string, + factory: ControlFactory, + controlGroupApi?: ControlGroupApi + ) => + (api: ControlApiRegistration, nextComparators: StateComparators) => { + return { + ...api, + uuid, + parentApi: controlGroupApi ?? getMockedControlGroupApi(), + unsavedChanges: new BehaviorSubject | undefined>(undefined), + resetUnsavedChanges: () => {}, + type: factory.type, + }; + }; diff --git a/examples/controls_example/public/react_controls/timeslider_control/get_timeslider_control_factory.test.tsx b/examples/controls_example/public/react_controls/timeslider_control/get_timeslider_control_factory.test.tsx index ff32abe441a0c..9bf8ade2ebe32 100644 --- a/examples/controls_example/public/react_controls/timeslider_control/get_timeslider_control_factory.test.tsx +++ b/examples/controls_example/public/react_controls/timeslider_control/get_timeslider_control_factory.test.tsx @@ -6,28 +6,27 @@ * Side Public License, v 1. */ -import React from 'react'; -import { render, fireEvent } from '@testing-library/react'; -import { TimeRange } from '@kbn/es-query'; -import { StateComparators } from '@kbn/presentation-publishing'; import { coreMock } from '@kbn/core/public/mocks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import dateMath from '@kbn/datemath'; +import { TimeRange } from '@kbn/es-query'; +import { StateComparators } from '@kbn/presentation-publishing'; +import { fireEvent, render } from '@testing-library/react'; +import React from 'react'; import { BehaviorSubject } from 'rxjs'; -import { ControlGroupApi } from '../control_group/types'; +import { getMockedControlGroupApi } from '../mocks/control_mocks'; import { ControlApiRegistration } from '../types'; import { getTimesliderControlFactory } from './get_timeslider_control_factory'; import { TimesliderControlApi, TimesliderControlState } from './types'; describe('TimesliderControlApi', () => { const uuid = 'myControl1'; + const dashboardApi = { timeRange$: new BehaviorSubject(undefined), }; - const controlGroupApi = { - autoApplySelections$: new BehaviorSubject(true), - parentApi: dashboardApi, - } as unknown as ControlGroupApi; + const controlGroupApi = getMockedControlGroupApi(dashboardApi); + const dataStartServiceMock = dataPluginMock.createStartContract(); dataStartServiceMock.query.timefilter.timefilter.calculateBounds = (timeRange: TimeRange) => { const now = new Date(); diff --git a/examples/controls_example/tsconfig.json b/examples/controls_example/tsconfig.json index 5ad45877cf0a7..9ddcdf1835213 100644 --- a/examples/controls_example/tsconfig.json +++ b/examples/controls_example/tsconfig.json @@ -36,5 +36,6 @@ "@kbn/datemath", "@kbn/ui-theme", "@kbn/react-kibana-context-render", + "@kbn/field-formats-plugin", ] } diff --git a/oas_docs/makefile b/oas_docs/makefile index aa6bd1af38223..ec99abaf9e40d 100644 --- a/oas_docs/makefile +++ b/oas_docs/makefile @@ -16,11 +16,11 @@ .PHONY: api-docs api-docs: ## Generate kibana.serverless.yaml and kibana.yaml @npx @redocly/cli join "kibana.info.serverless.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis_serverless.yaml" "../packages/core/saved-objects/docs/openapi/bundled_serverless.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" -o "output/kibana.serverless.yaml" "bundle.serverless.json" --prefix-components-with-info-prop title - @npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/alerting/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title + @npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/alerting/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title .PHONY: api-docs-stateful api-docs-stateful: ## Generate only kibana.yaml - @npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/alerting/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title + @npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/alerting/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title # Temporarily omit "../x-pack/plugins/fleet/common/openapi/bundled.yaml" due to internals tag and tag sorting .PHONY: api-docs-serverless @@ -29,8 +29,7 @@ api-docs-serverless: ## Generate only kibana.serverless.yaml .PHONY: api-docs-lint api-docs-lint: ## Run spectral API docs linter - @npx @stoplight/spectral-cli lint "output/kibana.serverless.yaml" --ruleset ".spectral.yaml" - @npx @stoplight/spectral-cli lint "output/kibana.yaml" --ruleset ".spectral.yaml" + @npx @stoplight/spectral-cli lint "output/*.yaml" --ruleset ".spectral.yaml" .PHONY: api-docs-lint-stateful api-docs-lint-stateful: ## Run spectral API docs linter on kibana.yaml diff --git a/oas_docs/overlays/kibana.overlays.serverless.yaml b/oas_docs/overlays/kibana.overlays.serverless.yaml index 359d0d4bddac8..86a73d57c8561 100644 --- a/oas_docs/overlays/kibana.overlays.serverless.yaml +++ b/oas_docs/overlays/kibana.overlays.serverless.yaml @@ -4,6 +4,7 @@ info: title: Overlays for the Kibana API document version: 0.0.1 actions: + # Clean up server definitions - target: '$.servers.*' description: Remove all servers so we can add our own. remove: true @@ -14,6 +15,11 @@ actions: variables: kibana_url: default: localhost:5601 + # Remove operation-level security definitions + - target: "$.paths['/api/status']['get'].security" + description: Remove system security definitions + remove: true + # Add a document-level security definition - target: '$.components.securitySchemes' description: Add an API key security scheme update: @@ -27,4 +33,8 @@ actions: update: security: - apiKeyAuth: [] - + # Mark all operations as beta + - target: '$.paths[*][*]' + description: Add x-beta + update: + x-beta: true \ No newline at end of file diff --git a/oas_docs/overlays/kibana.overlays.yaml b/oas_docs/overlays/kibana.overlays.yaml index 7681a7201872a..d1acdf7712bf8 100644 --- a/oas_docs/overlays/kibana.overlays.yaml +++ b/oas_docs/overlays/kibana.overlays.yaml @@ -4,6 +4,7 @@ info: title: Overlays for the Kibana API document version: 0.0.1 actions: + # Clean up server definitions - target: '$.servers.*' description: Remove all servers so we can add our own. remove: true @@ -14,6 +15,11 @@ actions: variables: kibana_url: default: localhost:5601 + # Remove operation-level security definitions + - target: "$.paths['/api/status']['get'].security" + description: Remove system security definitions + remove: true + # Add document-level security definitions - target: '$.components.securitySchemes' description: Add an API key security scheme update: @@ -34,6 +40,7 @@ actions: security: - apiKeyAuth: [] - basicAuth: [] + # Add an introduction to spaces - target: '$' description: Add an extra page about spaces update: diff --git a/package.json b/package.json index 6ecf6e7ef932f..8bc048ee0901d 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "resolutions": { "**/@bazel/typescript/protobufjs": "6.11.4", "**/@hello-pangea/dnd": "16.6.0", - "**/@langchain/core": "^0.2.17", + "**/@langchain/core": "^0.2.18", "**/@types/node": "20.10.5", "**/@typescript-eslint/utils": "5.62.0", "**/chokidar": "^3.5.3", @@ -88,7 +88,7 @@ "**/globule/minimatch": "^3.1.2", "**/hoist-non-react-statics": "^3.3.2", "**/isomorphic-fetch/node-fetch": "^2.6.7", - "**/langchain": "^0.2.10", + "**/langchain": "^0.2.11", "**/react-intl/**/@types/react": "^17.0.45", "**/remark-parse/trim": "1.0.1", "**/sharp": "0.32.6", @@ -114,7 +114,7 @@ "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.14.0", "@elastic/ems-client": "8.5.3", - "@elastic/eui": "95.4.0", + "@elastic/eui": "95.5.0", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", @@ -181,6 +181,7 @@ "@kbn/apm-data-access-plugin": "link:x-pack/plugins/observability_solution/apm_data_access", "@kbn/apm-data-view": "link:packages/kbn-apm-data-view", "@kbn/apm-plugin": "link:x-pack/plugins/observability_solution/apm", + "@kbn/apm-types": "link:packages/kbn-apm-types", "@kbn/apm-utils": "link:packages/kbn-apm-utils", "@kbn/app-link-test-plugin": "link:test/plugin_functional/plugins/app_link_test", "@kbn/application-usage-test-plugin": "link:x-pack/test/usage_collection/plugins/application_usage_test", @@ -949,9 +950,9 @@ "@kbn/zod": "link:packages/kbn-zod", "@kbn/zod-helpers": "link:packages/kbn-zod-helpers", "@langchain/community": "0.2.18", - "@langchain/core": "^0.2.17", + "@langchain/core": "^0.2.18", "@langchain/google-genai": "^0.0.23", - "@langchain/langgraph": "^0.0.29", + "@langchain/langgraph": "^0.0.31", "@langchain/openai": "^0.1.3", "@langtrase/trace-attributes": "^3.0.8", "@launchdarkly/node-server-sdk": "^9.4.7", @@ -1043,7 +1044,7 @@ "deepmerge": "^4.2.2", "del": "^6.1.0", "diff": "^5.1.0", - "elastic-apm-node": "^4.7.1", + "elastic-apm-node": "^4.7.2", "email-addresses": "^5.0.0", "eventsource-parser": "^1.1.1", "execa": "^5.1.1", @@ -1093,8 +1094,8 @@ "jsonwebtoken": "^9.0.2", "jsts": "^1.6.2", "kea": "^2.6.0", - "langchain": "^0.2.10", - "langsmith": "^0.1.37", + "langchain": "^0.2.11", + "langsmith": "^0.1.39", "launchdarkly-js-client-sdk": "^3.4.0", "launchdarkly-node-server-sdk": "^7.0.3", "load-json-file": "^6.2.0", @@ -1141,7 +1142,7 @@ "pretty-ms": "6.0.0", "prop-types": "^15.8.1", "proxy-from-env": "1.0.0", - "puppeteer": "22.8.1", + "puppeteer": "22.13.1", "query-string": "^6.13.2", "rbush": "^3.0.1", "re-resizable": "^6.9.9", @@ -1759,7 +1760,7 @@ "svgo": "^2.8.0", "table": "^6.8.1", "tape": "^5.0.1", - "terser": "^5.31.2", + "terser": "^5.31.3", "terser-webpack-plugin": "^4.2.3", "tough-cookie": "^4.1.4", "tree-kill": "^1.2.2", diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts index 3bf7ab94af0de..2e19999bd8735 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts @@ -46,8 +46,8 @@ const { pollEsNodesVersion: pollEsNodesVersionActual } = jest.requireActual( const isValidConnectionMock = isValidConnection as jest.Mock; -const delay = async (durationMs: number) => - await new Promise((resolve) => setTimeout(resolve, durationMs)); +const TICK = 10; +const tick = (ticks = 1) => jest.advanceTimersByTime(TICK * ticks); const configService = configServiceMock.create(); @@ -67,11 +67,13 @@ beforeEach(() => { env = Env.createDefault(REPO_ROOT, getEnvOptions()); + jest.useFakeTimers(); + mockConfig$ = new BehaviorSubject({ hosts: ['http://1.2.3.4'], healthCheck: { - delay: duration(10), - startupDelay: duration(10), + delay: duration(TICK), + startupDelay: duration(TICK), }, ssl: { verificationMode: 'none', @@ -96,6 +98,7 @@ beforeEach(() => { afterEach(async () => { jest.clearAllMocks(); + jest.useRealTimers(); MockClusterClient.mockClear(); isScriptingEnabledMock.mockReset(); getClusterInfoMock.mockReset(); @@ -223,13 +226,18 @@ describe('#setup', () => { elasticsearchClientMock.createErrorTransportRequestPromise(new Error()) ); + expect(mockedClient.nodes.info).toHaveBeenCalledTimes(0); + const setupContract = await elasticsearchService.setup(setupDeps); - await delay(10); - expect(mockedClient.nodes.info).toHaveBeenCalledTimes(0); + expect(mockedClient.nodes.info).toHaveBeenCalledTimes(1); + + tick(); + + expect(mockedClient.nodes.info).toHaveBeenCalledTimes(2); await firstValueFrom(setupContract.esNodesCompatibility$); - expect(mockedClient.nodes.info).toHaveBeenCalledTimes(1); + expect(mockedClient.nodes.info).toHaveBeenCalledTimes(2); // shares the last value }); it('esNodeVersionCompatibility$ stops polling when unsubscribed from', async () => { @@ -238,13 +246,17 @@ describe('#setup', () => { elasticsearchClientMock.createErrorTransportRequestPromise(new Error()) ); + expect(mockedClient.nodes.info).toHaveBeenCalledTimes(0); + const setupContract = await elasticsearchService.setup(setupDeps); - expect(mockedClient.nodes.info).toHaveBeenCalledTimes(0); + expect(mockedClient.nodes.info).toHaveBeenCalledTimes(1); await firstValueFrom(setupContract.esNodesCompatibility$); - await delay(100); - expect(mockedClient.nodes.info).toHaveBeenCalledTimes(1); + + tick(); + + expect(mockedClient.nodes.info).toHaveBeenCalledTimes(2); }); }); @@ -276,6 +288,7 @@ describe('#start', () => { pollEsNodesVersionMocked.mockImplementation(() => observable$); await elasticsearchService.setup(setupDeps); + tick(); await elasticsearchService.start(); expect(loggingSystemMock.collect(coreContext.logger).error).toEqual([]); observable$.next({ @@ -290,7 +303,7 @@ describe('#start', () => { it('logs an info message about connecting to ES', async () => { isValidConnectionMock.mockImplementation(async () => { - await new Promise((r) => setTimeout(r, 50)); + tick(); }); await elasticsearchService.setup(setupDeps); @@ -309,7 +322,7 @@ describe('#start', () => { it('returns the information about the time spent waiting for Elasticsearch', async () => { isValidConnectionMock.mockImplementation(async () => { - await new Promise((r) => setTimeout(r, 50)); + tick(); }); await elasticsearchService.setup(setupDeps); @@ -487,11 +500,11 @@ describe('#stop', () => { setupContract.esNodesCompatibility$.pipe( concatMap(async () => { expect(mockedClient.nodes.info).toHaveBeenCalledTimes(1); - await delay(10); + tick(); expect(mockedClient.nodes.info).toHaveBeenCalledTimes(2); await elasticsearchService.stop(); - await delay(100); + tick(10); expect(mockedClient.nodes.info).toHaveBeenCalledTimes(2); }) ) diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts index 100fad846374c..87ac7b83d6fb0 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts @@ -6,8 +6,7 @@ * Side Public License, v 1. */ -import { firstValueFrom, Observable, Subject } from 'rxjs'; -import { map, takeUntil } from 'rxjs'; +import { map, takeUntil, firstValueFrom, Observable, Subject } from 'rxjs'; import type { Logger } from '@kbn/logging'; import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; @@ -107,6 +106,13 @@ export class ElasticsearchService internalClient: this.client.asInternalUser, }).pipe(takeUntil(this.stop$)); + // Log every error we may encounter in the connection to Elasticsearch + esNodesCompatibility$.subscribe(({ isCompatible, message }) => { + if (!isCompatible && message) { + this.log.error(message); + } + }); + this.esNodesCompatibility$ = esNodesCompatibility$; this.clusterInfo$ = getClusterInfo$(this.client.asInternalUser); @@ -138,13 +144,6 @@ export class ElasticsearchService const config = await firstValueFrom(this.config$); - // Log every error we may encounter in the connection to Elasticsearch - this.esNodesCompatibility$.subscribe(({ isCompatible, message }) => { - if (!isCompatible && message) { - this.log.error(message); - } - }); - let capabilities: ElasticsearchCapabilities; let elasticsearchWaitTime: number; diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts index 753a9bd079a4e..7fdeb434a9fcc 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts @@ -11,8 +11,12 @@ * that defined in Kibana's package.json. */ -import { interval, of, from, Observable, BehaviorSubject } from 'rxjs'; import { + interval, + of, + from, + Observable, + BehaviorSubject, map, distinctUntilChanged, catchError, diff --git a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap index 51caec4b95289..ca90bcbdb67ba 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap +++ b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap @@ -263,7 +263,6 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiProgress.valueText": [Function], "euiQuickSelect.applyButton": "Apply", "euiQuickSelect.fullDescription": [Function], - "euiQuickSelect.legendText": "Quick select a time range", "euiQuickSelect.nextLabel": "Next time window", "euiQuickSelect.previousLabel": "Previous time window", "euiQuickSelect.quickSelectTitle": "Quick select", @@ -275,7 +274,10 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiRecentlyUsed.legend": "Recently used date ranges", "euiRefreshInterval.fullDescriptionOff": [Function], "euiRefreshInterval.fullDescriptionOn": [Function], - "euiRefreshInterval.legend": "Refresh every", + "euiRefreshInterval.toggleAriaLabel": "Toggle refresh", + "euiRefreshInterval.toggleLabel": "Refresh every", + "euiRefreshInterval.unitsAriaLabel": "Refresh interval units", + "euiRefreshInterval.valueAriaLabel": "Refresh interval value", "euiRelativeTab.dateInputError": "Must be a valid range", "euiRelativeTab.fullDescription": [Function], "euiRelativeTab.numberInputError": "Must be >= 0", diff --git a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx index df6071e9d14ed..34e6ef5ab0380 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx +++ b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx @@ -1312,9 +1312,6 @@ export const getEuiContextMapping = (): EuiTokensObject => { defaultMessage: 'Currently set to {timeTense} {timeValue} {timeUnit}.', values: { timeTense, timeValue, timeUnit }, }), - 'euiQuickSelect.legendText': i18n.translate('core.euiQuickSelect.legendText', { - defaultMessage: 'Quick select a time range', - }), 'euiQuickSelect.nextLabel': i18n.translate('core.euiQuickSelect.nextLabel', { defaultMessage: 'Next time window', }), @@ -1339,9 +1336,21 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiRecentlyUsed.legend': i18n.translate('core.euiRecentlyUsed.legend', { defaultMessage: 'Recently used date ranges', }), - 'euiRefreshInterval.legend': i18n.translate('core.euiRefreshInterval.legend', { + 'euiRefreshInterval.toggleLabel': i18n.translate('core.euiRefreshInterval.toggleLabel', { defaultMessage: 'Refresh every', }), + 'euiRefreshInterval.toggleAriaLabel': i18n.translate( + 'core.euiRefreshInterval.toggleAriaLabel', + { + defaultMessage: 'Toggle refresh', + } + ), + 'euiRefreshInterval.valueAriaLabel': i18n.translate('core.euiRefreshInterval.valueAriaLabel', { + defaultMessage: 'Refresh interval value', + }), + 'euiRefreshInterval.unitsAriaLabel': i18n.translate('core.euiRefreshInterval.unitsAriaLabel', { + defaultMessage: 'Refresh interval units', + }), 'euiRefreshInterval.fullDescriptionOff': ({ optionValue, optionText }: EuiValues) => i18n.translate('core.euiRefreshInterval.fullDescriptionOff', { defaultMessage: 'Refresh is off, interval set to {optionValue} {optionText}.', diff --git a/packages/kbn-apm-types/es_fields.ts b/packages/kbn-apm-types/es_fields.ts new file mode 100644 index 0000000000000..00e78c5196f7d --- /dev/null +++ b/packages/kbn-apm-types/es_fields.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +export * from './src/es_fields/apm'; diff --git a/packages/kbn-apm-types/es_schemas_raw.ts b/packages/kbn-apm-types/es_schemas_raw.ts new file mode 100644 index 0000000000000..ef0d4cbeb5897 --- /dev/null +++ b/packages/kbn-apm-types/es_schemas_raw.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ +export * from './src/es_schemas/raw'; +export * from './src/es_schemas/raw/fields'; diff --git a/packages/kbn-apm-types/es_schemas_ui.ts b/packages/kbn-apm-types/es_schemas_ui.ts new file mode 100644 index 0000000000000..e974312a737ef --- /dev/null +++ b/packages/kbn-apm-types/es_schemas_ui.ts @@ -0,0 +1,10 @@ +/* + * 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. + */ + +export * from './src/es_schemas/ui'; +export * from './src/es_schemas/ui/fields'; diff --git a/packages/kbn-apm-types/index.ts b/packages/kbn-apm-types/index.ts new file mode 100644 index 0000000000000..8f15cbd897e28 --- /dev/null +++ b/packages/kbn-apm-types/index.ts @@ -0,0 +1,11 @@ +/* + * 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. + */ + +export * from './es_fields'; +export * from './es_schemas_raw'; +export * from './es_schemas_ui'; diff --git a/packages/kbn-apm-types/kibana.jsonc b/packages/kbn-apm-types/kibana.jsonc new file mode 100644 index 0000000000000..26b4ec0b1cf75 --- /dev/null +++ b/packages/kbn-apm-types/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/apm-types", + "owner": "@elastic/obs-ux-infra_services-team" +} diff --git a/packages/kbn-apm-types/package.json b/packages/kbn-apm-types/package.json new file mode 100644 index 0000000000000..3b15b82701d81 --- /dev/null +++ b/packages/kbn-apm-types/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/apm-types", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/kbn-apm-types/src/es_fields/apm.ts b/packages/kbn-apm-types/src/es_fields/apm.ts new file mode 100644 index 0000000000000..d17a1ed78db90 --- /dev/null +++ b/packages/kbn-apm-types/src/es_fields/apm.ts @@ -0,0 +1,197 @@ +/* + * 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. + */ + +export const TIMESTAMP = 'timestamp.us'; +export const AGENT = 'agent'; +export const AGENT_NAME = 'agent.name'; +export const AGENT_VERSION = 'agent.version'; +export const AGENT_ACTIVATION_METHOD = 'agent.activation_method'; + +export const DESTINATION_ADDRESS = 'destination.address'; + +export const CLOUD = 'cloud'; +export const CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone'; +export const CLOUD_PROVIDER = 'cloud.provider'; +export const CLOUD_REGION = 'cloud.region'; +export const CLOUD_MACHINE_TYPE = 'cloud.machine.type'; +export const CLOUD_ACCOUNT_ID = 'cloud.account.id'; +export const CLOUD_INSTANCE_ID = 'cloud.instance.id'; +export const CLOUD_INSTANCE_NAME = 'cloud.instance.name'; +export const CLOUD_SERVICE_NAME = 'cloud.service.name'; + +export const EVENT_SUCCESS_COUNT = 'event.success_count'; + +export const SERVICE = 'service'; +export const SERVICE_NAME = 'service.name'; +export const SERVICE_ENVIRONMENT = 'service.environment'; +export const SERVICE_FRAMEWORK_NAME = 'service.framework.name'; +export const SERVICE_FRAMEWORK_VERSION = 'service.framework.version'; +export const SERVICE_LANGUAGE_NAME = 'service.language.name'; +export const SERVICE_LANGUAGE_VERSION = 'service.language.version'; +export const SERVICE_RUNTIME_NAME = 'service.runtime.name'; +export const SERVICE_RUNTIME_VERSION = 'service.runtime.version'; +export const SERVICE_NODE_NAME = 'service.node.name'; +export const SERVICE_VERSION = 'service.version'; +export const SERVICE_TARGET_TYPE = 'service.target.type'; +export const SERVICE_OVERFLOW_COUNT = 'service_transaction.aggregation.overflow_count'; + +export const URL_FULL = 'url.full'; +export const HTTP_REQUEST_METHOD = 'http.request.method'; +export const HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code'; +export const USER_ID = 'user.id'; +export const USER_AGENT_ORIGINAL = 'user_agent.original'; +export const USER_AGENT_NAME = 'user_agent.name'; + +export const OBSERVER_HOSTNAME = 'observer.hostname'; +export const OBSERVER_LISTENING = 'observer.listening'; +export const PROCESSOR_EVENT = 'processor.event'; + +export const TRANSACTION_DURATION = 'transaction.duration.us'; +export const TRANSACTION_DURATION_HISTOGRAM = 'transaction.duration.histogram'; +export const TRANSACTION_DURATION_SUMMARY = 'transaction.duration.summary'; +export const TRANSACTION_TYPE = 'transaction.type'; +export const TRANSACTION_RESULT = 'transaction.result'; +export const TRANSACTION_NAME = 'transaction.name'; +export const TRANSACTION_ID = 'transaction.id'; +export const TRANSACTION_SAMPLED = 'transaction.sampled'; +export const TRANSACTION_PAGE_URL = 'transaction.page.url'; +export const TRANSACTION_FAILURE_COUNT = 'transaction.failure_count'; +export const TRANSACTION_SUCCESS_COUNT = 'transaction.success_count'; +export const TRANSACTION_OVERFLOW_COUNT = 'transaction.aggregation.overflow_count'; +// for transaction metrics +export const TRANSACTION_ROOT = 'transaction.root'; +export const TRANSACTION_PROFILER_STACK_TRACE_IDS = 'transaction.profiler_stack_trace_ids'; + +export const EVENT_OUTCOME = 'event.outcome'; + +export const TRACE_ID = 'trace.id'; + +export const SPAN_DURATION = 'span.duration.us'; +export const SPAN_TYPE = 'span.type'; +export const SPAN_SUBTYPE = 'span.subtype'; +export const SPAN_SELF_TIME_SUM = 'span.self_time.sum.us'; +export const SPAN_ACTION = 'span.action'; +export const SPAN_NAME = 'span.name'; +export const SPAN_ID = 'span.id'; +export const SPAN_DESTINATION_SERVICE_RESOURCE = 'span.destination.service.resource'; +export const SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT = + 'span.destination.service.response_time.count'; + +export const SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM = + 'span.destination.service.response_time.sum.us'; + +export const SPAN_LINKS = 'span.links'; +export const SPAN_LINKS_TRACE_ID = 'span.links.trace.id'; +export const SPAN_LINKS_SPAN_ID = 'span.links.span.id'; + +export const SPAN_COMPOSITE_COUNT = 'span.composite.count'; +export const SPAN_COMPOSITE_SUM = 'span.composite.sum.us'; +export const SPAN_COMPOSITE_COMPRESSION_STRATEGY = 'span.composite.compression_strategy'; + +export const SPAN_SYNC = 'span.sync'; + +// Parent ID for a transaction or span +export const PARENT_ID = 'parent.id'; + +export const ERROR_ID = 'error.id'; +export const ERROR_GROUP_ID = 'error.grouping_key'; +export const ERROR_GROUP_NAME = 'error.grouping_name'; +export const ERROR_CULPRIT = 'error.culprit'; +export const ERROR_LOG_LEVEL = 'error.log.level'; +export const ERROR_LOG_MESSAGE = 'error.log.message'; +export const ERROR_EXCEPTION = 'error.exception'; +export const ERROR_EXC_MESSAGE = 'error.exception.message'; // only to be used in es queries, since error.exception is now an array +export const ERROR_EXC_HANDLED = 'error.exception.handled'; // only to be used in es queries, since error.exception is now an array +export const ERROR_EXC_TYPE = 'error.exception.type'; +export const ERROR_PAGE_URL = 'error.page.url'; +export const ERROR_TYPE = 'error.type'; + +// METRICS +export const METRIC_SYSTEM_FREE_MEMORY = 'system.memory.actual.free'; +export const METRIC_SYSTEM_TOTAL_MEMORY = 'system.memory.total'; +export const METRIC_SYSTEM_CPU_PERCENT = 'system.cpu.total.norm.pct'; +export const METRIC_PROCESS_CPU_PERCENT = 'system.process.cpu.total.norm.pct'; +export const METRIC_CGROUP_MEMORY_LIMIT_BYTES = 'system.process.cgroup.memory.mem.limit.bytes'; +export const METRIC_CGROUP_MEMORY_USAGE_BYTES = 'system.process.cgroup.memory.mem.usage.bytes'; + +export const METRIC_JAVA_HEAP_MEMORY_MAX = 'jvm.memory.heap.max'; +export const METRIC_JAVA_HEAP_MEMORY_COMMITTED = 'jvm.memory.heap.committed'; +export const METRIC_JAVA_HEAP_MEMORY_USED = 'jvm.memory.heap.used'; +export const METRIC_JAVA_NON_HEAP_MEMORY_MAX = 'jvm.memory.non_heap.max'; +export const METRIC_JAVA_NON_HEAP_MEMORY_COMMITTED = 'jvm.memory.non_heap.committed'; +export const METRIC_JAVA_NON_HEAP_MEMORY_USED = 'jvm.memory.non_heap.used'; +export const METRIC_JAVA_THREAD_COUNT = 'jvm.thread.count'; +export const METRIC_JAVA_GC_COUNT = 'jvm.gc.count'; +export const METRIC_JAVA_GC_TIME = 'jvm.gc.time'; + +export const METRICSET_NAME = 'metricset.name'; +export const METRICSET_INTERVAL = 'metricset.interval'; + +export const LABEL_NAME = 'labels.name'; +export const LABEL_GC = 'labels.gc'; +export const LABEL_TYPE = 'labels.type'; +export const LABEL_TELEMETRY_AUTO_VERSION = 'labels.telemetry_auto_version'; +export const LABEL_LIFECYCLE_STATE = 'labels.lifecycle_state'; + +export const HOST = 'host'; +export const HOST_HOSTNAME = 'host.hostname'; // Do not use. Please use `HOST_NAME` instead. +export const HOST_NAME = 'host.name'; +export const HOST_OS_PLATFORM = 'host.os.platform'; +export const HOST_ARCHITECTURE = 'host.architecture'; +export const HOST_OS_VERSION = 'host.os.version'; + +export const CONTAINER_ID = 'container.id'; +export const CONTAINER = 'container'; +export const CONTAINER_IMAGE = 'container.image.name'; + +export const KUBERNETES = 'kubernetes'; +export const KUBERNETES_POD_NAME = 'kubernetes.pod.name'; +export const KUBERNETES_POD_UID = 'kubernetes.pod.uid'; + +export const FAAS_ID = 'faas.id'; +export const FAAS_NAME = 'faas.name'; +export const FAAS_COLDSTART = 'faas.coldstart'; +export const FAAS_TRIGGER_TYPE = 'faas.trigger.type'; +export const FAAS_DURATION = 'faas.duration'; +export const FAAS_COLDSTART_DURATION = 'faas.coldstart_duration'; +export const FAAS_BILLED_DURATION = 'faas.billed_duration'; + +// OpenTelemetry Metrics +export const METRIC_OTEL_SYSTEM_CPU_UTILIZATION = 'system.cpu.utilization'; +export const METRIC_OTEL_SYSTEM_MEMORY_UTILIZATION = 'system.memory.utilization'; + +export const METRIC_OTEL_JVM_PROCESS_CPU_PERCENT = 'process.runtime.jvm.cpu.utilization'; +export const METRIC_OTEL_JVM_PROCESS_MEMORY_USAGE = 'process.runtime.jvm.memory.usage'; +export const METRIC_OTEL_JVM_PROCESS_MEMORY_COMMITTED = 'process.runtime.jvm.memory.committed'; +export const METRIC_OTEL_JVM_PROCESS_MEMORY_LIMIT = 'process.runtime.jvm.memory.limit'; +export const METRIC_OTEL_JVM_PROCESS_THREADS_COUNT = 'process.runtime.jvm.threads.count'; +export const METRIC_OTEL_JVM_SYSTEM_CPU_PERCENT = 'process.runtime.jvm.system.cpu.utilization'; +export const METRIC_OTEL_JVM_GC_DURATION = 'process.runtime.jvm.gc.duration'; +export const VALUE_OTEL_JVM_PROCESS_MEMORY_HEAP = 'heap'; +export const VALUE_OTEL_JVM_PROCESS_MEMORY_NON_HEAP = 'non_heap'; + +// Metadata +export const TIER = '_tier'; +export const INDEX = '_index'; +export const DATA_STEAM_TYPE = 'data_stream.type'; + +// Mobile +export const NETWORK_CONNECTION_TYPE = 'network.connection.type'; +export const DEVICE_MODEL_IDENTIFIER = 'device.model.identifier'; +export const SESSION_ID = 'session.id'; +export const APP_LAUNCH_TIME = 'application.launch.time'; +export const EVENT_NAME = 'event.name'; + +// Location +export const CLIENT_GEO_COUNTRY_ISO_CODE = 'client.geo.country_iso_code'; +export const CLIENT_GEO_REGION_ISO_CODE = 'client.geo.region_iso_code'; +export const CLIENT_GEO_COUNTRY_NAME = 'client.geo.country_name'; +export const CLIENT_GEO_CITY_NAME = 'client.geo.city_name'; +export const CLIENT_GEO_REGION_NAME = 'client.geo.region_name'; + +export const CHILD_ID = 'child.id'; diff --git a/packages/kbn-apm-types/src/es_schemas/raw/apm_base_doc.ts b/packages/kbn-apm-types/src/es_schemas/raw/apm_base_doc.ts new file mode 100644 index 0000000000000..a750c39c775d2 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/apm_base_doc.ts @@ -0,0 +1,24 @@ +/* + * 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 { Observer } from './fields/observer'; + +// all documents types extend APMBaseDoc and inherit all properties +export interface APMBaseDoc { + '@timestamp': string; + agent: { + name: string; + version: string; + }; + parent?: { id: string }; // parent ID is not available on root transactions + trace?: { id: string }; + labels?: { + [key: string]: string | number | boolean; + }; + observer?: Observer; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/error_raw.ts b/packages/kbn-apm-types/src/es_schemas/raw/error_raw.ts new file mode 100644 index 0000000000000..f0157a6a08376 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/error_raw.ts @@ -0,0 +1,75 @@ +/* + * 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 { APMBaseDoc } from './apm_base_doc'; +import { + Container, + Host, + Http, + Kubernetes, + Page, + Process, + Service, + Stackframe, + TimestampUs, + Url, + User, +} from './fields'; + +export interface Processor { + name: 'error'; + event: 'error'; +} + +export interface Exception { + attributes?: { + response?: string; + }; + code?: string; + message?: string; // either message or type are given + type?: string; + module?: string; + handled?: boolean; + stacktrace?: Stackframe[]; +} + +export interface Log { + message: string; + stacktrace?: Stackframe[]; +} + +export interface ErrorRaw extends APMBaseDoc { + processor: Processor; + timestamp: TimestampUs; + transaction?: { + id: string; + sampled?: boolean; + type: string; + }; + error: { + id: string; + culprit?: string; + grouping_key: string; + // either exception or log are given + exception?: Exception[]; + page?: Page; // special property for RUM: shared by error and transaction + log?: Log; + stack_trace?: string; + custom?: Record; + }; + + // Shared by errors and transactions + container?: Container; + host?: Host; + http?: Http; + kubernetes?: Kubernetes; + process?: Process; + service: Service; + url?: Url; + user?: User; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/event_raw.ts b/packages/kbn-apm-types/src/es_schemas/raw/event_raw.ts new file mode 100644 index 0000000000000..f8d3124914239 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/event_raw.ts @@ -0,0 +1,26 @@ +/* + * 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 { APMBaseDoc } from './apm_base_doc'; +import { TimestampUs } from './fields/timestamp_us'; + +export interface EventRaw extends APMBaseDoc { + timestamp: TimestampUs; + transaction?: { + id: string; + sampled?: boolean; + type: string; + }; + log: { + message?: string; + }; + event: { + action: string; + category: string; + }; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/cloud.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/cloud.ts new file mode 100644 index 0000000000000..eaad379f5069b --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/cloud.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +export interface Cloud { + availability_zone?: string; + instance?: { + name: string; + id: string; + }; + machine?: { + type: string; + }; + project?: { + id: string; + name: string; + }; + provider?: string; + region?: string; + account?: { + id: string; + name: string; + }; + image?: { + id: string; + }; + service?: { + name: string; + }; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/container.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/container.ts new file mode 100644 index 0000000000000..ae6526ad9ff92 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/container.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export interface Container { + id?: string | null; + image?: string | null; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/event_outcome.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/event_outcome.ts new file mode 100644 index 0000000000000..53c19ab293d9b --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/event_outcome.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +export type EventOutcome = 'success' | 'failure' | 'unknown'; diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/faas.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/faas.ts new file mode 100644 index 0000000000000..9054839b82902 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/faas.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +export interface Faas { + id: string; + coldstart?: boolean; + execution?: string; + trigger?: { + type?: string; + request_id?: string; + }; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/host.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/host.ts new file mode 100644 index 0000000000000..7a12a8eba824f --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/host.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +export interface Host { + architecture?: string; + hostname?: string; + name?: string; + ip?: string; + os?: { + platform?: string; + }; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/http.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/http.ts new file mode 100644 index 0000000000000..3e16e5dceb80c --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/http.ts @@ -0,0 +1,13 @@ +/* + * 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. + */ + +export interface Http { + request?: { method: string; [key: string]: unknown }; + response?: { status_code: number; [key: string]: unknown }; + version?: string; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/index.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/index.ts new file mode 100644 index 0000000000000..aa8355934fbb4 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/index.ts @@ -0,0 +1,25 @@ +/* + * 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. + */ + +export * from './cloud'; +export * from './container'; +export * from './event_outcome'; +export * from './faas'; +export * from './host'; +export * from './http'; +export * from './kubernetes'; +export * from './observer'; +export * from './page'; +export * from './process'; +export * from './service'; +export * from './span_links'; +export * from './stackframe'; +export * from './timestamp_us'; +export * from './url'; +export * from './user_agent'; +export * from './user'; diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/kubernetes.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/kubernetes.ts new file mode 100644 index 0000000000000..09667f08d441c --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/kubernetes.ts @@ -0,0 +1,22 @@ +/* + * 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. + */ + +export interface Kubernetes { + pod?: { uid?: string | null; [key: string]: unknown }; + namespace?: string; + replicaset?: { + name?: string; + }; + deployment?: { + name?: string; + }; + container?: { + id?: string; + name?: string; + }; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/observer.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/observer.ts new file mode 100644 index 0000000000000..b035c0210bb35 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/observer.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +export interface Observer { + ephemeral_id?: string; + hostname?: string; + id?: string; + name?: string; + type?: string; + version: string; + version_major: number; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/page.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/page.ts new file mode 100644 index 0000000000000..1c2548cb777cd --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/page.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +// only for RUM agent: shared by error and transaction +export interface Page { + url: string; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/process.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/process.ts new file mode 100644 index 0000000000000..25db0098f8d3d --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/process.ts @@ -0,0 +1,14 @@ +/* + * 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. + */ + +export interface Process { + args?: string[]; + pid: number; + ppid?: number; + title?: string; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/service.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/service.ts new file mode 100644 index 0000000000000..ff01bfc8517e8 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/service.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +export interface Service { + name: string; + environment?: string; + framework?: { + name: string; + version?: string; + }; + node?: { + name?: string; + }; + runtime?: { + name: string; + version: string; + }; + language?: { + name: string; + version?: string; + }; + version?: string; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/span_links.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/span_links.ts new file mode 100644 index 0000000000000..13ffc4d7075f1 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/span_links.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export interface SpanLink { + trace: { id: string }; + span: { id: string }; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/stackframe.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/stackframe.ts new file mode 100644 index 0000000000000..b2b1cf8000103 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/stackframe.ts @@ -0,0 +1,44 @@ +/* + * 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. + */ + +interface Line { + column?: number; + number: number; +} + +interface Sourcemap { + error?: string; + updated?: boolean; +} + +interface StackframeBase { + abs_path?: string; + classname?: string; + context?: { + post?: string[]; + pre?: string[]; + }; + exclude_from_grouping?: boolean; + filename?: string; + function?: string; + module?: string; + library_frame?: boolean; + line?: Line; + sourcemap?: Sourcemap; + vars?: { + [key: string]: unknown; + }; +} + +export type StackframeWithLineContext = StackframeBase & { + line: Line & { + context: string; + }; +}; + +export type Stackframe = StackframeBase | StackframeWithLineContext; diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/timestamp_us.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/timestamp_us.ts new file mode 100644 index 0000000000000..17c06c8e38156 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/timestamp_us.ts @@ -0,0 +1,11 @@ +/* + * 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. + */ + +export interface TimestampUs { + us: number; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/url.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/url.ts new file mode 100644 index 0000000000000..4fa149e6b65d6 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/url.ts @@ -0,0 +1,13 @@ +/* + * 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. + */ + +export interface Url { + domain?: string; + full: string; + original?: string; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/user.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/user.ts new file mode 100644 index 0000000000000..ced460ececd17 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/user.ts @@ -0,0 +1,11 @@ +/* + * 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. + */ + +export interface User { + id: string; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/fields/user_agent.ts b/packages/kbn-apm-types/src/es_schemas/raw/fields/user_agent.ts new file mode 100644 index 0000000000000..0658d408dbe54 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/fields/user_agent.ts @@ -0,0 +1,21 @@ +/* + * 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. + */ + +export interface UserAgent { + device?: { + name: string; + }; + name?: string; + original: string; + os?: { + name: string; + version?: string; + full?: string; + }; + version?: string; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/index.ts b/packages/kbn-apm-types/src/es_schemas/raw/index.ts new file mode 100644 index 0000000000000..addd3279f2586 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/index.ts @@ -0,0 +1,14 @@ +/* + * 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. + */ + +export * from './apm_base_doc'; +export * from './error_raw'; +export * from './event_raw'; +export * from './metric_raw'; +export * from './span_raw'; +export * from './transaction_raw'; diff --git a/packages/kbn-apm-types/src/es_schemas/raw/metric_raw.ts b/packages/kbn-apm-types/src/es_schemas/raw/metric_raw.ts new file mode 100644 index 0000000000000..29a8dc921f3d9 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/metric_raw.ts @@ -0,0 +1,124 @@ +/* + * 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 { APMBaseDoc } from './apm_base_doc'; +import { Cloud } from './fields/cloud'; +import { Container } from './fields/container'; +import { Host } from './fields/host'; +import { Kubernetes } from './fields/kubernetes'; +import { Service } from './fields/service'; + +type BaseMetric = APMBaseDoc & { + processor: { + name: 'metric'; + event: 'metric'; + }; + cloud?: Cloud; + container?: Container; + kubernetes?: Kubernetes; + service?: Service; + host?: Host; +}; + +type BaseBreakdownMetric = BaseMetric & { + transaction: { + name: string; + type: string; + }; + span: { + self_time: { + count: number; + sum: { + us: number; + }; + }; + }; +}; + +type TransactionBreakdownMetric = BaseBreakdownMetric & { + transaction: { + duration: { + count: number; + sum: { + us: number; + }; + }; + breakdown: { + count: number; + }; + }; +}; + +type SpanBreakdownMetric = BaseBreakdownMetric & { + span: { + type: string; + subtype?: string; + }; +}; + +type SystemMetric = BaseMetric & { + system: unknown; + service: { + node?: { + name: string; + }; + }; +}; + +type CGroupMetric = SystemMetric; +type JVMMetric = SystemMetric & { + jvm: unknown; +}; + +type TransactionDurationMetric = BaseMetric & { + transaction: { + name: string; + type: string; + result?: string; + duration: { + histogram: { + values: number[]; + counts: number[]; + }; + }; + }; + service: { + name: string; + node?: { + name: string; + }; + environment?: string; + version?: string; + }; +}; + +export type SpanDestinationMetric = BaseMetric & { + span: { + destination: { + service: { + resource: string; + response_time: { + count: number; + sum: { + us: number; + }; + }; + }; + }; + }; +}; + +export type MetricRaw = + | BaseMetric + | TransactionBreakdownMetric + | SpanBreakdownMetric + | TransactionDurationMetric + | SpanDestinationMetric + | SystemMetric + | CGroupMetric + | JVMMetric; diff --git a/packages/kbn-apm-types/src/es_schemas/raw/span_raw.ts b/packages/kbn-apm-types/src/es_schemas/raw/span_raw.ts new file mode 100644 index 0000000000000..0d45d3bb00cc4 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/span_raw.ts @@ -0,0 +1,80 @@ +/* + * 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 { APMBaseDoc } from './apm_base_doc'; +import { EventOutcome } from './fields/event_outcome'; +import { Http } from './fields/http'; +import { SpanLink } from './fields/span_links'; +import { Stackframe } from './fields/stackframe'; +import { TimestampUs } from './fields/timestamp_us'; +import { Url } from './fields/url'; + +interface Processor { + name: 'transaction'; + event: 'span'; +} + +export interface SpanRaw extends APMBaseDoc { + processor: Processor; + trace: { id: string }; // trace is required + event?: { outcome?: EventOutcome }; + service: { + name: string; + environment?: string; + }; + span: { + destination?: { + service: { + resource: string; + }; + }; + action?: string; + duration: { us: number }; + id: string; + name: string; + stacktrace?: Stackframe[]; + subtype?: string; + sync?: boolean; + type: string; + http?: { + url?: { + original?: string; + }; + response: { + status_code: number; + }; + method?: string; + }; + db?: { + statement?: string; + type?: string; + }; + message?: { + queue?: { name: string }; + age?: { ms: number }; + body?: string; + headers?: Record; + }; + composite?: { + count: number; + sum: { us: number }; + compression_strategy: string; + }; + links?: SpanLink[]; + }; + timestamp: TimestampUs; + transaction?: { + id: string; + }; + child?: { id: string[] }; + code?: { + stacktrace?: string; + }; + http?: Http; + url?: Url; +} diff --git a/packages/kbn-apm-types/src/es_schemas/raw/transaction_raw.ts b/packages/kbn-apm-types/src/es_schemas/raw/transaction_raw.ts new file mode 100644 index 0000000000000..6505e2808f795 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/raw/transaction_raw.ts @@ -0,0 +1,79 @@ +/* + * 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 { APMBaseDoc } from './apm_base_doc'; +import { Cloud } from './fields/cloud'; +import { Container } from './fields/container'; +import { EventOutcome } from './fields/event_outcome'; +import { Host } from './fields/host'; +import { Http } from './fields/http'; +import { Kubernetes } from './fields/kubernetes'; +import { Page } from './fields/page'; +import { Process } from './fields/process'; +import { Service } from './fields/service'; +import { TimestampUs } from './fields/timestamp_us'; +import { Url } from './fields/url'; +import { User } from './fields/user'; +import { UserAgent } from './fields/user_agent'; +import { Faas } from './fields/faas'; +import { SpanLink } from './fields/span_links'; + +interface Processor { + name: 'transaction'; + event: 'transaction'; +} + +export interface TransactionRaw extends APMBaseDoc { + processor: Processor; + timestamp: TimestampUs; + trace: { id: string }; // trace is required + event?: { outcome?: EventOutcome }; + transaction: { + duration: { us: number }; + id: string; + marks?: { + // "agent": not defined by APM Server - only sent by RUM agent + agent?: { + [name: string]: number; + }; + }; + name?: string; + page?: Page; // special property for RUM: shared by error and transaction + result?: string; + sampled: boolean; + span_count?: { + started?: number; + dropped?: number; + }; + type: string; + custom?: Record; + message?: { + queue?: { name: string }; + age?: { ms: number }; + body?: string; + headers?: Record; + }; + }; + + // Shared by errors and transactions + container?: Container; + ecs?: { version?: string }; + host?: Host; + http?: Http; + kubernetes?: Kubernetes; + process?: Process; + service: Service; + url?: Url; + user?: User; + user_agent?: UserAgent; + cloud?: Cloud; + faas?: Faas; + span?: { + links?: SpanLink[]; + }; +} diff --git a/packages/kbn-apm-types/src/es_schemas/ui/apm_error.ts b/packages/kbn-apm-types/src/es_schemas/ui/apm_error.ts new file mode 100644 index 0000000000000..fad4190a229ef --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/ui/apm_error.ts @@ -0,0 +1,14 @@ +/* + * 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 { ErrorRaw } from '../raw/error_raw'; +import { Agent } from './fields/agent'; + +export interface APMError extends ErrorRaw { + agent: Agent; +} diff --git a/packages/kbn-apm-types/src/es_schemas/ui/event.ts b/packages/kbn-apm-types/src/es_schemas/ui/event.ts new file mode 100644 index 0000000000000..8d0fd78f5f0f9 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/ui/event.ts @@ -0,0 +1,14 @@ +/* + * 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 { EventRaw } from '../raw/event_raw'; +import { Agent } from './fields/agent'; + +export interface Event extends EventRaw { + agent: Agent; +} diff --git a/packages/kbn-apm-types/src/es_schemas/ui/fields/agent.ts b/packages/kbn-apm-types/src/es_schemas/ui/fields/agent.ts new file mode 100644 index 0000000000000..85cb7340fdda6 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/ui/fields/agent.ts @@ -0,0 +1,17 @@ +/* + * 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 type { AgentName } from '@kbn/elastic-agent-utils'; + +export type { ElasticAgentName, OpenTelemetryAgentName, AgentName } from '@kbn/elastic-agent-utils'; + +export interface Agent { + ephemeral_id?: string; + name: AgentName; + version: string; +} diff --git a/packages/kbn-apm-types/src/es_schemas/ui/fields/index.ts b/packages/kbn-apm-types/src/es_schemas/ui/fields/index.ts new file mode 100644 index 0000000000000..1e64e14e07f8a --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/ui/fields/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ +export * from './agent'; diff --git a/packages/kbn-apm-types/src/es_schemas/ui/index.ts b/packages/kbn-apm-types/src/es_schemas/ui/index.ts new file mode 100644 index 0000000000000..26f716289aaff --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/ui/index.ts @@ -0,0 +1,13 @@ +/* + * 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. + */ + +export * from './apm_error'; +export * from './event'; +export * from './metric'; +export * from './span'; +export * from './transaction'; diff --git a/packages/kbn-apm-types/src/es_schemas/ui/metric.ts b/packages/kbn-apm-types/src/es_schemas/ui/metric.ts new file mode 100644 index 0000000000000..bd9391e269554 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/ui/metric.ts @@ -0,0 +1,11 @@ +/* + * 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 { MetricRaw } from '../raw/metric_raw'; + +export type Metric = MetricRaw; diff --git a/packages/kbn-apm-types/src/es_schemas/ui/span.ts b/packages/kbn-apm-types/src/es_schemas/ui/span.ts new file mode 100644 index 0000000000000..5e09b84b87df2 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/ui/span.ts @@ -0,0 +1,14 @@ +/* + * 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 { SpanRaw } from '../raw/span_raw'; +import { Agent } from './fields/agent'; + +export interface Span extends SpanRaw { + agent: Agent; +} diff --git a/packages/kbn-apm-types/src/es_schemas/ui/transaction.ts b/packages/kbn-apm-types/src/es_schemas/ui/transaction.ts new file mode 100644 index 0000000000000..ea5ccf5fd6434 --- /dev/null +++ b/packages/kbn-apm-types/src/es_schemas/ui/transaction.ts @@ -0,0 +1,23 @@ +/* + * 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 { TransactionRaw } from '../raw/transaction_raw'; +import { Agent } from './fields/agent'; + +// Make `transaction.name` required instead of optional. +// `transaction.name` can be missing in Elasticsearch but the UI will only aggregate on transactions with a name, +// and thus it doesn't make sense to treat it as optional +type InnerTransaction = TransactionRaw['transaction']; +interface InnerTransactionWithName extends InnerTransaction { + name: string; +} + +export interface Transaction extends TransactionRaw { + agent: Agent; + transaction: InnerTransactionWithName; +} diff --git a/packages/kbn-apm-types/tsconfig.json b/packages/kbn-apm-types/tsconfig.json new file mode 100644 index 0000000000000..312ebd695e48e --- /dev/null +++ b/packages/kbn-apm-types/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "node" + ] + }, + "include": [ + "**/*.ts" + ], + "exclude": [ + "target/**/*", + ], + "kbn_references": [ + "@kbn/elastic-agent-utils", + ] +} diff --git a/packages/kbn-avc-banner/src/index.tsx b/packages/kbn-avc-banner/src/index.tsx index 54ded0bfdd49d..2f71b5ddd9679 100644 --- a/packages/kbn-avc-banner/src/index.tsx +++ b/packages/kbn-avc-banner/src/index.tsx @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import React from 'react'; +import React, { useMemo } from 'react'; import { css } from '@emotion/css'; import { i18n } from '@kbn/i18n'; import { EuiButton, EuiCallOut, EuiSpacer, useEuiTheme } from '@elastic/eui'; @@ -14,6 +14,13 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import avcBannerBackground from './avc_banner_background.svg'; +// Logic to hide banner at EOY 2024 +export const useIsStillYear2024: () => boolean = () => { + return useMemo(() => { + return new Date().getFullYear() === 2024; + }, []); +}; + export const AVCResultsBanner2024: React.FC<{ onDismiss: () => void }> = ({ onDismiss }) => { const { docLinks } = useKibana().services; const { euiTheme } = useEuiTheme(); diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index fef52545f8d2f..25c91238a7b6d 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -466,7 +466,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D }, securitySolution: { artifactControl: `${SECURITY_SOLUTION_DOCS}artifact-control.html`, - avcResults: `${ELASTIC_WEBSITE_URL}blog/elastic-security-malware-protection-test-av-comparatives`, + avcResults: `${ELASTIC_WEBSITE_URL}blog/elastic-av-comparatives-business-security-test`, trustedApps: `${SECURITY_SOLUTION_DOCS}trusted-apps-ov.html`, eventFilters: `${SECURITY_SOLUTION_DOCS}event-filters.html`, blocklist: `${SECURITY_SOLUTION_DOCS}blocklist.html`, diff --git a/packages/kbn-esql-ast/src/__tests__/ast_parser.commands.test.ts b/packages/kbn-esql-ast/src/__tests__/ast_parser.commands.test.ts new file mode 100644 index 0000000000000..a636f4a448595 --- /dev/null +++ b/packages/kbn-esql-ast/src/__tests__/ast_parser.commands.test.ts @@ -0,0 +1,369 @@ +/* + * 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 { getAstAndSyntaxErrors as parse } from '../ast_parser'; + +describe('commands', () => { + describe('correctly formatted, basic usage', () => { + it('SHOW', () => { + const query = 'SHOW info'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + { + type: 'command', + name: 'show', + args: [ + { + type: 'function', + name: 'info', + }, + ], + }, + ]); + }); + + it('META', () => { + const query = 'META functions'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + { + type: 'command', + name: 'meta', + args: [ + { + type: 'function', + name: 'functions', + }, + ], + }, + ]); + }); + + it('FROM', () => { + const query = 'FROM index'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + { + type: 'command', + name: 'from', + args: [ + { + type: 'source', + name: 'index', + }, + ], + }, + ]); + }); + + it('ROW', () => { + const query = 'ROW 1'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + { + type: 'command', + name: 'row', + args: [ + { + type: 'literal', + value: 1, + }, + ], + }, + ]); + }); + + it('EVAL', () => { + const query = 'FROM index | EVAL 1'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'eval', + args: [ + { + type: 'literal', + value: 1, + }, + ], + }, + ]); + }); + + it('STATS', () => { + const query = 'FROM index | STATS 1'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'stats', + args: [ + { + type: 'literal', + value: 1, + }, + ], + }, + ]); + }); + + it('LIMIT', () => { + const query = 'FROM index | LIMIT 1'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'limit', + args: [ + { + type: 'literal', + value: 1, + }, + ], + }, + ]); + }); + + it('KEEP', () => { + const query = 'FROM index | KEEP abc'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'keep', + args: [ + { + type: 'column', + name: 'abc', + }, + ], + }, + ]); + }); + + it('SORT', () => { + const query = 'FROM index | SORT 1'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'sort', + args: [ + { + type: 'literal', + value: 1, + }, + ], + }, + ]); + }); + + it('WHERE', () => { + const query = 'FROM index | WHERE 1'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'where', + args: [ + { + type: 'literal', + value: 1, + }, + ], + }, + ]); + }); + + it('DROP', () => { + const query = 'FROM index | DROP abc'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'drop', + args: [ + { + type: 'column', + name: 'abc', + }, + ], + }, + ]); + }); + + it('RENAME', () => { + const query = 'FROM index | RENAME a AS b, c AS d'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'rename', + args: [ + { + type: 'option', + name: 'as', + args: [ + { + type: 'column', + name: 'a', + }, + { + type: 'column', + name: 'b', + }, + ], + }, + { + type: 'option', + name: 'as', + args: [ + { + type: 'column', + name: 'c', + }, + { + type: 'column', + name: 'd', + }, + ], + }, + ], + }, + ]); + }); + + it('DISSECT', () => { + const query = 'FROM index | DISSECT a "b" APPEND_SEPARATOR="c"'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'dissect', + args: [ + { + type: 'column', + name: 'a', + }, + { + type: 'literal', + value: '"b"', + }, + { + type: 'option', + name: 'append_separator', + args: [ + { + type: 'literal', + value: '"c"', + }, + ], + }, + ], + }, + ]); + }); + + it('GROK', () => { + const query = 'FROM index | GROK a "b"'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'grok', + args: [ + { + type: 'column', + name: 'a', + }, + { + type: 'literal', + value: '"b"', + }, + ], + }, + ]); + }); + + it('ENRICH', () => { + const query = 'FROM index | ENRICH a ON b WITH c, d'; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'enrich', + args: [ + { + type: 'source', + name: 'a', + }, + { + type: 'option', + name: 'on', + args: [ + { + type: 'column', + name: 'b', + }, + ], + }, + { + type: 'option', + name: 'with', + }, + ], + }, + ]); + }); + + it('MV_EXPAND', () => { + const query = 'FROM index | MV_EXPAND a '; + const { ast } = parse(query); + + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'mv_expand', + args: [ + { + type: 'column', + name: 'a', + }, + ], + }, + ]); + }); + }); +}); diff --git a/packages/kbn-esql-ast/src/__tests__/ast_parser.literal.test.ts b/packages/kbn-esql-ast/src/__tests__/ast_parser.literal.test.ts new file mode 100644 index 0000000000000..1f941c49f0fbe --- /dev/null +++ b/packages/kbn-esql-ast/src/__tests__/ast_parser.literal.test.ts @@ -0,0 +1,25 @@ +/* + * 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 { getAstAndSyntaxErrors as parse } from '../ast_parser'; +import { ESQLLiteral } from '../types'; + +describe('literal expression', () => { + it('numeric expression captures "value", and "name" fields', () => { + const text = 'ROW 1'; + const { ast } = parse(text); + const literal = ast[0].args[0] as ESQLLiteral; + + expect(literal).toMatchObject({ + type: 'literal', + literalType: 'integer', + name: '1', + value: 1, + }); + }); +}); diff --git a/packages/kbn-esql-ast/src/__tests__/ast_parser.sort.test.ts b/packages/kbn-esql-ast/src/__tests__/ast_parser.sort.test.ts new file mode 100644 index 0000000000000..ccfbceb890893 --- /dev/null +++ b/packages/kbn-esql-ast/src/__tests__/ast_parser.sort.test.ts @@ -0,0 +1,85 @@ +/* + * 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 { getAstAndSyntaxErrors as parse } from '../ast_parser'; + +describe('SORT', () => { + describe('correctly formatted', () => { + // Un-skip one https://github.com/elastic/kibana/issues/189491 fixed. + it.skip('example from documentation', () => { + const text = ` + FROM employees + | KEEP first_name, last_name, height + | SORT height DESC + `; + const { ast, errors } = parse(text); + + expect(errors.length).toBe(0); + expect(ast).toMatchObject([ + {}, + {}, + { + type: 'command', + name: 'sort', + args: [ + { + type: 'column', + name: 'height', + }, + ], + }, + ]); + }); + + // Un-skip once https://github.com/elastic/kibana/issues/189491 fixed. + it.skip('can parse various sorting columns with options', () => { + const text = + 'FROM a | SORT a, b ASC, c DESC, d NULLS FIRST, e NULLS LAST, f ASC NULLS FIRST, g DESC NULLS LAST'; + const { ast, errors } = parse(text); + + expect(errors.length).toBe(0); + expect(ast).toMatchObject([ + {}, + { + type: 'command', + name: 'sort', + args: [ + { + type: 'column', + name: 'a', + }, + { + type: 'column', + name: 'b', + }, + { + type: 'column', + name: 'c', + }, + { + type: 'column', + name: 'd', + }, + { + type: 'column', + name: 'e', + }, + { + type: 'column', + name: 'f', + }, + { + type: 'column', + name: 'g', + }, + ], + }, + ]); + }); + }); +}); diff --git a/packages/kbn-esql-ast/src/__tests__/ast_parser.where.test.ts b/packages/kbn-esql-ast/src/__tests__/ast_parser.where.test.ts new file mode 100644 index 0000000000000..34148ec1aecd2 --- /dev/null +++ b/packages/kbn-esql-ast/src/__tests__/ast_parser.where.test.ts @@ -0,0 +1,38 @@ +/* + * 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 { getAstAndSyntaxErrors as parse } from '../ast_parser'; + +describe('WHERE', () => { + describe('correctly formatted', () => { + it('example from documentation', () => { + const text = ` + FROM employees + | KEEP first_name, last_name, still_hired + | WHERE still_hired == true + `; + const { ast, errors } = parse(text); + + expect(errors.length).toBe(0); + expect(ast).toMatchObject([ + {}, + {}, + { + type: 'command', + name: 'where', + args: [ + { + type: 'function', + name: '==', + }, + ], + }, + ]); + }); + }); +}); diff --git a/packages/kbn-esql-ast/src/ast_factory.ts b/packages/kbn-esql-ast/src/ast_factory.ts index f389be63b3afd..cd73bc79a3887 100644 --- a/packages/kbn-esql-ast/src/ast_factory.ts +++ b/packages/kbn-esql-ast/src/ast_factory.ts @@ -205,7 +205,7 @@ export class AstListener implements ESQLParserListener { const command = createCommand('limit', ctx); this.ast.push(command); if (ctx.getToken(esql_parser.INTEGER_LITERAL, 0)) { - const literal = createLiteral('number', ctx.INTEGER_LITERAL()); + const literal = createLiteral('integer', ctx.INTEGER_LITERAL()); if (literal) { command.args.push(literal); } diff --git a/packages/kbn-esql-ast/src/ast_helpers.ts b/packages/kbn-esql-ast/src/ast_helpers.ts index cc6488d5bbc0c..6ebb3fb9c4490 100644 --- a/packages/kbn-esql-ast/src/ast_helpers.ts +++ b/packages/kbn-esql-ast/src/ast_helpers.ts @@ -35,7 +35,9 @@ import type { ESQLCommandMode, ESQLInlineCast, ESQLUnknownItem, + ESQLNumericLiteralType, FunctionSubtype, + ESQLNumericLiteral, } from './types'; export function nonNullable(v: T): v is NonNullable { @@ -87,11 +89,14 @@ export function createList(ctx: ParserRuleContext, values: ESQLLiteral[]): ESQLL }; } -export function createNumericLiteral(ctx: DecimalValueContext | IntegerValueContext): ESQLLiteral { +export function createNumericLiteral( + ctx: DecimalValueContext | IntegerValueContext, + literalType: ESQLNumericLiteralType +): ESQLLiteral { const text = ctx.getText(); return { type: 'literal', - literalType: 'number', + literalType, text, name: text, value: Number(text), @@ -100,10 +105,13 @@ export function createNumericLiteral(ctx: DecimalValueContext | IntegerValueCont }; } -export function createFakeMultiplyLiteral(ctx: ArithmeticUnaryContext): ESQLLiteral { +export function createFakeMultiplyLiteral( + ctx: ArithmeticUnaryContext, + literalType: ESQLNumericLiteralType +): ESQLLiteral { return { type: 'literal', - literalType: 'number', + literalType, text: ctx.getText(), name: ctx.getText(), value: ctx.PLUS() ? 1 : -1, @@ -158,12 +166,13 @@ export function createLiteral( location: getPosition(node.symbol), incomplete: isMissingText(text), }; - if (type === 'number') { + if (type === 'decimal' || type === 'integer') { return { ...partialLiteral, literalType: type, value: Number(text), - }; + paramType: 'number', + } as ESQLNumericLiteral<'decimal'> | ESQLNumericLiteral<'integer'>; } else if (type === 'param') { throw new Error('Should never happen'); } @@ -171,7 +180,7 @@ export function createLiteral( ...partialLiteral, literalType: type, value: text, - }; + } as ESQLLiteral; } export function createTimeUnit(ctx: QualifiedIntegerLiteralContext): ESQLTimeInterval { diff --git a/packages/kbn-esql-ast/src/ast_walker.ts b/packages/kbn-esql-ast/src/ast_walker.ts index 1b603975cf68f..3a0f182215c3e 100644 --- a/packages/kbn-esql-ast/src/ast_walker.ts +++ b/packages/kbn-esql-ast/src/ast_walker.ts @@ -84,7 +84,7 @@ import { createUnknownItem, } from './ast_helpers'; import { getPosition } from './ast_position_utils'; -import type { +import { ESQLLiteral, ESQLColumn, ESQLFunction, @@ -289,7 +289,7 @@ function visitOperatorExpression( const arg = visitOperatorExpression(ctx.operatorExpression()); // this is a number sign thing const fn = createFunction('*', ctx, undefined, 'binary-expression'); - fn.args.push(createFakeMultiplyLiteral(ctx)); + fn.args.push(createFakeMultiplyLiteral(ctx, 'integer')); if (arg) { fn.args.push(arg); } @@ -328,16 +328,21 @@ function getConstant(ctx: ConstantContext): ESQLAstItem { // e.g. 1 year, 15 months return createTimeUnit(ctx); } + + // Decimal type covers multiple ES|QL types: long, double, etc. if (ctx instanceof DecimalLiteralContext) { - return createNumericLiteral(ctx.decimalValue()); + return createNumericLiteral(ctx.decimalValue(), 'decimal'); } + + // Integer type encompasses integer if (ctx instanceof IntegerLiteralContext) { - return createNumericLiteral(ctx.integerValue()); + return createNumericLiteral(ctx.integerValue(), 'integer'); } if (ctx instanceof BooleanLiteralContext) { return getBooleanValue(ctx); } if (ctx instanceof StringLiteralContext) { + // String literal covers multiple ES|QL types: text and keyword types return createLiteral('string', ctx.string_().QUOTED_STRING()); } if ( @@ -346,14 +351,18 @@ function getConstant(ctx: ConstantContext): ESQLAstItem { ctx instanceof StringArrayLiteralContext ) { const values: ESQLLiteral[] = []; + for (const numericValue of ctx.getTypedRuleContexts(NumericValueContext)) { + const isDecimal = + numericValue.decimalValue() !== null && numericValue.decimalValue() !== undefined; const value = numericValue.decimalValue() || numericValue.integerValue(); - values.push(createNumericLiteral(value!)); + values.push(createNumericLiteral(value!, isDecimal ? 'decimal' : 'integer')); } for (const booleanValue of ctx.getTypedRuleContexts(BooleanValueContext)) { values.push(getBooleanValue(booleanValue)!); } for (const string of ctx.getTypedRuleContexts(StringContext)) { + // String literal covers multiple ES|QL types: text and keyword types const literal = createLiteral('string', string.QUOTED_STRING()); if (literal) { values.push(literal); diff --git a/packages/kbn-esql-ast/src/builder/index.test.ts b/packages/kbn-esql-ast/src/builder/index.test.ts new file mode 100644 index 0000000000000..d8199027ea1c8 --- /dev/null +++ b/packages/kbn-esql-ast/src/builder/index.test.ts @@ -0,0 +1,20 @@ +/* + * 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 { Builder } from '.'; + +test('can mint a numeric literal', () => { + const node = Builder.numericLiteral({ value: 42 }); + + expect(node).toMatchObject({ + type: 'literal', + literalType: 'integer', + name: '42', + value: 42, + }); +}); diff --git a/packages/kbn-esql-ast/src/builder/index.ts b/packages/kbn-esql-ast/src/builder/index.ts new file mode 100644 index 0000000000000..524301111ed4d --- /dev/null +++ b/packages/kbn-esql-ast/src/builder/index.ts @@ -0,0 +1,47 @@ +/* + * 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 { ESQLDecimalLiteral, ESQLIntegerLiteral, ESQLNumericLiteralType } from '../types'; +import { AstNodeParserFields, AstNodeTemplate } from './types'; + +export class Builder { + /** + * Constructs fields which are only available when the node is minted by + * the parser. + */ + public static readonly parserFields = ({ + location = { min: 0, max: 0 }, + text = '', + incomplete = false, + }: Partial): AstNodeParserFields => ({ + location, + text, + incomplete, + }); + + /** + * Constructs a integer literal node. + */ + public static readonly numericLiteral = ( + template: Omit< + AstNodeTemplate, + 'literalType' | 'name' + >, + type: ESQLNumericLiteralType = 'integer' + ): ESQLIntegerLiteral | ESQLDecimalLiteral => { + const node: ESQLIntegerLiteral | ESQLDecimalLiteral = { + ...template, + ...Builder.parserFields(template), + type: 'literal', + literalType: type, + name: template.value.toString(), + }; + + return node; + }; +} diff --git a/packages/kbn-esql-ast/src/builder/types.ts b/packages/kbn-esql-ast/src/builder/types.ts new file mode 100644 index 0000000000000..60575c0d00994 --- /dev/null +++ b/packages/kbn-esql-ast/src/builder/types.ts @@ -0,0 +1,30 @@ +/* + * 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 type { ESQLProperNode, ESQLAstBaseItem } from '../types'; + +/** + * Node fields which are available only when the node is minted by the parser. + * When creating nodes manually, these fields are not available. + */ +export type AstNodeParserFields = Pick; + +/** + * The node *template* transforms ES|QL AST nodes into a permissive shape, with + * the aim to: + * + * - Remove the `type` property, as the builder will set it. + * - Make properties like `text`, `location`, and `incomplete` optional, as they + * are a available only when the AST node is minted by the parser. + * - Make all other properties optional, for easy node creation. + */ +export type AstNodeTemplate = Omit< + Node, + 'type' | 'text' | 'location' | 'incomplete' +> & + Partial>; diff --git a/packages/kbn-esql-ast/src/types.ts b/packages/kbn-esql-ast/src/types.ts index 257a004e78f10..12496835ea12b 100644 --- a/packages/kbn-esql-ast/src/types.ts +++ b/packages/kbn-esql-ast/src/types.ts @@ -35,6 +35,15 @@ export type ESQLAstField = ESQLFunction | ESQLColumn; */ export type ESQLAstItem = ESQLSingleAstItem | ESQLAstItem[]; +export type ESQLAstNodeWithArgs = ESQLCommand | ESQLCommandOption | ESQLFunction; + +/** + * *Proper* are nodes which are objects with `type` property, once we get rid + * of the nodes which are plain arrays, all nodes will be *proper* and we can + * remove this type. + */ +export type ESQLProperNode = ESQLSingleAstItem | ESQLAstCommand; + export interface ESQLLocation { min: number; max: number; @@ -170,19 +179,30 @@ export interface ESQLList extends ESQLAstBaseItem { values: ESQLLiteral[]; } +export type ESQLNumericLiteralType = 'decimal' | 'integer'; + export type ESQLLiteral = - | ESQLNumberLiteral + | ESQLDecimalLiteral + | ESQLIntegerLiteral | ESQLBooleanLiteral | ESQLNullLiteral | ESQLStringLiteral | ESQLParamLiteral; +// Exporting here to prevent TypeScript error TS4058 +// Return type of exported function has or is using name 'ESQLNumericLiteral' from external module // @internal -export interface ESQLNumberLiteral extends ESQLAstBaseItem { +export interface ESQLNumericLiteral extends ESQLAstBaseItem { type: 'literal'; - literalType: 'number'; + literalType: T; value: number; } +// We cast anything as decimal (e.g. 32.12) as generic decimal numeric type here +// @internal +export type ESQLDecimalLiteral = ESQLNumericLiteral<'decimal'>; + +// @internal +export type ESQLIntegerLiteral = ESQLNumericLiteral<'integer'>; // @internal export interface ESQLBooleanLiteral extends ESQLAstBaseItem { diff --git a/packages/kbn-esql-ast/src/visitor/README.md b/packages/kbn-esql-ast/src/visitor/README.md new file mode 100644 index 0000000000000..71729bf56a0ab --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/README.md @@ -0,0 +1,69 @@ +## High-level AST structure + +Broadly, there are two AST node types: (1) commands (say `FROM ...`, like +*statements* in other languages), and (2) expressions (say `a + b`, or `fn()`). + + +### Commands + +Commands in ES|QL are like *statements* in other languages. They are the top +level nodes in the AST. + +The root node of the AST is considered to bye the "query" node. It contains a +list of commands. + +``` +Quey = Command[] +``` + +Each command receives a list of positional arguments. For example: + +``` +COMMAND arg1, arg2, arg3 +``` + +A command may also receive additional lists of *named* arguments, we refer to +them as `option`s. For example: + +``` +COMMAND arg1, arg2, arg3 OPTION1 arg4, arg5 OPTION2 arg6, arg7 +``` + +Essentially, one can of command arguments as a list of expressions, with the +ability to add named arguments to the command. For example, the above command +arguments can be represented as: + +```js +{ + '': [arg1, arg2, arg3], + 'option1': [arg4, arg5], + 'option2': [arg6, arg7] +} +``` + +Each command has a command specific `visitCommandX` callback, where `X` is the +name of the command. If a command-specific callback is not found, the generic +`visitCommand` callback is called. + + +### Expressions + +Expressions just like expressions in other languages. Expressions can be deeply +nested, as one expression can contain other expressions. For example, math +expressions `1 + 2`, function call expressions `fn()`, identifier expressions +`my.index` and so on. + +As of this writing, the following expressions are defined: + +- Column identifier expression, `{type: "column"}`, like `@timestamp` +- Source identifier expression, `{type: "source"}`, like `tsdb_index` +- Function call expression, `{type: "function"}`, like `fn(123)` +- Literal expression, `{type: "literal"}`, like `123`, `"hello"` +- List literal expression, `{type: "list"}`, like `[1, 2, 3]`, `["a", "b", "c"]`, `[true, false]` +- Time interval expression, `{type: "interval"}`, like `1h`, `1d`, `1w` +- Inline cast expression, `{type: "cast"}`, like `abc::int`, `def::string` +- Unknown node, `{type: "unknown"}` + +Each expression has a `visitExpressionX` callback, where `X` is the type of the +expression. If a expression-specific callback is not found, the generic +`visitExpression` callback is called. diff --git a/packages/kbn-esql-ast/src/visitor/__tests__/expressions.test.ts b/packages/kbn-esql-ast/src/visitor/__tests__/expressions.test.ts new file mode 100644 index 0000000000000..efd30f035e7ca --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/__tests__/expressions.test.ts @@ -0,0 +1,159 @@ +/* + * 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 { getAstAndSyntaxErrors } from '../../ast_parser'; +import { Visitor } from '../visitor'; + +test('"visitExpression" captures all non-captured expressions', () => { + const { ast } = getAstAndSyntaxErrors(` + FROM index + | STATS 1, "str", [true], a = b BY field + | LIMIT 123 + `); + const visitor = new Visitor() + .on('visitExpression', (ctx) => { + return ''; + }) + .on('visitCommand', (ctx) => { + const args = [...ctx.visitArguments()].join(', '); + return `${ctx.name()}${args ? ` ${args}` : ''}`; + }) + .on('visitQuery', (ctx) => { + return [...ctx.visitCommands()].join(' | '); + }); + const text = visitor.visitQuery(ast); + + expect(text).toBe( + 'FROM | STATS , , , | LIMIT ' + ); +}); + +test('can terminate walk early, does not visit all literals', () => { + const numbers: number[] = []; + const { ast } = getAstAndSyntaxErrors(` + FROM index + | STATS 0, 1, 2, 3 + | LIMIT 123 + `); + const result = new Visitor() + .on('visitExpression', (ctx) => { + return 0; + }) + .on('visitLiteralExpression', (ctx) => { + numbers.push(ctx.node.value as number); + return ctx.node.value; + }) + .on('visitCommand', (ctx) => { + for (const res of ctx.visitArguments()) if (res) return res; + }) + .on('visitQuery', (ctx) => { + for (const res of ctx.visitCommands()) if (res) return res; + }) + .visitQuery(ast); + + expect(result).toBe(1); + expect(numbers).toEqual([0, 1]); +}); + +test('"visitColumnExpression" takes over all column visits', () => { + const { ast } = getAstAndSyntaxErrors(` + FROM index | STATS a + `); + const visitor = new Visitor() + .on('visitColumnExpression', (ctx) => { + return ''; + }) + .on('visitExpression', (ctx) => { + return 'E'; + }) + .on('visitCommand', (ctx) => { + const args = [...ctx.visitArguments()].join(', '); + return `${ctx.name()}${args ? ` ${args}` : ''}`; + }) + .on('visitQuery', (ctx) => { + return [...ctx.visitCommands()].join(' | '); + }); + const text = visitor.visitQuery(ast); + + expect(text).toBe('FROM E | STATS '); +}); + +test('"visitSourceExpression" takes over all source visits', () => { + const { ast } = getAstAndSyntaxErrors(` + FROM index + | STATS 1, "str", [true], a = b BY field + | LIMIT 123 + `); + const visitor = new Visitor() + .on('visitSourceExpression', (ctx) => { + return ''; + }) + .on('visitExpression', (ctx) => { + return 'E'; + }) + .on('visitCommand', (ctx) => { + const args = [...ctx.visitArguments()].join(', '); + return `${ctx.name()}${args ? ` ${args}` : ''}`; + }) + .on('visitQuery', (ctx) => { + return [...ctx.visitCommands()].join(' | '); + }); + const text = visitor.visitQuery(ast); + + expect(text).toBe('FROM | STATS E, E, E, E | LIMIT E'); +}); + +test('"visitFunctionCallExpression" takes over all literal visits', () => { + const { ast } = getAstAndSyntaxErrors(` + FROM index + | STATS 1, "str", [true], a = b BY field + | LIMIT 123 + `); + const visitor = new Visitor() + .on('visitFunctionCallExpression', (ctx) => { + return ''; + }) + .on('visitExpression', (ctx) => { + return 'E'; + }) + .on('visitCommand', (ctx) => { + const args = [...ctx.visitArguments()].join(', '); + return `${ctx.name()}${args ? ` ${args}` : ''}`; + }) + .on('visitQuery', (ctx) => { + return [...ctx.visitCommands()].join(' | '); + }); + const text = visitor.visitQuery(ast); + + expect(text).toBe('FROM E | STATS E, E, E, | LIMIT E'); +}); + +test('"visitLiteral" takes over all literal visits', () => { + const { ast } = getAstAndSyntaxErrors(` + FROM index + | STATS 1, "str", [true], a = b BY field + | LIMIT 123 + `); + const visitor = new Visitor() + .on('visitLiteralExpression', (ctx) => { + return ''; + }) + .on('visitExpression', (ctx) => { + return 'E'; + }) + .on('visitCommand', (ctx) => { + const args = [...ctx.visitArguments()].join(', '); + return `${ctx.name()}${args ? ` ${args}` : ''}`; + }) + .on('visitQuery', (ctx) => { + return [...ctx.visitCommands()].join(' | '); + }); + const text = visitor.visitQuery(ast); + + expect(text).toBe('FROM E | STATS , , E, E | LIMIT '); +}); diff --git a/packages/kbn-esql-ast/src/visitor/__tests__/scenarios.test.ts b/packages/kbn-esql-ast/src/visitor/__tests__/scenarios.test.ts new file mode 100644 index 0000000000000..ce338e8bd72ba --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/__tests__/scenarios.test.ts @@ -0,0 +1,193 @@ +/* + * 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. + */ + +/** + * @category Visitor Real-world Scenarios + * + * This test suite contains real-world scenarios that demonstrate how to use the + * visitor to traverse the AST and make changes to it, or how to extract useful + */ + +import { getAstAndSyntaxErrors } from '../../ast_parser'; +import { ESQLAstQueryNode } from '../types'; +import { Visitor } from '../visitor'; + +test('change LIMIT from 24 to 42', () => { + const { ast } = getAstAndSyntaxErrors(` + FROM index + | STATS 1, "str", [true], a = b BY field + | LIMIT 24 + `); + + // Find the LIMIT node + const limit = () => + new Visitor() + .on('visitLimitCommand', (ctx) => ctx.numeric()) + .on('visitCommand', () => null) + .on('visitQuery', (ctx) => [...ctx.visitCommands()]) + .visitQuery(ast) + .filter(Boolean)[0]; + + expect(limit()).toBe(24); + + // Change LIMIT to 42 + new Visitor() + .on('visitLimitCommand', (ctx) => { + ctx.setLimit(42); + }) + .on('visitCommand', () => {}) + .on('visitQuery', (ctx) => [...ctx.visitCommands()]) + .visitQuery(ast); + + expect(limit()).toBe(42); +}); + +/** + * Implement this once sorting order expressions are available: + * + * - https://github.com/elastic/kibana/issues/189491 + */ +test.todo('can modify sorting orders'); + +test('can remove a specific WHERE command', () => { + const query = getAstAndSyntaxErrors(` + FROM employees + | KEEP first_name, last_name, still_hired + | WHERE still_hired == true + | WHERE last_name == "Jeo" + | WHERE 123 == salary + `); + + const print = () => + new Visitor() + .on('visitColumnExpression', (ctx) => ctx.node.name) + .on( + 'visitFunctionCallExpression', + (ctx) => `${ctx.node.name}(${[...ctx.visitArguments()].join(', ')})` + ) + .on('visitExpression', (ctx) => '') + .on('visitCommand', (ctx) => { + if (ctx.node.name === 'where') { + const args = [...ctx.visitArguments()].join(', '); + return `${ctx.name()}${args ? ` ${args}` : ''}`; + } else { + return ''; + } + }) + .on('visitQuery', (ctx) => [...ctx.visitCommands()].filter(Boolean).join(' | ')) + .visitQuery(query.ast); + + const removeFilter = (field: string) => { + query.ast = new Visitor() + .on('visitColumnExpression', (ctx) => (ctx.node.name === field ? null : ctx.node)) + .on('visitFunctionCallExpression', (ctx) => { + const args = [...ctx.visitArguments()]; + return args.some((arg) => arg === null) ? null : ctx.node; + }) + .on('visitExpression', (ctx) => ctx.node) + .on('visitCommand', (ctx) => { + if (ctx.node.name === 'where') { + ctx.node.args = [...ctx.visitArguments()].filter(Boolean); + } + return ctx.node; + }) + .on('visitQuery', (ctx) => [...ctx.visitCommands()].filter((cmd) => cmd.args.length)) + .visitQuery(query.ast); + }; + + expect(print()).toBe( + 'WHERE ==(still_hired, ) | WHERE ==(last_name, ) | WHERE ==(, salary)' + ); + removeFilter('last_name'); + expect(print()).toBe('WHERE ==(still_hired, ) | WHERE ==(, salary)'); + removeFilter('still_hired'); + removeFilter('still_hired'); + expect(print()).toBe('WHERE ==(, salary)'); + removeFilter('still_hired'); + removeFilter('salary'); + removeFilter('salary'); + expect(print()).toBe(''); +}); + +export const prettyPrint = (ast: ESQLAstQueryNode) => + new Visitor() + .on('visitSourceExpression', (ctx) => { + return ctx.node.name; + }) + .on('visitColumnExpression', (ctx) => { + return ctx.node.name; + }) + .on('visitFunctionCallExpression', (ctx) => { + let args = ''; + for (const arg of ctx.visitArguments()) { + args += (args ? ', ' : '') + arg; + } + return `${ctx.node.name.toUpperCase()}${args ? `(${args})` : ''}`; + }) + .on('visitLiteralExpression', (ctx) => { + return ctx.node.value; + }) + .on('visitListLiteralExpression', (ctx) => { + return ''; + }) + .on('visitTimeIntervalLiteralExpression', (ctx) => { + return ''; + }) + .on('visitInlineCastExpression', (ctx) => { + return ''; + }) + .on('visitExpression', (ctx) => { + return ''; + }) + .on('visitCommandOption', (ctx) => { + let args = ''; + for (const arg of ctx.visitArguments()) { + args += (args ? ', ' : '') + arg; + } + return ctx.node.name.toUpperCase() + (args ? ` ${args}` : ''); + }) + .on('visitCommand', (ctx) => { + let args = ''; + for (const source of ctx.visitArguments()) { + args += (args ? ', ' : '') + source; + } + return `${ctx.node.name.toUpperCase()}${args ? ` ${args}` : ''}`; + }) + .on('visitFromCommand', (ctx) => { + let sources = ''; + for (const source of ctx.visitSources()) { + sources += (sources ? ', ' : '') + source; + } + let options = ''; + for (const option of ctx.visitOptions()) { + options += ' ' + option; + } + return `FROM ${sources}${options}`; + }) + .on('visitLimitCommand', (ctx) => { + return `LIMIT ${ctx.numeric() ?? 0}`; + }) + .on('visitQuery', (ctx) => { + let text = ''; + for (const cmd of ctx.visitCommands()) { + text += (text ? ' | ' : '') + cmd; + } + return text; + }) + .visitQuery(ast); + +test('can print a query to text', () => { + const { ast } = getAstAndSyntaxErrors( + 'FROM index METADATA _id, asdf, 123 | STATS fn([1,2], 1d, 1::string, x in (1, 2)), a = b | LIMIT 1000' + ); + const text = prettyPrint(ast); + + expect(text).toBe( + 'FROM index METADATA _id, asdf, 123 | STATS FN(, , , IN(x, 1, 2)), =(a, b) | LIMIT 1000' + ); +}); diff --git a/packages/kbn-esql-ast/src/visitor/__tests__/visitor.test.ts b/packages/kbn-esql-ast/src/visitor/__tests__/visitor.test.ts new file mode 100644 index 0000000000000..24944f635ee44 --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/__tests__/visitor.test.ts @@ -0,0 +1,118 @@ +/* + * 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 { getAstAndSyntaxErrors } from '../../ast_parser'; +import { CommandVisitorContext, WhereCommandVisitorContext } from '../contexts'; +import { Visitor } from '../visitor'; + +test('can collect all command names in type safe way', () => { + const visitor = new Visitor() + .on('visitCommand', (ctx) => { + return ctx.node.name; + }) + .on('visitQuery', (ctx) => { + const cmds = []; + for (const cmd of ctx.visitCommands()) { + cmds.push(cmd); + } + return cmds; + }); + + const { ast } = getAstAndSyntaxErrors('FROM index | LIMIT 123'); + const res = visitor.visitQuery(ast); + + expect(res).toEqual(['from', 'limit']); +}); + +test('can pass inputs to visitors', () => { + const visitor = new Visitor() + .on('visitCommand', (ctx, prefix: string) => { + return prefix + ctx.node.name; + }) + .on('visitQuery', (ctx) => { + const cmds = []; + for (const cmd of ctx.visitCommands('pfx:')) { + cmds.push(cmd); + } + return cmds; + }); + + const { ast } = getAstAndSyntaxErrors('FROM index | LIMIT 123'); + const res = visitor.visitQuery(ast); + + expect(res).toEqual(['pfx:from', 'pfx:limit']); +}); + +test('can specify specific visitors for commands', () => { + const { ast } = getAstAndSyntaxErrors( + 'FROM index | SORT asfd | WHERE 1 | ENRICH adsf | LIMIT 123' + ); + const res = new Visitor() + .on('visitWhereCommand', () => 'where') + .on('visitSortCommand', () => 'sort') + .on('visitEnrichCommand', () => 'very rich') + .on('visitCommand', () => 'DEFAULT') + .on('visitQuery', (ctx) => [...ctx.visitCommands()]) + .visitQuery(ast); + + expect(res).toEqual(['DEFAULT', 'sort', 'where', 'very rich', 'DEFAULT']); +}); + +test('a command can access parent query node', () => { + const { ast } = getAstAndSyntaxErrors( + 'FROM index | SORT asfd | WHERE 1 | ENRICH adsf | LIMIT 123' + ); + new Visitor() + .on('visitWhereCommand', (ctx) => { + if (ctx.parent!.node !== ast) { + throw new Error('Expected parent to be query node'); + } + }) + .on('visitCommand', (ctx) => { + if (ctx.parent!.node !== ast) { + throw new Error('Expected parent to be query node'); + } + }) + .on('visitQuery', (ctx) => [...ctx.visitCommands()]) + .visitQuery(ast); +}); + +test('specific commands receive specific visitor contexts', () => { + const { ast } = getAstAndSyntaxErrors( + 'FROM index | SORT asfd | WHERE 1 | ENRICH adsf | LIMIT 123' + ); + + new Visitor() + .on('visitWhereCommand', (ctx) => { + if (!(ctx instanceof WhereCommandVisitorContext)) { + throw new Error('Expected WhereCommandVisitorContext'); + } + if (!(ctx instanceof CommandVisitorContext)) { + throw new Error('Expected WhereCommandVisitorContext'); + } + }) + .on('visitCommand', (ctx) => { + if (!(ctx instanceof CommandVisitorContext)) { + throw new Error('Expected CommandVisitorContext'); + } + }) + .on('visitQuery', (ctx) => [...ctx.visitCommands()]) + .visitQuery(ast); + + new Visitor() + .on('visitCommand', (ctx) => { + if (!(ctx instanceof CommandVisitorContext)) { + throw new Error('Expected CommandVisitorContext'); + } + if (ctx instanceof WhereCommandVisitorContext) { + throw new Error('Did not expect WhereCommandVisitorContext'); + } + }) + .on('visitQuery', (ctx) => [...ctx.visitCommands()]) + .visitQuery(ast); +}); diff --git a/packages/kbn-esql-ast/src/visitor/contexts.ts b/packages/kbn-esql-ast/src/visitor/contexts.ts new file mode 100644 index 0000000000000..a7920358e1bab --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/contexts.ts @@ -0,0 +1,443 @@ +/* + * 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. + */ + +/* eslint-disable max-classes-per-file */ +// Splitting classes across files runs into issues with circular dependencies +// and makes it harder to understand the code structure. + +import { type GlobalVisitorContext, SharedData } from './global_visitor_context'; +import { firstItem, singleItems } from './utils'; +import type { + ESQLAstCommand, + ESQLAstItem, + ESQLAstNodeWithArgs, + ESQLColumn, + ESQLCommandOption, + ESQLDecimalLiteral, + ESQLFunction, + ESQLInlineCast, + ESQLIntegerLiteral, + ESQLList, + ESQLLiteral, + ESQLSource, + ESQLTimeInterval, +} from '../types'; +import type { + CommandVisitorInput, + ESQLAstExpressionNode, + ESQLAstQueryNode, + ExpressionVisitorInput, + ExpressionVisitorOutput, + UndefinedToVoid, + VisitorAstNode, + VisitorMethods, +} from './types'; +import { Builder } from '../builder'; + +const isNodeWithArgs = (x: unknown): x is ESQLAstNodeWithArgs => + !!x && typeof x === 'object' && Array.isArray((x as any).args); + +export class VisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData, + Node extends VisitorAstNode = VisitorAstNode +> { + constructor( + /** + * Global visitor context. + */ + public readonly ctx: GlobalVisitorContext, + + /** + * ES|QL AST node which is currently being visited. + */ + public readonly node: Node, + + /** + * Context of the parent node, from which the current node was reached + * during the AST traversal. + */ + public readonly parent: VisitorContext | null = null + ) {} + + public *visitArguments( + input: ExpressionVisitorInput + ): Iterable> { + this.ctx.assertMethodExists('visitExpression'); + + const node = this.node; + + if (!isNodeWithArgs(node)) { + throw new Error('Node does not have arguments'); + } + + for (const arg of singleItems(node.args)) { + yield this.visitExpression(arg, input as any); + } + } + + public visitExpression( + expressionNode: ESQLAstExpressionNode, + input: ExpressionVisitorInput + ): ExpressionVisitorOutput { + return this.ctx.visitExpression(this, expressionNode, input); + } + + public visitCommand( + commandNode: ESQLAstCommand, + input: CommandVisitorInput + ): ExpressionVisitorOutput { + return this.ctx.visitCommand(this, commandNode, input); + } +} + +export class QueryVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends VisitorContext { + public *visitCommands( + input: UndefinedToVoid>[1]> + ): Iterable< + | ReturnType> + | ReturnType> + > { + this.ctx.assertMethodExists('visitCommand'); + + for (const cmd of this.node) { + yield this.visitCommand(cmd, input as any); + } + } +} + +// Commands -------------------------------------------------------------------- + +export class CommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData, + Node extends ESQLAstCommand = ESQLAstCommand +> extends VisitorContext { + public name(): string { + return this.node.name.toUpperCase(); + } + + public *options(): Iterable { + for (const arg of this.node.args) { + if (Array.isArray(arg)) { + continue; + } + if (arg.type === 'option') { + yield arg; + } + } + } + + public *visitOptions( + input: UndefinedToVoid>[1]> + ): Iterable>> { + this.ctx.assertMethodExists('visitCommandOption'); + + for (const option of this.options()) { + const sourceContext = new CommandOptionVisitorContext(this.ctx, option, this); + const result = this.ctx.methods.visitCommandOption!(sourceContext, input); + + yield result; + } + } + + public *arguments(option: '' | string = ''): Iterable { + option = option.toLowerCase(); + + if (!option) { + for (const arg of this.node.args) { + if (Array.isArray(arg)) { + yield arg; + continue; + } + if (arg.type !== 'option') { + yield arg; + } + } + } + + const optionNode = this.node.args.find( + (arg) => !Array.isArray(arg) && arg.type === 'option' && arg.name === option + ); + + if (optionNode) { + yield* (optionNode as ESQLCommandOption).args; + } + } + + public *visitArguments( + input: ExpressionVisitorInput, + option: '' | string = '' + ): Iterable> { + this.ctx.assertMethodExists('visitExpression'); + + const node = this.node; + + if (!isNodeWithArgs(node)) { + throw new Error('Node does not have arguments'); + } + + for (const arg of singleItems(this.arguments(option))) { + yield this.visitExpression(arg, input as any); + } + } + + public *visitSources( + input: UndefinedToVoid>[1]> + ): Iterable>> { + this.ctx.assertMethodExists('visitSourceExpression'); + + for (const arg of singleItems(this.node.args)) { + if (arg.type === 'source') { + const sourceContext = new SourceExpressionVisitorContext(this.ctx, arg, this); + const result = this.ctx.methods.visitSourceExpression!(sourceContext, input); + + yield result; + } + } + } +} + +export class CommandOptionVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends VisitorContext {} + +// FROM [ METADATA ] +export class FromCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext { + /** + * Visit the METADATA part of the FROM command. + * + * FROM [ METADATA ] + * + * @param input Input object to pass to all "visitColumn" children methods. + * @returns An iterable of results of all the "visitColumn" visitor methods. + */ + public *visitMetadataColumns( + input: UndefinedToVoid>[1]> + ): Iterable>> { + this.ctx.assertMethodExists('visitColumnExpression'); + + let metadataOption: ESQLCommandOption | undefined; + + for (const arg of singleItems(this.node.args)) { + if (arg.type === 'option' && arg.name === 'metadata') { + metadataOption = arg; + break; + } + } + + if (!metadataOption) { + return; + } + + for (const arg of singleItems(metadataOption.args)) { + if (arg.type === 'column') { + const columnContext = new ColumnExpressionVisitorContext(this.ctx, arg, this); + const result = this.ctx.methods.visitColumnExpression!(columnContext, input); + + yield result; + } + } + } +} + +// LIMIT +export class LimitCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext { + /** + * @returns The first numeric literal argument of the command. + */ + public numericLiteral(): ESQLIntegerLiteral | ESQLDecimalLiteral | undefined { + const arg = firstItem(this.node.args); + + if ( + arg && + arg.type === 'literal' && + (arg.literalType === 'integer' || arg.literalType === 'decimal') + ) { + return arg; + } + } + + /** + * @returns The value of the first numeric literal argument of the command. + */ + public numeric(): number | undefined { + const literal = this.numericLiteral(); + + return literal?.value; + } + + public setLimit(value: number): void { + const literalNode = Builder.numericLiteral({ value }); + + this.node.args = [literalNode]; + } +} + +// EXPLAIN +export class ExplainCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// ROW +export class RowCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// METRICS +export class MetricsCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// SHOW +export class ShowCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// META +export class MetaCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// EVAL +export class EvalCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// STATS [ BY ] +export class StatsCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// INLINESTATS [ BY ] +export class InlineStatsCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// LOOKUP ON +export class LookupCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// KEEP +export class KeepCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// SORT +export class SortCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// WHERE +export class WhereCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// DROP +export class DropCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// RENAME AS +export class RenameCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// DISSECT [ APPEND_SEPARATOR = ] +export class DissectCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// GROK +export class GrokCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// ENRICH [ ON ] [ WITH ] +export class EnrichCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// MV_EXPAND +export class MvExpandCommandVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends CommandVisitorContext {} + +// Expressions ----------------------------------------------------------------- + +export class ExpressionVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData, + Node extends ESQLAstExpressionNode = ESQLAstExpressionNode +> extends VisitorContext {} + +export class ColumnExpressionVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends VisitorContext {} + +export class SourceExpressionVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends VisitorContext {} + +export class FunctionCallExpressionVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends VisitorContext {} + +export class LiteralExpressionVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData, + Node extends ESQLLiteral = ESQLLiteral +> extends ExpressionVisitorContext {} + +export class ListLiteralExpressionVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData, + Node extends ESQLList = ESQLList +> extends ExpressionVisitorContext {} + +export class TimeIntervalLiteralExpressionVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends ExpressionVisitorContext {} + +export class InlineCastExpressionVisitorContext< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> extends ExpressionVisitorContext {} diff --git a/packages/kbn-esql-ast/src/visitor/global_visitor_context.ts b/packages/kbn-esql-ast/src/visitor/global_visitor_context.ts new file mode 100644 index 0000000000000..9cae41f36dde5 --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/global_visitor_context.ts @@ -0,0 +1,468 @@ +/* + * 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 * as contexts from './contexts'; +import type { + ESQLAstCommand, + ESQLColumn, + ESQLFunction, + ESQLInlineCast, + ESQLList, + ESQLLiteral, + ESQLSource, + ESQLTimeInterval, +} from '../types'; +import type * as types from './types'; + +export type SharedData = Record; + +/** + * Global shared visitor context available to all visitors when visiting the AST. + * It contains the shared data, which can be accessed and modified by all visitors. + */ +export class GlobalVisitorContext< + Methods extends types.VisitorMethods = types.VisitorMethods, + Data extends SharedData = SharedData +> { + constructor( + /** + * Visitor methods, used internally by the visitor to traverse the AST. + * @protected + */ + public readonly methods: Methods, + + /** + * Shared data, which can be accessed and modified by all visitors. + */ + public data: Data + ) {} + + public assertMethodExists(name: K) { + if (!this.methods[name]) { + throw new Error(`${name}() method is not defined`); + } + } + + private visitWithSpecificContext< + Method extends keyof types.VisitorMethods, + Context extends contexts.VisitorContext + >( + method: Method, + context: Context, + input: types.VisitorInput + ): types.VisitorOutput { + this.assertMethodExists(method); + return this.methods[method]!(context as any, input); + } + + // Command visiting ---------------------------------------------------------- + + public visitCommandGeneric( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + this.assertMethodExists('visitCommand'); + + const context = new contexts.CommandVisitorContext(this, node, parent); + const output = this.methods.visitCommand!(context, input); + + return output; + } + + public visitCommand( + parent: contexts.VisitorContext | null, + commandNode: ESQLAstCommand, + input: types.CommandVisitorInput + ): types.CommandVisitorOutput { + switch (commandNode.name) { + case 'from': { + if (!this.methods.visitFromCommand) break; + return this.visitFromCommand(parent, commandNode, input as any); + } + case 'limit': { + if (!this.methods.visitLimitCommand) break; + return this.visitLimitCommand(parent, commandNode, input as any); + } + case 'explain': { + if (!this.methods.visitExplainCommand) break; + return this.visitExplainCommand(parent, commandNode, input as any); + } + case 'row': { + if (!this.methods.visitRowCommand) break; + return this.visitRowCommand(parent, commandNode, input as any); + } + // TODO: uncomment this when the command is implemented + // case 'metrics': { + // if (!this.methods.visitMetricsCommand) break; + // return this.visitMetricsCommand(parent, commandNode, input as any); + // } + case 'show': { + if (!this.methods.visitShowCommand) break; + return this.visitShowCommand(parent, commandNode, input as any); + } + case 'meta': { + if (!this.methods.visitMetaCommand) break; + return this.visitMetaCommand(parent, commandNode, input as any); + } + case 'eval': { + if (!this.methods.visitEvalCommand) break; + return this.visitEvalCommand(parent, commandNode, input as any); + } + case 'stats': { + if (!this.methods.visitStatsCommand) break; + return this.visitStatsCommand(parent, commandNode, input as any); + } + // TODO: uncomment this when the command is implemented + // case 'inline_stats': { + // if (!this.methods.visitInlineStatsCommand) break; + // return this.visitInlineStatsCommand(parent, commandNode, input as any); + // } + case 'lookup': { + if (!this.methods.visitLookupCommand) break; + return this.visitLookupCommand(parent, commandNode, input as any); + } + case 'keep': { + if (!this.methods.visitKeepCommand) break; + return this.visitKeepCommand(parent, commandNode, input as any); + } + case 'sort': { + if (!this.methods.visitSortCommand) break; + return this.visitSortCommand(parent, commandNode, input as any); + } + case 'where': { + if (!this.methods.visitWhereCommand) break; + return this.visitWhereCommand(parent, commandNode, input as any); + } + case 'drop': { + if (!this.methods.visitDropCommand) break; + return this.visitDropCommand(parent, commandNode, input as any); + } + case 'rename': { + if (!this.methods.visitRenameCommand) break; + return this.visitRenameCommand(parent, commandNode, input as any); + } + case 'dissect': { + if (!this.methods.visitDissectCommand) break; + return this.visitDissectCommand(parent, commandNode, input as any); + } + case 'grok': { + if (!this.methods.visitGrokCommand) break; + return this.visitGrokCommand(parent, commandNode, input as any); + } + case 'enrich': { + if (!this.methods.visitEnrichCommand) break; + return this.visitEnrichCommand(parent, commandNode, input as any); + } + case 'mv_expand': { + if (!this.methods.visitMvExpandCommand) break; + return this.visitMvExpandCommand(parent, commandNode, input as any); + } + } + return this.visitCommandGeneric(parent, commandNode, input as any); + } + + public visitFromCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.FromCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitFromCommand', context, input); + } + + public visitLimitCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.LimitCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitLimitCommand', context, input); + } + + public visitExplainCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.ExplainCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitExplainCommand', context, input); + } + + public visitRowCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.RowCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitRowCommand', context, input); + } + + public visitMetricsCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.MetricsCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitMetricsCommand', context, input); + } + + public visitShowCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.ShowCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitShowCommand', context, input); + } + + public visitMetaCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.MetaCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitMetaCommand', context, input); + } + + public visitEvalCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.EvalCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitEvalCommand', context, input); + } + + public visitStatsCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.StatsCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitStatsCommand', context, input); + } + + public visitInlineStatsCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.InlineStatsCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitInlineStatsCommand', context, input); + } + + public visitLookupCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.LookupCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitLookupCommand', context, input); + } + + public visitKeepCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.KeepCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitKeepCommand', context, input); + } + + public visitSortCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.SortCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitSortCommand', context, input); + } + + public visitWhereCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.WhereCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitWhereCommand', context, input); + } + + public visitDropCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.DropCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitDropCommand', context, input); + } + + public visitRenameCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.RenameCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitRenameCommand', context, input); + } + + public visitDissectCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.DissectCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitDissectCommand', context, input); + } + + public visitGrokCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.GrokCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitGrokCommand', context, input); + } + + public visitEnrichCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.EnrichCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitEnrichCommand', context, input); + } + + public visitMvExpandCommand( + parent: contexts.VisitorContext | null, + node: ESQLAstCommand, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.MvExpandCommandVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitMvExpandCommand', context, input); + } + + // Expression visiting ------------------------------------------------------- + + public visitExpressionGeneric( + parent: contexts.VisitorContext | null, + node: types.ESQLAstExpressionNode, + input: types.VisitorInput + ): types.VisitorOutput { + this.assertMethodExists('visitExpression'); + + const context = new contexts.ExpressionVisitorContext(this, node, parent); + const output = this.methods.visitExpression!(context, input); + + return output; + } + + public visitExpression( + parent: contexts.VisitorContext | null, + expressionNode: types.ESQLAstExpressionNode, + input: types.ExpressionVisitorInput + ): types.ExpressionVisitorOutput { + if (Array.isArray(expressionNode)) { + throw new Error('should not happen'); + } + switch (expressionNode.type) { + case 'column': { + if (!this.methods.visitColumnExpression) break; + return this.visitColumnExpression(parent, expressionNode, input as any); + } + case 'source': { + if (!this.methods.visitSourceExpression) break; + return this.visitSourceExpression(parent, expressionNode, input as any); + } + case 'function': { + if (!this.methods.visitFunctionCallExpression) break; + return this.visitFunctionCallExpression(parent, expressionNode, input as any); + } + case 'literal': { + if (!this.methods.visitLiteralExpression) break; + return this.visitLiteralExpression(parent, expressionNode, input as any); + } + case 'list': { + if (!this.methods.visitListLiteralExpression) break; + return this.visitListLiteralExpression(parent, expressionNode, input as any); + } + case 'timeInterval': { + if (!this.methods.visitTimeIntervalLiteralExpression) break; + return this.visitTimeIntervalLiteralExpression(parent, expressionNode, input as any); + } + case 'inlineCast': { + if (!this.methods.visitInlineCastExpression) break; + return this.visitInlineCastExpression(parent, expressionNode, input as any); + } + } + return this.visitExpressionGeneric(parent, expressionNode, input as any); + } + + public visitColumnExpression( + parent: contexts.VisitorContext | null, + node: ESQLColumn, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.ColumnExpressionVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitColumnExpression', context, input); + } + + public visitSourceExpression( + parent: contexts.VisitorContext | null, + node: ESQLSource, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.SourceExpressionVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitSourceExpression', context, input); + } + + public visitFunctionCallExpression( + parent: contexts.VisitorContext | null, + node: ESQLFunction, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.FunctionCallExpressionVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitFunctionCallExpression', context, input); + } + + public visitLiteralExpression( + parent: contexts.VisitorContext | null, + node: ESQLLiteral, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.LiteralExpressionVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitLiteralExpression', context, input); + } + + public visitListLiteralExpression( + parent: contexts.VisitorContext | null, + node: ESQLList, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.ListLiteralExpressionVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitListLiteralExpression', context, input); + } + + public visitTimeIntervalLiteralExpression( + parent: contexts.VisitorContext | null, + node: ESQLTimeInterval, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.TimeIntervalLiteralExpressionVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitTimeIntervalLiteralExpression', context, input); + } + + public visitInlineCastExpression( + parent: contexts.VisitorContext | null, + node: ESQLInlineCast, + input: types.VisitorInput + ): types.VisitorOutput { + const context = new contexts.InlineCastExpressionVisitorContext(this, node, parent); + return this.visitWithSpecificContext('visitInlineCastExpression', context, input); + } +} diff --git a/packages/kbn-esql-ast/src/visitor/index.ts b/packages/kbn-esql-ast/src/visitor/index.ts new file mode 100644 index 0000000000000..9e46616a50002 --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export * from './types'; +export { Visitor, type VisitorOptions } from './visitor'; +export { GlobalVisitorContext, type SharedData } from './global_visitor_context'; +export * from './contexts'; diff --git a/packages/kbn-esql-ast/src/visitor/types.ts b/packages/kbn-esql-ast/src/visitor/types.ts new file mode 100644 index 0000000000000..a8ec5e9bd1785 --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/types.ts @@ -0,0 +1,256 @@ +/* + * 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 type { SharedData } from './global_visitor_context'; +import type * as ast from '../types'; +import type * as contexts from './contexts'; + +/** + * We don't have a dedicated "query" AST node, so - for now - we use the root + * array of commands as the "query" node. + */ +export type ESQLAstQueryNode = ast.ESQLAst; + +/** + * Represents an "expression" node in the AST. + */ +// export type ESQLAstExpressionNode = ESQLAstItem; +export type ESQLAstExpressionNode = ast.ESQLSingleAstItem; + +/** + * All possible AST nodes supported by the visitor. + */ +export type VisitorAstNode = ESQLAstQueryNode | ast.ESQLAstNode; + +export type Visitor = ( + ctx: Ctx, + input: Input +) => Output; + +/** + * Retrieves the `Input` of a {@link Visitor} function. + */ +export type VisitorInput< + Methods extends VisitorMethods, + Method extends keyof Methods +> = UndefinedToVoid>>[1]>; + +/** + * Retrieves the `Output` of a {@link Visitor} function. + */ +export type VisitorOutput< + Methods extends VisitorMethods, + Method extends keyof Methods +> = ReturnType>>; + +/** + * Input that satisfies any expression visitor input constraints. + */ +export type ExpressionVisitorInput = AnyToVoid< + | VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput +>; + +/** + * Input that satisfies any expression visitor output constraints. + */ +export type ExpressionVisitorOutput = + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput; + +/** + * Input that satisfies any command visitor input constraints. + */ +export type CommandVisitorInput = AnyToVoid< + | VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput & + VisitorInput +>; + +/** + * Input that satisfies any command visitor output constraints. + */ +export type CommandVisitorOutput = + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput + | VisitorOutput; + +export interface VisitorMethods< + Visitors extends VisitorMethods = any, + Data extends SharedData = SharedData +> { + visitQuery?: Visitor, any, any>; + visitCommand?: Visitor, any, any>; + visitFromCommand?: Visitor, any, any>; + visitLimitCommand?: Visitor, any, any>; + visitExplainCommand?: Visitor, any, any>; + visitRowCommand?: Visitor, any, any>; + visitMetricsCommand?: Visitor, any, any>; + visitShowCommand?: Visitor, any, any>; + visitMetaCommand?: Visitor, any, any>; + visitEvalCommand?: Visitor, any, any>; + visitStatsCommand?: Visitor, any, any>; + visitInlineStatsCommand?: Visitor< + contexts.InlineStatsCommandVisitorContext, + any, + any + >; + visitLookupCommand?: Visitor, any, any>; + visitKeepCommand?: Visitor, any, any>; + visitSortCommand?: Visitor, any, any>; + visitWhereCommand?: Visitor, any, any>; + visitDropCommand?: Visitor, any, any>; + visitRenameCommand?: Visitor, any, any>; + visitDissectCommand?: Visitor, any, any>; + visitGrokCommand?: Visitor, any, any>; + visitEnrichCommand?: Visitor, any, any>; + visitMvExpandCommand?: Visitor, any, any>; + visitCommandOption?: Visitor, any, any>; + visitExpression?: Visitor, any, any>; + visitSourceExpression?: Visitor< + contexts.SourceExpressionVisitorContext, + any, + any + >; + visitColumnExpression?: Visitor< + contexts.ColumnExpressionVisitorContext, + any, + any + >; + visitFunctionCallExpression?: Visitor< + contexts.FunctionCallExpressionVisitorContext, + any, + any + >; + visitLiteralExpression?: Visitor< + contexts.LiteralExpressionVisitorContext, + any, + any + >; + visitListLiteralExpression?: Visitor< + contexts.ListLiteralExpressionVisitorContext, + any, + any + >; + visitTimeIntervalLiteralExpression?: Visitor< + contexts.TimeIntervalLiteralExpressionVisitorContext, + any, + any + >; + visitInlineCastExpression?: Visitor< + contexts.InlineCastExpressionVisitorContext, + any, + any + >; +} + +/** + * Maps any AST node to the corresponding visitor context. + */ +export type AstNodeToVisitorName = Node extends ESQLAstQueryNode + ? 'visitQuery' + : Node extends ast.ESQLCommand + ? 'visitCommand' + : Node extends ast.ESQLCommandOption + ? 'visitCommandOption' + : Node extends ast.ESQLSource + ? 'visitSourceExpression' + : Node extends ast.ESQLColumn + ? 'visitColumnExpression' + : Node extends ast.ESQLFunction + ? 'visitFunctionCallExpression' + : Node extends ast.ESQLLiteral + ? 'visitLiteralExpression' + : Node extends ast.ESQLList + ? 'visitListLiteralExpression' + : Node extends ast.ESQLTimeInterval + ? 'visitTimeIntervalLiteralExpression' + : Node extends ast.ESQLInlineCast + ? 'visitInlineCastExpression' + : never; + +/** + * Maps any AST node to the corresponding visitor context. + */ +export type AstNodeToVisitor< + Node extends VisitorAstNode, + Methods extends VisitorMethods = VisitorMethods +> = Methods[AstNodeToVisitorName]; + +/** + * Maps any AST node to its corresponding visitor context. + */ +export type AstNodeToContext< + Node extends VisitorAstNode, + Methods extends VisitorMethods = VisitorMethods +> = Parameters>>[0]; + +/** + * Asserts that a type is a function. + */ +export type EnsureFunction = T extends (...args: any[]) => any ? T : never; + +/** + * Converts `undefined` to `void`. This allows to make optional a function + * parameter or the return value. + */ +export type UndefinedToVoid = T extends undefined ? void : T; + +/** Returns `Y` if `T` is `any`, or `N` otherwise. */ +export type IfAny = 0 extends 1 & T ? Y : N; + +/** Converts `any` type to `void`. */ +export type AnyToVoid = IfAny; diff --git a/packages/kbn-esql-ast/src/visitor/utils.ts b/packages/kbn-esql-ast/src/visitor/utils.ts new file mode 100644 index 0000000000000..d79cc6fd5ed1a --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/utils.ts @@ -0,0 +1,36 @@ +/* + * 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 { ESQLAstItem, ESQLSingleAstItem } from '../types'; + +/** + * Normalizes AST "item" list to only contain *single* items. + * + * @param items A list of single or nested items. + */ +export function* singleItems(items: Iterable): Iterable { + for (const item of items) { + if (Array.isArray(item)) { + yield* singleItems(item); + } else { + yield item; + } + } +} + +/** + * Returns the first normalized "single item" from the "item" list. + * + * @param items Returns the first "single item" from the "item" list. + * @returns A "single item", if any. + */ +export const firstItem = (items: ESQLAstItem[]): ESQLSingleAstItem | undefined => { + for (const item of singleItems(items)) { + return item; + } +}; diff --git a/packages/kbn-esql-ast/src/visitor/visitor.ts b/packages/kbn-esql-ast/src/visitor/visitor.ts new file mode 100644 index 0000000000000..3956fe126723e --- /dev/null +++ b/packages/kbn-esql-ast/src/visitor/visitor.ts @@ -0,0 +1,98 @@ +/* + * 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 { GlobalVisitorContext, SharedData } from './global_visitor_context'; +import { QueryVisitorContext } from './contexts'; +import { VisitorContext } from './contexts'; +import type { + AstNodeToVisitorName, + EnsureFunction, + ESQLAstQueryNode, + UndefinedToVoid, + VisitorMethods, +} from './types'; + +export interface VisitorOptions< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> { + visitors?: Methods; + data?: Data; +} + +export class Visitor< + Methods extends VisitorMethods = VisitorMethods, + Data extends SharedData = SharedData +> { + public readonly ctx: GlobalVisitorContext; + + constructor(protected readonly options: VisitorOptions = {}) { + this.ctx = new GlobalVisitorContext( + options.visitors ?? ({} as Methods), + options.data ?? ({} as Data) + ); + } + + public visitors>( + visitors: NewMethods + ): Visitor { + Object.assign(this.ctx.methods, visitors); + return this as any; + } + + public on< + K extends keyof VisitorMethods, + F extends VisitorMethods[K] + >(visitor: K, fn: F): Visitor { + (this.ctx.methods as any)[visitor] = fn; + return this as any; + } + + /** + * Traverse any AST node given any visitor context. + * + * @param node AST node to traverse. + * @param ctx Traversal context. + * @returns Result of the visitor callback. + */ + public visit>( + ctx: Ctx, + input: UndefinedToVoid]>>[1]> + ): ReturnType]>> { + const node = ctx.node; + if (node instanceof Array) { + this.ctx.assertMethodExists('visitQuery'); + return this.ctx.methods.visitQuery!(ctx as any, input) as ReturnType< + NonNullable + >; + } else if (node && typeof node === 'object') { + switch (node.type) { + case 'command': + this.ctx.assertMethodExists('visitCommand'); + return this.ctx.methods.visitCommand!(ctx as any, input) as ReturnType< + NonNullable + >; + } + } + throw new Error(`Unsupported node type: ${typeof node}`); + } + + /** + * Traverse the root node of ES|QL query with default context. + * + * @param node Query node to traverse. + * @returns The result of the query visitor. + */ + public visitQuery( + node: ESQLAstQueryNode, + input: UndefinedToVoid>[1]> + ) { + const queryContext = new QueryVisitorContext(this.ctx, node, null); + return this.visit(queryContext, input); + } +} diff --git a/packages/kbn-esql-ast/src/walker/walker.test.ts b/packages/kbn-esql-ast/src/walker/walker.test.ts index 2bc666a1e0421..9f62c2f07d200 100644 --- a/packages/kbn-esql-ast/src/walker/walker.test.ts +++ b/packages/kbn-esql-ast/src/walker/walker.test.ts @@ -211,7 +211,7 @@ describe('structurally can walk all nodes', () => { expect(columns).toMatchObject([ { type: 'literal', - literalType: 'number', + literalType: 'integer', name: '123', }, { @@ -244,7 +244,7 @@ describe('structurally can walk all nodes', () => { expect(columns).toMatchObject([ { type: 'literal', - literalType: 'number', + literalType: 'integer', name: '1', }, { @@ -264,7 +264,7 @@ describe('structurally can walk all nodes', () => { }, { type: 'literal', - literalType: 'number', + literalType: 'decimal', name: '3.14', }, ]); @@ -288,12 +288,12 @@ describe('structurally can walk all nodes', () => { values: [ { type: 'literal', - literalType: 'number', + literalType: 'integer', name: '1', }, { type: 'literal', - literalType: 'number', + literalType: 'integer', name: '2', }, ], @@ -318,12 +318,12 @@ describe('structurally can walk all nodes', () => { values: [ { type: 'literal', - literalType: 'number', + literalType: 'integer', name: '1', }, { type: 'literal', - literalType: 'number', + literalType: 'integer', name: '2', }, ], @@ -333,7 +333,7 @@ describe('structurally can walk all nodes', () => { values: [ { type: 'literal', - literalType: 'number', + literalType: 'decimal', name: '3.3', }, ], @@ -342,17 +342,17 @@ describe('structurally can walk all nodes', () => { expect(literals).toMatchObject([ { type: 'literal', - literalType: 'number', + literalType: 'integer', name: '1', }, { type: 'literal', - literalType: 'number', + literalType: 'integer', name: '2', }, { type: 'literal', - literalType: 'number', + literalType: 'decimal', name: '3.3', }, ]); @@ -511,7 +511,7 @@ describe('structurally can walk all nodes', () => { describe('cast expression', () => { test('can visit cast expression', () => { - const query = 'FROM index | STATS a = 123::number'; + const query = 'FROM index | STATS a = 123::integer'; const { ast } = getAstAndSyntaxErrors(query); const casts: ESQLInlineCast[] = []; @@ -523,10 +523,10 @@ describe('structurally can walk all nodes', () => { expect(casts).toMatchObject([ { type: 'inlineCast', - castType: 'number', + castType: 'integer', value: { type: 'literal', - literalType: 'number', + literalType: 'integer', value: 123, }, }, diff --git a/packages/kbn-esql-utils/src/utils/get_initial_esql_query.test.ts b/packages/kbn-esql-utils/src/utils/get_initial_esql_query.test.ts index 45aac1344725d..26d3b1c0c4a89 100644 --- a/packages/kbn-esql-utils/src/utils/get_initial_esql_query.test.ts +++ b/packages/kbn-esql-utils/src/utils/get_initial_esql_query.test.ts @@ -5,11 +5,98 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { DataView } from '@kbn/data-views-plugin/public'; import { getInitialESQLQuery } from './get_initial_esql_query'; +const getDataView = (name: string, dataViewFields: DataView['fields'], timeFieldName?: string) => { + dataViewFields.getByName = (fieldName: string) => { + return dataViewFields.find((field) => field.name === fieldName); + }; + return { + id: `${name}-id`, + title: name, + metaFields: ['_index', '_score'], + fields: dataViewFields, + type: 'default', + getName: () => name, + getIndexPattern: () => name, + getFieldByName: jest.fn((fieldName: string) => dataViewFields.getByName(fieldName)), + timeFieldName, + isPersisted: () => true, + toSpec: () => ({}), + toMinimalSpec: () => ({}), + } as unknown as DataView; +}; + describe('getInitialESQLQuery', () => { - it('should work correctly', () => { - expect(getInitialESQLQuery('logs*')).toBe('FROM logs* | LIMIT 10'); + it('should NOT add the where clause if there is @timestamp in the index', () => { + const fields = [ + { + name: '@timestamp', + displayName: '@timestamp', + type: 'date', + scripted: false, + filterable: true, + aggregatable: true, + sortable: true, + }, + { + name: 'message', + displayName: 'message', + type: 'string', + scripted: false, + filterable: false, + }, + ] as DataView['fields']; + const dataView = getDataView('logs*', fields, '@timestamp'); + expect(getInitialESQLQuery(dataView)).toBe('FROM logs* | LIMIT 10'); + }); + + it('should NOT add the where clause if there is @timestamp in the index although the dataview timefielName is different', () => { + const fields = [ + { + name: '@timestamp', + displayName: '@timestamp', + type: 'date', + scripted: false, + filterable: true, + aggregatable: true, + sortable: true, + }, + { + name: 'message', + displayName: 'message', + type: 'string', + scripted: false, + filterable: false, + }, + ] as DataView['fields']; + const dataView = getDataView('logs*', fields, 'timestamp'); + expect(getInitialESQLQuery(dataView)).toBe('FROM logs* | LIMIT 10'); + }); + + it('should append a where clause correctly if there is no @timestamp in the index fields', () => { + const fields = [ + { + name: '@custom_timestamp', + displayName: '@custom_timestamp', + type: 'date', + scripted: false, + filterable: true, + aggregatable: true, + sortable: true, + }, + { + name: 'message', + displayName: 'message', + type: 'string', + scripted: false, + filterable: false, + }, + ] as DataView['fields']; + const dataView = getDataView('logs*', fields, '@custom_timestamp'); + expect(getInitialESQLQuery(dataView)).toBe( + 'FROM logs* | WHERE @custom_timestamp >= ?start AND @custom_timestamp <= ?end | LIMIT 10' + ); }); }); diff --git a/packages/kbn-esql-utils/src/utils/get_initial_esql_query.ts b/packages/kbn-esql-utils/src/utils/get_initial_esql_query.ts index 302f3c364f1a6..1d78432b14269 100644 --- a/packages/kbn-esql-utils/src/utils/get_initial_esql_query.ts +++ b/packages/kbn-esql-utils/src/utils/get_initial_esql_query.ts @@ -5,11 +5,20 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +import type { DataView } from '@kbn/data-views-plugin/public'; /** - * Builds an ES|QL query for the provided index or index pattern - * @param indexOrIndexPattern + * Builds an ES|QL query for the provided dataView + * If there is @timestamp field in the index, we don't add the WHERE clause + * If there is no @timestamp and there is a dataView timeFieldName, we add the WHERE clause with the timeFieldName + * @param dataView */ -export function getInitialESQLQuery(indexOrIndexPattern: string): string { - return `FROM ${indexOrIndexPattern} | LIMIT 10`; +export function getInitialESQLQuery(dataView: DataView): string { + const hasAtTimestampField = dataView?.fields?.getByName?.('@timestamp')?.type === 'date'; + const timeFieldName = dataView?.timeFieldName; + const filterByTimeParams = + !hasAtTimestampField && timeFieldName + ? ` | WHERE ${timeFieldName} >= ?start AND ${timeFieldName} <= ?end` + : ''; + return `FROM ${dataView.getIndexPattern()}${filterByTimeParams} | LIMIT 10`; } diff --git a/packages/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts b/packages/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts index aa92c7bd024d5..cbee9d00e8928 100644 --- a/packages/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts +++ b/packages/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts @@ -12,7 +12,6 @@ import { join } from 'path'; import _ from 'lodash'; import type { RecursivePartial } from '@kbn/utility-types'; import { FunctionDefinition } from '../src/definitions/types'; -import { esqlToKibanaType } from '../src/shared/esql_to_kibana_type'; const aliasTable: Record = { to_version: ['to_ver'], @@ -240,10 +239,10 @@ function getFunctionDefinition(ESFunctionDefinition: Record): Funct ...signature, params: signature.params.map((param: any) => ({ ...param, - type: esqlToKibanaType(param.type), + type: param.type, description: undefined, })), - returnType: esqlToKibanaType(signature.returnType), + returnType: signature.returnType, variadic: undefined, // we don't support variadic property minParams: signature.variadic ? signature.params.filter((param: any) => !param.optional).length 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 8d6394fe96af6..d3497115aecf9 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 @@ -25,6 +25,7 @@ import { } from '../src/definitions/types'; import { FUNCTION_DESCRIBE_BLOCK_NAME } from '../src/validation/function_describe_block_name'; import { getMaxMinNumberOfParams } from '../src/validation/helpers'; +import { ESQL_NUMBER_TYPES, isNumericType, isStringType } from '../src/shared/esql_types'; export const fieldNameFromType = (type: SupportedFieldType) => `${camelCase(type)}Field`; @@ -141,8 +142,8 @@ function generateImplicitDateCastingTestsForFunction( const allSignaturesWithDateParams = definition.signatures.filter((signature) => signature.params.some( (param, i) => - param.type === 'date' && - !definition.signatures.some((def) => getParamAtPosition(def, i)?.type === 'string') // don't count parameters that already accept a string + (param.type === 'date' || param.type === 'date_period') && + !definition.signatures.some((def) => isStringType(getParamAtPosition(def, i)?.type)) // don't count parameters that already accept a string ) ); @@ -300,8 +301,8 @@ function generateWhereCommandTestsForEvalFunction( // TODO: not sure why there's this constraint... const supportedFunction = signatures.some( ({ returnType, params }) => - ['number', 'string'].includes(returnType) && - params.every(({ type }) => ['number', 'string'].includes(type)) + [...ESQL_NUMBER_TYPES, 'string'].includes(returnType) && + params.every(({ type }) => [...ESQL_NUMBER_TYPES, 'string'].includes(type)) ); if (!supportedFunction) { @@ -311,12 +312,12 @@ function generateWhereCommandTestsForEvalFunction( const supportedSignatures = signatures.filter(({ returnType }) => // TODO — not sure why the tests have this limitation... seems like any type // that can be part of a boolean expression should be allowed in a where clause - ['number', 'string'].includes(returnType) + [...ESQL_NUMBER_TYPES, 'string'].includes(returnType) ); for (const { params, returnType, ...restSign } of supportedSignatures) { const correctMapping = getFieldMapping(params); testCases.set( - `from a_index | where ${returnType !== 'number' ? 'length(' : ''}${ + `from a_index | where ${!isNumericType(returnType) ? 'length(' : ''}${ // hijacking a bit this function to produce a function call getFunctionSignatures( { @@ -326,7 +327,7 @@ function generateWhereCommandTestsForEvalFunction( }, { withTypes: false } )[0].declaration - }${returnType !== 'number' ? ')' : ''} > 0`, + }${!isNumericType(returnType) ? ')' : ''} > 0`, [] ); @@ -337,7 +338,7 @@ function generateWhereCommandTestsForEvalFunction( supportedTypesAndFieldNames ); testCases.set( - `from a_index | where ${returnType !== 'number' ? 'length(' : ''}${ + `from a_index | where ${!isNumericType(returnType) ? 'length(' : ''}${ // hijacking a bit this function to produce a function call getFunctionSignatures( { @@ -347,7 +348,7 @@ function generateWhereCommandTestsForEvalFunction( }, { withTypes: false } )[0].declaration - }${returnType !== 'number' ? ')' : ''} > 0`, + }${!isNumericType(returnType) ? ')' : ''} > 0`, expectedErrors ); } @@ -357,7 +358,7 @@ function generateWhereCommandTestsForAggFunction( { name, alias, signatures, ...defRest }: FunctionDefinition, testCases: Map ) { - // statsSignatures.some(({ returnType, params }) => ['number'].includes(returnType)) + // statsSignatures.some(({ returnType, params }) => [...ESQL_NUMBER_TYPES].includes(returnType)) for (const { params, ...signRest } of signatures) { const fieldMapping = getFieldMapping(params); @@ -542,7 +543,7 @@ function generateEvalCommandTestsForEvalFunction( signatureWithGreatestNumberOfParams.params ).concat({ name: 'extraArg', - type: 'number', + type: 'integer', }); // get the expected args from the first signature in case of errors @@ -660,7 +661,7 @@ function generateStatsCommandTestsForAggFunction( testCases.set(`from a_index | stats var = ${correctSignature}`, []); testCases.set(`from a_index | stats ${correctSignature}`, []); - if (signRest.returnType === 'number') { + if (isNumericType(signRest.returnType)) { testCases.set(`from a_index | stats var = round(${correctSignature})`, []); testCases.set(`from a_index | stats round(${correctSignature})`, []); testCases.set( @@ -713,8 +714,8 @@ function generateStatsCommandTestsForAggFunction( } // test only numeric functions for now - if (params[0].type === 'number') { - const nestedBuiltin = 'numberField / 2'; + if (isNumericType(params[0].type)) { + const nestedBuiltin = 'doubleField / 2'; const fieldMappingWithNestedBuiltinFunctions = getFieldMapping(params); fieldMappingWithNestedBuiltinFunctions[0].name = nestedBuiltin; @@ -726,16 +727,16 @@ function generateStatsCommandTestsForAggFunction( }, { withTypes: false } )[0].declaration; - // from a_index | STATS aggFn( numberField / 2 ) + // from a_index | STATS aggFn( doubleField / 2 ) testCases.set(`from a_index | stats ${fnSignatureWithBuiltinString}`, []); testCases.set(`from a_index | stats var0 = ${fnSignatureWithBuiltinString}`, []); - testCases.set(`from a_index | stats avg(numberField), ${fnSignatureWithBuiltinString}`, []); + testCases.set(`from a_index | stats avg(doubleField), ${fnSignatureWithBuiltinString}`, []); testCases.set( - `from a_index | stats avg(numberField), var0 = ${fnSignatureWithBuiltinString}`, + `from a_index | stats avg(doubleField), var0 = ${fnSignatureWithBuiltinString}`, [] ); - const nestedEvalAndBuiltin = 'round(numberField / 2)'; + const nestedEvalAndBuiltin = 'round(doubleField / 2)'; const fieldMappingWithNestedEvalAndBuiltinFunctions = getFieldMapping(params); fieldMappingWithNestedBuiltinFunctions[0].name = nestedEvalAndBuiltin; @@ -747,18 +748,18 @@ function generateStatsCommandTestsForAggFunction( }, { withTypes: false } )[0].declaration; - // from a_index | STATS aggFn( round(numberField / 2) ) + // from a_index | STATS aggFn( round(doubleField / 2) ) testCases.set(`from a_index | stats ${fnSignatureWithEvalAndBuiltinString}`, []); testCases.set(`from a_index | stats var0 = ${fnSignatureWithEvalAndBuiltinString}`, []); testCases.set( - `from a_index | stats avg(numberField), ${fnSignatureWithEvalAndBuiltinString}`, + `from a_index | stats avg(doubleField), ${fnSignatureWithEvalAndBuiltinString}`, [] ); testCases.set( - `from a_index | stats avg(numberField), var0 = ${fnSignatureWithEvalAndBuiltinString}`, + `from a_index | stats avg(doubleField), var0 = ${fnSignatureWithEvalAndBuiltinString}`, [] ); - // from a_index | STATS aggFn(round(numberField / 2) ) BY round(numberField / 2) + // from a_index | STATS aggFn(round(doubleField / 2) ) BY round(doubleField / 2) testCases.set( `from a_index | stats ${fnSignatureWithEvalAndBuiltinString} by ${nestedEvalAndBuiltin}`, [] @@ -768,19 +769,19 @@ function generateStatsCommandTestsForAggFunction( [] ); testCases.set( - `from a_index | stats avg(numberField), ${fnSignatureWithEvalAndBuiltinString} by ${nestedEvalAndBuiltin}, ipField`, + `from a_index | stats avg(doubleField), ${fnSignatureWithEvalAndBuiltinString} by ${nestedEvalAndBuiltin}, ipField`, [] ); testCases.set( - `from a_index | stats avg(numberField), var0 = ${fnSignatureWithEvalAndBuiltinString} by var1 = ${nestedEvalAndBuiltin}, ipField`, + `from a_index | stats avg(doubleField), var0 = ${fnSignatureWithEvalAndBuiltinString} by var1 = ${nestedEvalAndBuiltin}, ipField`, [] ); testCases.set( - `from a_index | stats avg(numberField), ${fnSignatureWithEvalAndBuiltinString} by ${nestedEvalAndBuiltin}, ${nestedBuiltin}`, + `from a_index | stats avg(doubleField), ${fnSignatureWithEvalAndBuiltinString} by ${nestedEvalAndBuiltin}, ${nestedBuiltin}`, [] ); testCases.set( - `from a_index | stats avg(numberField), var0 = ${fnSignatureWithEvalAndBuiltinString} by var1 = ${nestedEvalAndBuiltin}, ${nestedBuiltin}`, + `from a_index | stats avg(doubleField), var0 = ${fnSignatureWithEvalAndBuiltinString} by var1 = ${nestedEvalAndBuiltin}, ${nestedBuiltin}`, [] ); } @@ -798,7 +799,7 @@ function generateStatsCommandTestsForAggFunction( .filter(({ constantOnly }) => !constantOnly) .map( (_) => - `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]` + `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(doubleField)] of type [double]` ); testCases.set( `from a_index | stats var = ${ @@ -965,9 +966,17 @@ function generateSortCommandTestsForAggFunction( const generateSortCommandTestsForGroupingFunction = generateSortCommandTestsForAggFunction; const fieldTypesToConstants: Record = { - string: '"a"', - number: '5', - date: 'now()', + text: '"a"', + keyword: '"a"', + double: '5.5', + integer: '5', + long: '5', + unsigned_long: '5', + counter_integer: '5', + counter_long: '5', + counter_double: '5.5', + date: 'to_datetime("2021-01-01T00:00:00Z")', + date_period: 'to_date_period("2021-01-01/2021-01-02")', boolean: 'true', version: 'to_version("1.0.0")', ip: 'to_ip("127.0.0.1")', @@ -1003,8 +1012,8 @@ function prepareNestedFunction(fnSignature: FunctionDefinition): string { } const toAvgSignature = statsAggregationFunctionDefinitions.find(({ name }) => name === 'avg')!; - const toInteger = evalFunctionDefinitions.find(({ name }) => name === 'to_integer')!; +const toDoubleSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_double')!; const toStringSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_string')!; const toDateSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_datetime')!; const toBooleanSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_boolean')!; @@ -1019,10 +1028,12 @@ const toCartesianShapeSignature = evalFunctionDefinitions.find( )!; const toVersionSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_version')!; +// We don't have full list for long, unsigned_long, etc. const nestedFunctions: Record = { - number: prepareNestedFunction(toInteger), - string: prepareNestedFunction(toStringSignature), - date: prepareNestedFunction(toDateSignature), + double: prepareNestedFunction(toDoubleSignature), + integer: prepareNestedFunction(toInteger), + text: prepareNestedFunction(toStringSignature), + keyword: prepareNestedFunction(toStringSignature), boolean: prepareNestedFunction(toBooleanSignature), ip: prepareNestedFunction(toIpSignature), version: prepareNestedFunction(toVersionSignature), @@ -1030,6 +1041,8 @@ const nestedFunctions: Record = { geo_shape: prepareNestedFunction(toGeoShapeSignature), cartesian_point: prepareNestedFunction(toCartesianPointSignature), cartesian_shape: prepareNestedFunction(toCartesianShapeSignature), + // @ts-expect-error + datetime: prepareNestedFunction(toDateSignature), }; function getFieldName( @@ -1086,6 +1099,7 @@ function getFieldMapping( number: '5', date: 'now()', }; + return params.map(({ name: _name, type, constantOnly, literalOptions, ...rest }) => { const typeString: string = type; if (isSupportedFieldType(typeString)) { @@ -1124,7 +1138,7 @@ function getFieldMapping( ...rest, }; } - return { name: 'stringField', type, ...rest }; + return { name: 'textField', type, ...rest }; }); } @@ -1225,8 +1239,12 @@ function generateIncorrectlyTypedParameters( } const fieldName = wrongFieldMapping[i].name; if ( - fieldName === 'numberField' && - signatures.every((signature) => getParamAtPosition(signature, i)?.type !== 'string') + fieldName === 'doubleField' && + signatures.every( + (signature) => + getParamAtPosition(signature, i)?.type !== 'keyword' || + getParamAtPosition(signature, i)?.type !== 'text' + ) ) { return; } diff --git a/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts index f3c159247e260..5f24d86e718bc 100644 --- a/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts +++ b/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts @@ -11,14 +11,14 @@ import { supportedFieldTypes } from '../definitions/types'; export const fields = [ ...supportedFieldTypes.map((type) => ({ name: `${camelCase(type)}Field`, type })), - { name: 'any#Char$Field', type: 'number' }, - { name: 'kubernetes.something.something', type: 'number' }, + { name: 'any#Char$Field', type: 'double' }, + { name: 'kubernetes.something.something', type: 'double' }, { name: '@timestamp', type: 'date' }, ]; export const enrichFields = [ - { name: 'otherField', type: 'string' }, - { name: 'yetAnotherField', type: 'number' }, + { name: 'otherField', type: 'text' }, + { name: 'yetAnotherField', type: 'double' }, ]; // eslint-disable-next-line @typescript-eslint/naming-convention @@ -58,7 +58,7 @@ export function getCallbackMocks() { return unsupported_field; } if (/dissect|grok/.test(query)) { - return [{ name: 'firstWord', type: 'string' }]; + return [{ name: 'firstWord', type: 'text' }]; } return fields; }), diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/autocomplete.command.stats.test.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/autocomplete.command.stats.test.ts index 58d4698974089..88fd654a83453 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/autocomplete.command.stats.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/autocomplete.command.stats.test.ts @@ -6,8 +6,11 @@ * Side Public License, v 1. */ +import { ESQL_COMMON_NUMERIC_TYPES, ESQL_NUMBER_TYPES } from '../../shared/esql_types'; import { setup, getFunctionSignaturesByReturnType, getFieldNamesByType } from './helpers'; +const ESQL_NUMERIC_TYPES = ESQL_NUMBER_TYPES as unknown as string[]; + const allAggFunctions = getFunctionSignaturesByReturnType('stats', 'any', { agg: true, }); @@ -74,51 +77,76 @@ describe('autocomplete.suggest', () => { const { assertSuggestions } = await setup(); await assertSuggestions('from a | stats by bucket(/', [ - ...getFieldNamesByType(['number', 'date']).map((field) => `${field},`), - ...getFunctionSignaturesByReturnType('eval', ['date', 'number'], { scalar: true }).map( - (s) => ({ ...s, text: `${s.text},` }) + ...getFieldNamesByType([...ESQL_COMMON_NUMERIC_TYPES, 'date']).map( + (field) => `${field},` ), + ...getFunctionSignaturesByReturnType('eval', ['date', ...ESQL_COMMON_NUMERIC_TYPES], { + scalar: true, + }).map((s) => ({ ...s, text: `${s.text},` })), ]); await assertSuggestions('from a | stats round(/', [ - ...getFunctionSignaturesByReturnType('stats', 'number', { agg: true, grouping: true }), - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ - 'round', - ]), + ...getFunctionSignaturesByReturnType('stats', ESQL_NUMERIC_TYPES, { + agg: true, + grouping: true, + }), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'eval', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['round'] + ), ]); await assertSuggestions('from a | stats round(round(/', [ - ...getFunctionSignaturesByReturnType('stats', 'number', { agg: true }), - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ - 'round', - ]), + ...getFunctionSignaturesByReturnType('stats', ESQL_NUMERIC_TYPES, { agg: true }), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'eval', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['round'] + ), ]); await assertSuggestions('from a | stats avg(round(/', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ - 'round', - ]), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'eval', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['round'] + ), ]); await assertSuggestions('from a | stats avg(/', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType('eval', ESQL_NUMERIC_TYPES, { scalar: true }), ]); await assertSuggestions('from a | stats round(avg(/', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ - 'round', - ]), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'eval', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['round'] + ), ]); }); test('when typing inside function left paren', async () => { const { assertSuggestions } = await setup(); const expected = [ - ...getFieldNamesByType(['number', 'date', 'boolean', 'ip']), - ...getFunctionSignaturesByReturnType('stats', ['number', 'date', 'boolean', 'ip'], { - scalar: true, - }), + ...getFieldNamesByType([...ESQL_COMMON_NUMERIC_TYPES, 'date', 'boolean', 'ip']), + ...getFunctionSignaturesByReturnType( + 'stats', + [...ESQL_COMMON_NUMERIC_TYPES, 'date', 'boolean', 'ip'], + { + scalar: true, + } + ), ]; await assertSuggestions('from a | stats a=min(/)', expected); @@ -130,8 +158,14 @@ describe('autocomplete.suggest', () => { const { assertSuggestions } = await setup(); await assertSuggestions('from a | stats avg(b/) by stringField', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }), + ...getFieldNamesByType('double'), + ...getFunctionSignaturesByReturnType( + 'eval', + ['double', 'integer', 'long', 'unsigned_long'], + { + scalar: true, + } + ), ]); }); @@ -205,10 +239,15 @@ describe('autocomplete.suggest', () => { test('on space before expression right hand side operand', async () => { const { assertSuggestions } = await setup(); - await assertSuggestions('from a | stats avg(b) by numberField % /', [ - ...getFieldNamesByType('number'), + await assertSuggestions('from a | stats avg(b) by integerField % /', [ + ...getFieldNamesByType('integer'), + ...getFieldNamesByType('double'), + ...getFieldNamesByType('long'), '`avg(b)`', - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }), + ...getFunctionSignaturesByReturnType('eval', ['integer', 'double', 'long'], { + scalar: true, + }), + ...allGroupingFunctions, ]); await assertSuggestions('from a | stats avg(b) by var0 = /', [ @@ -226,10 +265,10 @@ describe('autocomplete.suggest', () => { test('on space after expression right hand side operand', async () => { const { assertSuggestions } = await setup(); - await assertSuggestions('from a | stats avg(b) by numberField % 2 /', [',', '|']); + await assertSuggestions('from a | stats avg(b) by doubleField % 2 /', [',', '|']); await assertSuggestions( - 'from a | stats var0 = AVG(products.base_price) BY var1 = BUCKET(order_date, 1 day)/', + 'from a | stats var0 = AVG(doubleField) BY var1 = BUCKET(dateField, 1 day)/', [',', '|', '+ $0', '- $0'] ); }); diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/helpers.ts index 3d9ed7058a4a8..6600ffdbaf1d8 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/helpers.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/helpers.ts @@ -41,7 +41,7 @@ export const triggerCharacters = [',', '(', '=', ' ']; export const fields: Array<{ name: string; type: string; suggestedAs?: string }> = [ ...[ 'string', - 'number', + 'double', 'date', 'boolean', 'ip', @@ -53,8 +53,8 @@ export const fields: Array<{ name: string; type: string; suggestedAs?: string }> name: `${camelCase(type)}Field`, type, })), - { name: 'any#Char$Field', type: 'number', suggestedAs: '`any#Char$Field`' }, - { name: 'kubernetes.something.something', type: 'number' }, + { name: 'any#Char$Field', type: 'double', suggestedAs: '`any#Char$Field`' }, + { name: 'kubernetes.something.something', type: 'double' }, ]; export const indexes = ( 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 d4ad5157d979a..d9c958b5bd4f7 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts @@ -10,15 +10,10 @@ import { suggest } from './autocomplete'; import { evalFunctionDefinitions } from '../definitions/functions'; import { timeUnitsToSuggest } from '../definitions/literals'; import { commandDefinitions } from '../definitions/commands'; -import { - getSafeInsertText, - getUnitDuration, - TRIGGER_SUGGESTION_COMMAND, - TIME_SYSTEM_PARAMS, -} from './factories'; +import { getSafeInsertText, getUnitDuration, TRIGGER_SUGGESTION_COMMAND } from './factories'; import { camelCase, partition } from 'lodash'; import { getAstAndSyntaxErrors } from '@kbn/esql-ast'; -import { FunctionParameter } from '../definitions/types'; +import { FunctionParameter, FunctionReturnType } from '../definitions/types'; import { getParamAtPosition } from './helper'; import { nonNullable } from '../shared/helpers'; import { @@ -31,9 +26,16 @@ import { createCompletionContext, getPolicyFields, PartialSuggestionWithText, - TIME_PICKER_SUGGESTION, } from './__tests__/helpers'; import { METADATA_FIELDS } from '../shared/constants'; +import { + ESQL_COMMON_NUMERIC_TYPES as UNCASTED_ESQL_COMMON_NUMERIC_TYPES, + ESQL_NUMBER_TYPES, +} from '../shared/esql_types'; + +const ESQL_NUMERIC_TYPES = ESQL_NUMBER_TYPES as unknown as string[]; +const ESQL_COMMON_NUMERIC_TYPES = + UNCASTED_ESQL_COMMON_NUMERIC_TYPES as unknown as FunctionReturnType[]; describe('autocomplete', () => { type TestArgs = [ @@ -166,25 +168,18 @@ describe('autocomplete', () => { ['string'] ), ]); - testSuggestions('from a | where stringField >= ', [ - ...getFieldNamesByType('string'), - ...getFunctionSignaturesByReturnType('where', 'string', { scalar: true }), + testSuggestions('from a | where textField >= ', [ + ...getFieldNamesByType('any'), + ...getFunctionSignaturesByReturnType('where', ['any'], { scalar: true }), ]); // Skip these tests until the insensitive case equality gets restored back testSuggestions.skip('from a | where stringField =~ ', [ ...getFieldNamesByType('string'), ...getFunctionSignaturesByReturnType('where', 'string', { scalar: true }), ]); - testSuggestions('from a | where stringField >= stringField ', [ - '|', - ...getFunctionSignaturesByReturnType( - 'where', - 'boolean', - { - builtin: true, - }, - ['boolean'] - ), + testSuggestions('from a | where textField >= textField', [ + ...getFieldNamesByType('any'), + ...getFunctionSignaturesByReturnType('where', 'any', { scalar: true }), ]); testSuggestions.skip('from a | where stringField =~ stringField ', [ '|', @@ -202,52 +197,60 @@ describe('autocomplete', () => { ...getFieldNamesByType('any'), ...getFunctionSignaturesByReturnType('where', 'any', { scalar: true }), ]); - testSuggestions(`from a | where stringField >= stringField ${op} numberField `, [ - ...getFunctionSignaturesByReturnType('where', 'boolean', { builtin: true }, ['number']), + testSuggestions(`from a | where stringField >= stringField ${op} doubleField `, [ + ...getFunctionSignaturesByReturnType('where', 'boolean', { builtin: true }, ['double']), ]); - testSuggestions(`from a | where stringField >= stringField ${op} numberField == `, [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('where', 'number', { scalar: true }), + testSuggestions(`from a | where stringField >= stringField ${op} doubleField == `, [ + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType('where', ESQL_COMMON_NUMERIC_TYPES, { scalar: true }), ]); } - testSuggestions('from a | stats a=avg(numberField) | where a ', [ + testSuggestions('from a | stats a=avg(doubleField) | where a ', [ ...getFunctionSignaturesByReturnType('where', 'any', { builtin: true, skipAssign: true }, [ - 'number', + 'double', ]), ]); // Mind this test: suggestion is aware of previous commands when checking for fields - // in this case the numberField has been wiped by the STATS command and suggest cannot find it's type + // in this case the doubleField has been wiped by the STATS command and suggest cannot find it's type // @TODO: verify this is the correct behaviour in this case or if we want a "generic" suggestion anyway testSuggestions( - 'from a | stats a=avg(numberField) | where numberField ', + 'from a | stats a=avg(doubleField) | where doubleField ', [], undefined, undefined, // make the fields suggest aware of the previous STATS, leave the other callbacks untouched - [[{ name: 'a', type: 'number' }], undefined, undefined] + [[{ name: 'a', type: 'double' }], undefined, undefined] ); // The editor automatically inject the final bracket, so it is not useful to test with just open bracket testSuggestions( 'from a | where log10()', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('where', 'number', { scalar: true }, undefined, [ - 'log10', - ]), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'where', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['log10'] + ), ], '(' ); - testSuggestions('from a | where log10(numberField) ', [ - ...getFunctionSignaturesByReturnType('where', 'number', { builtin: true }, ['number']), - ...getFunctionSignaturesByReturnType('where', 'boolean', { builtin: true }, ['number']), + testSuggestions('from a | where log10(doubleField) ', [ + ...getFunctionSignaturesByReturnType('where', 'double', { builtin: true }, ['double']), + ...getFunctionSignaturesByReturnType('where', 'boolean', { builtin: true }, ['double']), ]); testSuggestions( - 'from a | WHERE pow(numberField, )', + 'from a | WHERE pow(doubleField, )', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('where', 'number', { scalar: true }, undefined, [ - 'pow', - ]), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'where', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['pow'] + ), ], ',' ); @@ -258,34 +261,34 @@ describe('autocomplete', () => { ...getFieldNamesByType('boolean'), ...getFunctionSignaturesByReturnType('eval', 'boolean', { scalar: true }), ]); - testSuggestions('from index | WHERE numberField in ', ['( $0 )']); - testSuggestions('from index | WHERE numberField not in ', ['( $0 )']); + testSuggestions('from index | WHERE doubleField in ', ['( $0 )']); + testSuggestions('from index | WHERE doubleField not in ', ['( $0 )']); testSuggestions( - 'from index | WHERE numberField not in ( )', + 'from index | WHERE doubleField not in ( )', [ - ...getFieldNamesByType('number').filter((name) => name !== 'numberField'), - ...getFunctionSignaturesByReturnType('where', 'number', { scalar: true }), + ...getFieldNamesByType('double').filter((name) => name !== 'doubleField'), + ...getFunctionSignaturesByReturnType('where', 'double', { scalar: true }), ], '(' ); testSuggestions( - 'from index | WHERE numberField in ( `any#Char$Field`, )', + 'from index | WHERE doubleField in ( `any#Char$Field`, )', [ - ...getFieldNamesByType('number').filter( - (name) => name !== '`any#Char$Field`' && name !== 'numberField' + ...getFieldNamesByType('double').filter( + (name) => name !== '`any#Char$Field`' && name !== 'doubleField' ), - ...getFunctionSignaturesByReturnType('where', 'number', { scalar: true }), + ...getFunctionSignaturesByReturnType('where', 'double', { scalar: true }), ], undefined, 54 // after the first suggestions ); testSuggestions( - 'from index | WHERE numberField not in ( `any#Char$Field`, )', + 'from index | WHERE doubleField not in ( `any#Char$Field`, )', [ - ...getFieldNamesByType('number').filter( - (name) => name !== '`any#Char$Field`' && name !== 'numberField' + ...getFieldNamesByType('double').filter( + (name) => name !== '`any#Char$Field`' && name !== 'doubleField' ), - ...getFunctionSignaturesByReturnType('where', 'number', { scalar: true }), + ...getFunctionSignaturesByReturnType('where', 'double', { scalar: true }), ], undefined, 58 // after the first suggestions @@ -377,14 +380,14 @@ describe('autocomplete', () => { ); testSuggestions( - `from a_index | eval round(numberField) + 1 | eval \`round(numberField) + 1\` + 1 | eval \`\`\`round(numberField) + 1\`\` + 1\` + 1 | eval \`\`\`\`\`\`\`round(numberField) + 1\`\`\`\` + 1\`\` + 1\` + 1 | eval \`\`\`\`\`\`\`\`\`\`\`\`\`\`\`round(numberField) + 1\`\`\`\`\`\`\`\` + 1\`\`\`\` + 1\`\` + 1\` + 1 | ${command} `, + `from a_index | eval round(doubleField) + 1 | eval \`round(doubleField) + 1\` + 1 | eval \`\`\`round(doubleField) + 1\`\` + 1\` + 1 | eval \`\`\`\`\`\`\`round(doubleField) + 1\`\`\`\` + 1\`\` + 1\` + 1 | eval \`\`\`\`\`\`\`\`\`\`\`\`\`\`\`round(doubleField) + 1\`\`\`\`\`\`\`\` + 1\`\`\`\` + 1\`\` + 1\` + 1 | ${command} `, [ ...getFieldNamesByType('any'), - '`round(numberField) + 1`', - '```round(numberField) + 1`` + 1`', - '```````round(numberField) + 1```` + 1`` + 1`', - '```````````````round(numberField) + 1```````` + 1```` + 1`` + 1`', - '```````````````````````````````round(numberField) + 1```````````````` + 1```````` + 1```` + 1`` + 1`', + '`round(doubleField) + 1`', + '```round(doubleField) + 1`` + 1`', + '```````round(doubleField) + 1```` + 1`` + 1`', + '```````````````round(doubleField) + 1```````` + 1```` + 1`` + 1`', + '```````````````````````````````round(doubleField) + 1```````````````` + 1```````` + 1```` + 1`` + 1`', ] ); }); @@ -413,7 +416,7 @@ describe('autocomplete', () => { testSuggestions(`from a ${prevCommand}| enrich policy `, ['ON $0', 'WITH $0', '|']); testSuggestions(`from a ${prevCommand}| enrich policy on `, [ 'stringField', - 'numberField', + 'doubleField', 'dateField', 'booleanField', 'ipField', @@ -466,25 +469,25 @@ describe('autocomplete', () => { ...getFieldNamesByType('any'), ...getFunctionSignaturesByReturnType('eval', 'any', { scalar: true }), ]); - testSuggestions('from a | eval numberField ', [ + testSuggestions('from a | eval doubleField ', [ ...getFunctionSignaturesByReturnType('eval', 'any', { builtin: true, skipAssign: true }, [ - 'number', + 'double', ]), ',', '|', ]); testSuggestions('from index | EVAL stringField not ', ['LIKE $0', 'RLIKE $0', 'IN $0']); testSuggestions('from index | EVAL stringField NOT ', ['LIKE $0', 'RLIKE $0', 'IN $0']); - testSuggestions('from index | EVAL numberField in ', ['( $0 )']); + testSuggestions('from index | EVAL doubleField in ', ['( $0 )']); testSuggestions( - 'from index | EVAL numberField in ( )', + 'from index | EVAL doubleField in ( )', [ - ...getFieldNamesByType('number').filter((name) => name !== 'numberField'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }), + ...getFieldNamesByType('double').filter((name) => name !== 'doubleField'), + ...getFunctionSignaturesByReturnType('eval', 'double', { scalar: true }), ], '(' ); - testSuggestions('from index | EVAL numberField not in ', ['( $0 )']); + testSuggestions('from index | EVAL doubleField not in ', ['( $0 )']); testSuggestions('from index | EVAL not ', [ ...getFieldNamesByType('boolean'), ...getFunctionSignaturesByReturnType('eval', 'boolean', { scalar: true }), @@ -492,10 +495,10 @@ describe('autocomplete', () => { testSuggestions('from a | eval a=', [ ...getFunctionSignaturesByReturnType('eval', 'any', { scalar: true }), ]); - testSuggestions('from a | eval a=abs(numberField), b= ', [ + testSuggestions('from a | eval a=abs(doubleField), b= ', [ ...getFunctionSignaturesByReturnType('eval', 'any', { scalar: true }), ]); - testSuggestions('from a | eval a=numberField, ', [ + testSuggestions('from a | eval a=doubleField, ', [ 'var0 =', ...getFieldNamesByType('any'), 'a', @@ -509,10 +512,14 @@ describe('autocomplete', () => { testSuggestions( 'from a | eval a=round()', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ - 'round', - ]), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'eval', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['round'] + ), ], '(' ); @@ -539,64 +546,59 @@ describe('autocomplete', () => { [], ' ' ); - testSuggestions('from a | eval a=round(numberField) ', [ + testSuggestions('from a | eval a=round(doubleField) ', [ ',', '|', ...getFunctionSignaturesByReturnType('eval', 'any', { builtin: true, skipAssign: true }, [ - 'number', + 'double', ]), ]); testSuggestions( - 'from a | eval a=round(numberField, ', + 'from a | eval a=round(doubleField, ', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ + ...getFieldNamesByType('integer'), + ...getFunctionSignaturesByReturnType('eval', 'integer', { scalar: true }, undefined, [ 'round', ]), ], ' ' ); testSuggestions( - 'from a | eval round(numberField, ', + 'from a | eval round(doubleField, ', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ + ...getFunctionSignaturesByReturnType('eval', 'integer', { scalar: true }, undefined, [ 'round', ]), ], ' ' ); - testSuggestions('from a | eval a=round(numberField),', [ + testSuggestions('from a | eval a=round(doubleField),', [ 'var0 =', ...getFieldNamesByType('any'), 'a', ...getFunctionSignaturesByReturnType('eval', 'any', { scalar: true }), ]); - testSuggestions('from a | eval a=round(numberField) + ', [ - ...getFieldNamesByType('number'), - 'a', // @TODO remove this - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }), + testSuggestions('from a | eval a=round(doubleField) + ', [ + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType('eval', ESQL_COMMON_NUMERIC_TYPES, { scalar: true }), ]); - testSuggestions('from a | eval a=round(numberField)+ ', [ - ...getFieldNamesByType('number'), - 'a', // @TODO remove this - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }), + testSuggestions('from a | eval a=round(doubleField)+ ', [ + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType('eval', ESQL_COMMON_NUMERIC_TYPES, { scalar: true }), ]); - testSuggestions('from a | eval a=numberField+ ', [ - ...getFieldNamesByType('number'), - 'a', // @TODO remove this - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }), + testSuggestions('from a | eval a=doubleField+ ', [ + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType('eval', ESQL_COMMON_NUMERIC_TYPES, { scalar: true }), ]); testSuggestions('from a | eval a=`any#Char$Field`+ ', [ - ...getFieldNamesByType('number'), - 'a', // @TODO remove this - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType('eval', ESQL_COMMON_NUMERIC_TYPES, { scalar: true }), ]); testSuggestions( - 'from a | stats avg(numberField) by stringField | eval ', + 'from a | stats avg(doubleField) by stringField | eval ', [ 'var0 =', - '`avg(numberField)`', + '`avg(doubleField)`', ...getFunctionSignaturesByReturnType('eval', 'any', { scalar: true }), ], ' ', @@ -605,32 +607,32 @@ describe('autocomplete', () => { [[], undefined, undefined] ); testSuggestions( - 'from a | eval abs(numberField) + 1 | eval ', + 'from a | eval abs(doubleField) + 1 | eval ', [ 'var0 =', ...getFieldNamesByType('any'), - '`abs(numberField) + 1`', + '`abs(doubleField) + 1`', ...getFunctionSignaturesByReturnType('eval', 'any', { scalar: true }), ], ' ' ); testSuggestions( - 'from a | stats avg(numberField) by stringField | eval ', + 'from a | stats avg(doubleField) by stringField | eval ', [ 'var0 =', - '`avg(numberField)`', + '`avg(doubleField)`', ...getFunctionSignaturesByReturnType('eval', 'any', { scalar: true }), ], ' ', undefined, // make aware EVAL of the previous STATS command with the buggy field name from expression - [[{ name: 'avg_numberField_', type: 'number' }], undefined, undefined] + [[{ name: 'avg_doubleField_', type: 'double' }], undefined, undefined] ); testSuggestions( - 'from a | stats avg(numberField), avg(kubernetes.something.something) by stringField | eval ', + 'from a | stats avg(doubleField), avg(kubernetes.something.something) by stringField | eval ', [ 'var0 =', - '`avg(numberField)`', + '`avg(doubleField)`', '`avg(kubernetes.something.something)`', ...getFunctionSignaturesByReturnType('eval', 'any', { scalar: true }), ], @@ -639,48 +641,64 @@ describe('autocomplete', () => { // make aware EVAL of the previous STATS command with the buggy field name from expression [ [ - { name: 'avg_numberField_', type: 'number' }, - { name: 'avg_kubernetes.something.something_', type: 'number' }, + { name: 'avg_doubleField_', type: 'double' }, + { name: 'avg_kubernetes.something.something_', type: 'double' }, ], undefined, undefined, ] ); testSuggestions( - 'from a | eval a=round(numberField), b=round()', + 'from a | eval a=round(doubleField), b=round()', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ - 'round', - ]), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'eval', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['round'] + ), ], '(' ); // test that comma is correctly added to the suggestions if minParams is not reached yet testSuggestions('from a | eval a=concat( ', [ - ...getFieldNamesByType('string').map((v) => `${v},`), - ...getFunctionSignaturesByReturnType('eval', 'string', { scalar: true }, undefined, [ - 'concat', - ]).map((v) => ({ ...v, text: `${v.text},` })), + ...getFieldNamesByType(['text', 'keyword']).map((v) => `${v},`), + ...getFunctionSignaturesByReturnType( + 'eval', + ['text', 'keyword'], + { scalar: true }, + undefined, + ['concat'] + ).map((v) => ({ ...v, text: `${v.text},` })), ]); testSuggestions( - 'from a | eval a=concat(stringField, ', + 'from a | eval a=concat(textField, ', [ - ...getFieldNamesByType('string'), - ...getFunctionSignaturesByReturnType('eval', 'string', { scalar: true }, undefined, [ - 'concat', - ]), + ...getFieldNamesByType(['text', 'keyword']), + ...getFunctionSignaturesByReturnType( + 'eval', + ['text', 'keyword'], + { scalar: true }, + undefined, + ['concat'] + ), ], ' ' ); // test that the arg type is correct after minParams testSuggestions( - 'from a | eval a=cidr_match(ipField, stringField, ', + 'from a | eval a=cidr_match(ipField, textField, ', [ - ...getFieldNamesByType('string'), - ...getFunctionSignaturesByReturnType('eval', 'string', { scalar: true }, undefined, [ - 'cidr_match', - ]), + ...getFieldNamesByType('text'), + ...getFunctionSignaturesByReturnType( + 'eval', + ['text', 'keyword'], + { scalar: true }, + undefined, + ['cidr_match'] + ), ], ' ' ); @@ -694,10 +712,14 @@ describe('autocomplete', () => { testSuggestions( 'from a | eval a=cidr_match(ipField, ', [ - ...getFieldNamesByType('string'), - ...getFunctionSignaturesByReturnType('eval', 'string', { scalar: true }, undefined, [ - 'cidr_match', - ]), + ...getFieldNamesByType(['text', 'keyword']), + ...getFunctionSignaturesByReturnType( + 'eval', + ['text', 'keyword'], + { scalar: true }, + undefined, + ['cidr_match'] + ), ], ' ' ); @@ -709,10 +731,14 @@ describe('autocomplete', () => { testSuggestions( `from a | eval a=${Array(nesting).fill('round(').join('')}`, [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ - 'round', - ]), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'eval', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['round'] + ), ], '(' ); @@ -720,12 +746,12 @@ describe('autocomplete', () => { // Smoke testing for suggestions in previous position than the end of the statement testSuggestions( - 'from a | eval var0 = abs(numberField) | eval abs(var0)', + 'from a | eval var0 = abs(doubleField) | eval abs(var0)', [ ',', '|', ...getFunctionSignaturesByReturnType('eval', 'any', { builtin: true, skipAssign: true }, [ - 'number', + 'double', ]), ], undefined, @@ -734,10 +760,14 @@ describe('autocomplete', () => { testSuggestions( 'from a | eval var0 = abs(b) | eval abs(var0)', [ - ...getFieldNamesByType('number'), - ...getFunctionSignaturesByReturnType('eval', 'number', { scalar: true }, undefined, [ - 'abs', - ]), + ...getFieldNamesByType(ESQL_NUMERIC_TYPES), + ...getFunctionSignaturesByReturnType( + 'eval', + ESQL_NUMERIC_TYPES, + { scalar: true }, + undefined, + ['abs'] + ), ], undefined, 26 /* b column in abs */ @@ -746,7 +776,7 @@ describe('autocomplete', () => { // Test suggestions for each possible param, within each signature variation, for each function for (const fn of evalFunctionDefinitions) { // skip this fn for the moment as it's quite hard to test - if (fn.name !== 'bucket') { + if (!['bucket', 'date_extract', 'date_diff'].includes(fn.name)) { for (const signature of fn.signatures) { signature.params.forEach((param, i) => { if (i < signature.params.length) { @@ -822,6 +852,23 @@ describe('autocomplete', () => { }); } } + + // The above test fails cause it expects nested functions like + // DATE_EXTRACT(concat("aligned_day_","of_week_in_month"), date) to also be suggested + // which is actually valid according to func signature + // but currently, our autocomplete only suggests the literal suggestions + if (['date_extract', 'date_diff'].includes(fn.name)) { + const firstParam = fn.signatures[0].params[0]; + const suggestedConstants = firstParam?.literalSuggestions || firstParam?.literalOptions; + const requiresMoreArgs = true; + + testSuggestions( + `from a | eval ${fn.name}(`, + suggestedConstants?.length + ? [...suggestedConstants.map((option) => `"${option}"${requiresMoreArgs ? ',' : ''}`)] + : [] + ); + } } testSuggestions('from a | eval var0 = bucket(@timestamp, ', getUnitDuration(1), ' '); @@ -836,7 +883,7 @@ describe('autocomplete', () => { ',', '|', ...getFunctionSignaturesByReturnType('eval', 'any', { builtin: true, skipAssign: true }, [ - 'number', + 'integer', ]), ], ' ' @@ -848,39 +895,20 @@ describe('autocomplete', () => { 'time_interval', ]), ]); - testSuggestions( - 'from a | eval a = 1 day + 2 ', - [ - ...dateSuggestions, - ',', - '|', - ...getFunctionSignaturesByReturnType('eval', 'any', { builtin: true, skipAssign: true }, [ - 'number', - ]), - ], - ' ' - ); + testSuggestions('from a | eval a = 1 day + 2 ', [',', '|']); testSuggestions( 'from a | eval 1 day + 2 ', [ ...dateSuggestions, ...getFunctionSignaturesByReturnType('eval', 'any', { builtin: true, skipAssign: true }, [ - 'number', + 'integer', ]), ], ' ' ); testSuggestions( 'from a | eval var0=date_trunc()', - [ - ...[...TIME_SYSTEM_PARAMS].map((t) => `${t},`), - ...getLiteralsByType('time_literal').map((t) => `${t},`), - ...getFunctionSignaturesByReturnType('eval', 'date', { scalar: true }, undefined, [ - 'date_trunc', - ]).map((t) => ({ ...t, text: `${t.text},` })), - ...getFieldNamesByType('date').map((t) => `${t},`), - TIME_PICKER_SUGGESTION, - ], + [...getLiteralsByType('time_literal').map((t) => `${t},`)], '(' ); testSuggestions( @@ -917,7 +945,7 @@ describe('autocomplete', () => { describe('callbacks', () => { it('should send the fields query without the last command', async () => { const callbackMocks = createCustomCallbackMocks(undefined, undefined, undefined); - const statement = 'from a | drop stringField | eval var0 = abs(numberField) '; + const statement = 'from a | drop stringField | eval var0 = abs(doubleField) '; const triggerOffset = statement.lastIndexOf(' '); const context = createCompletionContext(statement[triggerOffset]); await suggest( @@ -933,7 +961,7 @@ describe('autocomplete', () => { }); it('should send the fields query aware of the location', async () => { const callbackMocks = createCustomCallbackMocks(undefined, undefined, undefined); - const statement = 'from a | drop | eval var0 = abs(numberField) '; + const statement = 'from a | drop | eval var0 = abs(doubleField) '; const triggerOffset = statement.lastIndexOf('p') + 1; // drop const context = createCompletionContext(statement[triggerOffset]); await suggest( @@ -1025,10 +1053,13 @@ describe('autocomplete', () => { testSuggestions( 'FROM kibana_sample_data_logs | EVAL TRIM(e)', [ - ...getFieldNamesByType('string'), - ...getFunctionSignaturesByReturnType('eval', 'string', { scalar: true }, undefined, [ - 'trim', - ]), + ...getFunctionSignaturesByReturnType( + 'eval', + ['text', 'keyword'], + { scalar: true }, + undefined, + ['trim'] + ), ], undefined, 42 diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts index 42e82662e7110..d2d617aac4315 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts @@ -16,6 +16,7 @@ import type { ESQLSingleAstItem, } from '@kbn/esql-ast'; import { partition } from 'lodash'; +import { ESQL_NUMBER_TYPES, isNumericType } from '../shared/esql_types'; import type { EditorContext, SuggestionRawDefinition } from './types'; import { lookupColumn, @@ -88,6 +89,7 @@ import { getParamAtPosition, getQueryForFields, getSourcesFromCommands, + getSupportedTypesForBinaryOperators, isAggFunctionUsedAlready, removeQuoteForSuggestedSources, } from './helper'; @@ -124,7 +126,7 @@ function appendEnrichFields( // @TODO: improve this const newMap: Map = new Map(fieldsMap); for (const field of policyMetadata.enrichFields) { - newMap.set(field, { name: field, type: 'number' }); + newMap.set(field, { name: field, type: 'double' }); } return newMap; } @@ -732,7 +734,7 @@ async function getExpressionSuggestionsByType( workoutBuiltinOptions(rightArg, references) ) ); - if (nodeArgType === 'number' && isLiteralItem(rightArg)) { + if (isNumericType(nodeArgType) && isLiteralItem(rightArg)) { // ... EVAL var = 1 suggestions.push(...getCompatibleLiterals(command.name, ['time_literal_unit'])); } @@ -740,7 +742,7 @@ async function getExpressionSuggestionsByType( if (rightArg.args.some(isTimeIntervalItem)) { const lastFnArg = rightArg.args[rightArg.args.length - 1]; const lastFnArgType = extractFinalTypeFromArg(lastFnArg, references); - if (lastFnArgType === 'number' && isLiteralItem(lastFnArg)) + if (isNumericType(lastFnArgType) && isLiteralItem(lastFnArg)) // ... EVAL var = 1 year + 2 suggestions.push(...getCompatibleLiterals(command.name, ['time_literal_unit'])); } @@ -777,7 +779,7 @@ async function getExpressionSuggestionsByType( if (nodeArg.args.some(isTimeIntervalItem)) { const lastFnArg = nodeArg.args[nodeArg.args.length - 1]; const lastFnArgType = extractFinalTypeFromArg(lastFnArg, references); - if (lastFnArgType === 'number' && isLiteralItem(lastFnArg)) + if (isNumericType(lastFnArgType) && isLiteralItem(lastFnArg)) // ... EVAL var = 1 year + 2 suggestions.push(...getCompatibleLiterals(command.name, ['time_literal_unit'])); } @@ -793,7 +795,10 @@ async function getExpressionSuggestionsByType( suggestions.push(...buildConstantsDefinitions(argDef.values)); } // If the type is specified try to dig deeper in the definition to suggest the best candidate - if (['string', 'number', 'boolean'].includes(argDef.type) && !argDef.values) { + if ( + ['string', 'text', 'keyword', 'boolean', ...ESQL_NUMBER_TYPES].includes(argDef.type) && + !argDef.values + ) { // it can be just literal values (i.e. "string") if (argDef.constantOnly) { // ... | ... @@ -971,6 +976,7 @@ async function getBuiltinFunctionNextArgument( ) { const suggestions = []; const isFnComplete = isFunctionArgComplete(nodeArg, references); + if (isFnComplete.complete) { // i.e. ... | field > 0 // i.e. ... | field + otherN @@ -1001,17 +1007,16 @@ async function getBuiltinFunctionNextArgument( suggestions.push(listCompleteItem); } else { const finalType = nestedType || nodeArgType || 'any'; + const supportedTypes = getSupportedTypesForBinaryOperators(fnDef, finalType); suggestions.push( ...(await getFieldsOrFunctionsSuggestions( // this is a special case with AND/OR // expression AND/OR // technically another boolean value should be suggested, but it is a better experience // to actually suggest a wider set of fields/functions - [ - finalType === 'boolean' && getFunctionDefinition(nodeArg.name)?.type === 'builtin' - ? 'any' - : finalType, - ], + finalType === 'boolean' && getFunctionDefinition(nodeArg.name)?.type === 'builtin' + ? ['any'] + : supportedTypes, command.name, option?.name, getFieldsByType, @@ -1321,7 +1326,7 @@ async function getFunctionArgsSuggestions( // for eval and row commands try also to complete numeric literals with time intervals where possible if (arg) { if (command.name !== 'stats') { - if (isLiteralItem(arg) && arg.literalType === 'number') { + if (isLiteralItem(arg) && isNumericType(arg.literalType)) { // ... | EVAL fn(2 ) suggestions.push( ...(await getFieldsOrFunctionsSuggestions( diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts index f54511c8e304d..cb56f40a6d6f4 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts @@ -22,7 +22,8 @@ import { import { shouldBeQuotedSource, getCommandDefinition, shouldBeQuotedText } from '../shared/helpers'; import { buildDocumentation, buildFunctionDocumentation } from './documentation_util'; import { DOUBLE_BACKTICK, SINGLE_TICK_REGEX } from '../shared/constants'; -import type { ESQLRealField } from '../validation/types'; +import { ESQLRealField } from '../validation/types'; +import { isNumericType } from '../shared/esql_types'; const allFunctions = statsAggregationFunctionDefinitions .concat(evalFunctionDefinitions) @@ -359,7 +360,7 @@ export function getUnitDuration(unit: number = 1) { */ export function getCompatibleLiterals(commandName: string, types: string[], names?: string[]) { const suggestions: SuggestionRawDefinition[] = []; - if (types.includes('number')) { + if (types.some(isNumericType)) { if (commandName === 'limit') { // suggest 10/100/1000 for limit suggestions.push(...buildConstantsDefinitions(['10', '100', '1000'], '')); diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts index f9586670b29e6..65f6601c51c13 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts @@ -80,3 +80,15 @@ export function removeQuoteForSuggestedSources(suggestions: SuggestionRawDefinit text: d.text.startsWith('"') && d.text.endsWith('"') ? d.text.slice(1, -1) : d.text, })); } + +export function getSupportedTypesForBinaryOperators( + fnDef: FunctionDefinition | undefined, + previousType: string +) { + // Retrieve list of all 'right' supported types that match the left hand side of the function + return fnDef && Array.isArray(fnDef?.signatures) + ? fnDef.signatures + .filter(({ params }) => params.find((p) => p.name === 'left' && p.type === previousType)) + .map(({ params }) => params[1].type) + : [previousType]; +} diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/aggs.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/aggs.ts index a27b8a68a9be0..97dc654f525ce 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/aggs.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/aggs.ts @@ -7,15 +7,18 @@ */ import { i18n } from '@kbn/i18n'; -import type { FunctionDefinition, FunctionParameterType } from './types'; +import { ESQL_COMMON_NUMERIC_TYPES, ESQL_NUMBER_TYPES } from '../shared/esql_types'; +import type { FunctionDefinition, FunctionParameterType, FunctionReturnType } from './types'; function createNumericAggDefinition({ name, description, + returnType, args = [], }: { name: string; description: string; + returnType?: (numericType: FunctionParameterType) => FunctionReturnType; args?: Array<{ name: string; type: FunctionParameterType; @@ -30,9 +33,9 @@ function createNumericAggDefinition({ description, supportedCommands: ['stats', 'metrics'], signatures: [ - { + ...ESQL_NUMBER_TYPES.map((numericType) => ({ params: [ - { name: 'column', type: 'number', noNestingFunctions: true }, + { name: 'column', type: numericType, noNestingFunctions: true }, ...args.map(({ name: paramName, type, constantOnly }) => ({ name: paramName, type, @@ -40,8 +43,8 @@ function createNumericAggDefinition({ constantOnly, })), ], - returnType: 'number', - }, + returnType: returnType ? returnType(numericType) : numericType, + })), ], examples: [ `from index | stats result = ${name}(field${extraParamsExample})`, @@ -56,18 +59,28 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.avgDoc', { defaultMessage: 'Returns the average of the values in a field', }), + returnType: () => 'double' as FunctionReturnType, }, { name: 'sum', description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.sumDoc', { defaultMessage: 'Returns the sum of the values in a field.', }), + returnType: (numericType: FunctionParameterType): FunctionReturnType => { + switch (numericType) { + case 'double': + return 'double'; + default: + return 'long'; + } + }, }, { name: 'median', description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.medianDoc', { defaultMessage: 'Returns the 50% percentile.', }), + returnType: () => 'double' as FunctionReturnType, }, { name: 'median_absolute_deviation', @@ -78,20 +91,42 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [ 'Returns the median of each data point’s deviation from the median of the entire sample.', } ), - }, - { - name: 'percentile', - description: i18n.translate( - 'kbn-esql-validation-autocomplete.esql.definitions.percentiletDoc', - { - defaultMessage: 'Returns the n percentile of a field.', - } - ), - args: [{ name: 'percentile', type: 'number' as const, value: '90', constantOnly: true }], + returnType: () => 'double' as FunctionReturnType, }, ] .map(createNumericAggDefinition) .concat([ + { + name: 'percentile', + description: i18n.translate( + 'kbn-esql-validation-autocomplete.esql.definitions.percentiletDoc', + { + defaultMessage: 'Returns the n percentile of a field.', + } + ), + type: 'agg', + supportedCommands: ['stats', 'metrics'], + signatures: [ + ...ESQL_COMMON_NUMERIC_TYPES.map((numericType: FunctionParameterType) => { + return ESQL_COMMON_NUMERIC_TYPES.map((weightType: FunctionParameterType) => ({ + params: [ + { + name: 'column', + type: numericType, + noNestingFunctions: true, + }, + { + name: 'percentile', + type: weightType, + noNestingFunctions: true, + constantOnly: true, + }, + ], + returnType: 'double' as FunctionReturnType, + })); + }).flat(), + ], + }, { name: 'max', description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.maxDoc', { @@ -100,13 +135,17 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [ type: 'agg', supportedCommands: ['stats', 'metrics'], signatures: [ + ...ESQL_COMMON_NUMERIC_TYPES.map((type) => ({ + params: [{ name: 'column', type, noNestingFunctions: true }], + returnType: type, + })), { - params: [{ name: 'column', type: 'number', noNestingFunctions: true }], - returnType: 'number', + params: [{ name: 'column', type: 'date', noNestingFunctions: true }], + returnType: 'date', }, { - params: [{ name: 'column', type: 'date', noNestingFunctions: true }], - returnType: 'number', + params: [{ name: 'column', type: 'date_period', noNestingFunctions: true }], + returnType: 'date_period', }, { params: [{ name: 'column', type: 'boolean', noNestingFunctions: true }], @@ -127,13 +166,17 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [ type: 'agg', supportedCommands: ['stats', 'metrics'], signatures: [ + ...ESQL_COMMON_NUMERIC_TYPES.map((type) => ({ + params: [{ name: 'column', type, noNestingFunctions: true }], + returnType: type, + })), { - params: [{ name: 'column', type: 'number', noNestingFunctions: true }], - returnType: 'number', + params: [{ name: 'column', type: 'date', noNestingFunctions: true }], + returnType: 'date', }, { - params: [{ name: 'column', type: 'date', noNestingFunctions: true }], - returnType: 'number', + params: [{ name: 'column', type: 'date_period', noNestingFunctions: true }], + returnType: 'date_period', }, { params: [{ name: 'column', type: 'boolean', noNestingFunctions: true }], @@ -166,7 +209,7 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [ optional: true, }, ], - returnType: 'number', + returnType: 'long', }, ], examples: [`from index | stats result = count(field)`, `from index | stats count(field)`], @@ -185,9 +228,14 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [ { params: [ { name: 'column', type: 'any', noNestingFunctions: true }, - { name: 'precision', type: 'number', noNestingFunctions: true, optional: true }, + ...ESQL_NUMBER_TYPES.map((type) => ({ + name: 'precision', + type, + noNestingFunctions: true, + optional: true, + })), ], - returnType: 'number', + returnType: 'long', }, ], examples: [ @@ -258,14 +306,14 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [ }, { name: 'limit', - type: 'number', + type: 'integer', noNestingFunctions: true, optional: false, constantOnly: true, }, { name: 'order', - type: 'string', + type: 'keyword', noNestingFunctions: true, optional: false, constantOnly: true, @@ -292,23 +340,25 @@ export const statsAggregationFunctionDefinitions: FunctionDefinition[] = [ ), supportedCommands: ['stats', 'metrics'], signatures: [ - { - params: [ - { - name: 'number', - type: 'number', - noNestingFunctions: true, - optional: false, - }, - { - name: 'weight', - type: 'number', - noNestingFunctions: true, - optional: false, - }, - ], - returnType: 'number', - }, + ...ESQL_COMMON_NUMERIC_TYPES.map((numericType: FunctionParameterType) => { + return ESQL_COMMON_NUMERIC_TYPES.map((weightType: FunctionParameterType) => ({ + params: [ + { + name: 'number', + type: numericType, + noNestingFunctions: true, + optional: false, + }, + { + name: 'weight', + type: weightType, + noNestingFunctions: true, + optional: false, + }, + ], + returnType: 'double' as FunctionReturnType, + })); + }).flat(), ], examples: [ `from employees | stats w_avg = weighted_avg(salary, height) by languages | eval w_avg = round(w_avg)`, diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/builtin.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/builtin.ts index a32cba3d191c3..10945d1c6b135 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/builtin.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/builtin.ts @@ -7,14 +7,14 @@ */ import { i18n } from '@kbn/i18n'; +import { ESQL_NUMBER_TYPES, isNumericType } from '../shared/esql_types'; import type { FunctionDefinition, FunctionParameterType, FunctionReturnType } from './types'; +type MathFunctionSignature = [FunctionParameterType, FunctionParameterType, FunctionReturnType]; + function createMathDefinition( name: string, - types: Array< - | (FunctionParameterType & FunctionReturnType) - | [FunctionParameterType, FunctionParameterType, FunctionReturnType] - >, + functionSignatures: MathFunctionSignature[], description: string, validate?: FunctionDefinition['validate'] ): FunctionDefinition { @@ -24,28 +24,41 @@ function createMathDefinition( description, supportedCommands: ['eval', 'where', 'row', 'stats', 'metrics', 'sort'], supportedOptions: ['by'], - signatures: types.map((type) => { - if (Array.isArray(type)) { - return { - params: [ - { name: 'left', type: type[0] }, - { name: 'right', type: type[1] }, - ], - returnType: type[2], - }; - } + signatures: functionSignatures.map((functionSignature) => { + const [lhs, rhs, result] = functionSignature; return { params: [ - { name: 'left', type }, - { name: 'right', type }, + { name: 'left', type: lhs }, + { name: 'right', type: rhs }, ], - returnType: type, + returnType: result, }; }), validate, }; } +// https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#_less_than +const baseComparisonTypeTable: MathFunctionSignature[] = [ + ['date', 'date', 'boolean'], + ['double', 'double', 'boolean'], + ['double', 'integer', 'boolean'], + ['double', 'long', 'boolean'], + ['integer', 'double', 'boolean'], + ['integer', 'integer', 'boolean'], + ['integer', 'long', 'boolean'], + ['ip', 'ip', 'boolean'], + ['keyword', 'keyword', 'boolean'], + ['keyword', 'text', 'boolean'], + ['long', 'double', 'boolean'], + ['long', 'integer', 'boolean'], + ['long', 'long', 'boolean'], + ['text', 'keyword', 'boolean'], + ['text', 'text', 'boolean'], + ['unsigned_long', 'unsigned_long', 'boolean'], + ['version', 'version', 'boolean'], +]; + function createComparisonDefinition( { name, @@ -58,6 +71,17 @@ function createComparisonDefinition( }, validate?: FunctionDefinition['validate'] ): FunctionDefinition { + const commonSignatures = baseComparisonTypeTable.map((functionSignature) => { + const [lhs, rhs, result] = functionSignature; + return { + params: [ + { name: 'left', type: lhs }, + { name: 'right', type: rhs }, + ], + returnType: result, + }; + }); + return { type: 'builtin' as const, name, @@ -66,41 +90,7 @@ function createComparisonDefinition( supportedOptions: ['by'], validate, signatures: [ - { - params: [ - { name: 'left', type: 'number' }, - { name: 'right', type: 'number' }, - ], - returnType: 'boolean', - }, - { - params: [ - { name: 'left', type: 'string' }, - { name: 'right', type: 'string' }, - ], - returnType: 'boolean', - }, - { - params: [ - { name: 'left', type: 'date' }, - { name: 'right', type: 'date' }, - ], - returnType: 'boolean', - }, - { - params: [ - { name: 'left', type: 'ip' }, - { name: 'right', type: 'ip' }, - ], - returnType: 'boolean', - }, - { - params: [ - { name: 'left', type: 'version' }, - { name: 'right', type: 'version' }, - ], - returnType: 'boolean', - }, + ...commonSignatures, // constant strings okay because of implicit casting for // string to version and ip // @@ -113,13 +103,13 @@ function createComparisonDefinition( { params: [ { name: 'left', type }, - { name: 'right', type: 'string' as const, constantOnly: true }, + { name: 'right', type: 'text' as const, constantOnly: true }, ], returnType: 'boolean' as const, }, { params: [ - { name: 'right', type: 'string' as const, constantOnly: true }, + { name: 'left', type: 'text' as const, constantOnly: true }, { name: 'right', type }, ], returnType: 'boolean' as const, @@ -130,31 +120,111 @@ function createComparisonDefinition( }; } +const addTypeTable: MathFunctionSignature[] = [ + ['date_period', 'date_period', 'date_period'], + ['date_period', 'date', 'date'], + ['date', 'date_period', 'date'], + ['date', 'time_duration', 'date'], + ['date', 'time_literal', 'date'], + ['double', 'double', 'double'], + ['double', 'integer', 'double'], + ['double', 'long', 'double'], + ['integer', 'double', 'double'], + ['integer', 'integer', 'integer'], + ['integer', 'long', 'long'], + ['long', 'double', 'double'], + ['long', 'integer', 'long'], + ['long', 'long', 'long'], + ['time_duration', 'date', 'date'], + ['time_duration', 'time_duration', 'time_duration'], + ['unsigned_long', 'unsigned_long', 'unsigned_long'], + ['time_literal', 'date', 'date'], +]; + +const subtractTypeTable: MathFunctionSignature[] = [ + ['date_period', 'date_period', 'date_period'], + ['date', 'date_period', 'date'], + ['date', 'time_duration', 'date'], + ['date', 'time_literal', 'date'], + ['double', 'double', 'double'], + ['double', 'integer', 'double'], + ['double', 'long', 'double'], + ['integer', 'double', 'double'], + ['integer', 'integer', 'integer'], + ['integer', 'long', 'long'], + ['long', 'double', 'double'], + ['long', 'integer', 'long'], + ['long', 'long', 'long'], + ['time_duration', 'date', 'date'], + ['time_duration', 'time_duration', 'time_duration'], + ['unsigned_long', 'unsigned_long', 'unsigned_long'], + ['time_literal', 'date', 'date'], +]; + +const multiplyTypeTable: MathFunctionSignature[] = [ + ['double', 'double', 'double'], + ['double', 'integer', 'double'], + ['double', 'long', 'double'], + ['integer', 'double', 'double'], + ['integer', 'integer', 'integer'], + ['integer', 'long', 'long'], + ['long', 'double', 'double'], + ['long', 'integer', 'long'], + ['long', 'long', 'long'], + ['unsigned_long', 'unsigned_long', 'unsigned_long'], +]; + +const divideTypeTable: MathFunctionSignature[] = [ + ['double', 'double', 'double'], + ['double', 'integer', 'double'], + ['double', 'long', 'double'], + ['integer', 'double', 'double'], + ['integer', 'integer', 'integer'], + ['integer', 'long', 'long'], + ['long', 'double', 'double'], + ['long', 'integer', 'long'], + ['long', 'long', 'long'], + ['unsigned_long', 'unsigned_long', 'unsigned_long'], +]; + +const modulusTypeTable: MathFunctionSignature[] = [ + ['double', 'double', 'double'], + ['double', 'integer', 'double'], + ['double', 'long', 'double'], + ['integer', 'double', 'double'], + ['integer', 'integer', 'integer'], + ['integer', 'long', 'long'], + ['long', 'double', 'double'], + ['long', 'integer', 'long'], + ['long', 'long', 'long'], + ['unsigned_long', 'unsigned_long', 'unsigned_long'], +]; + export const mathFunctions: FunctionDefinition[] = [ createMathDefinition( '+', - ['number', ['date', 'time_literal', 'date'], ['time_literal', 'date', 'date']], + addTypeTable, i18n.translate('kbn-esql-validation-autocomplete.esql.definition.addDoc', { defaultMessage: 'Add (+)', }) ), createMathDefinition( '-', - ['number', ['date', 'time_literal', 'date'], ['time_literal', 'date', 'date']], + subtractTypeTable, i18n.translate('kbn-esql-validation-autocomplete.esql.definition.subtractDoc', { defaultMessage: 'Subtract (-)', }) ), createMathDefinition( '*', - ['number'], + multiplyTypeTable, i18n.translate('kbn-esql-validation-autocomplete.esql.definition.multiplyDoc', { defaultMessage: 'Multiply (*)', }) ), createMathDefinition( '/', - ['number'], + divideTypeTable, i18n.translate('kbn-esql-validation-autocomplete.esql.definition.divideDoc', { defaultMessage: 'Divide (/)', }), @@ -162,7 +232,7 @@ export const mathFunctions: FunctionDefinition[] = [ const [left, right] = fnDef.args; const messages = []; if (!Array.isArray(left) && !Array.isArray(right)) { - if (right.type === 'literal' && right.literalType === 'number') { + if (right.type === 'literal' && isNumericType(right.literalType)) { if (right.value === 0) { messages.push({ type: 'warning' as const, @@ -187,7 +257,7 @@ export const mathFunctions: FunctionDefinition[] = [ ), createMathDefinition( '%', - ['number'], + modulusTypeTable, i18n.translate('kbn-esql-validation-autocomplete.esql.definition.moduleDoc', { defaultMessage: 'Module (%)', }), @@ -195,7 +265,7 @@ export const mathFunctions: FunctionDefinition[] = [ const [left, right] = fnDef.args; const messages = []; if (!Array.isArray(left) && !Array.isArray(right)) { - if (right.type === 'literal' && right.literalType === 'number') { + if (right.type === 'literal' && isNumericType(right.literalType)) { if (right.value === 0) { messages.push({ type: 'warning' as const, @@ -244,7 +314,7 @@ const comparisonFunctions: FunctionDefinition[] = [ }, { params: [ - { name: 'right', type: 'string' as const, constantOnly: true }, + { name: 'left', type: 'string' as const, constantOnly: true }, { name: 'right', type: 'boolean' as const }, ], returnType: 'boolean' as const, @@ -274,7 +344,7 @@ const comparisonFunctions: FunctionDefinition[] = [ }, { params: [ - { name: 'right', type: 'string' as const, constantOnly: true }, + { name: 'left', type: 'string' as const, constantOnly: true }, { name: 'right', type: 'boolean' as const }, ], returnType: 'boolean' as const, @@ -347,8 +417,15 @@ const likeFunctions: FunctionDefinition[] = [ signatures: [ { params: [ - { name: 'left', type: 'string' as const }, - { name: 'right', type: 'string' as const }, + { name: 'left', type: 'text' as const }, + { name: 'right', type: 'text' as const }, + ], + returnType: 'boolean', + }, + { + params: [ + { name: 'left', type: 'keyword' as const }, + { name: 'right', type: 'keyword' as const }, ], returnType: 'boolean', }, @@ -383,17 +460,24 @@ const inFunctions: FunctionDefinition[] = [ description, supportedCommands: ['eval', 'where', 'row', 'sort'], signatures: [ - { + ...ESQL_NUMBER_TYPES.map((type) => ({ params: [ - { name: 'left', type: 'number' }, + { name: 'left', type: type as FunctionParameterType }, + { name: 'right', type: 'any[]' as FunctionParameterType }, + ], + returnType: 'boolean' as FunctionReturnType, + })), + { + params: [ + { name: 'left', type: 'keyword' }, { name: 'right', type: 'any[]' }, ], returnType: 'boolean', }, { params: [ - { name: 'left', type: 'string' }, + { name: 'left', type: 'text' }, { name: 'right', type: 'any[]' }, ], returnType: 'boolean', diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts index 033518ac16c37..df0d5f02f8cf0 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts @@ -273,7 +273,7 @@ export const commandDefinitions: CommandDefinition[] = [ examples: ['… | limit 100', '… | limit 0'], signature: { multipleParams: false, - params: [{ name: 'size', type: 'number', constantOnly: true }], + params: [{ name: 'size', type: 'integer', constantOnly: true }], }, options: [], modes: [], @@ -390,6 +390,7 @@ export const commandDefinitions: CommandDefinition[] = [ signature: { multipleParams: false, params: [ + // innerType: 'string' is interpreted as keyword and text (see columnParamsWithInnerTypes) { name: 'column', type: 'column', innerType: 'string' }, { name: 'pattern', type: 'string', constantOnly: true }, ], @@ -407,6 +408,7 @@ export const commandDefinitions: CommandDefinition[] = [ signature: { multipleParams: false, params: [ + // innerType: 'string' is interpreted as keyword and text (see columnParamsWithInnerTypes) { name: 'column', type: 'column', innerType: 'string' }, { name: 'pattern', type: 'string', constantOnly: true }, ], diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts index a02a09757d033..3b9d9131e7643 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts @@ -43,11 +43,41 @@ const absDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', optional: false, }, ], - returnType: 'number', + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'unsigned_long', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -72,11 +102,41 @@ const acosDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', optional: false, }, ], - returnType: 'number', + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -99,85 +159,56 @@ const asinDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW a=.9\n| EVAL asin=ASIN(a)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + type: 'integer', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW a=12.9\n| EVAL atan=ATAN(a)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'number', + type: 'long', optional: false, }, + ], + returnType: 'double', + }, + { + params: [ { - name: 'x_coordinate', - type: 'number', + name: 'number', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['ROW y=12.9, x=.6\n| EVAL atan2=ATAN2(y, x)'], + examples: ['ROW a=.9\n| EVAL asin=ASIN(a)'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const cbrtDefinition: FunctionDefinition = { +const atanDefinition: FunctionDefinition = { type: 'eval', - name: 'cbrt', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cbrt', { + name: 'atan', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.atan', { 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.', + 'Returns the arctangent of the input\nnumeric expression as an angle, expressed in radians.', }), alias: undefined, signatures: [ @@ -185,503 +216,1075 @@ const cbrtDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW d = 1000.0\n| EVAL c = cbrt(d)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + type: 'integer', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW a=1.8\n| EVAL a=CEIL(a)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'number', + type: 'long', optional: false, }, + ], + returnType: 'double', + }, + { + params: [ { - name: 'blockX', - type: 'string', + name: 'number', + type: 'unsigned_long', optional: false, }, ], - returnType: 'boolean', - minParams: 2, + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', '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', - ], + examples: ['ROW a=12.9\n| EVAL atan=ATAN(a)'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const coalesceDefinition: FunctionDefinition = { +const atan2Definition: FunctionDefinition = { type: 'eval', - name: 'coalesce', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.coalesce', { + name: 'atan2', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.atan2', { defaultMessage: - 'Returns the first of its arguments that is not null. If all arguments are null, it returns `null`.', + '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: 'first', - type: 'boolean', + name: 'y_coordinate', + type: 'double', + optional: false, + }, + { + name: 'x_coordinate', + type: 'double', optional: false, }, ], - returnType: 'boolean', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'boolean', + name: 'y_coordinate', + type: 'double', optional: false, }, { - name: 'rest', - type: 'boolean', - optional: true, + name: 'x_coordinate', + type: 'integer', + optional: false, }, ], - returnType: 'boolean', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'cartesian_point', + name: 'y_coordinate', + type: 'double', optional: false, }, { - name: 'rest', - type: 'cartesian_point', - optional: true, + name: 'x_coordinate', + type: 'long', + optional: false, }, ], - returnType: 'cartesian_point', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'cartesian_shape', + name: 'y_coordinate', + type: 'double', optional: false, }, { - name: 'rest', - type: 'cartesian_shape', - optional: true, + name: 'x_coordinate', + type: 'unsigned_long', + optional: false, }, ], - returnType: 'cartesian_shape', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'date', + name: 'y_coordinate', + type: 'integer', optional: false, }, { - name: 'rest', - type: 'date', - optional: true, + name: 'x_coordinate', + type: 'double', + optional: false, }, ], - returnType: 'date', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'geo_point', + name: 'y_coordinate', + type: 'integer', optional: false, }, { - name: 'rest', - type: 'geo_point', - optional: true, + name: 'x_coordinate', + type: 'integer', + optional: false, }, ], - returnType: 'geo_point', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'geo_shape', + name: 'y_coordinate', + type: 'integer', optional: false, }, { - name: 'rest', - type: 'geo_shape', - optional: true, + name: 'x_coordinate', + type: 'long', + optional: false, }, ], - returnType: 'geo_shape', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'number', + name: 'y_coordinate', + type: 'integer', + optional: false, + }, + { + name: 'x_coordinate', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'number', + name: 'y_coordinate', + type: 'long', optional: false, }, { - name: 'rest', - type: 'number', - optional: true, + name: 'x_coordinate', + type: 'double', + optional: false, }, ], - returnType: 'number', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'ip', + name: 'y_coordinate', + type: 'long', optional: false, }, { - name: 'rest', - type: 'ip', - optional: true, + name: 'x_coordinate', + type: 'integer', + optional: false, }, ], - returnType: 'ip', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'string', + name: 'y_coordinate', + type: 'long', + optional: false, + }, + { + name: 'x_coordinate', + type: 'long', optional: false, }, ], - returnType: 'string', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'string', + name: 'y_coordinate', + type: 'long', optional: false, }, { - name: 'rest', - type: 'string', - optional: true, + name: 'x_coordinate', + type: 'unsigned_long', + optional: false, }, ], - returnType: 'string', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'version', + name: 'y_coordinate', + type: 'unsigned_long', optional: false, }, { - name: 'rest', - type: 'version', - optional: true, + name: 'x_coordinate', + type: 'double', + optional: false, }, ], - returnType: 'version', - minParams: 1, + returnType: 'double', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW a=null, b="b"\n| EVAL COALESCE(a, b)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'y_coordinate', + type: 'unsigned_long', optional: false, }, { - name: 'string2', - type: 'string', + name: 'x_coordinate', + type: 'integer', optional: false, }, ], - returnType: 'string', - minParams: 2, + returnType: 'double', + }, + { + params: [ + { + name: 'y_coordinate', + type: 'unsigned_long', + optional: false, + }, + { + name: 'x_coordinate', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'y_coordinate', + type: 'unsigned_long', + optional: false, + }, + { + name: 'x_coordinate', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', '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)', - ], + examples: ['ROW y=12.9, x=.6\n| EVAL atan2=ATAN2(y, x)'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const cosDefinition: FunctionDefinition = { +const cbrtDefinition: FunctionDefinition = { type: 'eval', - name: 'cos', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cos', { - defaultMessage: 'Returns the cosine of an angle.', + 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: 'angle', - type: 'number', + name: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['ROW a=1.8 \n| EVAL cos=COS(a)'], + examples: ['ROW d = 1000.0\n| EVAL c = cbrt(d)'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const coshDefinition: FunctionDefinition = { +const ceilDefinition: FunctionDefinition = { type: 'eval', - name: 'cosh', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cosh', { - defaultMessage: 'Returns the hyperbolic cosine of an angle.', + 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: 'angle', - type: 'number', + name: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'unsigned_long', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['ROW a=1.8 \n| EVAL cosh=COSH(a)'], + examples: ['ROW a=1.8\n| EVAL a=CEIL(a)'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const dateDiffDefinition: FunctionDefinition = { +const cidrMatchDefinition: FunctionDefinition = { type: 'eval', - name: 'date_diff', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.date_diff', { + name: 'cidr_match', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.cidr_match', { 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.', + 'Returns true if the provided IP is contained in one of the provided CIDR blocks.', }), alias: undefined, signatures: [ { params: [ { - name: 'unit', - type: 'string', + name: 'ip', + type: 'ip', 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', + name: 'blockX', + type: 'keyword', optional: false, }, + ], + returnType: 'boolean', + minParams: 2, + }, + { + params: [ { - name: 'endTimestamp', - type: 'date', + name: 'ip', + type: 'ip', + optional: false, + }, + { + name: 'blockX', + type: 'text', optional: false, }, ], - returnType: 'number', + returnType: 'boolean', + minParams: 2, }, ], supportedCommands: ['stats', 'metrics', '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)', + 'FROM hosts \n| WHERE CIDR_MATCH(ip1, "127.0.0.2/32", "127.0.0.3/32") \n| KEEP card, host, ip0, ip1', ], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const dateExtractDefinition: FunctionDefinition = { +const coalesceDefinition: 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.', + 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: 'datePart', - type: 'string', + name: 'first', + type: 'boolean', optional: false, - literalOptions: [ - 'ALIGNED_DAY_OF_WEEK_IN_MONTH', - 'ALIGNED_DAY_OF_WEEK_IN_YEAR', - 'ALIGNED_WEEK_OF_MONTH', - 'ALIGNED_WEEK_OF_YEAR', - 'AMPM_OF_DAY', - 'CLOCK_HOUR_OF_AMPM', - 'CLOCK_HOUR_OF_DAY', - 'DAY_OF_MONTH', - 'DAY_OF_WEEK', - 'DAY_OF_YEAR', - 'EPOCH_DAY', + }, + ], + 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: 'cartesian_point', + optional: false, + }, + { + name: 'rest', + type: 'cartesian_point', + optional: true, + }, + ], + returnType: 'cartesian_point', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'cartesian_shape', + optional: false, + }, + { + name: 'rest', + type: 'cartesian_shape', + optional: true, + }, + ], + returnType: 'cartesian_shape', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'date', + optional: false, + }, + { + name: 'rest', + type: 'date', + optional: true, + }, + ], + returnType: 'date', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'geo_point', + optional: false, + }, + { + name: 'rest', + type: 'geo_point', + optional: true, + }, + ], + returnType: 'geo_point', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'geo_shape', + optional: false, + }, + { + name: 'rest', + type: 'geo_shape', + optional: true, + }, + ], + returnType: 'geo_shape', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'integer', + optional: false, + }, + { + name: 'rest', + type: 'integer', + optional: true, + }, + ], + returnType: 'integer', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'ip', + optional: false, + }, + { + name: 'rest', + type: 'ip', + optional: true, + }, + ], + returnType: 'ip', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'keyword', + optional: false, + }, + { + name: 'rest', + type: 'keyword', + optional: true, + }, + ], + returnType: 'keyword', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'long', + optional: false, + }, + ], + returnType: 'long', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'long', + optional: false, + }, + { + name: 'rest', + type: 'long', + optional: true, + }, + ], + returnType: 'long', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'text', + optional: false, + }, + ], + returnType: 'text', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'text', + optional: false, + }, + { + name: 'rest', + type: 'text', + optional: true, + }, + ], + returnType: 'text', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'version', + optional: false, + }, + { + name: 'rest', + type: 'version', + optional: true, + }, + ], + returnType: 'version', + minParams: 1, + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW a=null, b="b"\n| EVAL COALESCE(a, b)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: false, + }, + { + name: 'string2', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + minParams: 2, + }, + { + params: [ + { + name: 'string1', + type: 'keyword', + optional: false, + }, + { + name: 'string2', + type: 'text', + optional: false, + }, + ], + returnType: 'keyword', + minParams: 2, + }, + { + params: [ + { + name: 'string1', + type: 'text', + optional: false, + }, + { + name: 'string2', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + minParams: 2, + }, + { + params: [ + { + name: 'string1', + type: 'text', + optional: false, + }, + { + name: 'string2', + type: 'text', + optional: false, + }, + ], + returnType: 'keyword', + minParams: 2, + }, + ], + supportedCommands: ['stats', 'metrics', '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)', + ], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW a=1.8 \n| EVAL cos=COS(a)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW a=1.8 \n| EVAL cosh=COSH(a)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + 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: 'integer', + }, + { + params: [ + { + name: 'unit', + type: 'text', + optional: false, + }, + { + name: 'startTimestamp', + type: 'date', + optional: false, + }, + { + name: 'endTimestamp', + type: 'date', + optional: false, + }, + ], + returnType: 'integer', + }, + ], + supportedCommands: ['stats', 'metrics', '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)', + ], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: false, + literalOptions: [ + 'ALIGNED_DAY_OF_WEEK_IN_MONTH', + 'ALIGNED_DAY_OF_WEEK_IN_YEAR', + 'ALIGNED_WEEK_OF_MONTH', + 'ALIGNED_WEEK_OF_YEAR', + 'AMPM_OF_DAY', + 'CLOCK_HOUR_OF_AMPM', + 'CLOCK_HOUR_OF_DAY', + 'DAY_OF_MONTH', + 'DAY_OF_WEEK', + 'DAY_OF_YEAR', + 'EPOCH_DAY', 'ERA', 'HOUR_OF_AMPM', 'HOUR_OF_DAY', @@ -704,842 +1307,2528 @@ const dateExtractDefinition: FunctionDefinition = { ], }, { - name: 'date', - type: 'date', + name: 'date', + type: 'date', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'datePart', + type: 'text', + optional: false, + }, + { + name: 'date', + type: 'date', + optional: false, + }, + ], + returnType: 'long', + }, + ], + supportedCommands: ['stats', 'metrics', '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', + ], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: true, + }, + { + name: 'date', + type: 'date', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'dateFormat', + type: 'text', + optional: true, + }, + { + name: 'date', + type: 'date', + optional: false, + }, + ], + returnType: 'keyword', + }, + ], + supportedCommands: ['stats', 'metrics', '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)', + ], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: true, + }, + { + name: 'dateString', + type: 'keyword', + optional: false, + }, + ], + returnType: 'date', + }, + { + params: [ + { + name: 'datePattern', + type: 'keyword', + optional: true, + }, + { + name: 'dateString', + type: 'text', + optional: false, + }, + ], + returnType: 'date', + }, + { + params: [ + { + name: 'datePattern', + type: 'text', + optional: true, + }, + { + name: 'dateString', + type: 'keyword', + optional: false, + }, + ], + returnType: 'date', + }, + { + params: [ + { + name: 'datePattern', + type: 'text', + optional: true, + }, + { + name: 'dateString', + type: 'text', + optional: false, + }, + ], + returnType: 'date', + }, + ], + supportedCommands: ['stats', 'metrics', '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)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'time_duration', + optional: false, + }, + { + name: 'date', + type: 'date', + optional: false, + }, + ], + returnType: 'date', + }, + ], + supportedCommands: ['stats', 'metrics', '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', + ], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'double', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW E()'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: false, + }, + { + name: 'suffix', + type: 'keyword', + optional: false, + }, + ], + returnType: 'boolean', + }, + { + params: [ + { + name: 'str', + type: 'text', + optional: false, + }, + { + name: 'suffix', + type: 'text', + optional: false, + }, + ], + returnType: 'boolean', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['FROM employees\n| KEEP last_name\n| EVAL ln_E = ENDS_WITH(last_name, "d")'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +const expDefinition: FunctionDefinition = { + type: 'eval', + name: 'exp', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.exp', { + defaultMessage: 'Returns the value of e raised to the power of the given number.', + }), + alias: undefined, + signatures: [ + { + params: [ + { + name: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW d = 5.0\n| EVAL s = EXP(d)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'unsigned_long', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW a=1.8\n| EVAL a=FLOOR(a)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + ], + returnType: 'keyword', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['row a = "ZWxhc3RpYw==" \n| eval d = from_base64(a)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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 `MV_MAX`\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: 'double', + optional: false, + }, + { + name: 'rest', + type: 'double', + optional: true, + }, + ], + returnType: 'double', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'integer', + optional: false, + }, + { + name: 'rest', + type: 'integer', + optional: true, + }, + ], + returnType: 'integer', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'ip', + optional: false, + }, + { + name: 'rest', + type: 'ip', + optional: true, + }, + ], + returnType: 'ip', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'keyword', + optional: false, + }, + { + name: 'rest', + type: 'keyword', + optional: true, + }, + ], + returnType: 'keyword', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'long', + optional: false, + }, + ], + returnType: 'long', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'long', + optional: false, + }, + { + name: 'rest', + type: 'long', + optional: true, + }, + ], + returnType: 'long', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'text', + optional: false, + }, + ], + returnType: 'text', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'text', + optional: false, + }, + { + name: 'rest', + type: 'text', + optional: true, + }, + ], + returnType: 'text', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'version', + optional: false, + }, + { + name: 'rest', + type: 'version', + optional: true, + }, + ], + returnType: 'version', + minParams: 1, + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW a = 10, b = 20\n| EVAL g = GREATEST(a, b)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +const ipPrefixDefinition: FunctionDefinition = { + type: 'eval', + name: 'ip_prefix', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.ip_prefix', { + defaultMessage: 'Truncates an IP to a given prefix length.', + }), + alias: undefined, + signatures: [ + { + params: [ + { + name: 'ip', + type: 'ip', + optional: false, + }, + { + name: 'prefixLengthV4', + type: 'integer', + optional: false, + }, + { + name: 'prefixLengthV6', + type: 'integer', + optional: false, + }, + ], + returnType: 'ip', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: [ + 'row ip4 = to_ip("1.2.3.4"), ip6 = to_ip("fe80::cae2:65ff:fece:feb9")\n| eval ip4_prefix = ip_prefix(ip4, 24, 0), ip6_prefix = ip_prefix(ip6, 0, 112);', + ], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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 `MV_MIN` 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: 'double', + optional: false, + }, + { + name: 'rest', + type: 'double', + optional: true, + }, + ], + returnType: 'double', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'integer', + optional: false, + }, + { + name: 'rest', + type: 'integer', + optional: true, + }, + ], + returnType: 'integer', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'ip', + optional: false, + }, + { + name: 'rest', + type: 'ip', + optional: true, + }, + ], + returnType: 'ip', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'keyword', + optional: false, + }, + { + name: 'rest', + type: 'keyword', + optional: true, + }, + ], + returnType: 'keyword', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'long', + optional: false, + }, + ], + returnType: 'long', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'long', + optional: false, + }, + { + name: 'rest', + type: 'long', + optional: true, + }, + ], + returnType: 'long', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'text', + optional: false, + }, + ], + returnType: 'text', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'text', + optional: false, + }, + { + name: 'rest', + type: 'text', + optional: true, + }, + ], + returnType: 'text', + minParams: 1, + }, + { + params: [ + { + name: 'first', + type: 'version', + optional: false, + }, + { + name: 'rest', + type: 'version', + optional: true, + }, + ], + returnType: 'version', + minParams: 1, + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW a = 10, b = 20\n| EVAL l = LEAST(a, b)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: false, + }, + { + name: 'length', + type: 'integer', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + { + name: 'length', + type: 'integer', + optional: false, + }, + ], + returnType: 'keyword', + }, + ], + supportedCommands: ['stats', 'metrics', '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', + ], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + ], + returnType: 'integer', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['FROM employees\n| KEEP first_name, last_name\n| EVAL fn_length = LENGTH(first_name)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: false, + }, + { + name: 'substring', + type: 'keyword', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'substring', + type: 'keyword', + optional: false, + }, + { + name: 'start', + type: 'integer', + optional: true, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'substring', + type: 'text', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'substring', + type: 'text', + optional: false, + }, + { + name: 'start', + type: 'integer', + optional: true, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + { + name: 'substring', + type: 'keyword', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + { + name: 'substring', + type: 'keyword', + optional: false, + }, + { + name: 'start', + type: 'integer', + optional: true, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + { + name: 'substring', + type: 'text', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + { + name: 'substring', + type: 'text', + optional: false, + }, + { + name: 'start', + type: 'integer', + optional: true, + }, + ], + returnType: 'integer', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['row a = "hello"\n| eval a_ll = locate(a, "ll")'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'double', + optional: true, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'double', + optional: true, + }, + { + name: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'double', + optional: true, + }, + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'double', + optional: true, + }, + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'double', + optional: true, + }, + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'integer', + optional: true, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'integer', + optional: true, + }, + { + name: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'integer', + optional: true, + }, + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'integer', + optional: true, + }, + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'integer', + optional: true, + }, + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'long', + optional: true, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'long', + optional: true, + }, + { + name: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'long', + optional: true, + }, + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'long', + optional: true, + }, + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'long', + optional: true, + }, + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'unsigned_long', + optional: true, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'unsigned_long', + optional: true, + }, + { + name: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'unsigned_long', + optional: true, + }, + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'unsigned_long', + optional: true, + }, + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'base', + type: 'unsigned_long', + optional: true, + }, + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', + }, + ], + supportedCommands: ['stats', 'metrics', '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) && Number(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; + }, + examples: [ + 'ROW base = 2.0, value = 8.0\n| EVAL s = LOG(base, value)', + 'row value = 100\n| EVAL s = LOG(value);', + ], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', + }, + ], + supportedCommands: ['stats', 'metrics', '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) && Number(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; + }, + examples: ['ROW d = 1000.0 \n| EVAL s = LOG10(d)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + ], + returnType: 'text', + }, + ], + supportedCommands: ['stats', 'metrics', '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, "\'")', + ], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +const mvAppendDefinition: FunctionDefinition = { + type: 'eval', + name: 'mv_append', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_append', { + defaultMessage: 'Concatenates values of two multi-value fields.', + }), + alias: undefined, + signatures: [ + { + params: [ + { + name: 'field1', + type: 'boolean', + optional: false, + }, + { + name: 'field2', + type: 'boolean', + optional: false, + }, + ], + returnType: 'boolean', + }, + { + params: [ + { + name: 'field1', + type: 'cartesian_point', + optional: false, + }, + { + name: 'field2', + type: 'cartesian_point', + optional: false, + }, + ], + returnType: 'cartesian_point', + }, + { + params: [ + { + name: 'field1', + type: 'cartesian_shape', + optional: false, + }, + { + name: 'field2', + type: 'cartesian_shape', + optional: false, + }, + ], + returnType: 'cartesian_shape', + }, + { + params: [ + { + name: 'field1', + type: 'date', + optional: false, + }, + { + name: 'field2', + type: 'date', + optional: false, + }, + ], + returnType: 'date', + }, + { + params: [ + { + name: 'field1', + type: 'double', + optional: false, + }, + { + name: 'field2', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'field1', + type: 'geo_point', + optional: false, + }, + { + name: 'field2', + type: 'geo_point', + optional: false, + }, + ], + returnType: 'geo_point', + }, + { + params: [ + { + name: 'field1', + type: 'geo_shape', + optional: false, + }, + { + name: 'field2', + type: 'geo_shape', + optional: false, + }, + ], + returnType: 'geo_shape', + }, + { + params: [ + { + name: 'field1', + type: 'integer', + optional: false, + }, + { + name: 'field2', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field1', + type: 'ip', + optional: false, + }, + { + name: 'field2', + type: 'ip', + optional: false, + }, + ], + returnType: 'ip', + }, + { + params: [ + { + name: 'field1', + type: 'keyword', + optional: false, + }, + { + name: 'field2', + type: 'keyword', optional: false, }, ], - returnType: 'number', + returnType: 'keyword', }, - ], - supportedCommands: ['stats', 'metrics', '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', - ], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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: 'field1', + type: 'long', + optional: false, }, { - name: 'date', - type: 'date', + name: 'field2', + type: 'long', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'field1', + type: 'text', + optional: false, + }, + { + name: 'field2', + type: 'text', + optional: false, + }, + ], + returnType: 'text', + }, + { + params: [ + { + name: 'field1', + type: 'version', + optional: false, + }, + { + name: 'field2', + type: 'version', optional: false, }, ], - returnType: 'string', + returnType: 'version', }, ], supportedCommands: ['stats', 'metrics', '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)', - ], + examples: [], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const dateParseDefinition: FunctionDefinition = { +const mvAvgDefinition: FunctionDefinition = { type: 'eval', - name: 'date_parse', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.date_parse', { + name: 'mv_avg', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_avg', { defaultMessage: - 'Returns a date by parsing the second argument using the format specified in the first argument.', + 'Converts a multivalued field into a single valued field containing the average of all of the values.', }), alias: undefined, signatures: [ { params: [ { - name: 'datePattern', - type: 'string', - optional: true, + name: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, }, + ], + returnType: 'double', + }, + { + params: [ { - name: 'dateString', - type: 'string', + name: 'number', + type: 'long', optional: false, }, ], - returnType: 'date', + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', '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)'], + examples: ['ROW a=[3, 5, 1, 6]\n| EVAL avg_a = MV_AVG(a)'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const dateTruncDefinition: FunctionDefinition = { +const mvConcatDefinition: 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.', + 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: 'interval', - type: 'time_literal', + name: 'string', + type: 'keyword', optional: false, }, { - name: 'date', - type: 'date', + name: 'delim', + type: 'keyword', optional: false, }, ], - returnType: 'date', + returnType: 'keyword', }, { params: [ { - name: 'interval', - type: 'date', + name: 'string', + type: 'keyword', optional: false, }, { - name: 'date', - type: 'date', + name: 'delim', + type: 'text', optional: false, }, ], - returnType: 'date', + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + { + name: 'delim', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + { + name: 'delim', + type: 'text', + optional: false, + }, + ], + returnType: 'keyword', }, ], supportedCommands: ['stats', 'metrics', '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', + 'ROW a=["foo", "zoo", "bar"]\n| EVAL j = MV_CONCAT(a, ", ")', + 'ROW a=[10, 9, 8]\n| EVAL j = MV_CONCAT(TO_STRING(a), ", ")', ], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const eDefinition: FunctionDefinition = { +const mvCountDefinition: FunctionDefinition = { type: 'eval', - name: 'e', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.e', { - defaultMessage: "Returns Euler's number.", + 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: [], - returnType: 'number', + params: [ + { + name: 'field', + type: 'boolean', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'cartesian_point', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'cartesian_shape', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'date', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'double', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'geo_point', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'geo_shape', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'ip', + optional: false, + }, + ], + returnType: 'integer', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW E()'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'field', + type: 'keyword', optional: false, }, + ], + returnType: 'integer', + }, + { + params: [ { - name: 'suffix', - type: 'string', + name: 'field', + type: 'long', optional: false, }, ], - returnType: 'boolean', + returnType: 'integer', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['FROM employees\n| KEEP last_name\n| EVAL ln_E = ENDS_WITH(last_name, "d")'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -const expDefinition: FunctionDefinition = { - type: 'eval', - name: 'exp', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.exp', { - defaultMessage: 'Returns the value of e raised to the power of the given number.', - }), - alias: undefined, - signatures: [ { params: [ { - name: 'number', - type: 'number', + name: 'field', + type: 'text', optional: false, }, ], - returnType: 'number', + returnType: 'integer', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW d = 5.0\n| EVAL s = EXP(d)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'field', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'integer', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW a=1.8\n| EVAL a=FLOOR(a)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'field', + type: 'version', optional: false, }, ], - returnType: 'string', + returnType: 'integer', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['row a = "ZWxhc3RpYw==" \n| eval d = from_base64(a)'], + examples: ['ROW a=["foo", "zoo", "bar"]\n| EVAL count_a = MV_COUNT(a)'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const greatestDefinition: FunctionDefinition = { +const mvDedupeDefinition: 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 `MV_MAX`\nexcept it is intended to run on multiple columns at once.', + 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: 'first', + name: 'field', type: 'boolean', optional: false, }, ], returnType: 'boolean', - minParams: 1, }, { params: [ { - name: 'first', - type: 'boolean', + name: 'field', + type: 'cartesian_point', optional: false, }, + ], + returnType: 'cartesian_point', + }, + { + params: [ { - name: 'rest', - type: 'boolean', - optional: true, + name: 'field', + type: 'cartesian_shape', + optional: false, }, ], - returnType: 'boolean', - minParams: 1, + returnType: 'cartesian_shape', }, { params: [ { - name: 'first', - type: 'number', + name: 'field', + type: 'date', optional: false, }, + ], + returnType: 'date', + }, + { + params: [ { - name: 'rest', - type: 'number', - optional: true, + name: 'field', + type: 'double', + optional: false, }, ], - returnType: 'number', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'number', + name: 'field', + type: 'geo_point', optional: false, }, ], - returnType: 'number', - minParams: 1, + returnType: 'geo_point', }, { params: [ { - name: 'first', - type: 'ip', + name: 'field', + type: 'geo_shape', optional: false, }, + ], + returnType: 'geo_shape', + }, + { + params: [ { - name: 'rest', - type: 'ip', - optional: true, + name: 'field', + type: 'integer', + optional: false, }, ], - returnType: 'ip', - minParams: 1, + returnType: 'integer', }, { params: [ { - name: 'first', - type: 'string', + name: 'field', + type: 'ip', optional: false, }, ], - returnType: 'string', - minParams: 1, + returnType: 'ip', }, { params: [ { - name: 'first', - type: 'string', + name: 'field', + type: 'keyword', optional: false, }, + ], + returnType: 'keyword', + }, + { + params: [ { - name: 'rest', - type: 'string', - optional: true, + name: 'field', + type: 'long', + optional: false, }, ], - returnType: 'string', - minParams: 1, + returnType: 'long', }, { params: [ { - name: 'first', - type: 'version', + name: 'field', + type: 'text', optional: false, }, + ], + returnType: 'text', + }, + { + params: [ { - name: 'rest', + name: 'field', type: 'version', - optional: true, + optional: false, }, ], returnType: 'version', - minParams: 1, }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['ROW a = 10, b = 20\n| EVAL g = GREATEST(a, b)'], + examples: ['ROW a=["foo", "foo", "bar", "foo"]\n| EVAL dedupe_a = MV_DEDUPE(a)'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const ipPrefixDefinition: FunctionDefinition = { +const mvFirstDefinition: FunctionDefinition = { type: 'eval', - name: 'ip_prefix', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.ip_prefix', { - defaultMessage: 'Truncates an IP to a given prefix length.', + 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 `SPLIT`.\n\nThe order that multivalued fields 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 `MV_MIN` 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: 'ip', - type: 'ip', + name: 'field', + type: 'boolean', optional: false, }, + ], + returnType: 'boolean', + }, + { + params: [ { - name: 'prefixLengthV4', - type: 'number', + name: 'field', + type: 'cartesian_point', optional: false, }, + ], + returnType: 'cartesian_point', + }, + { + params: [ { - name: 'prefixLengthV6', - type: 'number', + name: 'field', + type: 'cartesian_shape', optional: false, }, ], - returnType: 'ip', + returnType: 'cartesian_shape', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: [ - 'row ip4 = to_ip("1.2.3.4"), ip6 = to_ip("fe80::cae2:65ff:fece:feb9")\n| eval ip4_prefix = ip_prefix(ip4, 24, 0), ip6_prefix = ip_prefix(ip6, 0, 112);', - ], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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 `MV_MIN` except it is intended to run on multiple columns at once.', - }), - alias: undefined, - signatures: [ { params: [ { - name: 'first', - type: 'boolean', + name: 'field', + type: 'date', optional: false, }, ], - returnType: 'boolean', - minParams: 1, + returnType: 'date', }, { params: [ { - name: 'first', - type: 'boolean', + name: 'field', + type: 'double', optional: false, }, - { - name: 'rest', - type: 'boolean', - optional: true, - }, ], - returnType: 'boolean', - minParams: 1, + returnType: 'double', }, { params: [ { - name: 'first', - type: 'number', + name: 'field', + type: 'geo_point', optional: false, }, - { - name: 'rest', - type: 'number', - optional: true, - }, ], - returnType: 'number', - minParams: 1, + returnType: 'geo_point', }, { params: [ { - name: 'first', - type: 'number', + name: 'field', + type: 'geo_shape', optional: false, }, ], - returnType: 'number', - minParams: 1, + returnType: 'geo_shape', }, { params: [ { - name: 'first', - type: 'ip', + name: 'field', + type: 'integer', optional: false, }, + ], + returnType: 'integer', + }, + { + params: [ { - name: 'rest', + name: 'field', type: 'ip', - optional: true, + optional: false, }, ], returnType: 'ip', - minParams: 1, }, { params: [ { - name: 'first', - type: 'string', + name: 'field', + type: 'keyword', optional: false, }, ], - returnType: 'string', - minParams: 1, + returnType: 'keyword', }, { params: [ { - name: 'first', - type: 'string', + name: 'field', + type: 'long', optional: false, }, + ], + returnType: 'long', + }, + { + params: [ { - name: 'rest', - type: 'string', - optional: true, + name: 'field', + type: 'text', + optional: false, }, ], - returnType: 'string', - minParams: 1, + returnType: 'text', }, { params: [ { - name: 'first', - type: 'version', + name: 'field', + type: 'unsigned_long', optional: false, }, + ], + returnType: 'unsigned_long', + }, + { + params: [ { - name: 'rest', + name: 'field', type: 'version', - optional: true, + optional: false, }, ], returnType: 'version', - minParams: 1, }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['ROW a = 10, b = 20\n| EVAL l = LEAST(a, b)'], + examples: ['ROW a="foo;bar;baz"\n| EVAL first_a = MV_FIRST(SPLIT(a, ";"))'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const leftDefinition: FunctionDefinition = { +const mvLastDefinition: FunctionDefinition = { type: 'eval', - name: 'left', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.left', { + name: 'mv_last', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_last', { defaultMessage: - "Returns the substring that extracts 'length' chars from 'string' starting from the left.", + "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 `SPLIT`.\n\nThe order that multivalued fields 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 `MV_MAX` 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: 'string', - type: 'string', + name: 'field', + type: 'boolean', optional: false, }, + ], + returnType: 'boolean', + }, + { + params: [ { - name: 'length', - type: 'number', + name: 'field', + type: 'cartesian_point', optional: false, }, ], - returnType: 'string', + returnType: 'cartesian_point', }, - ], - supportedCommands: ['stats', 'metrics', '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', - ], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'field', + type: 'cartesian_shape', optional: false, }, ], - returnType: 'number', + returnType: 'cartesian_shape', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['FROM employees\n| KEEP first_name, last_name\n| EVAL fn_length = LENGTH(first_name)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'field', + type: 'date', optional: false, }, + ], + returnType: 'date', + }, + { + params: [ { - name: 'substring', - type: 'string', + name: 'field', + type: 'double', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, { params: [ { - name: 'string', - type: 'string', + name: 'field', + type: 'geo_point', optional: false, }, + ], + returnType: 'geo_point', + }, + { + params: [ { - name: 'substring', - type: 'string', + name: 'field', + type: 'geo_shape', optional: false, }, + ], + returnType: 'geo_shape', + }, + { + params: [ { - name: 'start', - type: 'number', - optional: true, + name: 'field', + type: 'integer', + optional: false, }, ], - returnType: 'number', + returnType: 'integer', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['row a = "hello"\n| eval a_ll = locate(a, "ll")'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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, + name: 'field', + type: 'ip', + optional: false, }, ], - returnType: 'number', + returnType: 'ip', }, { params: [ { - name: 'base', - type: 'number', - optional: true, + name: 'field', + type: 'keyword', + optional: false, }, + ], + returnType: 'keyword', + }, + { + params: [ { - name: 'number', - type: 'number', + name: 'field', + type: 'long', optional: false, }, ], - returnType: 'number', + returnType: 'long', }, - ], - supportedCommands: ['stats', 'metrics', '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) && Number(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; - }, - examples: [ - 'ROW base = 2.0, value = 8.0\n| EVAL s = LOG(base, value)', - 'row value = 100\n| EVAL s = LOG(value);', - ], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'field', + type: 'text', optional: false, }, ], - returnType: 'number', + returnType: 'text', }, - ], - supportedCommands: ['stats', 'metrics', '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) && Number(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; - }, - examples: ['ROW d = 1000.0 \n| EVAL s = LOG10(d)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'field', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'unsigned_long', + }, + { + params: [ + { + name: 'field', + type: 'version', optional: false, }, ], - returnType: 'string', + returnType: 'version', }, ], supportedCommands: ['stats', 'metrics', '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, "\'")', - ], + examples: ['ROW a="foo;bar;baz"\n| EVAL last_a = MV_LAST(SPLIT(a, ";"))'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvAppendDefinition: FunctionDefinition = { +const mvMaxDefinition: FunctionDefinition = { type: 'eval', - name: 'mv_append', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_append', { - defaultMessage: 'Concatenates values of two multi-value fields.', + 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: 'field1', - type: 'boolean', - optional: false, - }, - { - name: 'field2', + name: 'field', type: 'boolean', optional: false, }, @@ -1549,132 +3838,87 @@ const mvAppendDefinition: FunctionDefinition = { { params: [ { - name: 'field1', - type: 'cartesian_point', - optional: false, - }, - { - name: 'field2', - type: 'cartesian_point', + name: 'field', + type: 'date', optional: false, }, ], - returnType: 'cartesian_point', + returnType: 'date', }, { params: [ { - name: 'field1', - type: 'cartesian_shape', - optional: false, - }, - { - name: 'field2', - type: 'cartesian_shape', + name: 'field', + type: 'double', optional: false, }, ], - returnType: 'cartesian_shape', + returnType: 'double', }, { params: [ { - name: 'field1', - type: 'date', - optional: false, - }, - { - name: 'field2', - type: 'date', + name: 'field', + type: 'integer', optional: false, }, ], - returnType: 'date', + returnType: 'integer', }, { params: [ { - name: 'field1', - type: 'number', - optional: false, - }, - { - name: 'field2', - type: 'number', + name: 'field', + type: 'ip', optional: false, }, ], - returnType: 'number', + returnType: 'ip', }, { params: [ { - name: 'field1', - type: 'geo_point', - optional: false, - }, - { - name: 'field2', - type: 'geo_point', + name: 'field', + type: 'keyword', optional: false, }, ], - returnType: 'geo_point', + returnType: 'keyword', }, { params: [ { - name: 'field1', - type: 'geo_shape', - optional: false, - }, - { - name: 'field2', - type: 'geo_shape', + name: 'field', + type: 'long', optional: false, }, ], - returnType: 'geo_shape', + returnType: 'long', }, { params: [ { - name: 'field1', - type: 'ip', - optional: false, - }, - { - name: 'field2', - type: 'ip', + name: 'field', + type: 'text', optional: false, }, ], - returnType: 'ip', + returnType: 'text', }, { params: [ { - name: 'field1', - type: 'string', - optional: false, - }, - { - name: 'field2', - type: 'string', + name: 'field', + type: 'unsigned_long', optional: false, }, ], - returnType: 'string', + returnType: 'unsigned_long', }, { params: [ { - name: 'field1', - type: 'version', - optional: false, - }, - { - name: 'field2', + name: 'field', type: 'version', optional: false, }, @@ -1685,16 +3929,19 @@ const mvAppendDefinition: FunctionDefinition = { supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: [], + 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)', + ], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvAvgDefinition: FunctionDefinition = { +const mvMedianDefinition: FunctionDefinition = { type: 'eval', - name: 'mv_avg', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_avg', { + 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 average of all of the values.', + 'Converts a multivalued field into a single valued field containing the median value.', }), alias: undefined, signatures: [ @@ -1702,61 +3949,59 @@ const mvAvgDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW a=[3, 5, 1, 6]\n| EVAL avg_a = MV_AVG(a)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'number', + type: 'integer', optional: false, }, + ], + returnType: 'integer', + }, + { + params: [ { - name: 'delim', - type: 'string', + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', optional: false, }, ], - returnType: 'string', + returnType: 'unsigned_long', }, ], supportedCommands: ['stats', 'metrics', '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), ", ")', + '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)', ], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvCountDefinition: FunctionDefinition = { +const mvMinDefinition: FunctionDefinition = { type: 'eval', - name: 'mv_count', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_count', { + 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 a count of the number of values.', + 'Converts a multivalued expression into a single valued column containing the minimum value.', }), alias: undefined, signatures: [ @@ -1768,87 +4013,87 @@ const mvCountDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'boolean', }, { params: [ { name: 'field', - type: 'cartesian_point', + type: 'date', optional: false, }, ], - returnType: 'number', + returnType: 'date', }, { params: [ { name: 'field', - type: 'cartesian_shape', + type: 'double', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, { params: [ { name: 'field', - type: 'date', + type: 'integer', optional: false, }, ], - returnType: 'number', + returnType: 'integer', }, { params: [ { name: 'field', - type: 'number', + type: 'ip', optional: false, }, ], - returnType: 'number', + returnType: 'ip', }, { params: [ { name: 'field', - type: 'geo_point', + type: 'keyword', optional: false, }, ], - returnType: 'number', + returnType: 'keyword', }, { params: [ { name: 'field', - type: 'geo_shape', + type: 'long', optional: false, }, ], - returnType: 'number', + returnType: 'long', }, { params: [ { name: 'field', - type: 'ip', + type: 'text', optional: false, }, ], - returnType: 'number', + returnType: 'text', }, { params: [ { name: 'field', - type: 'string', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'unsigned_long', }, { params: [ @@ -1858,21 +4103,25 @@ const mvCountDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'version', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['ROW a=["foo", "zoo", "bar"]\n| EVAL count_a = MV_COUNT(a)'], + examples: [ + 'ROW a=[2, 1]\n| EVAL min_a = MV_MIN(a)', + 'ROW a=["foo", "bar"]\n| EVAL min_a = MV_MIN(a)', + ], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvDedupeDefinition: FunctionDefinition = { +const mvSliceDefinition: 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.', + 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: [ @@ -1883,6 +4132,16 @@ const mvDedupeDefinition: FunctionDefinition = { type: 'boolean', optional: false, }, + { + name: 'start', + type: 'integer', + optional: false, + }, + { + name: 'end', + type: 'integer', + optional: true, + }, ], returnType: 'boolean', }, @@ -1893,78 +4152,218 @@ const mvDedupeDefinition: FunctionDefinition = { type: 'cartesian_point', optional: false, }, + { + name: 'start', + type: 'integer', + optional: false, + }, + { + name: 'end', + type: 'integer', + optional: true, + }, + ], + returnType: 'cartesian_point', + }, + { + params: [ + { + name: 'field', + type: 'cartesian_shape', + optional: false, + }, + { + name: 'start', + type: 'integer', + optional: false, + }, + { + name: 'end', + type: 'integer', + optional: true, + }, + ], + returnType: 'cartesian_shape', + }, + { + params: [ + { + name: 'field', + type: 'date', + optional: false, + }, + { + name: 'start', + type: 'integer', + optional: false, + }, + { + name: 'end', + type: 'integer', + optional: true, + }, + ], + returnType: 'date', + }, + { + params: [ + { + name: 'field', + type: 'double', + optional: false, + }, + { + name: 'start', + type: 'integer', + optional: false, + }, + { + name: 'end', + type: 'integer', + optional: true, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'field', + type: 'geo_point', + optional: false, + }, + { + name: 'start', + type: 'integer', + optional: false, + }, + { + name: 'end', + type: 'integer', + optional: true, + }, ], - returnType: 'cartesian_point', + returnType: 'geo_point', }, { params: [ { name: 'field', - type: 'cartesian_shape', + type: 'geo_shape', optional: false, }, - ], - returnType: 'cartesian_shape', - }, - { - params: [ { - name: 'field', - type: 'date', + name: 'start', + type: 'integer', optional: false, }, + { + name: 'end', + type: 'integer', + optional: true, + }, ], - returnType: 'date', + returnType: 'geo_shape', }, { params: [ { name: 'field', - type: 'number', + type: 'integer', + optional: false, + }, + { + name: 'start', + type: 'integer', optional: false, }, + { + name: 'end', + type: 'integer', + optional: true, + }, ], - returnType: 'number', + returnType: 'integer', }, { params: [ { name: 'field', - type: 'geo_point', + type: 'ip', + optional: false, + }, + { + name: 'start', + type: 'integer', optional: false, }, + { + name: 'end', + type: 'integer', + optional: true, + }, ], - returnType: 'geo_point', + returnType: 'ip', }, { params: [ { name: 'field', - type: 'geo_shape', + type: 'keyword', optional: false, }, + { + name: 'start', + type: 'integer', + optional: false, + }, + { + name: 'end', + type: 'integer', + optional: true, + }, ], - returnType: 'geo_shape', + returnType: 'keyword', }, { params: [ { name: 'field', - type: 'ip', + type: 'long', + optional: false, + }, + { + name: 'start', + type: 'integer', optional: false, }, + { + name: 'end', + type: 'integer', + optional: true, + }, ], - returnType: 'ip', + returnType: 'long', }, { params: [ { name: 'field', - type: 'string', + type: 'text', + optional: false, + }, + { + name: 'start', + type: 'integer', optional: false, }, + { + name: 'end', + type: 'integer', + optional: true, + }, ], - returnType: 'string', + returnType: 'text', }, { params: [ @@ -1973,6 +4372,16 @@ const mvDedupeDefinition: FunctionDefinition = { type: 'version', optional: false, }, + { + name: 'start', + type: 'integer', + optional: false, + }, + { + name: 'end', + type: 'integer', + optional: true, + }, ], returnType: 'version', }, @@ -1980,16 +4389,18 @@ const mvDedupeDefinition: FunctionDefinition = { supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['ROW a=["foo", "foo", "bar", "foo"]\n| EVAL dedupe_a = MV_DEDUPE(a)'], + 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)', + ], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvFirstDefinition: FunctionDefinition = { +const mvSortDefinition: 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 `SPLIT`.\n\nThe order that multivalued fields 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 `MV_MIN` instead of\n`MV_FIRST`. `MV_MIN` has optimizations for sorted values so there isn't a\nperformance benefit to `MV_FIRST`.", + 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: [ @@ -2000,6 +4411,12 @@ const mvFirstDefinition: FunctionDefinition = { type: 'boolean', optional: false, }, + { + name: 'order', + type: 'keyword', + optional: true, + literalOptions: ['asc', 'desc'], + }, ], returnType: 'boolean', }, @@ -2007,81 +4424,113 @@ const mvFirstDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'cartesian_point', + type: 'date', optional: false, }, - ], - returnType: 'cartesian_point', - }, - { - params: [ { - name: 'field', - type: 'cartesian_shape', - optional: false, + name: 'order', + type: 'keyword', + optional: true, + literalOptions: ['asc', 'desc'], }, ], - returnType: 'cartesian_shape', + returnType: 'date', }, { params: [ { name: 'field', - type: 'date', + type: 'double', optional: false, }, + { + name: 'order', + type: 'keyword', + optional: true, + literalOptions: ['asc', 'desc'], + }, ], - returnType: 'date', + returnType: 'double', }, { params: [ { name: 'field', - type: 'number', + type: 'integer', optional: false, }, + { + name: 'order', + type: 'keyword', + optional: true, + literalOptions: ['asc', 'desc'], + }, ], - returnType: 'number', + returnType: 'integer', }, { params: [ { name: 'field', - type: 'geo_point', + type: 'ip', optional: false, }, + { + name: 'order', + type: 'keyword', + optional: true, + literalOptions: ['asc', 'desc'], + }, ], - returnType: 'geo_point', + returnType: 'ip', }, { params: [ { name: 'field', - type: 'geo_shape', + type: 'keyword', optional: false, }, + { + name: 'order', + type: 'keyword', + optional: true, + literalOptions: ['asc', 'desc'], + }, ], - returnType: 'geo_shape', + returnType: 'keyword', }, { params: [ { name: 'field', - type: 'ip', + type: 'long', optional: false, }, + { + name: 'order', + type: 'keyword', + optional: true, + literalOptions: ['asc', 'desc'], + }, ], - returnType: 'ip', + returnType: 'long', }, { params: [ { name: 'field', - type: 'string', + type: 'text', optional: false, }, + { + name: 'order', + type: 'keyword', + optional: true, + literalOptions: ['asc', 'desc'], + }, ], - returnType: 'string', + returnType: 'text', }, { params: [ @@ -2090,6 +4539,12 @@ const mvFirstDefinition: FunctionDefinition = { type: 'version', optional: false, }, + { + name: 'order', + type: 'keyword', + optional: true, + literalOptions: ['asc', 'desc'], + }, ], returnType: 'version', }, @@ -2097,864 +4552,820 @@ const mvFirstDefinition: FunctionDefinition = { supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['ROW a="foo;bar;baz"\n| EVAL first_a = MV_FIRST(SPLIT(a, ";"))'], + examples: ['ROW a = [4, 2, -3, 2]\n| EVAL sa = mv_sort(a), sd = mv_sort(a, "DESC")'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvLastDefinition: FunctionDefinition = { +const mvSumDefinition: FunctionDefinition = { type: 'eval', - name: 'mv_last', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_last', { + name: 'mv_sum', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_sum', { 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 `SPLIT`.\n\nThe order that multivalued fields 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 `MV_MAX` instead of\n`MV_LAST`. `MV_MAX` has optimizations for sorted values so there isn't a\nperformance benefit to `MV_LAST`.", + 'Converts a multivalued field into a single valued field containing the sum of all of the values.', }), alias: undefined, signatures: [ { params: [ { - name: 'field', - type: 'boolean', + name: 'number', + type: 'double', optional: false, }, ], - returnType: 'boolean', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'cartesian_point', + name: 'number', + type: 'integer', optional: false, }, ], - returnType: 'cartesian_point', + returnType: 'integer', }, { params: [ { - name: 'field', - type: 'cartesian_shape', + name: 'number', + type: 'long', optional: false, }, ], - returnType: 'cartesian_shape', + returnType: 'long', }, { params: [ { - name: 'field', - type: 'date', + name: 'number', + type: 'unsigned_long', optional: false, }, ], - returnType: 'date', + returnType: 'unsigned_long', }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW a=[3, 5, 6]\n| EVAL sum_a = MV_SUM(a)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'field', - type: 'number', + name: 'string1', + type: 'keyword', + optional: false, + }, + { + name: 'string2', + type: 'keyword', optional: false, }, ], - returnType: 'number', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'geo_point', + name: 'string1', + type: 'keyword', + optional: false, + }, + { + name: 'string2', + type: 'keyword', optional: false, }, + { + name: 'delim', + type: 'keyword', + optional: true, + }, ], - returnType: 'geo_point', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'geo_shape', + name: 'string1', + type: 'keyword', + optional: false, + }, + { + name: 'string2', + type: 'keyword', optional: false, }, + { + name: 'delim', + type: 'text', + optional: true, + }, ], - returnType: 'geo_shape', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'ip', + name: 'string1', + type: 'keyword', + optional: false, + }, + { + name: 'string2', + type: 'text', optional: false, }, ], - returnType: 'ip', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'string', + name: 'string1', + type: 'keyword', + optional: false, + }, + { + name: 'string2', + type: 'text', optional: false, }, + { + name: 'delim', + type: 'keyword', + optional: true, + }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'version', + name: 'string1', + type: 'keyword', optional: false, }, + { + name: 'string2', + type: 'text', + optional: false, + }, + { + name: 'delim', + type: 'text', + optional: true, + }, ], - returnType: 'version', + returnType: 'keyword', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW a="foo;bar;baz"\n| EVAL last_a = MV_LAST(SPLIT(a, ";"))'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'string1', + type: 'text', + optional: false, + }, + { + name: 'string2', + type: 'keyword', optional: false, }, ], - returnType: 'boolean', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'date', + name: 'string1', + type: 'text', + optional: false, + }, + { + name: 'string2', + type: 'keyword', optional: false, }, + { + name: 'delim', + type: 'keyword', + optional: true, + }, ], - returnType: 'date', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'number', + name: 'string1', + type: 'text', optional: false, }, + { + name: 'string2', + type: 'keyword', + optional: false, + }, + { + name: 'delim', + type: 'text', + optional: true, + }, ], - returnType: 'number', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'ip', + name: 'string1', + type: 'text', + optional: false, + }, + { + name: 'string2', + type: 'text', optional: false, }, ], - returnType: 'ip', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'string', + name: 'string1', + type: 'text', + optional: false, + }, + { + name: 'string2', + type: 'text', optional: false, }, + { + name: 'delim', + type: 'keyword', + optional: true, + }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ { - name: 'field', - type: 'version', + name: 'string1', + type: 'text', + optional: false, + }, + { + name: 'string2', + type: 'text', optional: false, }, + { + name: 'delim', + type: 'text', + optional: true, + }, ], - returnType: 'version', + returnType: 'keyword', }, ], supportedCommands: ['stats', 'metrics', '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)', + 'ROW a = ["x", "y", "z"], b = ["1", "2"]\n| EVAL c = mv_zip(a, b, "-")\n| KEEP a, b, c', ], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvMedianDefinition: FunctionDefinition = { +const nowDefinition: 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.', + name: 'now', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.now', { + defaultMessage: 'Returns current date and time.', }), alias: undefined, signatures: [ { - params: [ - { - name: 'number', - type: 'number', - optional: false, - }, - ], - returnType: 'number', + params: [], + returnType: 'date', }, ], supportedCommands: ['stats', 'metrics', '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)', - ], + examples: ['ROW current_date = NOW()', 'FROM sample_data\n| WHERE @timestamp > NOW() - 1 hour'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvMinDefinition: FunctionDefinition = { +const piDefinition: 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.', + 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: [ - { - 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', + params: [], + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', '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)', - ], + examples: ['ROW PI()'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvSliceDefinition: FunctionDefinition = { +const powDefinition: 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.', + 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: 'field', - type: 'boolean', + name: 'base', + type: 'double', optional: false, }, { - name: 'start', - type: 'number', + name: 'exponent', + type: 'double', optional: false, }, - { - name: 'end', - type: 'number', - optional: true, - }, ], - returnType: 'boolean', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'cartesian_point', + name: 'base', + type: 'double', optional: false, }, { - name: 'start', - type: 'number', + name: 'exponent', + type: 'integer', optional: false, }, - { - name: 'end', - type: 'number', - optional: true, - }, ], - returnType: 'cartesian_point', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'cartesian_shape', + name: 'base', + type: 'double', optional: false, }, { - name: 'start', - type: 'number', + name: 'exponent', + type: 'long', optional: false, }, - { - name: 'end', - type: 'number', - optional: true, - }, ], - returnType: 'cartesian_shape', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'date', + name: 'base', + type: 'double', optional: false, }, { - name: 'start', - type: 'number', + name: 'exponent', + type: 'unsigned_long', optional: false, }, - { - name: 'end', - type: 'number', - optional: true, - }, ], - returnType: 'date', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'number', + name: 'base', + type: 'integer', optional: false, }, { - name: 'start', - type: 'number', + name: 'exponent', + type: 'double', optional: false, }, - { - name: 'end', - type: 'number', - optional: true, - }, ], - returnType: 'number', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'geo_point', + name: 'base', + type: 'integer', optional: false, }, { - name: 'start', - type: 'number', + name: 'exponent', + type: 'integer', optional: false, }, - { - name: 'end', - type: 'number', - optional: true, - }, ], - returnType: 'geo_point', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'geo_shape', + name: 'base', + type: 'integer', optional: false, }, { - name: 'start', - type: 'number', + name: 'exponent', + type: 'long', optional: false, }, - { - name: 'end', - type: 'number', - optional: true, - }, ], - returnType: 'geo_shape', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'ip', - optional: false, - }, - { - name: 'start', - type: 'number', + name: 'base', + type: 'integer', optional: false, }, { - name: 'end', - type: 'number', - optional: true, + name: 'exponent', + type: 'unsigned_long', + optional: false, }, ], - returnType: 'ip', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'string', + name: 'base', + type: 'long', optional: false, }, { - name: 'start', - type: 'number', + name: 'exponent', + type: 'double', optional: false, }, - { - name: 'end', - type: 'number', - optional: true, - }, ], - returnType: 'string', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'version', + name: 'base', + type: 'long', optional: false, }, { - name: 'start', - type: 'number', + name: 'exponent', + type: 'integer', optional: false, }, - { - name: 'end', - type: 'number', - optional: true, - }, ], - returnType: 'version', + returnType: 'double', }, - ], - supportedCommands: ['stats', 'metrics', '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)', - ], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'base', + type: 'long', optional: false, }, { - name: 'order', - type: 'string', - optional: true, - literalOptions: ['asc', 'desc'], + name: 'exponent', + type: 'long', + optional: false, }, ], - returnType: 'boolean', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'date', + name: 'base', + type: 'long', optional: false, }, { - name: 'order', - type: 'string', - optional: true, - literalOptions: ['asc', 'desc'], + name: 'exponent', + type: 'unsigned_long', + optional: false, }, ], - returnType: 'date', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'number', + name: 'base', + type: 'unsigned_long', optional: false, }, { - name: 'order', - type: 'string', - optional: true, - literalOptions: ['asc', 'desc'], + name: 'exponent', + type: 'double', + optional: false, }, ], - returnType: 'number', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'ip', + name: 'base', + type: 'unsigned_long', optional: false, }, { - name: 'order', - type: 'string', - optional: true, - literalOptions: ['asc', 'desc'], + name: 'exponent', + type: 'integer', + optional: false, }, ], - returnType: 'ip', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'string', + name: 'base', + type: 'unsigned_long', optional: false, }, { - name: 'order', - type: 'string', - optional: true, - literalOptions: ['asc', 'desc'], + name: 'exponent', + type: 'long', + optional: false, }, ], - returnType: 'string', + returnType: 'double', }, { params: [ { - name: 'field', - type: 'version', + name: 'base', + type: 'unsigned_long', optional: false, }, { - name: 'order', - type: 'string', - optional: true, - literalOptions: ['asc', 'desc'], + name: 'exponent', + type: 'unsigned_long', + optional: false, }, ], - returnType: 'version', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', '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")'], + 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)', + ], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvSumDefinition: FunctionDefinition = { +const repeatDefinition: FunctionDefinition = { type: 'eval', - name: 'mv_sum', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_sum', { + name: 'repeat', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.repeat', { defaultMessage: - 'Converts a multivalued field into a single valued field containing the sum of all of the values.', + 'Returns a string constructed by concatenating `string` with itself the specified `number` of times.', }), alias: undefined, signatures: [ { params: [ + { + name: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, { name: 'number', - type: 'number', + type: 'integer', optional: false, }, ], - returnType: 'number', + returnType: 'keyword', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], supportedOptions: ['by'], validate: undefined, - examples: ['ROW a=[3, 5, 6]\n| EVAL sum_a = MV_SUM(a)'], + examples: ['ROW a = "Hello!"\n| EVAL triple_a = REPEAT(a, 3);'], }; // Do not edit this manually... generated by scripts/generate_function_definitions.ts -const mvZipDefinition: FunctionDefinition = { +const replaceDefinition: FunctionDefinition = { type: 'eval', - name: 'mv_zip', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.mv_zip', { + name: 'replace', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.replace', { defaultMessage: - 'Combines the values from two multivalued fields with a delimiter that joins them together.', + 'The function substitutes in the string `str` any match of the regular expression `regex`\nwith the replacement string `newStr`.', }), alias: undefined, signatures: [ { params: [ { - name: 'string1', - type: 'string', + name: 'string', + type: 'keyword', optional: false, }, { - name: 'string2', - type: 'string', + name: 'regex', + type: 'keyword', + optional: false, + }, + { + name: 'newString', + type: 'keyword', optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ { - name: 'string1', - type: 'string', + name: 'string', + type: 'keyword', optional: false, }, { - name: 'string2', - type: 'string', + name: 'regex', + type: 'keyword', optional: false, }, { - name: 'delim', - type: 'string', - optional: true, + name: 'newString', + type: 'text', + optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, - ], - supportedCommands: ['stats', 'metrics', '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', - ], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + params: [ + { + name: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'regex', + type: 'text', + optional: false, + }, + { + name: 'newString', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW current_date = NOW()', 'FROM sample_data\n| WHERE @timestamp > NOW() - 1 hour'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + params: [ + { + name: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'regex', + type: 'text', + optional: false, + }, + { + name: 'newString', + type: 'text', + optional: false, + }, + ], + returnType: 'keyword', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW PI()'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + name: 'string', + type: 'text', optional: false, }, { - name: 'exponent', - type: 'number', + name: 'regex', + type: 'keyword', + optional: false, + }, + { + name: 'newString', + type: 'keyword', optional: false, }, ], - returnType: 'number', + returnType: 'keyword', }, - ], - supportedCommands: ['stats', 'metrics', '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)', - ], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -const repeatDefinition: FunctionDefinition = { - type: 'eval', - name: 'repeat', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.repeat', { - defaultMessage: - 'Returns a string constructed by concatenating `string` with itself the specified `number` of times.', - }), - alias: undefined, - signatures: [ { params: [ { name: 'string', - type: 'string', + type: 'text', optional: false, }, { - name: 'number', - type: 'number', + name: 'regex', + type: 'keyword', + optional: false, + }, + { + name: 'newString', + type: 'text', optional: false, }, ], - returnType: 'string', + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + { + name: 'regex', + type: 'text', + optional: false, + }, + { + name: 'newString', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW a = "Hello!"\n| EVAL triple_a = REPEAT(a, 3);'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + type: 'text', optional: false, }, { name: 'regex', - type: 'string', + type: 'text', optional: false, }, { name: 'newString', - type: 'string', + type: 'text', optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -2977,16 +5388,31 @@ const rightDefinition: FunctionDefinition = { params: [ { name: 'string', - type: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'length', + type: 'integer', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', optional: false, }, { name: 'length', - type: 'number', + type: 'integer', optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3011,26 +5437,86 @@ const roundDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'double', + optional: false, + }, + { + name: 'decimals', + type: 'integer', + optional: true, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + { + name: 'decimals', + type: 'integer', + optional: true, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'number', + type: 'long', optional: false, }, ], - returnType: 'number', + returnType: 'long', }, { params: [ { name: 'number', - type: 'number', + type: 'long', optional: false, }, { name: 'decimals', - type: 'number', + type: 'integer', optional: true, }, ], - returnType: 'number', + returnType: 'long', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'unsigned_long', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3054,11 +5540,21 @@ const rtrimDefinition: FunctionDefinition = { params: [ { name: 'string', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', optional: false, }, ], - returnType: 'string', + returnType: 'text', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3083,11 +5579,41 @@ const signumDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3109,11 +5635,41 @@ const sinDefinition: FunctionDefinition = { params: [ { name: 'angle', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3135,11 +5691,41 @@ const sinhDefinition: FunctionDefinition = { params: [ { name: 'angle', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3161,16 +5747,61 @@ const splitDefinition: FunctionDefinition = { params: [ { name: 'string', - type: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'delim', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'delim', + type: 'text', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', + optional: false, + }, + { + name: 'delim', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', optional: false, }, { name: 'delim', - type: 'string', + type: 'text', optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3193,11 +5824,41 @@ const sqrtDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3507,7 +6168,7 @@ const stDistanceDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'double', }, { params: [ @@ -3522,7 +6183,7 @@ const stDistanceDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3829,7 +6490,7 @@ const stXDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'double', }, { params: [ @@ -3839,7 +6500,7 @@ const stXDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3868,7 +6529,7 @@ const stYDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'double', }, { params: [ @@ -3878,7 +6539,7 @@ const stYDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3903,12 +6564,27 @@ const startsWithDefinition: FunctionDefinition = { params: [ { name: 'str', - type: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'prefix', + type: 'keyword', + optional: false, + }, + ], + returnType: 'boolean', + }, + { + params: [ + { + name: 'str', + type: 'text', optional: false, }, { name: 'prefix', - type: 'string', + type: 'text', optional: false, }, ], @@ -3935,21 +6611,41 @@ const substringDefinition: FunctionDefinition = { params: [ { name: 'string', - type: 'string', + type: 'keyword', + optional: false, + }, + { + name: 'start', + type: 'integer', + optional: false, + }, + { + name: 'length', + type: 'integer', + optional: true, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', optional: false, }, { name: 'start', - type: 'number', + type: 'integer', optional: false, }, { name: 'length', - type: 'number', + type: 'integer', optional: true, }, ], - returnType: 'string', + returnType: 'keyword', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -3975,11 +6671,41 @@ const tanDefinition: FunctionDefinition = { params: [ { name: 'angle', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4001,11 +6727,41 @@ const tanhDefinition: FunctionDefinition = { params: [ { name: 'angle', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'angle', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4025,7 +6781,7 @@ const tauDefinition: FunctionDefinition = { signatures: [ { params: [], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4047,11 +6803,21 @@ const toBase64Definition: FunctionDefinition = { params: [ { name: 'string', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4084,7 +6850,47 @@ const toBooleanDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'boolean', + }, + { + params: [ + { + name: 'field', + type: 'integer', + optional: false, + }, + ], + returnType: 'boolean', + }, + { + params: [ + { + name: 'field', + type: 'keyword', + optional: false, + }, + ], + returnType: 'boolean', + }, + { + params: [ + { + name: 'field', + type: 'long', + optional: false, + }, + ], + returnType: 'boolean', + }, + { + params: [ + { + name: 'field', + type: 'text', optional: false, }, ], @@ -4094,7 +6900,7 @@ const toBooleanDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'string', + type: 'unsigned_long', optional: false, }, ], @@ -4134,7 +6940,17 @@ const toCartesianpointDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'cartesian_point', + }, + { + params: [ + { + name: 'field', + type: 'text', optional: false, }, ], @@ -4186,7 +7002,17 @@ const toCartesianshapeDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'cartesian_shape', + }, + { + params: [ + { + name: 'field', + type: 'text', optional: false, }, ], @@ -4225,7 +7051,47 @@ const toDatetimeDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'date', + }, + { + params: [ + { + name: 'field', + type: 'integer', + optional: false, + }, + ], + returnType: 'date', + }, + { + params: [ + { + name: 'field', + type: 'keyword', + optional: false, + }, + ], + returnType: 'date', + }, + { + params: [ + { + name: 'field', + type: 'long', + optional: false, + }, + ], + returnType: 'date', + }, + { + params: [ + { + name: 'field', + type: 'text', optional: false, }, ], @@ -4235,7 +7101,7 @@ const toDatetimeDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'string', + type: 'unsigned_long', optional: false, }, ], @@ -4264,68 +7130,168 @@ const toDegreesDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', + optional: false, + }, + ], + returnType: 'double', + }, + ], + supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: ['ROW rad = [1.57, 3.14, 4.71]\n| EVAL deg = TO_DEGREES(rad)'], +}; + +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +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: 'double', + }, + { + params: [ + { + name: 'field', + type: 'counter_double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'field', + type: 'counter_integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'field', + type: 'counter_long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'field', + type: 'date', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'field', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'field', + type: 'integer', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, - ], - supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], - supportedOptions: ['by'], - validate: undefined, - examples: ['ROW rad = [1.57, 3.14, 4.71]\n| EVAL deg = TO_DEGREES(rad)'], -}; - -// Do not edit this manually... generated by scripts/generate_function_definitions.ts -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', + type: 'keyword', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, { params: [ { name: 'field', - type: 'number', + type: 'long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, { params: [ { name: 'field', - type: 'date', + type: 'text', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, { params: [ { name: 'field', - type: 'string', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4360,7 +7326,17 @@ const toGeopointDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'geo_point', + }, + { + params: [ + { + name: 'field', + type: 'text', optional: false, }, ], @@ -4407,7 +7383,17 @@ const toGeoshapeDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'geo_shape', + }, + { + params: [ + { + name: 'field', + type: 'text', optional: false, }, ], @@ -4440,17 +7426,17 @@ const toIntegerDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'integer', }, { params: [ { name: 'field', - type: 'number', + type: 'counter_integer', optional: false, }, ], - returnType: 'number', + returnType: 'integer', }, { params: [ @@ -4460,17 +7446,67 @@ const toIntegerDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'double', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'integer', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'keyword', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'long', + optional: false, + }, + ], + returnType: 'integer', + }, + { + params: [ + { + name: 'field', + type: 'text', + optional: false, + }, + ], + returnType: 'integer', }, { params: [ { name: 'field', - type: 'string', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'integer', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4502,7 +7538,17 @@ const toIpDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'ip', + }, + { + params: [ + { + name: 'field', + type: 'text', optional: false, }, ], @@ -4535,17 +7581,27 @@ const toLongDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'long', + }, + { + params: [ + { + name: 'field', + type: 'counter_integer', + optional: false, + }, + ], + returnType: 'long', }, { params: [ { name: 'field', - type: 'number', + type: 'counter_long', optional: false, }, ], - returnType: 'number', + returnType: 'long', }, { params: [ @@ -4555,17 +7611,67 @@ const toLongDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'long', + }, + { + params: [ + { + name: 'field', + type: 'double', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'field', + type: 'integer', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'field', + type: 'keyword', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'field', + type: 'long', + optional: false, + }, + ], + returnType: 'long', + }, + { + params: [ + { + name: 'field', + type: 'text', + optional: false, + }, + ], + returnType: 'long', }, { params: [ { name: 'field', - type: 'string', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'long', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4589,11 +7695,21 @@ const toLowerDefinition: FunctionDefinition = { params: [ { name: 'str', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'str', + type: 'text', optional: false, }, ], - returnType: 'string', + returnType: 'text', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4615,11 +7731,41 @@ const toRadiansDefinition: FunctionDefinition = { params: [ { name: 'number', - type: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'double', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4645,7 +7791,7 @@ const toStringDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ @@ -4655,7 +7801,7 @@ const toStringDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ @@ -4665,7 +7811,7 @@ const toStringDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ @@ -4675,17 +7821,17 @@ const toStringDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ { name: 'field', - type: 'number', + type: 'double', optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ @@ -4695,7 +7841,7 @@ const toStringDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ @@ -4705,7 +7851,17 @@ const toStringDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'string', + returnType: 'keyword', + }, + { + params: [ + { + name: 'field', + type: 'integer', + optional: false, + }, + ], + returnType: 'keyword', }, { params: [ @@ -4715,17 +7871,47 @@ const toStringDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'string', + returnType: 'keyword', + }, + { + params: [ + { + name: 'field', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'field', + type: 'long', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'field', + type: 'text', + optional: false, + }, + ], + returnType: 'keyword', }, { params: [ { name: 'field', - type: 'string', + type: 'unsigned_long', optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, { params: [ @@ -4735,7 +7921,7 @@ const toStringDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'string', + returnType: 'keyword', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4765,7 +7951,7 @@ const toUnsignedLongDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'unsigned_long', }, { params: [ @@ -4775,27 +7961,67 @@ const toUnsignedLongDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'number', + returnType: 'unsigned_long', + }, + { + params: [ + { + name: 'field', + type: 'double', + optional: false, + }, + ], + returnType: 'unsigned_long', + }, + { + params: [ + { + name: 'field', + type: 'integer', + optional: false, + }, + ], + returnType: 'unsigned_long', + }, + { + params: [ + { + name: 'field', + type: 'keyword', + optional: false, + }, + ], + returnType: 'unsigned_long', + }, + { + params: [ + { + name: 'field', + type: 'long', + optional: false, + }, + ], + returnType: 'unsigned_long', }, { params: [ { name: 'field', - type: 'number', + type: 'text', optional: false, }, ], - returnType: 'number', + returnType: 'unsigned_long', }, { params: [ { name: 'field', - type: 'string', + type: 'unsigned_long', optional: false, }, ], - returnType: 'number', + returnType: 'unsigned_long', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4819,11 +8045,21 @@ const toUpperDefinition: FunctionDefinition = { params: [ { name: 'str', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'str', + type: 'text', optional: false, }, ], - returnType: 'string', + returnType: 'text', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -4845,7 +8081,17 @@ const toVersionDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'version', + }, + { + params: [ + { + name: 'field', + type: 'text', optional: false, }, ], @@ -4881,11 +8127,21 @@ const trimDefinition: FunctionDefinition = { params: [ { name: 'string', - type: 'string', + type: 'keyword', + optional: false, + }, + ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'string', + type: 'text', optional: false, }, ], - returnType: 'string', + returnType: 'text', }, ], supportedCommands: ['stats', 'metrics', 'eval', 'where', 'row', 'sort'], diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts index 79ac91d14403a..043c6e44d55bc 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts @@ -7,8 +7,53 @@ */ import { i18n } from '@kbn/i18n'; -import { FunctionDefinition } from './types'; +import { FunctionDefinition, FunctionParameterType, FunctionReturnType } from './types'; +const groupingTypeTable: Array< + [ + FunctionParameterType, + FunctionParameterType, + FunctionParameterType | null, + FunctionParameterType | null, + FunctionReturnType + ] +> = [ + // field // bucket //from // to //result + ['date', 'date_period', null, null, 'date'], + ['date', 'integer', 'date', 'date', 'date'], + // Modified time_duration to time_literal + ['date', 'time_literal', null, null, 'date'], + ['double', 'double', null, null, 'double'], + ['double', 'integer', 'double', 'double', 'double'], + ['double', 'integer', 'double', 'integer', 'double'], + ['double', 'integer', 'double', 'long', 'double'], + ['double', 'integer', 'integer', 'double', 'double'], + ['double', 'integer', 'integer', 'integer', 'double'], + ['double', 'integer', 'integer', 'long', 'double'], + ['double', 'integer', 'long', 'double', 'double'], + ['double', 'integer', 'long', 'integer', 'double'], + ['double', 'integer', 'long', 'long', 'double'], + ['integer', 'double', null, null, 'double'], + ['integer', 'integer', 'double', 'double', 'double'], + ['integer', 'integer', 'double', 'integer', 'double'], + ['integer', 'integer', 'double', 'long', 'double'], + ['integer', 'integer', 'integer', 'double', 'double'], + ['integer', 'integer', 'integer', 'integer', 'double'], + ['integer', 'integer', 'integer', 'long', 'double'], + ['integer', 'integer', 'long', 'double', 'double'], + ['integer', 'integer', 'long', 'integer', 'double'], + ['integer', 'integer', 'long', 'long', 'double'], + ['long', 'double', null, null, 'double'], + ['long', 'integer', 'double', 'double', 'double'], + ['long', 'integer', 'double', 'integer', 'double'], + ['long', 'integer', 'double', 'long', 'double'], + ['long', 'integer', 'integer', 'double', 'double'], + ['long', 'integer', 'integer', 'integer', 'double'], + ['long', 'integer', 'integer', 'long', 'double'], + ['long', 'integer', 'long', 'double', 'double'], + ['long', 'integer', 'long', 'integer', 'double'], + ['long', 'integer', 'long', 'long', 'double'], +]; export const groupingFunctionDefinitions: FunctionDefinition[] = [ { name: 'bucket', @@ -21,65 +66,18 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [ supportedCommands: ['stats'], supportedOptions: ['by'], signatures: [ - { - params: [ - { name: 'field', type: 'date' }, - { name: 'buckets', type: 'time_literal', constantOnly: true }, - ], - returnType: 'date', - }, - { - params: [ - { name: 'field', type: 'number' }, - { name: 'buckets', type: 'number', constantOnly: true }, - ], - returnType: 'number', - }, - { - params: [ - { name: 'field', type: 'date' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startDate', type: 'string', constantOnly: true }, - { name: 'endDate', type: 'string', constantOnly: true }, - ], - returnType: 'date', - }, - { - params: [ - { name: 'field', type: 'date' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startDate', type: 'date', constantOnly: true }, - { name: 'endDate', type: 'date', constantOnly: true }, - ], - returnType: 'date', - }, - { - params: [ - { name: 'field', type: 'date' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startDate', type: 'string', constantOnly: true }, - { name: 'endDate', type: 'date', constantOnly: true }, - ], - returnType: 'date', - }, - { - params: [ - { name: 'field', type: 'date' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startDate', type: 'date', constantOnly: true }, - { name: 'endDate', type: 'string', constantOnly: true }, - ], - returnType: 'date', - }, - { - params: [ - { name: 'field', type: 'number' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startValue', type: 'number', constantOnly: true }, - { name: 'endValue', type: 'number', constantOnly: true }, - ], - returnType: 'number', - }, + ...groupingTypeTable.map((signature) => { + const [fieldType, bucketType, fromType, toType, resultType] = signature; + return { + params: [ + { name: 'field', type: fieldType }, + { name: 'buckets', type: bucketType, constantOnly: true }, + ...(fromType ? [{ name: 'startDate', type: fromType, constantOnly: true }] : []), + ...(toType ? [{ name: 'endDate', type: toType, constantOnly: true }] : []), + ], + returnType: resultType, + }; + }), ], examples: [ 'from index | eval hd = bucket(bytes, 1 hour)', diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts index dbf0b7782d1a4..660bb1c7aca81 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts @@ -8,10 +8,20 @@ import type { ESQLCommand, ESQLCommandOption, ESQLFunction, ESQLMessage } from '@kbn/esql-ast'; +// Currently, partial of the full list +// https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/type/DataType.java export const supportedFieldTypes = [ - 'number', + 'double', + 'unsigned_long', + 'long', + 'integer', + 'counter_integer', + 'counter_long', + 'counter_double', 'date', - 'string', + 'date_period', + 'text', + 'keyword', 'boolean', 'ip', 'cartesian_point', @@ -28,21 +38,43 @@ export type SupportedFieldType = (typeof supportedFieldTypes)[number]; export type FunctionParameterType = | SupportedFieldType + | 'string' | 'null' | 'any' | 'chrono_literal' | 'time_literal' - | 'number[]' + | 'time_duration' + | 'double[]' + | 'unsigned_long[]' + | 'long[]' + | 'integer[]' + | 'counter_integer[]' + | 'counter_long[]' + | 'counter_double[]' | 'string[]' + | 'keyword[]' + | 'text[]' | 'boolean[]' | 'any[]' - | 'date[]'; + | 'datetime[]' + | 'date_period[]'; export type FunctionReturnType = - | 'number' + | 'double' + | 'unsigned_long' + | 'long' + | 'integer' + | 'int' + | 'counter_integer' + | 'counter_long' + | 'counter_double' | 'date' + | 'date_period' + | 'time_duration' | 'any' | 'boolean' + | 'text' + | 'keyword' | 'string' | 'cartesian_point' | 'cartesian_shape' diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/esql_to_kibana_type.ts b/packages/kbn-esql-validation-autocomplete/src/shared/esql_to_kibana_type.ts deleted file mode 100644 index f13052288f29f..0000000000000 --- a/packages/kbn-esql-validation-autocomplete/src/shared/esql_to_kibana_type.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -const ESQL_NUMBER_TYPES = [ - 'double', - 'unsigned_long', - 'long', - 'integer', - 'int', - 'counter_integer', - 'counter_long', - 'counter_double', -]; - -const ESQL_TEXT_TYPES = ['text', 'keyword', 'string']; - -export const esqlToKibanaType = (elasticsearchType: string) => { - if (ESQL_NUMBER_TYPES.includes(elasticsearchType)) { - return 'number'; - } - - if (ESQL_TEXT_TYPES.includes(elasticsearchType)) { - return 'string'; - } - - if (['datetime', 'time_duration'].includes(elasticsearchType)) { - return 'date'; - } - - if (elasticsearchType === 'bool') { - return 'boolean'; - } - - if (elasticsearchType === 'date_period') { - return 'time_literal'; // TODO - consider aligning with Elasticsearch - } - - return elasticsearchType; -}; diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/esql_types.ts b/packages/kbn-esql-validation-autocomplete/src/shared/esql_types.ts new file mode 100644 index 0000000000000..dab8769f8477a --- /dev/null +++ b/packages/kbn-esql-validation-autocomplete/src/shared/esql_types.ts @@ -0,0 +1,49 @@ +/* + * 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 { ESQLDecimalLiteral, ESQLNumericLiteralType } from '@kbn/esql-ast/src/types'; + +export const ESQL_COMMON_NUMERIC_TYPES = ['double', 'long', 'integer'] as const; +export const ESQL_NUMERIC_DECIMAL_TYPES = [ + 'double', + 'unsigned_long', + 'long', + 'counter_long', + 'counter_double', +] as const; +export const ESQL_NUMBER_TYPES = [ + 'integer', + 'counter_integer', + ...ESQL_NUMERIC_DECIMAL_TYPES, +] as const; + +export const ESQL_STRING_TYPES = ['keyword', 'text'] as const; +export const ESQL_DATE_TYPES = ['datetime', 'date_period'] as const; + +/** + * + * @param type + * @returns + */ +export function isStringType(type: unknown) { + return typeof type === 'string' && ['keyword', 'text'].includes(type); +} + +export function isNumericType(type: unknown): type is ESQLNumericLiteralType { + return ( + typeof type === 'string' && + [...ESQL_NUMBER_TYPES, 'decimal'].includes(type as (typeof ESQL_NUMBER_TYPES)[number]) + ); +} + +export function isNumericDecimalType(type: unknown): type is ESQLDecimalLiteral { + return ( + typeof type === 'string' && + ESQL_NUMERIC_DECIMAL_TYPES.includes(type as (typeof ESQL_NUMERIC_DECIMAL_TYPES)[number]) + ); +} diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts index 68658b29251b5..e13326c2a9f43 100644 --- a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts +++ b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts @@ -33,7 +33,7 @@ import { withOption, appendSeparatorOption, } from '../definitions/options'; -import type { +import { CommandDefinition, CommandOptionsDefinition, FunctionParameter, @@ -43,7 +43,7 @@ import type { } from '../definitions/types'; import type { ESQLRealField, ESQLVariable, ReferenceMaps } from '../validation/types'; import { removeMarkerArgFromArgsList } from './context'; -import { esqlToKibanaType } from './esql_to_kibana_type'; +import { isNumericDecimalType } from './esql_types'; import type { ReasonTypes } from './types'; export function nonNullable(v: T): v is NonNullable { @@ -226,6 +226,14 @@ function compareLiteralType(argType: string, item: ESQLLiteral) { return true; } + if (item.literalType === 'decimal' && isNumericDecimalType(argType)) { + return true; + } + + if (item.literalType === 'string' && (argType === 'text' || argType === 'keyword')) { + return true; + } + if (item.literalType !== 'string') { if (argType === item.literalType) { return true; @@ -234,7 +242,7 @@ function compareLiteralType(argType: string, item: ESQLLiteral) { } // date-type parameters accept string literals because of ES auto-casting - return ['string', 'date'].includes(argType); + return ['string', 'date', 'date', 'date_period'].includes(argType); } /** @@ -245,7 +253,14 @@ export function lookupColumn( { fields, variables }: Pick ): ESQLRealField | ESQLVariable | undefined { const columnName = getQuotedColumnName(column); - return fields.get(columnName) || variables.get(columnName)?.[0]; + return ( + fields.get(columnName) || + variables.get(columnName)?.[0] || + // It's possible columnName has backticks "`fieldName`" + // so we need to access the original name as well + fields.get(column.name) || + variables.get(column.name)?.[0] + ); } const ARRAY_REGEXP = /\[\]$/; @@ -255,10 +270,19 @@ export function isArrayType(type: string) { } const arrayToSingularMap: Map = new Map([ - ['number[]', 'number'], - ['date[]', 'date'], - ['boolean[]', 'boolean'], + ['double[]', 'double'], + ['unsigned_long[]', 'unsigned_long'], + ['long[]', 'long'], + ['integer[]', 'integer'], + ['counter_integer[]', 'counter_integer'], + ['counter_long[]', 'counter_long'], + ['counter_double[]', 'counter_double'], ['string[]', 'string'], + ['keyword[]', 'keyword'], + ['text[]', 'text'], + ['datetime[]', 'date'], + ['date_period[]', 'date_period'], + ['boolean[]', 'boolean'], ['any[]', 'any'], ]); @@ -407,7 +431,8 @@ export function checkFunctionArgMatchesDefinition( return true; } if (arg.type === 'literal') { - return compareLiteralType(argType, arg); + const matched = compareLiteralType(argType, arg); + return matched; } if (arg.type === 'function') { if (isSupportedFunction(arg.name, parentCommand).supported) { @@ -428,11 +453,21 @@ export function checkFunctionArgMatchesDefinition( } const wrappedTypes = Array.isArray(validHit.type) ? validHit.type : [validHit.type]; // if final type is of type any make it pass for now - return wrappedTypes.some((ct) => ['any', 'null'].includes(ct) || argType === ct); + return wrappedTypes.some( + (ct) => + ['any', 'null'].includes(ct) || + argType === ct || + (ct === 'string' && ['text', 'keyword'].includes(argType)) + ); } if (arg.type === 'inlineCast') { - // TODO - remove with https://github.com/elastic/kibana/issues/174710 - return argType === esqlToKibanaType(arg.castType); + const lowerArgType = argType?.toLowerCase(); + const lowerArgCastType = arg.castType?.toLowerCase(); + return ( + lowerArgType === lowerArgCastType || + // for valid shorthand casts like 321.12::int or "false"::bool + (['int', 'bool'].includes(lowerArgCastType) && argType.startsWith(lowerArgCastType)) + ); } } diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/variables.ts b/packages/kbn-esql-validation-autocomplete/src/shared/variables.ts index 22c38cd286e19..ee1a912c688ea 100644 --- a/packages/kbn-esql-validation-autocomplete/src/shared/variables.ts +++ b/packages/kbn-esql-validation-autocomplete/src/shared/variables.ts @@ -35,7 +35,7 @@ function addToVariables( if (isColumnItem(oldArg) && isColumnItem(newArg)) { const newVariable: ESQLVariable = { name: newArg.name, - type: 'number' /* fallback to number */, + type: 'double' /* fallback to number */, location: newArg.location, }; // Now workout the exact type @@ -107,7 +107,7 @@ function addVariableFromAssignment( const rightHandSideArgType = getAssignRightHandSideType(assignOperation.args[1], fields); addToVariableOccurrencies(variables, { name: assignOperation.args[0].name, - type: rightHandSideArgType || 'number' /* fallback to number */, + type: rightHandSideArgType || 'double' /* fallback to number */, location: assignOperation.args[0].location, }); } @@ -125,7 +125,7 @@ function addVariableFromExpression( queryString, expressionOperation.location ); - const expressionType = 'number'; + const expressionType = 'double'; addToVariableOccurrencies(variables, { name: forwardThinkingVariableName, type: expressionType, diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/helpers.ts index 9d28f88115b42..02f7c30d96ff9 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/helpers.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/helpers.ts @@ -31,7 +31,7 @@ export const setup = async () => { return await validateQuery(query, getAstAndSyntaxErrors, opts, cb); }; - const assertErrors = (errors: unknown[], expectedErrors: string[]) => { + const assertErrors = (errors: unknown[], expectedErrors: string[], query?: string) => { const errorMessages: string[] = []; for (const error of errors) { if (error && typeof error === 'object') { @@ -46,7 +46,16 @@ export const setup = async () => { errorMessages.push(String(error)); } } - expect(errorMessages.sort()).toStrictEqual(expectedErrors.sort()); + + try { + expect(errorMessages.sort()).toStrictEqual(expectedErrors.sort()); + } catch (error) { + throw Error(`${query}\n + Received: + '${errorMessages.sort()}' + Expected: + ${expectedErrors.sort()}`); + } }; const expectErrors = async ( @@ -57,9 +66,9 @@ export const setup = async () => { cb: ESQLCallbacks = callbacks ) => { const { errors, warnings } = await validateQuery(query, getAstAndSyntaxErrors, opts, cb); - assertErrors(errors, expectedErrors); + assertErrors(errors, expectedErrors, query); if (expectedWarnings) { - assertErrors(warnings, expectedWarnings); + assertErrors(warnings, expectedWarnings, query); } }; diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.metrics.ts b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.metrics.ts index 44c15c722a1de..ea5df88553888 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.metrics.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.metrics.ts @@ -85,7 +85,7 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { await expectErrors(`METRICS average()`, ['Unknown index [average()]']); await expectErrors(`metrics custom_function()`, ['Unknown index [custom_function()]']); await expectErrors(`metrics indexes*`, ['Unknown index [indexes*]']); - await expectErrors('metrics numberField', ['Unknown index [numberField]']); + await expectErrors('metrics doubleField', ['Unknown index [doubleField]']); await expectErrors('metrics policy', ['Unknown index [policy]']); }); }); @@ -95,26 +95,26 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { const { expectErrors } = await setup(); await expectErrors('METRICS a_index count()', []); - await expectErrors('metrics a_index avg(numberField) by 1', []); - await expectErrors('metrics a_index count(`numberField`)', []); + await expectErrors('metrics a_index avg(doubleField) by 1', []); + await expectErrors('metrics a_index count(`doubleField`)', []); await expectErrors('metrics a_index count(*)', []); await expectErrors('metrics index var0 = count(*)', []); await expectErrors('metrics a_index var0 = count()', []); - await expectErrors('metrics a_index var0 = avg(numberField), count(*)', []); + await expectErrors('metrics a_index var0 = avg(doubleField), count(*)', []); await expectErrors(`metrics a_index sum(case(false, 0, 1))`, []); await expectErrors(`metrics a_index var0 = sum( case(false, 0, 1))`, []); - await expectErrors('metrics a_index count(stringField == "a" or null)', []); - await expectErrors('metrics other_index max(numberField) by stringField', []); + await expectErrors('metrics a_index count(textField == "a" or null)', []); + await expectErrors('metrics other_index max(doubleField) by textField', []); }); test('syntax errors', async () => { const { expectErrors } = await setup(); - await expectErrors('metrics a_index numberField=', [ + await expectErrors('metrics a_index doubleField=', [ expect.any(String), "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); - await expectErrors('metrics a_index numberField=5 by ', [ + await expectErrors('metrics a_index doubleField=5 by ', [ expect.any(String), "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); @@ -131,29 +131,29 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { test('errors when no aggregation function specified', async () => { const { expectErrors } = await setup(); - await expectErrors('metrics a_index numberField + 1', [ - 'At least one aggregation function required in [METRICS], found [numberField+1]', + await expectErrors('metrics a_index doubleField + 1', [ + 'At least one aggregation function required in [METRICS], found [doubleField+1]', ]); - await expectErrors('metrics a_index a = numberField + 1', [ - 'At least one aggregation function required in [METRICS], found [a=numberField+1]', + await expectErrors('metrics a_index a = doubleField + 1', [ + 'At least one aggregation function required in [METRICS], found [a=doubleField+1]', ]); - await expectErrors('metrics a_index a = numberField + 1, stringField', [ - 'At least one aggregation function required in [METRICS], found [a=numberField+1]', - 'Expected an aggregate function or group but got [stringField] of type [FieldAttribute]', + await expectErrors('metrics a_index a = doubleField + 1, textField', [ + 'At least one aggregation function required in [METRICS], found [a=doubleField+1]', + 'Expected an aggregate function or group but got [textField] of type [FieldAttribute]', ]); - await expectErrors('metrics a_index numberField + 1 by ipField', [ - 'At least one aggregation function required in [METRICS], found [numberField+1]', + await expectErrors('metrics a_index doubleField + 1 by ipField', [ + 'At least one aggregation function required in [METRICS], found [doubleField+1]', ]); }); test('errors on agg and non-agg mix', async () => { const { expectErrors } = await setup(); - await expectErrors('METRICS a_index sum( numberField ) + abs( numberField ) ', [ - 'Cannot combine aggregation and non-aggregation values in [METRICS], found [sum(numberField)+abs(numberField)]', + await expectErrors('METRICS a_index sum( doubleField ) + abs( doubleField ) ', [ + 'Cannot combine aggregation and non-aggregation values in [METRICS], found [sum(doubleField)+abs(doubleField)]', ]); - await expectErrors('METRICS a_index abs( numberField + sum( numberField )) ', [ - 'Cannot combine aggregation and non-aggregation values in [METRICS], found [abs(numberField+sum(numberField))]', + await expectErrors('METRICS a_index abs( doubleField + sum( doubleField )) ', [ + 'Cannot combine aggregation and non-aggregation values in [METRICS], found [abs(doubleField+sum(doubleField))]', ]); }); @@ -169,8 +169,8 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { test('errors when input is not an aggregate function', async () => { const { expectErrors } = await setup(); - await expectErrors('metrics a_index numberField ', [ - 'Expected an aggregate function or group but got [numberField] of type [FieldAttribute]', + await expectErrors('metrics a_index doubleField ', [ + 'Expected an aggregate function or group but got [doubleField] of type [FieldAttribute]', ]); }); @@ -179,9 +179,9 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { for (const subCommand of ['keep', 'drop', 'eval']) { await expectErrors( - 'metrics a_index count(`numberField`) | ' + + 'metrics a_index count(`doubleField`) | ' + subCommand + - ' `count(``numberField``)` ', + ' `count(``doubleField``)` ', [] ); } @@ -194,7 +194,7 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { 'Using wildcards (*) in round is not allowed', ]); await expectErrors('metrics a_index count(count(*))', [ - `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [count(*)] of type [number]`, + `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [count(*)] of type [long]`, ]); }); }); @@ -204,21 +204,21 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { const { expectErrors } = await setup(); await expectErrors( - 'metrics a_index avg(numberField), percentile(numberField, 50) by ipField', + 'metrics a_index avg(doubleField), percentile(doubleField, 50) by ipField', [] ); await expectErrors( - 'metrics a_index avg(numberField), percentile(numberField, 50) BY ipField', + 'metrics a_index avg(doubleField), percentile(doubleField, 50) BY ipField', [] ); await expectErrors( - 'metrics a_index avg(numberField), percentile(numberField, 50) + 1 by ipField', + 'metrics a_index avg(doubleField), percentile(doubleField, 50) + 1 by ipField', [] ); - await expectErrors('metrics a_index avg(numberField) by stringField | limit 100', []); + await expectErrors('metrics a_index avg(doubleField) by textField | limit 100', []); for (const op of ['+', '-', '*', '/', '%']) { await expectErrors( - `metrics a_index avg(numberField) ${op} percentile(numberField, 50) BY ipField`, + `metrics a_index avg(doubleField) ${op} percentile(doubleField, 50) BY ipField`, [] ); } @@ -227,9 +227,9 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { test('syntax does not allow clause without ', async () => { const { expectErrors } = await setup(); - await expectErrors('metrics a_index BY stringField', [ + await expectErrors('metrics a_index BY textField', [ 'Expected an aggregate function or group but got [BY] of type [FieldAttribute]', - "SyntaxError: extraneous input 'stringField' expecting ", + "SyntaxError: extraneous input 'textField' expecting ", ]); }); @@ -239,7 +239,7 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { await expectErrors('metrics a_index count(* + 1) BY ipField', [ "SyntaxError: no viable alternative at input 'count(* +'", ]); - await expectErrors('metrics a_index \n count(* + round(numberField)) BY ipField', [ + await expectErrors('metrics a_index \n count(* + round(doubleField)) BY ipField', [ "SyntaxError: no viable alternative at input 'count(* +'", ]); }); @@ -251,20 +251,20 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { 'Using wildcards (*) in round is not allowed', ]); await expectErrors('metrics a_index count(count(*)) BY ipField', [ - `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [count(*)] of type [number]`, + `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [count(*)] of type [long]`, ]); }); test('errors on unknown field', async () => { const { expectErrors } = await setup(); - await expectErrors('metrics a_index avg(numberField) by wrongField', [ + await expectErrors('metrics a_index avg(doubleField) by wrongField', [ 'Unknown column [wrongField]', ]); - await expectErrors('metrics a_index avg(numberField) by wrongField + 1', [ + await expectErrors('metrics a_index avg(doubleField) by wrongField + 1', [ 'Unknown column [wrongField]', ]); - await expectErrors('metrics a_index avg(numberField) by var0 = wrongField + 1', [ + await expectErrors('metrics a_index avg(doubleField) by var0 = wrongField + 1', [ 'Unknown column [wrongField]', ]); }); @@ -272,11 +272,11 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { test('various errors', async () => { const { expectErrors } = await setup(); - await expectErrors('METRICS a_index avg(numberField) by percentile(numberField)', [ + await expectErrors('METRICS a_index avg(doubleField) by percentile(doubleField)', [ 'METRICS BY does not support function percentile', ]); await expectErrors( - 'METRICS a_index avg(numberField) by stringField, percentile(numberField) by ipField', + 'METRICS a_index avg(doubleField) by textField, percentile(doubleField) by ipField', [ "SyntaxError: mismatched input 'by' expecting ", 'METRICS BY does not support function percentile', diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.stats.ts b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.stats.ts index 5a98d362dc002..f5bd10fe0ca83 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.stats.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.stats.ts @@ -15,15 +15,15 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { test('no errors on correct usage', async () => { const { expectErrors } = await setup(); - await expectErrors('from a_index | stats by stringField', []); + await expectErrors('from a_index | stats by textField', []); await expectErrors( `FROM index - | EVAL numberField * 3.281 - | STATS avg_numberField = AVG(\`numberField * 3.281\`)`, + | EVAL doubleField * 3.281 + | STATS avg_doubleField = AVG(\`doubleField * 3.281\`)`, [] ); await expectErrors( - `FROM index | STATS AVG(numberField) by round(numberField) + 1 | EVAL \`round(numberField) + 1\` / 2`, + `FROM index | STATS AVG(doubleField) by round(doubleField) + 1 | EVAL \`round(doubleField) + 1\` / 2`, [] ); }); @@ -40,18 +40,18 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { test('no errors on correct usage', async () => { const { expectErrors } = await setup(); - await expectErrors('from a_index | stats avg(numberField) by 1', []); - await expectErrors('from a_index | stats count(`numberField`)', []); + await expectErrors('from a_index | stats avg(doubleField) by 1', []); + await expectErrors('from a_index | stats count(`doubleField`)', []); await expectErrors('from a_index | stats count(*)', []); await expectErrors('from a_index | stats count()', []); await expectErrors('from a_index | stats var0 = count(*)', []); await expectErrors('from a_index | stats var0 = count()', []); - await expectErrors('from a_index | stats var0 = avg(numberField), count(*)', []); + await expectErrors('from a_index | stats var0 = avg(doubleField), count(*)', []); await expectErrors(`from a_index | stats sum(case(false, 0, 1))`, []); await expectErrors(`from a_index | stats var0 = sum( case(false, 0, 1))`, []); // "or" must accept "null" - await expectErrors('from a_index | stats count(stringField == "a" or null)', []); + await expectErrors('from a_index | stats count(textField == "a" or null)', []); }); test('sub-command can reference aggregated field', async () => { @@ -59,9 +59,9 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { for (const subCommand of ['keep', 'drop', 'eval']) { await expectErrors( - 'from a_index | stats count(`numberField`) | ' + + 'from a_index | stats count(`doubleField`) | ' + subCommand + - ' `count(``numberField``)` ', + ' `count(``doubleField``)` ', [] ); } @@ -70,64 +70,64 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { test('errors on agg and non-agg mix', async () => { const { expectErrors } = await setup(); - await expectErrors('from a_index | STATS sum( numberField ) + abs( numberField ) ', [ - 'Cannot combine aggregation and non-aggregation values in [STATS], found [sum(numberField)+abs(numberField)]', + await expectErrors('from a_index | STATS sum( doubleField ) + abs( doubleField ) ', [ + 'Cannot combine aggregation and non-aggregation values in [STATS], found [sum(doubleField)+abs(doubleField)]', ]); - await expectErrors('from a_index | STATS abs( numberField + sum( numberField )) ', [ - 'Cannot combine aggregation and non-aggregation values in [STATS], found [abs(numberField+sum(numberField))]', + await expectErrors('from a_index | STATS abs( doubleField + sum( doubleField )) ', [ + 'Cannot combine aggregation and non-aggregation values in [STATS], found [abs(doubleField+sum(doubleField))]', ]); }); test('errors on each aggregation field, which does not contain at least one agg function', async () => { const { expectErrors } = await setup(); - await expectErrors('from a_index | stats numberField + 1', [ - 'At least one aggregation function required in [STATS], found [numberField+1]', + await expectErrors('from a_index | stats doubleField + 1', [ + 'At least one aggregation function required in [STATS], found [doubleField+1]', ]); - await expectErrors('from a_index | stats numberField + 1, stringField', [ - 'At least one aggregation function required in [STATS], found [numberField+1]', - 'Expected an aggregate function or group but got [stringField] of type [FieldAttribute]', + await expectErrors('from a_index | stats doubleField + 1, textField', [ + 'At least one aggregation function required in [STATS], found [doubleField+1]', + 'Expected an aggregate function or group but got [textField] of type [FieldAttribute]', ]); - await expectErrors('from a_index | stats numberField + 1, numberField + 2, count()', [ - 'At least one aggregation function required in [STATS], found [numberField+1]', - 'At least one aggregation function required in [STATS], found [numberField+2]', + await expectErrors('from a_index | stats doubleField + 1, doubleField + 2, count()', [ + 'At least one aggregation function required in [STATS], found [doubleField+1]', + 'At least one aggregation function required in [STATS], found [doubleField+2]', ]); await expectErrors( - 'from a_index | stats numberField + 1, numberField + count(), count()', - ['At least one aggregation function required in [STATS], found [numberField+1]'] + 'from a_index | stats doubleField + 1, doubleField + count(), count()', + ['At least one aggregation function required in [STATS], found [doubleField+1]'] ); - await expectErrors('from a_index | stats 5 + numberField + 1', [ - 'At least one aggregation function required in [STATS], found [5+numberField+1]', + await expectErrors('from a_index | stats 5 + doubleField + 1', [ + 'At least one aggregation function required in [STATS], found [5+doubleField+1]', ]); - await expectErrors('from a_index | stats numberField + 1 by ipField', [ - 'At least one aggregation function required in [STATS], found [numberField+1]', + await expectErrors('from a_index | stats doubleField + 1 by ipField', [ + 'At least one aggregation function required in [STATS], found [doubleField+1]', ]); }); test('errors when input is not an aggregate function', async () => { const { expectErrors } = await setup(); - await expectErrors('from a_index | stats numberField ', [ - 'Expected an aggregate function or group but got [numberField] of type [FieldAttribute]', + await expectErrors('from a_index | stats doubleField ', [ + 'Expected an aggregate function or group but got [doubleField] of type [FieldAttribute]', ]); }); test('various errors', async () => { const { expectErrors } = await setup(); - await expectErrors('from a_index | stats numberField=', [ + await expectErrors('from a_index | stats doubleField=', [ "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); - await expectErrors('from a_index | stats numberField=5 by ', [ + await expectErrors('from a_index | stats doubleField=5 by ', [ "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); - await expectErrors('from a_index | stats avg(numberField) by wrongField', [ + await expectErrors('from a_index | stats avg(doubleField) by wrongField', [ 'Unknown column [wrongField]', ]); - await expectErrors('from a_index | stats avg(numberField) by wrongField + 1', [ + await expectErrors('from a_index | stats avg(doubleField) by wrongField + 1', [ 'Unknown column [wrongField]', ]); - await expectErrors('from a_index | stats avg(numberField) by var0 = wrongField + 1', [ + await expectErrors('from a_index | stats avg(doubleField) by var0 = wrongField + 1', [ 'Unknown column [wrongField]', ]); await expectErrors('from a_index | stats var0 = avg(fn(number)), count(*)', [ @@ -142,7 +142,7 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { 'Using wildcards (*) in round is not allowed', ]); await expectErrors('from a_index | stats count(count(*))', [ - `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [count(*)] of type [number]`, + `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [count(*)] of type [long]`, ]); }); }); @@ -152,20 +152,20 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { const { expectErrors } = await setup(); await expectErrors( - 'from a_index | stats avg(numberField), percentile(numberField, 50) by ipField', + 'from a_index | stats avg(doubleField), percentile(doubleField, 50) by ipField', [] ); await expectErrors( - 'from a_index | stats avg(numberField), percentile(numberField, 50) BY ipField', + 'from a_index | stats avg(doubleField), percentile(doubleField, 50) BY ipField', [] ); await expectErrors( - 'from a_index | stats avg(numberField), percentile(numberField, 50) + 1 by ipField', + 'from a_index | stats avg(doubleField), percentile(doubleField, 50) + 1 by ipField', [] ); for (const op of ['+', '-', '*', '/', '%']) { await expectErrors( - `from a_index | stats avg(numberField) ${op} percentile(numberField, 50) BY ipField`, + `from a_index | stats avg(doubleField) ${op} percentile(doubleField, 50) BY ipField`, [] ); } @@ -185,7 +185,7 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { await expectErrors('from a_index | stats count(* + 1) BY ipField', [ "SyntaxError: no viable alternative at input 'count(* +'", ]); - await expectErrors('from a_index | stats count(* + round(numberField)) BY ipField', [ + await expectErrors('from a_index | stats count(* + round(doubleField)) BY ipField', [ "SyntaxError: no viable alternative at input 'count(* +'", ]); }); @@ -197,18 +197,18 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { 'Using wildcards (*) in round is not allowed', ]); await expectErrors('from a_index | stats count(count(*)) BY ipField', [ - `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [count(*)] of type [number]`, + `Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [count(*)] of type [long]`, ]); }); test('various errors', async () => { const { expectErrors } = await setup(); - await expectErrors('from a_index | stats avg(numberField) by percentile(numberField)', [ + await expectErrors('from a_index | stats avg(doubleField) by percentile(doubleField)', [ 'STATS BY does not support function percentile', ]); await expectErrors( - 'from a_index | stats avg(numberField) by stringField, percentile(numberField) by ipField', + 'from a_index | stats avg(doubleField) by textField, percentile(doubleField) by ipField', [ "SyntaxError: mismatched input 'by' expecting ", 'STATS BY does not support function percentile', @@ -220,34 +220,37 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { test('no errors', async () => { const { expectErrors } = await setup(); - await expectErrors('from index | stats by bucket(dateField, pi(), "", "")', []); await expectErrors( 'from index | stats by bucket(dateField, 1 + 30 / 10, "", "")', [] ); await expectErrors( 'from index | stats by bucket(dateField, 1 + 30 / 10, concat("", ""), "")', - [] + ['Argument of [bucket] must be [date], found value [concat("","")] type [keyword]'] ); }); test('errors', async () => { const { expectErrors } = await setup(); + await expectErrors('from index | stats by bucket(dateField, pi(), "", "")', [ + 'Argument of [bucket] must be [integer], found value [pi()] type [double]', + ]); + await expectErrors( - 'from index | stats by bucket(dateField, abs(numberField), "", "")', - ['Argument of [bucket] must be a constant, received [abs(numberField)]'] + 'from index | stats by bucket(dateField, abs(doubleField), "", "")', + ['Argument of [bucket] must be a constant, received [abs(doubleField)]'] ); await expectErrors( - 'from index | stats by bucket(dateField, abs(length(numberField)), "", "")', - ['Argument of [bucket] must be a constant, received [abs(length(numberField))]'] + 'from index | stats by bucket(dateField, abs(length(doubleField)), "", "")', + ['Argument of [bucket] must be a constant, received [abs(length(doubleField))]'] ); await expectErrors( - 'from index | stats by bucket(dateField, numberField, stringField, stringField)', + 'from index | stats by bucket(dateField, doubleField, textField, textField)', [ - '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 [bucket] must be a constant, received [doubleField]', + 'Argument of [bucket] must be a constant, received [textField]', + 'Argument of [bucket] must be a constant, received [textField]', ] ); }); @@ -269,11 +272,11 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { const { expectErrors } = await setup(); await expectErrors( - `from a_index | stats 5 + avg(numberField) ${builtinWrapping}`, + `from a_index | stats 5 + avg(doubleField) ${builtinWrapping}`, [] ); await expectErrors( - `from a_index | stats 5 ${builtinWrapping} + avg(numberField)`, + `from a_index | stats 5 ${builtinWrapping} + avg(doubleField)`, [] ); }); @@ -281,16 +284,16 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { test('errors', async () => { const { expectErrors } = await setup(); - await expectErrors(`from a_index | stats 5 ${builtinWrapping} + numberField`, [ - `At least one aggregation function required in [STATS], found [5${builtinWrapping}+numberField]`, + await expectErrors(`from a_index | stats 5 ${builtinWrapping} + doubleField`, [ + `At least one aggregation function required in [STATS], found [5${builtinWrapping}+doubleField]`, ]); - await expectErrors(`from a_index | stats 5 + numberField ${builtinWrapping}`, [ - `At least one aggregation function required in [STATS], found [5+numberField${builtinWrapping}]`, + await expectErrors(`from a_index | stats 5 + doubleField ${builtinWrapping}`, [ + `At least one aggregation function required in [STATS], found [5+doubleField${builtinWrapping}]`, ]); await expectErrors( - `from a_index | stats 5 + numberField ${builtinWrapping}, var0 = sum(numberField)`, + `from a_index | stats 5 + doubleField ${builtinWrapping}, var0 = sum(doubleField)`, [ - `At least one aggregation function required in [STATS], found [5+numberField${builtinWrapping}]`, + `At least one aggregation function required in [STATS], found [5+doubleField${builtinWrapping}]`, ] ); }); @@ -304,31 +307,31 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { const { expectErrors } = await setup(); await expectErrors( - `from a_index | stats ${evalWrapping} sum(numberField) ${closingWrapping}`, + `from a_index | stats ${evalWrapping} sum(doubleField) ${closingWrapping}`, [] ); await expectErrors( - `from a_index | stats ${evalWrapping} sum(numberField) ${closingWrapping} + ${evalWrapping} sum(numberField) ${closingWrapping}`, + `from a_index | stats ${evalWrapping} sum(doubleField) ${closingWrapping} + ${evalWrapping} sum(doubleField) ${closingWrapping}`, [] ); await expectErrors( - `from a_index | stats ${evalWrapping} sum(numberField + numberField) ${closingWrapping}`, + `from a_index | stats ${evalWrapping} sum(doubleField + doubleField) ${closingWrapping}`, [] ); await expectErrors( - `from a_index | stats ${evalWrapping} sum(numberField + round(numberField)) ${closingWrapping}`, + `from a_index | stats ${evalWrapping} sum(doubleField + round(doubleField)) ${closingWrapping}`, [] ); await expectErrors( - `from a_index | stats ${evalWrapping} sum(numberField + round(numberField)) ${closingWrapping} + ${evalWrapping} sum(numberField + round(numberField)) ${closingWrapping}`, + `from a_index | stats ${evalWrapping} sum(doubleField + round(doubleField)) ${closingWrapping} + ${evalWrapping} sum(doubleField + round(doubleField)) ${closingWrapping}`, [] ); await expectErrors( - `from a_index | stats sum(${evalWrapping} numberField ${closingWrapping} )`, + `from a_index | stats sum(${evalWrapping} doubleField ${closingWrapping} )`, [] ); await expectErrors( - `from a_index | stats sum(${evalWrapping} numberField ${closingWrapping} ) + sum(${evalWrapping} numberField ${closingWrapping} )`, + `from a_index | stats sum(${evalWrapping} doubleField ${closingWrapping} ) + sum(${evalWrapping} doubleField ${closingWrapping} )`, [] ); }); @@ -337,21 +340,21 @@ export const validationStatsCommandTestSuite = (setup: helpers.Setup) => { const { expectErrors } = await setup(); await expectErrors( - `from a_index | stats ${evalWrapping} numberField + sum(numberField) ${closingWrapping}`, + `from a_index | stats ${evalWrapping} doubleField + sum(doubleField) ${closingWrapping}`, [ - `Cannot combine aggregation and non-aggregation values in [STATS], found [${evalWrapping}numberField+sum(numberField)${closingWrapping}]`, + `Cannot combine aggregation and non-aggregation values in [STATS], found [${evalWrapping}doubleField+sum(doubleField)${closingWrapping}]`, ] ); await expectErrors( - `from a_index | stats ${evalWrapping} numberField + sum(numberField) ${closingWrapping}, var0 = sum(numberField)`, + `from a_index | stats ${evalWrapping} doubleField + sum(doubleField) ${closingWrapping}, var0 = sum(doubleField)`, [ - `Cannot combine aggregation and non-aggregation values in [STATS], found [${evalWrapping}numberField+sum(numberField)${closingWrapping}]`, + `Cannot combine aggregation and non-aggregation values in [STATS], found [${evalWrapping}doubleField+sum(doubleField)${closingWrapping}]`, ] ); await expectErrors( - `from a_index | stats var0 = ${evalWrapping} numberField + sum(numberField) ${closingWrapping}, var1 = sum(numberField)`, + `from a_index | stats var0 = ${evalWrapping} doubleField + sum(doubleField) ${closingWrapping}, var1 = sum(doubleField)`, [ - `Cannot combine aggregation and non-aggregation values in [STATS], found [${evalWrapping}numberField+sum(numberField)${closingWrapping}]`, + `Cannot combine aggregation and non-aggregation values in [STATS], found [${evalWrapping}doubleField+sum(doubleField)${closingWrapping}]`, ] ); }); diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.eval.date_diff.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.eval.date_diff.test.ts new file mode 100644 index 0000000000000..fd21ceb9b681c --- /dev/null +++ b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.eval.date_diff.test.ts @@ -0,0 +1,56 @@ +/* + * 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 { setup } from './helpers'; + +describe('validation', () => { + describe('command', () => { + test('date_diff', async () => { + const { expectErrors } = await setup(); + await expectErrors( + 'row var = date_diff("month", "2023-12-02T11:00:00.000Z", "2023-12-02T11:00:00.000Z")', + [] + ); + await expectErrors( + 'row var = date_diff("mm", "2023-12-02T11:00:00.000Z", "2023-12-02T11:00:00.000Z")', + [] + ); + await expectErrors( + 'row var = date_diff("bogus", "2023-12-02T11:00:00.000Z", "2023-12-02T11:00:00.000Z")', + [] + ); + await expectErrors( + 'from a_index | eval date_diff(textField, "2023-12-02T11:00:00.000Z", "2023-12-02T11:00:00.000Z")', + [] + ); + await expectErrors( + 'from a_index | eval date_diff("month", dateField, "2023-12-02T11:00:00.000Z")', + [] + ); + await expectErrors( + 'from a_index | eval date_diff("month", "2023-12-02T11:00:00.000Z", dateField)', + [] + ); + await expectErrors('from a_index | eval date_diff("month", textField, dateField)', [ + 'Argument of [date_diff] must be [date], found value [textField] type [text]', + ]); + await expectErrors('from a_index | eval date_diff("month", dateField, textField)', [ + 'Argument of [date_diff] must be [date], found value [textField] type [text]', + ]); + await expectErrors( + 'from a_index | eval var = date_diff("year", to_datetime(textField), to_datetime(textField))', + [] + ); + await expectErrors('from a_index | eval date_diff(doubleField, textField, textField)', [ + 'Argument of [date_diff] must be [date], found value [textField] type [text]', + 'Argument of [date_diff] must be [date], found value [textField] type [text]', + 'Argument of [date_diff] must be [keyword], found value [doubleField] type [double]', + ]); + }); + }); +}); diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.params.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.params.test.ts index db132d4d3e488..d732838ed919e 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.params.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.params.test.ts @@ -23,18 +23,18 @@ test('should allow param inside agg function argument', async () => { test('allow params in WHERE command expressions', async () => { const { validate } = await setup(); - const res1 = await validate('FROM index | WHERE stringField >= ?start'); + const res1 = await validate('FROM index | WHERE textField >= ?start'); const res2 = await validate(` FROM index - | WHERE stringField >= ?start - | WHERE stringField <= ?0 - | WHERE stringField == ? + | WHERE textField >= ?start + | WHERE textField <= ?0 + | WHERE textField == ? `); const res3 = await validate(` FROM index - | WHERE stringField >= ?start - AND stringField <= ?0 - AND stringField == ? + | WHERE textField >= ?start + AND textField <= ?0 + AND textField == ? `); expect(res1).toMatchObject({ errors: [], warnings: [] }); 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 b8b91d665663f..0b601ab2f66a1 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 @@ -9,16 +9,48 @@ ], "fields": [ { - "name": "numberField", - "type": "number" + "name": "doubleField", + "type": "double" + }, + { + "name": "unsignedLongField", + "type": "unsigned_long" + }, + { + "name": "longField", + "type": "long" + }, + { + "name": "integerField", + "type": "integer" + }, + { + "name": "counterIntegerField", + "type": "counter_integer" + }, + { + "name": "counterLongField", + "type": "counter_long" + }, + { + "name": "counterDoubleField", + "type": "counter_double" }, { "name": "dateField", "type": "date" }, { - "name": "stringField", - "type": "string" + "name": "datePeriodField", + "type": "date_period" + }, + { + "name": "textField", + "type": "text" + }, + { + "name": "keywordField", + "type": "keyword" }, { "name": "booleanField", @@ -50,11 +82,11 @@ }, { "name": "any#Char$Field", - "type": "number" + "type": "double" }, { "name": "kubernetes.something.something", - "type": "number" + "type": "double" }, { "name": "@timestamp", @@ -68,11 +100,11 @@ "enrichFields": [ { "name": "otherField", - "type": "string" + "type": "text" }, { "name": "yetAnotherField", - "type": "number" + "type": "double" }, { "name": "otherStringField", @@ -417,9 +449,9 @@ "warning": [] }, { - "query": "row var = (numberField > 0)", + "query": "row var = (doubleField > 0)", "error": [ - "Unknown column [numberField]" + "Unknown column [doubleField]" ], "warning": [] }, @@ -441,8 +473,8 @@ { "query": "row var = false > false", "error": [ - "Argument of [>] must be [number], found value [false] type [boolean]", - "Argument of [>] must be [number], found value [false] type [boolean]" + "Argument of [>] must be [date], found value [false] type [boolean]", + "Argument of [>] must be [date], found value [false] type [boolean]" ], "warning": [] }, @@ -467,9 +499,9 @@ "warning": [] }, { - "query": "row var = (numberField >= 0)", + "query": "row var = (doubleField >= 0)", "error": [ - "Unknown column [numberField]" + "Unknown column [doubleField]" ], "warning": [] }, @@ -491,8 +523,8 @@ { "query": "row var = false >= false", "error": [ - "Argument of [>=] must be [number], found value [false] type [boolean]", - "Argument of [>=] must be [number], found value [false] type [boolean]" + "Argument of [>=] must be [date], found value [false] type [boolean]", + "Argument of [>=] must be [date], found value [false] type [boolean]" ], "warning": [] }, @@ -517,9 +549,9 @@ "warning": [] }, { - "query": "row var = (numberField < 0)", + "query": "row var = (doubleField < 0)", "error": [ - "Unknown column [numberField]" + "Unknown column [doubleField]" ], "warning": [] }, @@ -541,8 +573,8 @@ { "query": "row var = false < false", "error": [ - "Argument of [<] must be [number], found value [false] type [boolean]", - "Argument of [<] must be [number], found value [false] type [boolean]" + "Argument of [<] must be [date], found value [false] type [boolean]", + "Argument of [<] must be [date], found value [false] type [boolean]" ], "warning": [] }, @@ -567,9 +599,9 @@ "warning": [] }, { - "query": "row var = (numberField <= 0)", + "query": "row var = (doubleField <= 0)", "error": [ - "Unknown column [numberField]" + "Unknown column [doubleField]" ], "warning": [] }, @@ -591,8 +623,8 @@ { "query": "row var = false <= false", "error": [ - "Argument of [<=] must be [number], found value [false] type [boolean]", - "Argument of [<=] must be [number], found value [false] type [boolean]" + "Argument of [<=] must be [date], found value [false] type [boolean]", + "Argument of [<=] must be [date], found value [false] type [boolean]" ], "warning": [] }, @@ -617,9 +649,9 @@ "warning": [] }, { - "query": "row var = (numberField == 0)", + "query": "row var = (doubleField == 0)", "error": [ - "Unknown column [numberField]" + "Unknown column [doubleField]" ], "warning": [] }, @@ -664,9 +696,9 @@ "warning": [] }, { - "query": "row var = (numberField != 0)", + "query": "row var = (doubleField != 0)", "error": [ - "Unknown column [numberField]" + "Unknown column [doubleField]" ], "warning": [] }, @@ -713,7 +745,7 @@ { "query": "row var = now() + now()", "error": [ - "Argument of [+] must be [time_literal], found value [now()] type [date]" + "Argument of [+] must be [date_period], found value [now()] type [date]" ], "warning": [] }, @@ -730,7 +762,7 @@ { "query": "row var = now() - now()", "error": [ - "Argument of [-] must be [time_literal], found value [now()] type [date]" + "Argument of [-] must be [date_period], found value [now()] type [date]" ], "warning": [] }, @@ -747,8 +779,8 @@ { "query": "row var = now() * now()", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [now()] type [date]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [now()] type [date]" ], "warning": [] }, @@ -765,8 +797,8 @@ { "query": "row var = now() / now()", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [now()] type [date]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [now()] type [date]" ], "warning": [] }, @@ -783,8 +815,8 @@ { "query": "row var = now() % now()", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [now()] type [date]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [now()] type [date]" ], "warning": [] }, @@ -811,28 +843,28 @@ { "query": "row var = 5 like \"?a\"", "error": [ - "Argument of [like] must be [string], found value [5] type [number]" + "Argument of [like] must be [text], found value [5] type [integer]" ], "warning": [] }, { "query": "row var = 5 NOT like \"?a\"", "error": [ - "Argument of [not_like] must be [string], found value [5] type [number]" + "Argument of [not_like] must be [text], found value [5] type [integer]" ], "warning": [] }, { "query": "row var = NOT 5 like \"?a\"", "error": [ - "Argument of [like] must be [string], found value [5] type [number]" + "Argument of [like] must be [text], found value [5] type [integer]" ], "warning": [] }, { "query": "row var = NOT 5 NOT like \"?a\"", "error": [ - "Argument of [not_like] must be [string], found value [5] type [number]" + "Argument of [not_like] must be [text], found value [5] type [integer]" ], "warning": [] }, @@ -859,28 +891,28 @@ { "query": "row var = 5 rlike \"?a\"", "error": [ - "Argument of [rlike] must be [string], found value [5] type [number]" + "Argument of [rlike] must be [text], found value [5] type [integer]" ], "warning": [] }, { "query": "row var = 5 NOT rlike \"?a\"", "error": [ - "Argument of [not_rlike] must be [string], found value [5] type [number]" + "Argument of [not_rlike] must be [text], found value [5] type [integer]" ], "warning": [] }, { "query": "row var = NOT 5 rlike \"?a\"", "error": [ - "Argument of [rlike] must be [string], found value [5] type [number]" + "Argument of [rlike] must be [text], found value [5] type [integer]" ], "warning": [] }, { "query": "row var = NOT 5 NOT rlike \"?a\"", "error": [ - "Argument of [not_rlike] must be [string], found value [5] type [number]" + "Argument of [not_rlike] must be [text], found value [5] type [integer]" ], "warning": [] }, @@ -966,24 +998,24 @@ { "query": "row var = now() * 1 year", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 year] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 year] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 year", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 year] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 year] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 year", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 year] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 year] type [duration]" ], "warning": [] }, @@ -1031,24 +1063,24 @@ { "query": "row var = now() * 1 years", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 years] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 years] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 years", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 years] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 years] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 years", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 years] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 years] type [duration]" ], "warning": [] }, @@ -1096,24 +1128,24 @@ { "query": "row var = now() * 1 quarter", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 quarter] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 quarter] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 quarter", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 quarter] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 quarter] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 quarter", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 quarter] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 quarter] type [duration]" ], "warning": [] }, @@ -1161,24 +1193,24 @@ { "query": "row var = now() * 1 quarters", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 quarters] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 quarters] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 quarters", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 quarters] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 quarters] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 quarters", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 quarters] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 quarters] type [duration]" ], "warning": [] }, @@ -1226,24 +1258,24 @@ { "query": "row var = now() * 1 month", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 month] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 month] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 month", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 month] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 month] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 month", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 month] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 month] type [duration]" ], "warning": [] }, @@ -1291,24 +1323,24 @@ { "query": "row var = now() * 1 months", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 months] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 months] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 months", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 months] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 months] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 months", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 months] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 months] type [duration]" ], "warning": [] }, @@ -1356,24 +1388,24 @@ { "query": "row var = now() * 1 week", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 week] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 week] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 week", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 week] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 week] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 week", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 week] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 week] type [duration]" ], "warning": [] }, @@ -1421,24 +1453,24 @@ { "query": "row var = now() * 1 weeks", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 weeks] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 weeks] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 weeks", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 weeks] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 weeks] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 weeks", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 weeks] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 weeks] type [duration]" ], "warning": [] }, @@ -1486,24 +1518,24 @@ { "query": "row var = now() * 1 day", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 day] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 day] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 day", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 day] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 day] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 day", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 day] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 day] type [duration]" ], "warning": [] }, @@ -1551,24 +1583,24 @@ { "query": "row var = now() * 1 days", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 days] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 days] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 days", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 days] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 days] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 days", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 days] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 days] type [duration]" ], "warning": [] }, @@ -1616,24 +1648,24 @@ { "query": "row var = now() * 1 hour", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 hour] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 hour] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 hour", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 hour] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 hour] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 hour", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 hour] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 hour] type [duration]" ], "warning": [] }, @@ -1681,24 +1713,24 @@ { "query": "row var = now() * 1 hours", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 hours] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 hours] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 hours", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 hours] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 hours] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 hours", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 hours] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 hours] type [duration]" ], "warning": [] }, @@ -1746,24 +1778,24 @@ { "query": "row var = now() * 1 minute", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 minute] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 minute] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 minute", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 minute] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 minute] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 minute", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 minute] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 minute] type [duration]" ], "warning": [] }, @@ -1811,24 +1843,24 @@ { "query": "row var = now() * 1 minutes", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 minutes] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 minutes] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 minutes", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 minutes] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 minutes] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 minutes", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 minutes] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 minutes] type [duration]" ], "warning": [] }, @@ -1876,24 +1908,24 @@ { "query": "row var = now() * 1 second", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 second] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 second] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 second", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 second] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 second] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 second", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 second] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 second] type [duration]" ], "warning": [] }, @@ -1941,24 +1973,24 @@ { "query": "row var = now() * 1 seconds", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 seconds] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 seconds] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 seconds", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 seconds] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 seconds] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 seconds", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 seconds] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 seconds] type [duration]" ], "warning": [] }, @@ -2006,24 +2038,24 @@ { "query": "row var = now() * 1 millisecond", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 millisecond] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 millisecond] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 millisecond", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 millisecond] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 millisecond] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 millisecond", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 millisecond] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 millisecond] type [duration]" ], "warning": [] }, @@ -2071,24 +2103,24 @@ { "query": "row var = now() * 1 milliseconds", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 milliseconds] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 milliseconds] type [duration]" ], "warning": [] }, { "query": "row var = now() / 1 milliseconds", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 milliseconds] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 milliseconds] type [duration]" ], "warning": [] }, { "query": "row var = now() % 1 milliseconds", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 milliseconds] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 milliseconds] type [duration]" ], "warning": [] }, @@ -2105,14 +2137,14 @@ "warning": [] }, { - "query": "show numberField", + "query": "show doubleField", "error": [ - "SyntaxError: token recognition error at: 'n'", + "SyntaxError: token recognition error at: 'd'", + "SyntaxError: token recognition error at: 'o'", "SyntaxError: token recognition error at: 'u'", - "SyntaxError: token recognition error at: 'm'", "SyntaxError: token recognition error at: 'b'", + "SyntaxError: token recognition error at: 'l'", "SyntaxError: token recognition error at: 'e'", - "SyntaxError: token recognition error at: 'r'", "SyntaxError: token recognition error at: 'F'", "SyntaxError: token recognition error at: 'ie'", "SyntaxError: token recognition error at: 'l'", @@ -2148,16 +2180,16 @@ "warning": [] }, { - "query": "from index | limit numberField", + "query": "from index | limit doubleField", "error": [ - "SyntaxError: mismatched input 'numberField' expecting INTEGER_LITERAL" + "SyntaxError: mismatched input 'doubleField' expecting INTEGER_LITERAL" ], "warning": [] }, { - "query": "from index | limit stringField", + "query": "from index | limit textField", "error": [ - "SyntaxError: mismatched input 'stringField' expecting INTEGER_LITERAL" + "SyntaxError: mismatched input 'textField' expecting INTEGER_LITERAL" ], "warning": [] }, @@ -2179,12 +2211,12 @@ "warning": [] }, { - "query": "from index | keep stringField, numberField, dateField", + "query": "from index | keep keywordField, doubleField, integerField, dateField", "error": [], "warning": [] }, { - "query": "from index | keep `stringField`, `numberField`, `dateField`", + "query": "from index | keep `keywordField`, `doubleField`, `integerField`, `dateField`", "error": [], "warning": [] }, @@ -2206,7 +2238,7 @@ "warning": [] }, { - "query": "from index | keep missingField, numberField, dateField", + "query": "from index | keep missingField, doubleField, dateField", "error": [ "Unknown column [missingField]" ], @@ -2225,28 +2257,28 @@ "warning": [] }, { - "query": "from index | project stringField, numberField, dateField", + "query": "from index | project textField, doubleField, dateField", "error": [ "SyntaxError: mismatched input 'project' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'lookup', 'mv_expand', 'rename', 'sort', 'stats', 'where'}" ], "warning": [] }, { - "query": "from index | PROJECT stringField, numberField, dateField", + "query": "from index | PROJECT textField, doubleField, dateField", "error": [ "SyntaxError: mismatched input 'PROJECT' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'lookup', 'mv_expand', 'rename', 'sort', 'stats', 'where'}" ], "warning": [] }, { - "query": "from index | project missingField, numberField, dateField", + "query": "from index | project missingField, doubleField, dateField", "error": [ "SyntaxError: mismatched input 'project' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'lookup', 'mv_expand', 'rename', 'sort', 'stats', 'where'}" ], "warning": [] }, { - "query": "from index | keep s*", + "query": "from index | keep k*", "error": [], "warning": [] }, @@ -2256,17 +2288,17 @@ "warning": [] }, { - "query": "from index | keep s*Field", + "query": "from index | keep k*Field", "error": [], "warning": [] }, { - "query": "from index | keep string*Field", + "query": "from index | keep key*Field", "error": [], "warning": [] }, { - "query": "from index | keep s*, n*", + "query": "from index | keep k*, i*", "error": [], "warning": [] }, @@ -2299,12 +2331,12 @@ ] }, { - "query": "FROM index | STATS ROUND(AVG(numberField * 1.5)), COUNT(*), MIN(numberField * 10) | KEEP `MIN(numberField * 10)`", + "query": "FROM index | STATS ROUND(AVG(doubleField * 1.5)), COUNT(*), MIN(doubleField * 10) | KEEP `MIN(doubleField * 10)`", "error": [], "warning": [] }, { - "query": "FROM index | STATS COUNT(*), MIN(numberField * 10), MAX(numberField)| KEEP `COUNT(*)`", + "query": "FROM index | STATS COUNT(*), MIN(doubleField * 10), MAX(doubleField)| KEEP `COUNT(*)`", "error": [], "warning": [] }, @@ -2316,7 +2348,7 @@ "warning": [] }, { - "query": "from index | drop stringField, numberField, dateField", + "query": "from index | drop textField, doubleField, dateField", "error": [], "warning": [] }, @@ -2331,7 +2363,7 @@ "warning": [] }, { - "query": "from index | drop missingField, numberField, dateField", + "query": "from index | drop missingField, doubleField, dateField", "error": [ "Unknown column [missingField]" ], @@ -2343,12 +2375,12 @@ "warning": [] }, { - "query": "from index | drop s*", + "query": "from index | drop t*", "error": [], "warning": [] }, { - "query": "from index | drop s**Field", + "query": "from index | drop t**Field", "error": [], "warning": [] }, @@ -2358,7 +2390,7 @@ "warning": [] }, { - "query": "from index | drop s*F*d", + "query": "from index | drop t*F*d", "error": [], "warning": [] }, @@ -2368,18 +2400,20 @@ "warning": [] }, { - "query": "from index | drop s*Field", + "query": "from index | drop t*Field", "error": [], "warning": [] }, { - "query": "from index | drop string*Field", + "query": "from index | drop textField", "error": [], "warning": [] }, { - "query": "from index | drop s*, n*", - "error": [], + "query": "from index | drop s*, d*", + "error": [ + "Unknown column [s*]" + ], "warning": [] }, { @@ -2411,7 +2445,7 @@ "warning": [] }, { - "query": "from index | drop stringField, *", + "query": "from index | drop textField, *", "error": [ "Removing all fields is not allowed [*]" ], @@ -2425,19 +2459,19 @@ ] }, { - "query": "from index | drop stringField, @timestamp", + "query": "from index | drop textField, @timestamp", "error": [], "warning": [ "Drop [@timestamp] will remove all time filters to the search results" ] }, { - "query": "FROM index | STATS ROUND(AVG(numberField * 1.5)), COUNT(*), MIN(numberField * 10) | DROP `MIN(numberField * 10)`", + "query": "FROM index | STATS ROUND(AVG(doubleField * 1.5)), COUNT(*), MIN(doubleField * 10) | DROP `MIN(doubleField * 10)`", "error": [], "warning": [] }, { - "query": "FROM index | STATS COUNT(*), MIN(numberField * 10), MAX(numberField)| DROP `COUNT(*)`", + "query": "FROM index | STATS COUNT(*), MIN(doubleField * 10), MAX(doubleField)| DROP `COUNT(*)`", "error": [], "warning": [] }, @@ -2449,12 +2483,12 @@ "warning": [] }, { - "query": "from a_index | mv_expand stringField", + "query": "from a_index | mv_expand textField", "error": [], "warning": [] }, { - "query": "from a_index | mv_expand numberField", + "query": "from a_index | mv_expand integerField", "error": [], "warning": [] }, @@ -2474,7 +2508,7 @@ "warning": [] }, { - "query": "from a_index | mv_expand numberField, b", + "query": "from a_index | mv_expand doubleField, b", "error": [ "SyntaxError: token recognition error at: ','", "SyntaxError: extraneous input 'b' expecting " @@ -2509,7 +2543,7 @@ "warning": [] }, { - "query": "from a_index | rename stringField", + "query": "from a_index | rename textField", "error": [ "SyntaxError: mismatched input '' expecting 'as'" ], @@ -2524,7 +2558,7 @@ "warning": [] }, { - "query": "from a_index | rename stringField as", + "query": "from a_index | rename textField as", "error": [ "SyntaxError: missing ID_PATTERN at ''" ], @@ -2539,22 +2573,22 @@ "warning": [] }, { - "query": "from a_index | rename stringField as b", + "query": "from a_index | rename textField as b", "error": [], "warning": [] }, { - "query": "from a_index | rename stringField AS b", + "query": "from a_index | rename textField AS b", "error": [], "warning": [] }, { - "query": "from a_index | rename stringField As b", + "query": "from a_index | rename textField As b", "error": [], "warning": [] }, { - "query": "from a_index | rename stringField As b, b AS c", + "query": "from a_index | rename textField As b, b AS c", "error": [], "warning": [] }, @@ -2569,26 +2603,34 @@ "warning": [] }, { - "query": "from a_index | eval numberField + 1 | rename `numberField + 1` as a", + "query": "from a_index | eval doubleField + 1 | rename `doubleField + 1` as a", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField) | rename `avg(numberField)` as avg0", + "query": "from a_index | stats avg(doubleField) | rename `avg(doubleField)` as avg0", "error": [], "warning": [] }, { - "query": "from a_index |eval numberField + 1 | rename `numberField + 1` as ", + "query": "from a_index |eval doubleField + 1 | rename `doubleField + 1` as ", "error": [ "SyntaxError: missing ID_PATTERN at ''" ], "warning": [] }, + { + "query": "from a_index | rename key* as keywords", + "error": [ + "Using wildcards (*) in RENAME is not allowed [key*]", + "Unknown column [keywords]" + ], + "warning": [] + }, { "query": "from a_index | rename s* as strings", "error": [ - "Using wildcards (*) in RENAME is not allowed [s*]", + "Unknown column [s*]", "Unknown column [strings]" ], "warning": [] @@ -2613,29 +2655,29 @@ "warning": [] }, { - "query": "from a_index | dissect stringField", + "query": "from a_index | dissect textField", "error": [ "SyntaxError: missing QUOTED_STRING at ''" ], "warning": [] }, { - "query": "from a_index | dissect stringField 2", + "query": "from a_index | dissect textField 2", "error": [ "SyntaxError: mismatched input '2' expecting QUOTED_STRING" ], "warning": [] }, { - "query": "from a_index | dissect stringField .", + "query": "from a_index | dissect textField .", "error": [ "SyntaxError: mismatched input '' expecting {UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", - "Unknown column [stringField.]" + "Unknown column [textField.]" ], "warning": [] }, { - "query": "from a_index | dissect stringField %a", + "query": "from a_index | dissect textField %a", "error": [ "SyntaxError: mismatched input '%' expecting QUOTED_STRING", "SyntaxError: mismatched input '' expecting '='" @@ -2643,26 +2685,26 @@ "warning": [] }, { - "query": "from a_index | dissect stringField \"%{firstWord}\"", + "query": "from a_index | dissect textField \"%{firstWord}\"", "error": [], "warning": [] }, { - "query": "from a_index | dissect numberField \"%{firstWord}\"", + "query": "from a_index | dissect doubleField \"%{firstWord}\"", "error": [ - "DISSECT only supports string type values, found [numberField] of type [number]" + "DISSECT only supports string type values, found [doubleField] of type [double]" ], "warning": [] }, { - "query": "from a_index | dissect stringField \"%{firstWord}\" option ", + "query": "from a_index | dissect textField \"%{firstWord}\" option ", "error": [ "SyntaxError: mismatched input '' expecting '='" ], "warning": [] }, { - "query": "from a_index | dissect stringField \"%{firstWord}\" option = ", + "query": "from a_index | dissect textField \"%{firstWord}\" option = ", "error": [ "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET}", "Invalid option for DISSECT: [option]" @@ -2670,33 +2712,33 @@ "warning": [] }, { - "query": "from a_index | dissect stringField \"%{firstWord}\" option = 1", + "query": "from a_index | dissect textField \"%{firstWord}\" option = 1", "error": [ "Invalid option for DISSECT: [option]" ], "warning": [] }, { - "query": "from a_index | dissect stringField \"%{firstWord}\" append_separator = \"-\"", + "query": "from a_index | dissect textField \"%{firstWord}\" append_separator = \"-\"", "error": [], "warning": [] }, { - "query": "from a_index | dissect stringField \"%{firstWord}\" ignore_missing = true", + "query": "from a_index | dissect textField \"%{firstWord}\" ignore_missing = true", "error": [ "Invalid option for DISSECT: [ignore_missing]" ], "warning": [] }, { - "query": "from a_index | dissect stringField \"%{firstWord}\" append_separator = true", + "query": "from a_index | dissect textField \"%{firstWord}\" append_separator = true", "error": [ "Invalid value for DISSECT append_separator: expected a string, but was [true]" ], "warning": [] }, { - "query": "from a_index | dissect stringField \"%{firstWord}\" | keep firstWord", + "query": "from a_index | dissect textField \"%{firstWord}\" | keep firstWord", "error": [], "warning": [] }, @@ -2708,48 +2750,48 @@ "warning": [] }, { - "query": "from a_index | grok stringField", + "query": "from a_index | grok textField", "error": [ "SyntaxError: missing QUOTED_STRING at ''" ], "warning": [] }, { - "query": "from a_index | grok stringField 2", + "query": "from a_index | grok textField 2", "error": [ "SyntaxError: mismatched input '2' expecting QUOTED_STRING" ], "warning": [] }, { - "query": "from a_index | grok stringField .", + "query": "from a_index | grok textField .", "error": [ "SyntaxError: mismatched input '' expecting {UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", - "Unknown column [stringField.]" + "Unknown column [textField.]" ], "warning": [] }, { - "query": "from a_index | grok stringField %a", + "query": "from a_index | grok textField %a", "error": [ "SyntaxError: mismatched input '%' expecting QUOTED_STRING" ], "warning": [] }, { - "query": "from a_index | grok stringField \"%{firstWord}\"", + "query": "from a_index | grok textField \"%{firstWord}\"", "error": [], "warning": [] }, { - "query": "from a_index | grok numberField \"%{firstWord}\"", + "query": "from a_index | grok doubleField \"%{firstWord}\"", "error": [ - "GROK only supports string type values, found [numberField] of type [number]" + "GROK only supports string type values, found [doubleField] of type [double]" ], "warning": [] }, { - "query": "from a_index | grok stringField \"%{firstWord}\" | keep firstWord", + "query": "from a_index | grok textField \"%{firstWord}\" | keep firstWord", "error": [], "warning": [] }, @@ -2851,22 +2893,22 @@ "warning": [] }, { - "query": "from a_index | where numberField > 0", + "query": "from a_index | where doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where NOT numberField > 0", + "query": "from a_index | where NOT doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where (numberField > 0)", + "query": "from a_index | where (doubleField > 0)", "error": [], "warning": [] }, { - "query": "from a_index | where (NOT (numberField > 0))", + "query": "from a_index | where (NOT (doubleField > 0))", "error": [], "warning": [] }, @@ -2876,12 +2918,12 @@ "warning": [] }, { - "query": "from a_index | where stringField > stringField", + "query": "from a_index | where textField > textField", "error": [], "warning": [] }, { - "query": "from a_index | where numberField > numberField", + "query": "from a_index | where doubleField > doubleField", "error": [], "warning": [] }, @@ -2893,8 +2935,8 @@ { "query": "from a_index | where booleanField > booleanField", "error": [ - "Argument of [>] must be [number], found value [booleanField] type [boolean]", - "Argument of [>] must be [number], found value [booleanField] type [boolean]" + "Argument of [>] must be [date], found value [booleanField] type [boolean]", + "Argument of [>] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, @@ -2904,22 +2946,22 @@ "warning": [] }, { - "query": "from a_index | where numberField >= 0", + "query": "from a_index | where doubleField >= 0", "error": [], "warning": [] }, { - "query": "from a_index | where NOT numberField >= 0", + "query": "from a_index | where NOT doubleField >= 0", "error": [], "warning": [] }, { - "query": "from a_index | where (numberField >= 0)", + "query": "from a_index | where (doubleField >= 0)", "error": [], "warning": [] }, { - "query": "from a_index | where (NOT (numberField >= 0))", + "query": "from a_index | where (NOT (doubleField >= 0))", "error": [], "warning": [] }, @@ -2929,12 +2971,12 @@ "warning": [] }, { - "query": "from a_index | where stringField >= stringField", + "query": "from a_index | where textField >= textField", "error": [], "warning": [] }, { - "query": "from a_index | where numberField >= numberField", + "query": "from a_index | where doubleField >= doubleField", "error": [], "warning": [] }, @@ -2946,8 +2988,8 @@ { "query": "from a_index | where booleanField >= booleanField", "error": [ - "Argument of [>=] must be [number], found value [booleanField] type [boolean]", - "Argument of [>=] must be [number], found value [booleanField] type [boolean]" + "Argument of [>=] must be [date], found value [booleanField] type [boolean]", + "Argument of [>=] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, @@ -2957,22 +2999,22 @@ "warning": [] }, { - "query": "from a_index | where numberField < 0", + "query": "from a_index | where doubleField < 0", "error": [], "warning": [] }, { - "query": "from a_index | where NOT numberField < 0", + "query": "from a_index | where NOT doubleField < 0", "error": [], "warning": [] }, { - "query": "from a_index | where (numberField < 0)", + "query": "from a_index | where (doubleField < 0)", "error": [], "warning": [] }, { - "query": "from a_index | where (NOT (numberField < 0))", + "query": "from a_index | where (NOT (doubleField < 0))", "error": [], "warning": [] }, @@ -2982,12 +3024,12 @@ "warning": [] }, { - "query": "from a_index | where stringField < stringField", + "query": "from a_index | where textField < textField", "error": [], "warning": [] }, { - "query": "from a_index | where numberField < numberField", + "query": "from a_index | where doubleField < doubleField", "error": [], "warning": [] }, @@ -2999,8 +3041,8 @@ { "query": "from a_index | where booleanField < booleanField", "error": [ - "Argument of [<] must be [number], found value [booleanField] type [boolean]", - "Argument of [<] must be [number], found value [booleanField] type [boolean]" + "Argument of [<] must be [date], found value [booleanField] type [boolean]", + "Argument of [<] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, @@ -3010,22 +3052,22 @@ "warning": [] }, { - "query": "from a_index | where numberField <= 0", + "query": "from a_index | where doubleField <= 0", "error": [], "warning": [] }, { - "query": "from a_index | where NOT numberField <= 0", + "query": "from a_index | where NOT doubleField <= 0", "error": [], "warning": [] }, { - "query": "from a_index | where (numberField <= 0)", + "query": "from a_index | where (doubleField <= 0)", "error": [], "warning": [] }, { - "query": "from a_index | where (NOT (numberField <= 0))", + "query": "from a_index | where (NOT (doubleField <= 0))", "error": [], "warning": [] }, @@ -3035,12 +3077,12 @@ "warning": [] }, { - "query": "from a_index | where stringField <= stringField", + "query": "from a_index | where textField <= textField", "error": [], "warning": [] }, { - "query": "from a_index | where numberField <= numberField", + "query": "from a_index | where doubleField <= doubleField", "error": [], "warning": [] }, @@ -3052,8 +3094,8 @@ { "query": "from a_index | where booleanField <= booleanField", "error": [ - "Argument of [<=] must be [number], found value [booleanField] type [boolean]", - "Argument of [<=] must be [number], found value [booleanField] type [boolean]" + "Argument of [<=] must be [date], found value [booleanField] type [boolean]", + "Argument of [<=] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, @@ -3063,22 +3105,22 @@ "warning": [] }, { - "query": "from a_index | where numberField == 0", + "query": "from a_index | where doubleField == 0", "error": [], "warning": [] }, { - "query": "from a_index | where NOT numberField == 0", + "query": "from a_index | where NOT doubleField == 0", "error": [], "warning": [] }, { - "query": "from a_index | where (numberField == 0)", + "query": "from a_index | where (doubleField == 0)", "error": [], "warning": [] }, { - "query": "from a_index | where (NOT (numberField == 0))", + "query": "from a_index | where (NOT (doubleField == 0))", "error": [], "warning": [] }, @@ -3088,12 +3130,12 @@ "warning": [] }, { - "query": "from a_index | where stringField == stringField", + "query": "from a_index | where textField == textField", "error": [], "warning": [] }, { - "query": "from a_index | where numberField == numberField", + "query": "from a_index | where doubleField == doubleField", "error": [], "warning": [] }, @@ -3113,22 +3155,22 @@ "warning": [] }, { - "query": "from a_index | where numberField != 0", + "query": "from a_index | where doubleField != 0", "error": [], "warning": [] }, { - "query": "from a_index | where NOT numberField != 0", + "query": "from a_index | where NOT doubleField != 0", "error": [], "warning": [] }, { - "query": "from a_index | where (numberField != 0)", + "query": "from a_index | where (doubleField != 0)", "error": [], "warning": [] }, { - "query": "from a_index | where (NOT (numberField != 0))", + "query": "from a_index | where (NOT (doubleField != 0))", "error": [], "warning": [] }, @@ -3138,12 +3180,12 @@ "warning": [] }, { - "query": "from a_index | where stringField != stringField", + "query": "from a_index | where textField != textField", "error": [], "warning": [] }, { - "query": "from a_index | where numberField != numberField", + "query": "from a_index | where doubleField != doubleField", "error": [], "warning": [] }, @@ -3163,82 +3205,82 @@ "warning": [] }, { - "query": "from a_index | where - numberField > 0", + "query": "from a_index | where - doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where - round(numberField) > 0", + "query": "from a_index | where - round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + - numberField > 0", + "query": "from a_index | where 1 + - doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 - numberField > 0", + "query": "from a_index | where 1 - doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where - numberField > 0", + "query": "from a_index | where - doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where - round(numberField) > 0", + "query": "from a_index | where - round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + - numberField > 0", + "query": "from a_index | where 1 + - doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 - numberField > 0", + "query": "from a_index | where 1 - doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where + numberField > 0", + "query": "from a_index | where + doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where + round(numberField) > 0", + "query": "from a_index | where + round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + + numberField > 0", + "query": "from a_index | where 1 + + doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + numberField > 0", + "query": "from a_index | where 1 + doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where + numberField > 0", + "query": "from a_index | where + doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where + round(numberField) > 0", + "query": "from a_index | where + round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + + numberField > 0", + "query": "from a_index | where 1 + + doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + numberField > 0", + "query": "from a_index | where 1 + doubleField > 0", "error": [], "warning": [] }, @@ -3248,82 +3290,82 @@ "warning": [] }, { - "query": "from a_index | where -- numberField > 0", + "query": "from a_index | where -- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where -- round(numberField) > 0", + "query": "from a_index | where -- round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + -- numberField > 0", + "query": "from a_index | where 1 + -- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 -- numberField > 0", + "query": "from a_index | where 1 -- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where -+ numberField > 0", + "query": "from a_index | where -+ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where -+ round(numberField) > 0", + "query": "from a_index | where -+ round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + -+ numberField > 0", + "query": "from a_index | where 1 + -+ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 -+ numberField > 0", + "query": "from a_index | where 1 -+ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where +- numberField > 0", + "query": "from a_index | where +- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where +- round(numberField) > 0", + "query": "from a_index | where +- round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + +- numberField > 0", + "query": "from a_index | where 1 + +- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 +- numberField > 0", + "query": "from a_index | where 1 +- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where ++ numberField > 0", + "query": "from a_index | where ++ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where ++ round(numberField) > 0", + "query": "from a_index | where ++ round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + ++ numberField > 0", + "query": "from a_index | where 1 + ++ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 ++ numberField > 0", + "query": "from a_index | where 1 ++ doubleField > 0", "error": [], "warning": [] }, @@ -3333,82 +3375,82 @@ "warning": [] }, { - "query": "from a_index | where --- numberField > 0", + "query": "from a_index | where --- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where --- round(numberField) > 0", + "query": "from a_index | where --- round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + --- numberField > 0", + "query": "from a_index | where 1 + --- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 --- numberField > 0", + "query": "from a_index | where 1 --- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where -+- numberField > 0", + "query": "from a_index | where -+- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where -+- round(numberField) > 0", + "query": "from a_index | where -+- round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + -+- numberField > 0", + "query": "from a_index | where 1 + -+- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 -+- numberField > 0", + "query": "from a_index | where 1 -+- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where +-+ numberField > 0", + "query": "from a_index | where +-+ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where +-+ round(numberField) > 0", + "query": "from a_index | where +-+ round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + +-+ numberField > 0", + "query": "from a_index | where 1 + +-+ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 +-+ numberField > 0", + "query": "from a_index | where 1 +-+ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where +++ numberField > 0", + "query": "from a_index | where +++ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where +++ round(numberField) > 0", + "query": "from a_index | where +++ round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + +++ numberField > 0", + "query": "from a_index | where 1 + +++ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 +++ numberField > 0", + "query": "from a_index | where 1 +++ doubleField > 0", "error": [], "warning": [] }, @@ -3418,82 +3460,82 @@ "warning": [] }, { - "query": "from a_index | where ---- numberField > 0", + "query": "from a_index | where ---- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where ---- round(numberField) > 0", + "query": "from a_index | where ---- round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + ---- numberField > 0", + "query": "from a_index | where 1 + ---- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 ---- numberField > 0", + "query": "from a_index | where 1 ---- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where -+-+ numberField > 0", + "query": "from a_index | where -+-+ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where -+-+ round(numberField) > 0", + "query": "from a_index | where -+-+ round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + -+-+ numberField > 0", + "query": "from a_index | where 1 + -+-+ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 -+-+ numberField > 0", + "query": "from a_index | where 1 -+-+ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where +-+- numberField > 0", + "query": "from a_index | where +-+- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where +-+- round(numberField) > 0", + "query": "from a_index | where +-+- round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + +-+- numberField > 0", + "query": "from a_index | where 1 + +-+- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 +-+- numberField > 0", + "query": "from a_index | where 1 +-+- doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where ++++ numberField > 0", + "query": "from a_index | where ++++ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where ++++ round(numberField) > 0", + "query": "from a_index | where ++++ round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 + ++++ numberField > 0", + "query": "from a_index | where 1 + ++++ doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | where 1 ++++ numberField > 0", + "query": "from a_index | where 1 ++++ doubleField > 0", "error": [], "warning": [] }, @@ -3503,166 +3545,166 @@ "warning": [] }, { - "query": "from a_index | where *+ numberField", + "query": "from a_index | where *+ doubleField", "error": [ "SyntaxError: extraneous input '*' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" ], "warning": [] }, { - "query": "from a_index | where /+ numberField", + "query": "from a_index | where /+ doubleField", "error": [ "SyntaxError: extraneous input '/' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" ], "warning": [] }, { - "query": "from a_index | where %+ numberField", + "query": "from a_index | where %+ doubleField", "error": [ "SyntaxError: extraneous input '%' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" ], "warning": [] }, { - "query": "from a_index | where numberField =~ 0", + "query": "from a_index | where doubleField =~ 0", "error": [ - "Argument of [=~] must be [string], found value [numberField] type [number]", - "Argument of [=~] must be [string], found value [0] type [number]" + "Argument of [=~] must be [text], found value [doubleField] type [double]", + "Argument of [=~] must be [text], found value [0] type [number]" ], "warning": [] }, { - "query": "from a_index | where NOT numberField =~ 0", + "query": "from a_index | where NOT doubleField =~ 0", "error": [ - "Argument of [=~] must be [string], found value [numberField] type [number]", - "Argument of [=~] must be [string], found value [0] type [number]" + "Argument of [=~] must be [text], found value [doubleField] type [double]", + "Argument of [=~] must be [text], found value [0] type [number]" ], "warning": [] }, { - "query": "from a_index | where (numberField =~ 0)", + "query": "from a_index | where (doubleField =~ 0)", "error": [ - "Argument of [=~] must be [string], found value [numberField] type [number]", - "Argument of [=~] must be [string], found value [0] type [number]" + "Argument of [=~] must be [text], found value [doubleField] type [double]", + "Argument of [=~] must be [text], found value [0] type [number]" ], "warning": [] }, { - "query": "from a_index | where (NOT (numberField =~ 0))", + "query": "from a_index | where (NOT (doubleField =~ 0))", "error": [ - "Argument of [=~] must be [string], found value [numberField] type [number]", - "Argument of [=~] must be [string], found value [0] type [number]" + "Argument of [=~] must be [text], found value [doubleField] type [double]", + "Argument of [=~] must be [text], found value [0] type [number]" ], "warning": [] }, { "query": "from a_index | where 1 =~ 0", "error": [ - "Argument of [=~] must be [string], found value [1] type [number]", - "Argument of [=~] must be [string], found value [0] type [number]" + "Argument of [=~] must be [text], found value [1] type [number]", + "Argument of [=~] must be [text], found value [0] type [number]" ], "warning": [] }, { - "query": "from a_index | eval stringField =~ 0", + "query": "from a_index | eval textField =~ 0", "error": [ - "Argument of [=~] must be [string], found value [0] type [number]" + "Argument of [=~] must be [text], found value [0] type [number]" ], "warning": [] }, { - "query": "from a_index | where stringField like \"?a\"", + "query": "from a_index | where textField like \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | where stringField NOT like \"?a\"", + "query": "from a_index | where textField NOT like \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | where NOT stringField like \"?a\"", + "query": "from a_index | where NOT textField like \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | where NOT stringField NOT like \"?a\"", + "query": "from a_index | where NOT textField NOT like \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | where numberField like \"?a\"", + "query": "from a_index | where doubleField like \"?a\"", "error": [ - "Argument of [like] must be [string], found value [numberField] type [number]" + "Argument of [like] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | where numberField NOT like \"?a\"", + "query": "from a_index | where doubleField NOT like \"?a\"", "error": [ - "Argument of [not_like] must be [string], found value [numberField] type [number]" + "Argument of [not_like] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | where NOT numberField like \"?a\"", + "query": "from a_index | where NOT doubleField like \"?a\"", "error": [ - "Argument of [like] must be [string], found value [numberField] type [number]" + "Argument of [like] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | where NOT numberField NOT like \"?a\"", + "query": "from a_index | where NOT doubleField NOT like \"?a\"", "error": [ - "Argument of [not_like] must be [string], found value [numberField] type [number]" + "Argument of [not_like] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | where stringField rlike \"?a\"", + "query": "from a_index | where textField rlike \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | where stringField NOT rlike \"?a\"", + "query": "from a_index | where textField NOT rlike \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | where NOT stringField rlike \"?a\"", + "query": "from a_index | where NOT textField rlike \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | where NOT stringField NOT rlike \"?a\"", + "query": "from a_index | where NOT textField NOT rlike \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | where numberField rlike \"?a\"", + "query": "from a_index | where doubleField rlike \"?a\"", "error": [ - "Argument of [rlike] must be [string], found value [numberField] type [number]" + "Argument of [rlike] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | where numberField NOT rlike \"?a\"", + "query": "from a_index | where doubleField NOT rlike \"?a\"", "error": [ - "Argument of [not_rlike] must be [string], found value [numberField] type [number]" + "Argument of [not_rlike] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | where NOT numberField rlike \"?a\"", + "query": "from a_index | where NOT doubleField rlike \"?a\"", "error": [ - "Argument of [rlike] must be [string], found value [numberField] type [number]" + "Argument of [rlike] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | where NOT numberField NOT rlike \"?a\"", + "query": "from a_index | where NOT doubleField NOT rlike \"?a\"", "error": [ - "Argument of [not_rlike] must be [string], found value [numberField] type [number]" + "Argument of [not_rlike] must be [text], found value [doubleField] type [double]" ], "warning": [] }, @@ -3679,22936 +3721,31688 @@ "warning": [] }, { - "query": "from a_index | where numberField IS NULL", + "query": "from a_index | where doubleField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where numberField IS null", + "query": "from a_index | where doubleField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where numberField is null", + "query": "from a_index | where doubleField is null", "error": [], "warning": [] }, { - "query": "from a_index | where numberField is NULL", + "query": "from a_index | where doubleField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where numberField IS NOT NULL", + "query": "from a_index | where doubleField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where numberField IS NOT null", + "query": "from a_index | where doubleField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where numberField IS not NULL", + "query": "from a_index | where doubleField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where numberField Is nOt NuLL", + "query": "from a_index | where doubleField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where dateField IS NULL", + "query": "from a_index | where unsignedLongField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where dateField IS null", + "query": "from a_index | where unsignedLongField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where dateField is null", + "query": "from a_index | where unsignedLongField is null", "error": [], "warning": [] }, { - "query": "from a_index | where dateField is NULL", + "query": "from a_index | where unsignedLongField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where dateField IS NOT NULL", + "query": "from a_index | where unsignedLongField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where dateField IS NOT null", + "query": "from a_index | where unsignedLongField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where dateField IS not NULL", + "query": "from a_index | where unsignedLongField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where dateField Is nOt NuLL", + "query": "from a_index | where unsignedLongField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where stringField IS NULL", + "query": "from a_index | where longField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where stringField IS null", + "query": "from a_index | where longField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where stringField is null", + "query": "from a_index | where longField is null", "error": [], "warning": [] }, { - "query": "from a_index | where stringField is NULL", + "query": "from a_index | where longField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where stringField IS NOT NULL", + "query": "from a_index | where longField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where stringField IS NOT null", + "query": "from a_index | where longField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where stringField IS not NULL", + "query": "from a_index | where longField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where stringField Is nOt NuLL", + "query": "from a_index | where longField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where booleanField IS NULL", + "query": "from a_index | where integerField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where booleanField IS null", + "query": "from a_index | where integerField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where booleanField is null", + "query": "from a_index | where integerField is null", "error": [], "warning": [] }, { - "query": "from a_index | where booleanField is NULL", + "query": "from a_index | where integerField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where booleanField IS NOT NULL", + "query": "from a_index | where integerField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where booleanField IS NOT null", + "query": "from a_index | where integerField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where booleanField IS not NULL", + "query": "from a_index | where integerField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where booleanField Is nOt NuLL", + "query": "from a_index | where integerField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where ipField IS NULL", + "query": "from a_index | where counterIntegerField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where ipField IS null", + "query": "from a_index | where counterIntegerField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where ipField is null", + "query": "from a_index | where counterIntegerField is null", "error": [], "warning": [] }, { - "query": "from a_index | where ipField is NULL", + "query": "from a_index | where counterIntegerField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where ipField IS NOT NULL", + "query": "from a_index | where counterIntegerField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where ipField IS NOT null", + "query": "from a_index | where counterIntegerField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where ipField IS not NULL", + "query": "from a_index | where counterIntegerField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where ipField Is nOt NuLL", + "query": "from a_index | where counterIntegerField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianPointField IS NULL", + "query": "from a_index | where counterLongField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianPointField IS null", + "query": "from a_index | where counterLongField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianPointField is null", + "query": "from a_index | where counterLongField is null", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianPointField is NULL", + "query": "from a_index | where counterLongField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianPointField IS NOT NULL", + "query": "from a_index | where counterLongField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianPointField IS NOT null", + "query": "from a_index | where counterLongField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianPointField IS not NULL", + "query": "from a_index | where counterLongField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianPointField Is nOt NuLL", + "query": "from a_index | where counterLongField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianShapeField IS NULL", + "query": "from a_index | where counterDoubleField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianShapeField IS null", + "query": "from a_index | where counterDoubleField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianShapeField is null", + "query": "from a_index | where counterDoubleField is null", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianShapeField is NULL", + "query": "from a_index | where counterDoubleField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianShapeField IS NOT NULL", + "query": "from a_index | where counterDoubleField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianShapeField IS NOT null", + "query": "from a_index | where counterDoubleField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianShapeField IS not NULL", + "query": "from a_index | where counterDoubleField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where cartesianShapeField Is nOt NuLL", + "query": "from a_index | where counterDoubleField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where geoPointField IS NULL", + "query": "from a_index | where dateField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where geoPointField IS null", + "query": "from a_index | where dateField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where geoPointField is null", + "query": "from a_index | where dateField is null", "error": [], "warning": [] }, { - "query": "from a_index | where geoPointField is NULL", + "query": "from a_index | where dateField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where geoPointField IS NOT NULL", + "query": "from a_index | where dateField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where geoPointField IS NOT null", + "query": "from a_index | where dateField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where geoPointField IS not NULL", + "query": "from a_index | where dateField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where geoPointField Is nOt NuLL", + "query": "from a_index | where dateField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where geoShapeField IS NULL", + "query": "from a_index | where datePeriodField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where geoShapeField IS null", + "query": "from a_index | where datePeriodField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where geoShapeField is null", + "query": "from a_index | where datePeriodField is null", "error": [], "warning": [] }, { - "query": "from a_index | where geoShapeField is NULL", + "query": "from a_index | where datePeriodField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where geoShapeField IS NOT NULL", + "query": "from a_index | where datePeriodField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where geoShapeField IS NOT null", + "query": "from a_index | where datePeriodField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where geoShapeField IS not NULL", + "query": "from a_index | where datePeriodField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where geoShapeField Is nOt NuLL", + "query": "from a_index | where datePeriodField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where versionField IS NULL", + "query": "from a_index | where textField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | where versionField IS null", + "query": "from a_index | where textField IS null", "error": [], "warning": [] }, { - "query": "from a_index | where versionField is null", + "query": "from a_index | where textField is null", "error": [], "warning": [] }, { - "query": "from a_index | where versionField is NULL", + "query": "from a_index | where textField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | where versionField IS NOT NULL", + "query": "from a_index | where textField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | where versionField IS NOT null", + "query": "from a_index | where textField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | where versionField IS not NULL", + "query": "from a_index | where textField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | where versionField Is nOt NuLL", + "query": "from a_index | where textField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | where stringField == \"a\" or null", + "query": "from a_index | where keywordField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval ", - "error": [ - "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" - ], - "warning": [] - }, - { - "query": "from a_index | eval stringField ", + "query": "from a_index | where keywordField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval b = stringField", + "query": "from a_index | where keywordField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField + 1", + "query": "from a_index | where keywordField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField + ", - "error": [ - "SyntaxError: no viable alternative at input 'numberField + '" - ], + "query": "from a_index | where keywordField IS NOT NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField + 1", - "error": [ - "Argument of [+] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | where keywordField IS NOT null", + "error": [], "warning": [] }, { - "query": "from a_index | eval a=b", - "error": [ - "Unknown column [b]" - ], + "query": "from a_index | where keywordField IS not NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval a=b, ", - "error": [ - "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", - "Unknown column [b]" - ], + "query": "from a_index | where keywordField Is nOt NuLL", + "error": [], "warning": [] }, { - "query": "from a_index | eval a=round", - "error": [ - "Unknown column [round]" - ], + "query": "from a_index | where booleanField IS NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval a=round(", - "error": [ - "SyntaxError: no viable alternative at input 'round('" - ], + "query": "from a_index | where booleanField IS null", + "error": [], "warning": [] }, { - "query": "from a_index | eval a=round(numberField) ", + "query": "from a_index | where booleanField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=round(numberField), ", - "error": [ - "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" - ], + "query": "from a_index | where booleanField is NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval a=round(numberField) + round(numberField) ", + "query": "from a_index | where booleanField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=round(numberField) + round(stringField) ", - "error": [ - "Argument of [round] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | where booleanField IS NOT null", + "error": [], "warning": [] }, { - "query": "from a_index | eval a=round(numberField) + round(stringField), numberField ", - "error": [ - "Argument of [round] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | where booleanField IS not NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval a=round(numberField) + round(numberField), numberField ", + "query": "from a_index | where booleanField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=round(numberField) + round(numberField), b = numberField ", + "query": "from a_index | where ipField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=[1, 2, 3]", + "query": "from a_index | where ipField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=[true, false]", + "query": "from a_index | where ipField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=[\"a\", \"b\"]", + "query": "from a_index | where ipField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=null", + "query": "from a_index | where ipField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField IS NULL", + "query": "from a_index | where ipField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField IS null", + "query": "from a_index | where ipField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField is null", + "query": "from a_index | where ipField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField is NULL", + "query": "from a_index | where cartesianPointField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField IS NOT NULL", + "query": "from a_index | where cartesianPointField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField IS NOT null", + "query": "from a_index | where cartesianPointField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField IS not NULL", + "query": "from a_index | where cartesianPointField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField IS NULL", + "query": "from a_index | where cartesianPointField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField IS null", + "query": "from a_index | where cartesianPointField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField is null", + "query": "from a_index | where cartesianPointField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField is NULL", + "query": "from a_index | where cartesianPointField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField IS NOT NULL", + "query": "from a_index | where cartesianShapeField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField IS NOT null", + "query": "from a_index | where cartesianShapeField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField IS not NULL", + "query": "from a_index | where cartesianShapeField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField IS NULL", + "query": "from a_index | where cartesianShapeField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField IS null", + "query": "from a_index | where cartesianShapeField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField is null", + "query": "from a_index | where cartesianShapeField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField is NULL", + "query": "from a_index | where cartesianShapeField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField IS NOT NULL", + "query": "from a_index | where cartesianShapeField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField IS NOT null", + "query": "from a_index | where geoPointField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField IS not NULL", + "query": "from a_index | where geoPointField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField IS NULL", + "query": "from a_index | where geoPointField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField IS null", + "query": "from a_index | where geoPointField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField is null", + "query": "from a_index | where geoPointField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField is NULL", + "query": "from a_index | where geoPointField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField IS NOT NULL", + "query": "from a_index | where geoPointField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField IS NOT null", + "query": "from a_index | where geoPointField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField IS not NULL", + "query": "from a_index | where geoShapeField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField IS NULL", + "query": "from a_index | where geoShapeField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField IS null", + "query": "from a_index | where geoShapeField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField is null", + "query": "from a_index | where geoShapeField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField is NULL", + "query": "from a_index | where geoShapeField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField IS NOT NULL", + "query": "from a_index | where geoShapeField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField IS NOT null", + "query": "from a_index | where geoShapeField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField IS not NULL", + "query": "from a_index | where geoShapeField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianPointField IS NULL", + "query": "from a_index | where versionField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianPointField IS null", + "query": "from a_index | where versionField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianPointField is null", + "query": "from a_index | where versionField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianPointField is NULL", + "query": "from a_index | where versionField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianPointField IS NOT NULL", + "query": "from a_index | where versionField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianPointField IS NOT null", + "query": "from a_index | where versionField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianPointField IS not NULL", + "query": "from a_index | where versionField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianShapeField IS NULL", + "query": "from a_index | where versionField Is nOt NuLL", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianShapeField IS null", + "query": "from a_index | where textField == \"a\" or null", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianShapeField is null", - "error": [], + "query": "from a_index | eval ", + "error": [ + "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" + ], "warning": [] }, { - "query": "from a_index | eval cartesianShapeField is NULL", + "query": "from a_index | eval textField ", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianShapeField IS NOT NULL", + "query": "from a_index | eval b = textField", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianShapeField IS NOT null", + "query": "from a_index | eval doubleField + 1", "error": [], "warning": [] }, { - "query": "from a_index | eval cartesianShapeField IS not NULL", - "error": [], + "query": "from a_index | eval doubleField + ", + "error": [ + "SyntaxError: no viable alternative at input 'doubleField + '" + ], "warning": [] }, { - "query": "from a_index | eval geoPointField IS NULL", - "error": [], + "query": "from a_index | eval textField + 1", + "error": [ + "Argument of [+] must be [double], found value [textField] type [text]" + ], "warning": [] }, { - "query": "from a_index | eval geoPointField IS null", - "error": [], + "query": "from a_index | eval a=b", + "error": [ + "Unknown column [b]" + ], "warning": [] }, { - "query": "from a_index | eval geoPointField is null", - "error": [], + "query": "from a_index | eval a=b, ", + "error": [ + "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", + "Unknown column [b]" + ], "warning": [] }, { - "query": "from a_index | eval geoPointField is NULL", - "error": [], + "query": "from a_index | eval a=round", + "error": [ + "Unknown column [round]" + ], "warning": [] }, { - "query": "from a_index | eval geoPointField IS NOT NULL", - "error": [], + "query": "from a_index | eval a=round(", + "error": [ + "SyntaxError: no viable alternative at input 'round('" + ], "warning": [] }, { - "query": "from a_index | eval geoPointField IS NOT null", + "query": "from a_index | eval a=round(doubleField) ", "error": [], "warning": [] }, { - "query": "from a_index | eval geoPointField IS not NULL", - "error": [], + "query": "from a_index | eval a=round(doubleField), ", + "error": [ + "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" + ], "warning": [] }, { - "query": "from a_index | eval geoShapeField IS NULL", + "query": "from a_index | eval a=round(doubleField) + round(doubleField) ", "error": [], "warning": [] }, { - "query": "from a_index | eval geoShapeField IS null", - "error": [], + "query": "from a_index | eval a=round(doubleField) + round(textField) ", + "error": [ + "Argument of [round] must be [double], found value [textField] type [text]" + ], "warning": [] }, { - "query": "from a_index | eval geoShapeField is null", - "error": [], + "query": "from a_index | eval a=round(doubleField) + round(textField), doubleField ", + "error": [ + "Argument of [round] must be [double], found value [textField] type [text]" + ], "warning": [] }, { - "query": "from a_index | eval geoShapeField is NULL", + "query": "from a_index | eval a=round(doubleField) + round(doubleField), doubleField ", "error": [], "warning": [] }, { - "query": "from a_index | eval geoShapeField IS NOT NULL", + "query": "from a_index | eval a=round(doubleField) + round(doubleField), b = doubleField ", "error": [], "warning": [] }, { - "query": "from a_index | eval geoShapeField IS NOT null", + "query": "from a_index | eval a=[1, 2, 3]", "error": [], "warning": [] }, { - "query": "from a_index | eval geoShapeField IS not NULL", + "query": "from a_index | eval a=[true, false]", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField IS NULL", + "query": "from a_index | eval a=[\"a\", \"b\"]", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField IS null", + "query": "from a_index | eval a=null", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField is null", + "query": "from a_index | eval doubleField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField is NULL", + "query": "from a_index | eval doubleField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField IS NOT NULL", + "query": "from a_index | eval doubleField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField IS NOT null", + "query": "from a_index | eval doubleField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField IS not NULL", + "query": "from a_index | eval doubleField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval - numberField", + "query": "from a_index | eval doubleField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=- numberField", + "query": "from a_index | eval doubleField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=- round(numberField)", + "query": "from a_index | eval unsignedLongField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + - numberField", + "query": "from a_index | eval unsignedLongField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 - numberField", + "query": "from a_index | eval unsignedLongField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval - numberField", + "query": "from a_index | eval unsignedLongField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=- numberField", + "query": "from a_index | eval unsignedLongField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=- round(numberField)", + "query": "from a_index | eval unsignedLongField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + - numberField", + "query": "from a_index | eval unsignedLongField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 - numberField", + "query": "from a_index | eval longField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval + numberField", + "query": "from a_index | eval longField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+ numberField", + "query": "from a_index | eval longField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+ round(numberField)", + "query": "from a_index | eval longField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + + numberField", + "query": "from a_index | eval longField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + numberField", + "query": "from a_index | eval longField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval + numberField", + "query": "from a_index | eval longField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+ numberField", + "query": "from a_index | eval integerField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+ round(numberField)", + "query": "from a_index | eval integerField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + + numberField", + "query": "from a_index | eval integerField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + numberField", + "query": "from a_index | eval integerField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval not booleanField", + "query": "from a_index | eval integerField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval -- numberField", + "query": "from a_index | eval integerField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=-- numberField", + "query": "from a_index | eval integerField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=-- round(numberField)", + "query": "from a_index | eval counterIntegerField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + -- numberField", + "query": "from a_index | eval counterIntegerField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 -- numberField", + "query": "from a_index | eval counterIntegerField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval -+ numberField", + "query": "from a_index | eval counterIntegerField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=-+ numberField", + "query": "from a_index | eval counterIntegerField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=-+ round(numberField)", + "query": "from a_index | eval counterIntegerField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + -+ numberField", + "query": "from a_index | eval counterIntegerField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 -+ numberField", + "query": "from a_index | eval counterLongField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval +- numberField", + "query": "from a_index | eval counterLongField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+- numberField", + "query": "from a_index | eval counterLongField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+- round(numberField)", + "query": "from a_index | eval counterLongField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + +- numberField", + "query": "from a_index | eval counterLongField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 +- numberField", + "query": "from a_index | eval counterLongField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval ++ numberField", + "query": "from a_index | eval counterLongField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=++ numberField", + "query": "from a_index | eval counterDoubleField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=++ round(numberField)", + "query": "from a_index | eval counterDoubleField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + ++ numberField", + "query": "from a_index | eval counterDoubleField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 ++ numberField", + "query": "from a_index | eval counterDoubleField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval not not booleanField", + "query": "from a_index | eval counterDoubleField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval --- numberField", + "query": "from a_index | eval counterDoubleField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=--- numberField", + "query": "from a_index | eval counterDoubleField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=--- round(numberField)", + "query": "from a_index | eval dateField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + --- numberField", + "query": "from a_index | eval dateField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 --- numberField", + "query": "from a_index | eval dateField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval -+- numberField", + "query": "from a_index | eval dateField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=-+- numberField", + "query": "from a_index | eval dateField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=-+- round(numberField)", + "query": "from a_index | eval dateField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + -+- numberField", + "query": "from a_index | eval dateField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 -+- numberField", + "query": "from a_index | eval datePeriodField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval +-+ numberField", + "query": "from a_index | eval datePeriodField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+-+ numberField", + "query": "from a_index | eval datePeriodField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+-+ round(numberField)", + "query": "from a_index | eval datePeriodField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + +-+ numberField", + "query": "from a_index | eval datePeriodField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 +-+ numberField", + "query": "from a_index | eval datePeriodField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval +++ numberField", + "query": "from a_index | eval datePeriodField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+++ numberField", + "query": "from a_index | eval textField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+++ round(numberField)", + "query": "from a_index | eval textField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + +++ numberField", + "query": "from a_index | eval textField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 +++ numberField", + "query": "from a_index | eval textField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval not not not booleanField", + "query": "from a_index | eval textField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval ---- numberField", + "query": "from a_index | eval textField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=---- numberField", + "query": "from a_index | eval textField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=---- round(numberField)", + "query": "from a_index | eval keywordField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + ---- numberField", + "query": "from a_index | eval keywordField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 ---- numberField", + "query": "from a_index | eval keywordField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval -+-+ numberField", + "query": "from a_index | eval keywordField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=-+-+ numberField", + "query": "from a_index | eval keywordField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=-+-+ round(numberField)", + "query": "from a_index | eval keywordField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + -+-+ numberField", + "query": "from a_index | eval keywordField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 -+-+ numberField", + "query": "from a_index | eval booleanField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval +-+- numberField", + "query": "from a_index | eval booleanField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+-+- numberField", + "query": "from a_index | eval booleanField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval a=+-+- round(numberField)", + "query": "from a_index | eval booleanField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + +-+- numberField", + "query": "from a_index | eval booleanField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 +-+- numberField", + "query": "from a_index | eval booleanField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval ++++ numberField", + "query": "from a_index | eval booleanField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=++++ numberField", + "query": "from a_index | eval ipField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval a=++++ round(numberField)", + "query": "from a_index | eval ipField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + ++++ numberField", + "query": "from a_index | eval ipField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 ++++ numberField", + "query": "from a_index | eval ipField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval not not not not booleanField", + "query": "from a_index | eval ipField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval *+ numberField", - "error": [ - "SyntaxError: extraneous input '*' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" - ], + "query": "from a_index | eval ipField IS NOT null", + "error": [], "warning": [] }, { - "query": "from a_index | eval /+ numberField", - "error": [ - "SyntaxError: extraneous input '/' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" - ], + "query": "from a_index | eval ipField IS not NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval %+ numberField", - "error": [ - "SyntaxError: extraneous input '%' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" - ], + "query": "from a_index | eval cartesianPointField IS NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval log10(-1)", + "query": "from a_index | eval cartesianPointField IS null", "error": [], - "warning": [ - "Log of a negative number results in null: -1" - ] + "warning": [] }, { - "query": "from a_index | eval log(-1)", + "query": "from a_index | eval cartesianPointField is null", "error": [], - "warning": [ - "Log of a negative number results in null: -1" - ] + "warning": [] }, { - "query": "from a_index | eval log(-1, 20)", + "query": "from a_index | eval cartesianPointField is NULL", "error": [], - "warning": [ - "Log of a negative number results in null: -1" - ] + "warning": [] }, { - "query": "from a_index | eval log(-1, -20)", + "query": "from a_index | eval cartesianPointField IS NOT NULL", "error": [], - "warning": [ - "Log of a negative number results in null: -1", - "Log of a negative number results in null: -20" - ] + "warning": [] }, { - "query": "from a_index | eval var0 = log(-1, -20)", + "query": "from a_index | eval cartesianPointField IS NOT null", "error": [], - "warning": [ - "Log of a negative number results in null: -1", - "Log of a negative number results in null: -20" - ] + "warning": [] }, { - "query": "from a_index | eval numberField > 0", + "query": "from a_index | eval cartesianPointField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval NOT numberField > 0", + "query": "from a_index | eval cartesianShapeField IS NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField > 0)", + "query": "from a_index | eval cartesianShapeField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval (NOT (numberField > 0))", + "query": "from a_index | eval cartesianShapeField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 > 0", + "query": "from a_index | eval cartesianShapeField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField > stringField", + "query": "from a_index | eval cartesianShapeField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField > numberField", + "query": "from a_index | eval cartesianShapeField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField > dateField", + "query": "from a_index | eval cartesianShapeField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField > booleanField", - "error": [ - "Argument of [>] must be [number], found value [booleanField] type [boolean]", - "Argument of [>] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval geoPointField IS NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval ipField > ipField", + "query": "from a_index | eval geoPointField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField > stringField", - "error": [ - "Argument of [>] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval geoPointField is null", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField > numberField", - "error": [ - "Argument of [>] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval geoPointField is NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval numberField > \"2022\"", - "error": [ - "Argument of [>] must be [number], found value [\"2022\"] type [string]" - ], + "query": "from a_index | eval geoPointField IS NOT NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval dateField > stringField", - "error": [ - "Argument of [>] must be [string], found value [dateField] type [date]" - ], + "query": "from a_index | eval geoPointField IS NOT null", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField > dateField", - "error": [ - "Argument of [>] must be [string], found value [dateField] type [date]" - ], + "query": "from a_index | eval geoPointField IS not NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField > 0", - "error": [ - "Argument of [>] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval geoShapeField IS NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField > now()", - "error": [ - "Argument of [>] must be [string], found value [now()] type [date]" - ], + "query": "from a_index | eval geoShapeField IS null", + "error": [], "warning": [] }, { - "query": "from a_index | eval dateField > \"2022\"", + "query": "from a_index | eval geoShapeField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval \"2022\" > dateField", + "query": "from a_index | eval geoShapeField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField > \"1.2.3\"", + "query": "from a_index | eval geoShapeField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval \"1.2.3\" > versionField", + "query": "from a_index | eval geoShapeField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField > \"true\"", - "error": [ - "Argument of [>] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval geoShapeField IS not NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval \"true\" > booleanField", - "error": [ - "Argument of [>] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval versionField IS NULL", + "error": [], "warning": [] }, { - "query": "from a_index | eval ipField > \"136.36.3.205\"", + "query": "from a_index | eval versionField IS null", "error": [], "warning": [] }, { - "query": "from a_index | eval \"136.36.3.205\" > ipField", + "query": "from a_index | eval versionField is null", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField >= 0", + "query": "from a_index | eval versionField is NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval NOT numberField >= 0", + "query": "from a_index | eval versionField IS NOT NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField >= 0)", + "query": "from a_index | eval versionField IS NOT null", "error": [], "warning": [] }, { - "query": "from a_index | eval (NOT (numberField >= 0))", + "query": "from a_index | eval versionField IS not NULL", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 >= 0", + "query": "from a_index | eval - doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField >= stringField", + "query": "from a_index | eval a=- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField >= numberField", + "query": "from a_index | eval a=- round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField >= dateField", + "query": "from a_index | eval 1 + - doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField >= booleanField", - "error": [ - "Argument of [>=] must be [number], found value [booleanField] type [boolean]", - "Argument of [>=] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval 1 - doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval ipField >= ipField", + "query": "from a_index | eval - doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField >= stringField", - "error": [ - "Argument of [>=] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval a=- doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField >= numberField", - "error": [ - "Argument of [>=] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval a=- round(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval numberField >= \"2022\"", - "error": [ - "Argument of [>=] must be [number], found value [\"2022\"] type [string]" - ], + "query": "from a_index | eval 1 + - doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval dateField >= stringField", - "error": [ - "Argument of [>=] must be [string], found value [dateField] type [date]" - ], + "query": "from a_index | eval 1 - doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField >= dateField", - "error": [ - "Argument of [>=] must be [string], found value [dateField] type [date]" - ], + "query": "from a_index | eval + doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField >= 0", - "error": [ - "Argument of [>=] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval a=+ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField >= now()", - "error": [ - "Argument of [>=] must be [string], found value [now()] type [date]" - ], + "query": "from a_index | eval a=+ round(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval dateField >= \"2022\"", + "query": "from a_index | eval 1 + + doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"2022\" >= dateField", + "query": "from a_index | eval 1 + doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField >= \"1.2.3\"", + "query": "from a_index | eval + doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"1.2.3\" >= versionField", + "query": "from a_index | eval a=+ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField >= \"true\"", - "error": [ - "Argument of [>=] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval a=+ round(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval \"true\" >= booleanField", - "error": [ - "Argument of [>=] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval 1 + + doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval ipField >= \"136.36.3.205\"", + "query": "from a_index | eval 1 + doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"136.36.3.205\" >= ipField", + "query": "from a_index | eval not booleanField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField < 0", + "query": "from a_index | eval -- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval NOT numberField < 0", + "query": "from a_index | eval a=-- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField < 0)", + "query": "from a_index | eval a=-- round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval (NOT (numberField < 0))", + "query": "from a_index | eval 1 + -- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 < 0", + "query": "from a_index | eval 1 -- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField < stringField", + "query": "from a_index | eval -+ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField < numberField", + "query": "from a_index | eval a=-+ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField < dateField", + "query": "from a_index | eval a=-+ round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField < booleanField", - "error": [ - "Argument of [<] must be [number], found value [booleanField] type [boolean]", - "Argument of [<] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval 1 + -+ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval ipField < ipField", + "query": "from a_index | eval 1 -+ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField < stringField", - "error": [ - "Argument of [<] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval +- doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField < numberField", - "error": [ - "Argument of [<] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval a=+- doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval numberField < \"2022\"", - "error": [ - "Argument of [<] must be [number], found value [\"2022\"] type [string]" - ], + "query": "from a_index | eval a=+- round(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval dateField < stringField", - "error": [ - "Argument of [<] must be [string], found value [dateField] type [date]" - ], + "query": "from a_index | eval 1 + +- doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField < dateField", - "error": [ - "Argument of [<] must be [string], found value [dateField] type [date]" - ], + "query": "from a_index | eval 1 +- doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField < 0", - "error": [ - "Argument of [<] must be [number], found value [stringField] type [string]" - ], - "warning": [] - }, - { - "query": "from a_index | eval stringField < now()", - "error": [ - "Argument of [<] must be [string], found value [now()] type [date]" - ], + "query": "from a_index | eval ++ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval dateField < \"2022\"", + "query": "from a_index | eval a=++ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"2022\" < dateField", + "query": "from a_index | eval a=++ round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField < \"1.2.3\"", + "query": "from a_index | eval 1 + ++ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"1.2.3\" < versionField", + "query": "from a_index | eval 1 ++ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField < \"true\"", - "error": [ - "Argument of [<] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval not not booleanField", + "error": [], "warning": [] }, { - "query": "from a_index | eval \"true\" < booleanField", - "error": [ - "Argument of [<] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval --- doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval ipField < \"136.36.3.205\"", + "query": "from a_index | eval a=--- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"136.36.3.205\" < ipField", + "query": "from a_index | eval a=--- round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField <= 0", + "query": "from a_index | eval 1 + --- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval NOT numberField <= 0", + "query": "from a_index | eval 1 --- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField <= 0)", + "query": "from a_index | eval -+- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval (NOT (numberField <= 0))", + "query": "from a_index | eval a=-+- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 <= 0", + "query": "from a_index | eval a=-+- round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField <= stringField", + "query": "from a_index | eval 1 + -+- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField <= numberField", + "query": "from a_index | eval 1 -+- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField <= dateField", + "query": "from a_index | eval +-+ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField <= booleanField", - "error": [ - "Argument of [<=] must be [number], found value [booleanField] type [boolean]", - "Argument of [<=] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval a=+-+ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval ipField <= ipField", + "query": "from a_index | eval a=+-+ round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField <= stringField", - "error": [ - "Argument of [<=] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval 1 + +-+ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField <= numberField", - "error": [ - "Argument of [<=] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval 1 +-+ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval numberField <= \"2022\"", - "error": [ - "Argument of [<=] must be [number], found value [\"2022\"] type [string]" - ], + "query": "from a_index | eval +++ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval dateField <= stringField", - "error": [ - "Argument of [<=] must be [string], found value [dateField] type [date]" - ], + "query": "from a_index | eval a=+++ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField <= dateField", - "error": [ - "Argument of [<=] must be [string], found value [dateField] type [date]" - ], + "query": "from a_index | eval a=+++ round(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField <= 0", - "error": [ - "Argument of [<=] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval 1 + +++ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField <= now()", - "error": [ - "Argument of [<=] must be [string], found value [now()] type [date]" - ], + "query": "from a_index | eval 1 +++ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval dateField <= \"2022\"", + "query": "from a_index | eval not not not booleanField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"2022\" <= dateField", + "query": "from a_index | eval ---- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField <= \"1.2.3\"", + "query": "from a_index | eval a=---- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"1.2.3\" <= versionField", + "query": "from a_index | eval a=---- round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField <= \"true\"", - "error": [ - "Argument of [<=] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval 1 + ---- doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval \"true\" <= booleanField", - "error": [ - "Argument of [<=] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval 1 ---- doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval ipField <= \"136.36.3.205\"", + "query": "from a_index | eval -+-+ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"136.36.3.205\" <= ipField", + "query": "from a_index | eval a=-+-+ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField == 0", + "query": "from a_index | eval a=-+-+ round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval NOT numberField == 0", + "query": "from a_index | eval 1 + -+-+ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField == 0)", + "query": "from a_index | eval 1 -+-+ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval (NOT (numberField == 0))", + "query": "from a_index | eval +-+- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 == 0", + "query": "from a_index | eval a=+-+- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField == stringField", + "query": "from a_index | eval a=+-+- round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField == numberField", + "query": "from a_index | eval 1 + +-+- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField == dateField", + "query": "from a_index | eval 1 +-+- doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField == booleanField", + "query": "from a_index | eval ++++ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField == ipField", + "query": "from a_index | eval a=++++ doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField == stringField", - "error": [ - "Argument of [==] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval a=++++ round(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField == numberField", - "error": [ - "Argument of [==] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval 1 + ++++ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval numberField == \"2022\"", - "error": [ - "Argument of [==] must be [number], found value [\"2022\"] type [string]" - ], + "query": "from a_index | eval 1 ++++ doubleField", + "error": [], "warning": [] }, { - "query": "from a_index | eval dateField == stringField", - "error": [ - "Argument of [==] must be [string], found value [dateField] type [date]" - ], + "query": "from a_index | eval not not not not booleanField", + "error": [], "warning": [] }, { - "query": "from a_index | eval stringField == dateField", + "query": "from a_index | eval *+ doubleField", "error": [ - "Argument of [==] must be [string], found value [dateField] type [date]" + "SyntaxError: extraneous input '*' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" ], "warning": [] }, { - "query": "from a_index | eval stringField == 0", + "query": "from a_index | eval /+ doubleField", "error": [ - "Argument of [==] must be [number], found value [stringField] type [string]" + "SyntaxError: extraneous input '/' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" ], "warning": [] }, { - "query": "from a_index | eval stringField == now()", + "query": "from a_index | eval %+ doubleField", "error": [ - "Argument of [==] must be [string], found value [now()] type [date]" + "SyntaxError: extraneous input '%' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" ], "warning": [] }, { - "query": "from a_index | eval dateField == \"2022\"", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval \"2022\" == dateField", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval versionField == \"1.2.3\"", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval \"1.2.3\" == versionField", + "query": "from a_index | eval log10(-1)", "error": [], - "warning": [] + "warning": [ + "Log of a negative number results in null: -1" + ] }, { - "query": "from a_index | eval booleanField == \"true\"", + "query": "from a_index | eval log(-1)", "error": [], - "warning": [] + "warning": [ + "Log of a negative number results in null: -1" + ] }, { - "query": "from a_index | eval \"true\" == booleanField", + "query": "from a_index | eval log(-1, 20)", "error": [], - "warning": [] + "warning": [ + "Log of a negative number results in null: -1" + ] }, { - "query": "from a_index | eval ipField == \"136.36.3.205\"", + "query": "from a_index | eval log(-1, -20)", "error": [], - "warning": [] + "warning": [ + "Log of a negative number results in null: -1", + "Log of a negative number results in null: -20" + ] }, { - "query": "from a_index | eval \"136.36.3.205\" == ipField", + "query": "from a_index | eval var0 = log(-1, -20)", "error": [], - "warning": [] + "warning": [ + "Log of a negative number results in null: -1", + "Log of a negative number results in null: -20" + ] }, { - "query": "from a_index | eval numberField != 0", + "query": "from a_index | eval doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval NOT numberField != 0", + "query": "from a_index | eval NOT doubleField > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField != 0)", + "query": "from a_index | eval (doubleField > 0)", "error": [], "warning": [] }, { - "query": "from a_index | eval (NOT (numberField != 0))", + "query": "from a_index | eval (NOT (doubleField > 0))", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 != 0", + "query": "from a_index | eval 1 > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField != stringField", + "query": "from a_index | eval textField > textField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField != numberField", + "query": "from a_index | eval doubleField > doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField != dateField", + "query": "from a_index | eval dateField > dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField != booleanField", - "error": [], + "query": "from a_index | eval booleanField > booleanField", + "error": [ + "Argument of [>] must be [date], found value [booleanField] type [boolean]", + "Argument of [>] must be [date], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval ipField != ipField", + "query": "from a_index | eval ipField > ipField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField != stringField", + "query": "from a_index | eval doubleField > textField", "error": [ - "Argument of [!=] must be [number], found value [stringField] type [string]" + "Argument of [>] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval stringField != numberField", + "query": "from a_index | eval keywordField > doubleField", "error": [ - "Argument of [!=] must be [number], found value [stringField] type [string]" + "Argument of [>] must be [double], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval numberField != \"2022\"", + "query": "from a_index | eval doubleField > \"2022\"", "error": [ - "Argument of [!=] must be [number], found value [\"2022\"] type [string]" + "Argument of [>] must be [date], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval dateField != stringField", + "query": "from a_index | eval dateField > keywordField", "error": [ - "Argument of [!=] must be [string], found value [dateField] type [date]" + "Argument of [>] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval stringField != dateField", + "query": "from a_index | eval keywordField > dateField", "error": [ - "Argument of [!=] must be [string], found value [dateField] type [date]" + "Argument of [>] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval stringField != 0", + "query": "from a_index | eval textField > 0", "error": [ - "Argument of [!=] must be [number], found value [stringField] type [string]" + "Argument of [>] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval stringField != now()", + "query": "from a_index | eval textField > now()", "error": [ - "Argument of [!=] must be [string], found value [now()] type [date]" + "Argument of [>] must be [date], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval dateField != \"2022\"", + "query": "from a_index | eval dateField > \"2022\"", "error": [], "warning": [] }, { - "query": "from a_index | eval \"2022\" != dateField", + "query": "from a_index | eval \"2022\" > dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField != \"1.2.3\"", + "query": "from a_index | eval versionField > \"1.2.3\"", "error": [], "warning": [] }, { - "query": "from a_index | eval \"1.2.3\" != versionField", + "query": "from a_index | eval \"1.2.3\" > versionField", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField != \"true\"", - "error": [], + "query": "from a_index | eval booleanField > \"true\"", + "error": [ + "Argument of [>] must be [date], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval \"true\" != booleanField", + "query": "from a_index | eval \"true\" > booleanField", + "error": [ + "Argument of [>] must be [date], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval ipField > \"136.36.3.205\"", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField != \"136.36.3.205\"", + "query": "from a_index | eval \"136.36.3.205\" > ipField", "error": [], "warning": [] }, { - "query": "from a_index | eval \"136.36.3.205\" != ipField", + "query": "from a_index | eval doubleField >= 0", "error": [], "warning": [] }, { - "query": "from a_index | eval versionField in (\"1.2.3\", \"4.5.6\", to_version(\"2.3.2\"))", + "query": "from a_index | eval NOT doubleField >= 0", "error": [], "warning": [] }, { - "query": "from a_index | eval dateField in (\"2023-12-12\", \"2024-12-12\", date_parse(\"yyyy-MM-dd\", \"2025-12-12\"))", + "query": "from a_index | eval (doubleField >= 0)", "error": [], "warning": [] }, { - "query": "from a_index | eval booleanField in (\"true\", \"false\", false)", + "query": "from a_index | eval (NOT (doubleField >= 0))", "error": [], "warning": [] }, { - "query": "from a_index | eval ipField in (\"136.36.3.205\", \"136.36.3.206\", to_ip(\"136.36.3.207\"))", + "query": "from a_index | eval 1 >= 0", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField + 1", + "query": "from a_index | eval textField >= textField", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField + 1)", + "query": "from a_index | eval doubleField >= doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + 1", + "query": "from a_index | eval dateField >= dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval now() + now()", + "query": "from a_index | eval booleanField >= booleanField", "error": [ - "Argument of [+] must be [time_literal], found value [now()] type [date]" + "Argument of [>=] must be [date], found value [booleanField] type [boolean]", + "Argument of [>=] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval 1 + \"1\"", - "error": [ - "Argument of [+] must be [number], found value [\"1\"] type [string]" - ], + "query": "from a_index | eval ipField >= ipField", + "error": [], "warning": [] }, { - "query": "from a_index | eval \"1\" + 1", + "query": "from a_index | eval doubleField >= textField", "error": [ - "Argument of [+] must be [number], found value [\"1\"] type [string]" + "Argument of [>=] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval numberField - 1", - "error": [], + "query": "from a_index | eval keywordField >= doubleField", + "error": [ + "Argument of [>=] must be [double], found value [keywordField] type [keyword]" + ], "warning": [] }, { - "query": "from a_index | eval (numberField - 1)", - "error": [], + "query": "from a_index | eval doubleField >= \"2022\"", + "error": [ + "Argument of [>=] must be [date], found value [doubleField] type [double]" + ], "warning": [] }, { - "query": "from a_index | eval 1 - 1", - "error": [], + "query": "from a_index | eval dateField >= keywordField", + "error": [ + "Argument of [>=] must be [date], found value [keywordField] type [keyword]" + ], "warning": [] }, { - "query": "from a_index | eval now() - now()", + "query": "from a_index | eval keywordField >= dateField", "error": [ - "Argument of [-] must be [time_literal], found value [now()] type [date]" + "Argument of [>=] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval 1 - \"1\"", + "query": "from a_index | eval textField >= 0", "error": [ - "Argument of [-] must be [number], found value [\"1\"] type [string]" + "Argument of [>=] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval \"1\" - 1", + "query": "from a_index | eval textField >= now()", "error": [ - "Argument of [-] must be [number], found value [\"1\"] type [string]" + "Argument of [>=] must be [date], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval numberField * 1", + "query": "from a_index | eval dateField >= \"2022\"", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField * 1)", + "query": "from a_index | eval \"2022\" >= dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 * 1", + "query": "from a_index | eval versionField >= \"1.2.3\"", "error": [], "warning": [] }, { - "query": "from a_index | eval now() * now()", - "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [now()] type [date]" - ], + "query": "from a_index | eval \"1.2.3\" >= versionField", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 * \"1\"", + "query": "from a_index | eval booleanField >= \"true\"", "error": [ - "Argument of [*] must be [number], found value [\"1\"] type [string]" + "Argument of [>=] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval \"1\" * 1", + "query": "from a_index | eval \"true\" >= booleanField", "error": [ - "Argument of [*] must be [number], found value [\"1\"] type [string]" + "Argument of [>=] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval numberField / 1", + "query": "from a_index | eval ipField >= \"136.36.3.205\"", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField / 1)", + "query": "from a_index | eval \"136.36.3.205\" >= ipField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 / 1", + "query": "from a_index | eval doubleField < 0", "error": [], "warning": [] }, { - "query": "from a_index | eval now() / now()", - "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [now()] type [date]" - ], + "query": "from a_index | eval NOT doubleField < 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 / \"1\"", - "error": [ - "Argument of [/] must be [number], found value [\"1\"] type [string]" - ], + "query": "from a_index | eval (doubleField < 0)", + "error": [], "warning": [] }, { - "query": "from a_index | eval \"1\" / 1", - "error": [ - "Argument of [/] must be [number], found value [\"1\"] type [string]" - ], + "query": "from a_index | eval (NOT (doubleField < 0))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval 1 < 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval numberField % 1", + "query": "from a_index | eval textField < textField", "error": [], "warning": [] }, { - "query": "from a_index | eval (numberField % 1)", + "query": "from a_index | eval doubleField < doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 % 1", + "query": "from a_index | eval dateField < dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval now() % now()", + "query": "from a_index | eval booleanField < booleanField", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [now()] type [date]" + "Argument of [<] must be [date], found value [booleanField] type [boolean]", + "Argument of [<] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval 1 % \"1\"", + "query": "from a_index | eval ipField < ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval doubleField < textField", "error": [ - "Argument of [%] must be [number], found value [\"1\"] type [string]" + "Argument of [<] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval \"1\" % 1", + "query": "from a_index | eval keywordField < doubleField", "error": [ - "Argument of [%] must be [number], found value [\"1\"] type [string]" + "Argument of [<] must be [double], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval 1/0", - "error": [], - "warning": [ - "Cannot divide by zero: 1/0" - ] + "query": "from a_index | eval doubleField < \"2022\"", + "error": [ + "Argument of [<] must be [date], found value [doubleField] type [double]" + ], + "warning": [] }, { - "query": "from a_index | eval var = 1/0", - "error": [], - "warning": [ - "Cannot divide by zero: 1/0" - ] + "query": "from a_index | eval dateField < keywordField", + "error": [ + "Argument of [<] must be [date], found value [keywordField] type [keyword]" + ], + "warning": [] }, { - "query": "from a_index | eval 1 + 1/0", - "error": [], - "warning": [ - "Cannot divide by zero: 1/0" - ] - }, - { - "query": "from a_index | eval 1%0", - "error": [], - "warning": [ - "Module by zero can return null value: 1%0" - ] - }, - { - "query": "from a_index | eval var = 1%0", - "error": [], - "warning": [ - "Module by zero can return null value: 1%0" - ] - }, - { - "query": "from a_index | eval 1 + 1%0", - "error": [], - "warning": [ - "Module by zero can return null value: 1%0" - ] - }, - { - "query": "from a_index | eval stringField like \"?a\"", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval stringField NOT like \"?a\"", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval NOT stringField like \"?a\"", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval NOT stringField NOT like \"?a\"", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval numberField like \"?a\"", - "error": [ - "Argument of [like] must be [string], found value [numberField] type [number]" - ], - "warning": [] - }, - { - "query": "from a_index | eval numberField NOT like \"?a\"", + "query": "from a_index | eval keywordField < dateField", "error": [ - "Argument of [not_like] must be [string], found value [numberField] type [number]" + "Argument of [<] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval NOT numberField like \"?a\"", + "query": "from a_index | eval textField < 0", "error": [ - "Argument of [like] must be [string], found value [numberField] type [number]" + "Argument of [<] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval NOT numberField NOT like \"?a\"", + "query": "from a_index | eval textField < now()", "error": [ - "Argument of [not_like] must be [string], found value [numberField] type [number]" + "Argument of [<] must be [date], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval stringField rlike \"?a\"", + "query": "from a_index | eval dateField < \"2022\"", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField NOT rlike \"?a\"", + "query": "from a_index | eval \"2022\" < dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval NOT stringField rlike \"?a\"", + "query": "from a_index | eval versionField < \"1.2.3\"", "error": [], "warning": [] }, { - "query": "from a_index | eval NOT stringField NOT rlike \"?a\"", + "query": "from a_index | eval \"1.2.3\" < versionField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField rlike \"?a\"", - "error": [ - "Argument of [rlike] must be [string], found value [numberField] type [number]" - ], - "warning": [] - }, - { - "query": "from a_index | eval numberField NOT rlike \"?a\"", - "error": [ - "Argument of [not_rlike] must be [string], found value [numberField] type [number]" - ], - "warning": [] - }, - { - "query": "from a_index | eval NOT numberField rlike \"?a\"", + "query": "from a_index | eval booleanField < \"true\"", "error": [ - "Argument of [rlike] must be [string], found value [numberField] type [number]" + "Argument of [<] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval NOT numberField NOT rlike \"?a\"", + "query": "from a_index | eval \"true\" < booleanField", "error": [ - "Argument of [not_rlike] must be [string], found value [numberField] type [number]" + "Argument of [<] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval 1 in (1, 2, 3)", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval numberField in (1, 2, 3)", + "query": "from a_index | eval ipField < \"136.36.3.205\"", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField not in (1, 2, 3)", + "query": "from a_index | eval \"136.36.3.205\" < ipField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField not in (1, 2, 3, numberField)", + "query": "from a_index | eval doubleField <= 0", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 in (1, 2, 3, round(numberField))", + "query": "from a_index | eval NOT doubleField <= 0", "error": [], "warning": [] }, { - "query": "from a_index | eval \"a\" in (\"a\", \"b\", \"c\")", + "query": "from a_index | eval (doubleField <= 0)", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField in (\"a\", \"b\", \"c\")", + "query": "from a_index | eval (NOT (doubleField <= 0))", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField not in (\"a\", \"b\", \"c\")", + "query": "from a_index | eval 1 <= 0", "error": [], "warning": [] }, { - "query": "from a_index | eval stringField not in (\"a\", \"b\", \"c\", stringField)", + "query": "from a_index | eval textField <= textField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 in (\"a\", \"b\", \"c\")", + "query": "from a_index | eval doubleField <= doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField in (\"a\", \"b\", \"c\")", + "query": "from a_index | eval dateField <= dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval numberField not in (\"a\", \"b\", \"c\")", - "error": [], + "query": "from a_index | eval booleanField <= booleanField", + "error": [ + "Argument of [<=] must be [date], found value [booleanField] type [boolean]", + "Argument of [<=] must be [date], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval numberField not in (1, 2, 3, stringField)", + "query": "from a_index | eval ipField <= ipField", "error": [], "warning": [] }, { - "query": "from a_index | eval avg(numberField)", + "query": "from a_index | eval doubleField <= textField", "error": [ - "EVAL does not support function avg" + "Argument of [<=] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | stats avg(numberField) | eval `avg(numberField)` + 1", - "error": [], + "query": "from a_index | eval keywordField <= doubleField", + "error": [ + "Argument of [<=] must be [double], found value [keywordField] type [keyword]" + ], "warning": [] }, { - "query": "from a_index | eval not", + "query": "from a_index | eval doubleField <= \"2022\"", "error": [ - "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", - "Error: [not] function expects exactly one argument, got 0." + "Argument of [<=] must be [date], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval in", + "query": "from a_index | eval dateField <= keywordField", "error": [ - "SyntaxError: mismatched input 'in' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" + "Argument of [<=] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval stringField in stringField", + "query": "from a_index | eval keywordField <= dateField", "error": [ - "SyntaxError: missing '(' at 'stringField'", - "SyntaxError: mismatched input '' expecting {',', ')'}" + "Argument of [<=] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval stringField in stringField)", + "query": "from a_index | eval textField <= 0", "error": [ - "SyntaxError: missing '(' at 'stringField'", - "Error: [in] function expects exactly 2 arguments, got 1." + "Argument of [<=] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval stringField not in stringField", + "query": "from a_index | eval textField <= now()", "error": [ - "SyntaxError: missing '(' at 'stringField'", - "SyntaxError: mismatched input '' expecting {',', ')'}" + "Argument of [<=] must be [date], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval mv_sort([\"a\", \"b\"], \"bogus\")", + "query": "from a_index | eval dateField <= \"2022\"", "error": [], - "warning": [ - "Invalid option [\"bogus\"] for mv_sort. Supported options: [\"asc\", \"desc\"]." - ] + "warning": [] }, { - "query": "from a_index | eval mv_sort([\"a\", \"b\"], \"ASC\")", + "query": "from a_index | eval \"2022\" <= dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sort([\"a\", \"b\"], \"DESC\")", + "query": "from a_index | eval versionField <= \"1.2.3\"", "error": [], "warning": [] }, { - "query": "from a_index | eval result = case(false, 0, 1), round(result)", + "query": "from a_index | eval \"1.2.3\" <= versionField", "error": [], "warning": [] }, { - "query": "from a_index | eval result = case(false, 0, 1) | stats sum(result)", - "error": [], + "query": "from a_index | eval booleanField <= \"true\"", + "error": [ + "Argument of [<=] must be [date], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval result = case(false, 0, 1) | stats var0 = sum(result)", + "query": "from a_index | eval \"true\" <= booleanField", + "error": [ + "Argument of [<=] must be [date], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval ipField <= \"136.36.3.205\"", "error": [], "warning": [] }, { - "query": "from a_index | eval round(case(false, 0, 1))", + "query": "from a_index | eval \"136.36.3.205\" <= ipField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 anno", - "error": [ - "EVAL does not support [date_period] in expression [1 anno]" - ], + "query": "from a_index | eval doubleField == 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = 1 anno", - "error": [ - "Unexpected time interval qualifier: 'anno'" - ], + "query": "from a_index | eval NOT doubleField == 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval now() + 1 anno", - "error": [ - "Unexpected time interval qualifier: 'anno'" - ], + "query": "from a_index | eval (doubleField == 0)", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 year", - "error": [ - "EVAL does not support [date_period] in expression [1 year]" - ], + "query": "from a_index | eval (NOT (doubleField == 0))", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 year", - "error": [ - "EVAL does not support [date_period] in expression [1 year]" - ], + "query": "from a_index | eval 1 == 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 year", + "query": "from a_index | eval textField == textField", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 year", + "query": "from a_index | eval doubleField == doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 YEAR", + "query": "from a_index | eval dateField == dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Year", + "query": "from a_index | eval booleanField == booleanField", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 year", + "query": "from a_index | eval ipField == ipField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 year + 1 year", + "query": "from a_index | eval doubleField == textField", "error": [ - "Argument of [+] must be [date], found value [1 year] type [duration]" + "Argument of [==] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 year", + "query": "from a_index | eval keywordField == doubleField", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 year] type [duration]" + "Argument of [==] must be [double], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 year", + "query": "from a_index | eval doubleField == \"2022\"", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 year] type [duration]" + "Argument of [==] must be [date], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 year", + "query": "from a_index | eval dateField == keywordField", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 year] type [duration]" + "Argument of [==] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval 1 years", + "query": "from a_index | eval keywordField == dateField", "error": [ - "EVAL does not support [date_period] in expression [1 years]" + "Argument of [==] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval 1 years", + "query": "from a_index | eval textField == 0", "error": [ - "EVAL does not support [date_period] in expression [1 years]" + "Argument of [==] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 years", + "query": "from a_index | eval textField == now()", + "error": [ + "Argument of [==] must be [date], found value [textField] type [text]" + ], + "warning": [] + }, + { + "query": "from a_index | eval dateField == \"2022\"", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 years", + "query": "from a_index | eval \"2022\" == dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 YEARS", + "query": "from a_index | eval versionField == \"1.2.3\"", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Years", + "query": "from a_index | eval \"1.2.3\" == versionField", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 years", + "query": "from a_index | eval booleanField == \"true\"", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 years + 1 year", - "error": [ - "Argument of [+] must be [date], found value [1 years] type [duration]" - ], + "query": "from a_index | eval \"true\" == booleanField", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 years", - "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 years] type [duration]" - ], + "query": "from a_index | eval ipField == \"136.36.3.205\"", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 years", - "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 years] type [duration]" - ], + "query": "from a_index | eval \"136.36.3.205\" == ipField", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 years", - "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 years] type [duration]" - ], + "query": "from a_index | eval doubleField != 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 quarter", - "error": [ - "EVAL does not support [date_period] in expression [1 quarter]" - ], + "query": "from a_index | eval NOT doubleField != 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 quarter", - "error": [ - "EVAL does not support [date_period] in expression [1 quarter]" - ], + "query": "from a_index | eval (doubleField != 0)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 quarter", + "query": "from a_index | eval (NOT (doubleField != 0))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 quarter", + "query": "from a_index | eval 1 != 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 QUARTER", + "query": "from a_index | eval textField != textField", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Quarter", + "query": "from a_index | eval doubleField != doubleField", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 quarter", + "query": "from a_index | eval dateField != dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 quarter + 1 year", + "query": "from a_index | eval booleanField != booleanField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval ipField != ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval doubleField != textField", "error": [ - "Argument of [+] must be [date], found value [1 quarter] type [duration]" + "Argument of [!=] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 quarter", + "query": "from a_index | eval keywordField != doubleField", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 quarter] type [duration]" + "Argument of [!=] must be [double], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 quarter", + "query": "from a_index | eval doubleField != \"2022\"", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 quarter] type [duration]" + "Argument of [!=] must be [date], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 quarter", + "query": "from a_index | eval dateField != keywordField", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 quarter] type [duration]" + "Argument of [!=] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval 1 quarters", + "query": "from a_index | eval keywordField != dateField", "error": [ - "EVAL does not support [date_period] in expression [1 quarters]" + "Argument of [!=] must be [date], found value [keywordField] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval 1 quarters", + "query": "from a_index | eval textField != 0", "error": [ - "EVAL does not support [date_period] in expression [1 quarters]" + "Argument of [!=] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 quarters", - "error": [], + "query": "from a_index | eval textField != now()", + "error": [ + "Argument of [!=] must be [date], found value [textField] type [text]" + ], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 quarters", + "query": "from a_index | eval dateField != \"2022\"", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 QUARTERS", + "query": "from a_index | eval \"2022\" != dateField", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Quarters", + "query": "from a_index | eval versionField != \"1.2.3\"", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 quarters", + "query": "from a_index | eval \"1.2.3\" != versionField", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 quarters + 1 year", - "error": [ - "Argument of [+] must be [date], found value [1 quarters] type [duration]" - ], + "query": "from a_index | eval booleanField != \"true\"", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 quarters", - "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 quarters] type [duration]" - ], + "query": "from a_index | eval \"true\" != booleanField", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 quarters", - "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 quarters] type [duration]" - ], + "query": "from a_index | eval ipField != \"136.36.3.205\"", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 quarters", - "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 quarters] type [duration]" - ], + "query": "from a_index | eval \"136.36.3.205\" != ipField", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 month", - "error": [ - "EVAL does not support [date_period] in expression [1 month]" - ], + "query": "from a_index | eval versionField in (\"1.2.3\", \"4.5.6\", to_version(\"2.3.2\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 month", - "error": [ - "EVAL does not support [date_period] in expression [1 month]" - ], + "query": "from a_index | eval dateField in (\"2023-12-12\", \"2024-12-12\", date_parse(\"yyyy-MM-dd\", \"2025-12-12\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 month", + "query": "from a_index | eval booleanField in (\"true\", \"false\", false)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 month", + "query": "from a_index | eval ipField in (\"136.36.3.205\", \"136.36.3.206\", to_ip(\"136.36.3.207\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 MONTH", + "query": "from a_index | eval doubleField + 1", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Month", + "query": "from a_index | eval (doubleField + 1)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 month", + "query": "from a_index | eval 1 + 1", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 month + 1 year", + "query": "from a_index | eval now() + now()", "error": [ - "Argument of [+] must be [date], found value [1 month] type [duration]" + "Argument of [+] must be [date_period], found value [now()] type [date]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 month", + "query": "from a_index | eval 1 + \"1\"", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 month] type [duration]" + "Argument of [+] must be [date_period], found value [1] type [integer]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 month", + "query": "from a_index | eval \"1\" + 1", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 month] type [duration]" + "Argument of [+] must be [date_period], found value [1] type [integer]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 month", - "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 month] type [duration]" - ], + "query": "from a_index | eval doubleField - 1", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 months", - "error": [ - "EVAL does not support [date_period] in expression [1 months]" - ], + "query": "from a_index | eval (doubleField - 1)", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 months", + "query": "from a_index | eval 1 - 1", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval now() - now()", "error": [ - "EVAL does not support [date_period] in expression [1 months]" + "Argument of [-] must be [date_period], found value [now()] type [date]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 months", - "error": [], + "query": "from a_index | eval 1 - \"1\"", + "error": [ + "Argument of [-] must be [date_period], found value [1] type [integer]" + ], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 months", - "error": [], + "query": "from a_index | eval \"1\" - 1", + "error": [ + "Argument of [-] must be [date_period], found value [1] type [integer]" + ], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 MONTHS", + "query": "from a_index | eval doubleField * 1", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Months", + "query": "from a_index | eval (doubleField * 1)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 months", + "query": "from a_index | eval 1 * 1", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 months + 1 year", + "query": "from a_index | eval now() * now()", "error": [ - "Argument of [+] must be [date], found value [1 months] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [now()] type [date]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 months", + "query": "from a_index | eval 1 * \"1\"", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 months] type [duration]" + "Argument of [*] must be [double], found value [\"1\"] type [string]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 months", + "query": "from a_index | eval \"1\" * 1", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 months] type [duration]" + "Argument of [*] must be [double], found value [\"1\"] type [string]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 months", - "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 months] type [duration]" - ], + "query": "from a_index | eval doubleField / 1", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 week", - "error": [ - "EVAL does not support [date_period] in expression [1 week]" - ], + "query": "from a_index | eval (doubleField / 1)", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 week", + "query": "from a_index | eval 1 / 1", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval now() / now()", "error": [ - "EVAL does not support [date_period] in expression [1 week]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [now()] type [date]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 week", - "error": [], + "query": "from a_index | eval 1 / \"1\"", + "error": [ + "Argument of [/] must be [double], found value [\"1\"] type [string]" + ], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 week", - "error": [], + "query": "from a_index | eval \"1\" / 1", + "error": [ + "Argument of [/] must be [double], found value [\"1\"] type [string]" + ], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 WEEK", + "query": "from a_index | eval doubleField % 1", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Week", + "query": "from a_index | eval (doubleField % 1)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 week", + "query": "from a_index | eval 1 % 1", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 week + 1 year", + "query": "from a_index | eval now() % now()", "error": [ - "Argument of [+] must be [date], found value [1 week] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [now()] type [date]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 week", + "query": "from a_index | eval 1 % \"1\"", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 week] type [duration]" + "Argument of [%] must be [double], found value [\"1\"] type [string]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 week", + "query": "from a_index | eval \"1\" % 1", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 week] type [duration]" + "Argument of [%] must be [double], found value [\"1\"] type [string]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 week", - "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 week] type [duration]" - ], - "warning": [] + "query": "from a_index | eval 1/0", + "error": [], + "warning": [ + "Cannot divide by zero: 1/0" + ] }, { - "query": "from a_index | eval 1 weeks", - "error": [ - "EVAL does not support [date_period] in expression [1 weeks]" - ], - "warning": [] + "query": "from a_index | eval var = 1/0", + "error": [], + "warning": [ + "Cannot divide by zero: 1/0" + ] }, { - "query": "from a_index | eval 1 weeks", - "error": [ - "EVAL does not support [date_period] in expression [1 weeks]" - ], - "warning": [] + "query": "from a_index | eval 1 + 1/0", + "error": [], + "warning": [ + "Cannot divide by zero: 1/0" + ] }, { - "query": "from a_index | eval var = now() - 1 weeks", + "query": "from a_index | eval 1%0", "error": [], - "warning": [] + "warning": [ + "Module by zero can return null value: 1%0" + ] }, { - "query": "from a_index | eval var = dateField - 1 weeks", + "query": "from a_index | eval var = 1%0", "error": [], - "warning": [] + "warning": [ + "Module by zero can return null value: 1%0" + ] }, { - "query": "from a_index | eval var = dateField - 1 WEEKS", + "query": "from a_index | eval 1 + 1%0", "error": [], - "warning": [] + "warning": [ + "Module by zero can return null value: 1%0" + ] }, { - "query": "from a_index | eval var = dateField - 1 Weeks", + "query": "from a_index | eval textField like \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 weeks", + "query": "from a_index | eval textField NOT like \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 weeks + 1 year", - "error": [ - "Argument of [+] must be [date], found value [1 weeks] type [duration]" - ], + "query": "from a_index | eval NOT textField like \"?a\"", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 weeks", - "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 weeks] type [duration]" - ], + "query": "from a_index | eval NOT textField NOT like \"?a\"", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 weeks", + "query": "from a_index | eval doubleField like \"?a\"", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 weeks] type [duration]" + "Argument of [like] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 weeks", + "query": "from a_index | eval doubleField NOT like \"?a\"", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 weeks] type [duration]" + "Argument of [not_like] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval 1 day", + "query": "from a_index | eval NOT doubleField like \"?a\"", "error": [ - "EVAL does not support [date_period] in expression [1 day]" + "Argument of [like] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval 1 day", + "query": "from a_index | eval NOT doubleField NOT like \"?a\"", "error": [ - "EVAL does not support [date_period] in expression [1 day]" + "Argument of [not_like] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 day", + "query": "from a_index | eval textField rlike \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 day", + "query": "from a_index | eval textField NOT rlike \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 DAY", + "query": "from a_index | eval NOT textField rlike \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Day", + "query": "from a_index | eval NOT textField NOT rlike \"?a\"", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 day", - "error": [], + "query": "from a_index | eval doubleField rlike \"?a\"", + "error": [ + "Argument of [rlike] must be [text], found value [doubleField] type [double]" + ], "warning": [] }, { - "query": "from a_index | eval 1 day + 1 year", + "query": "from a_index | eval doubleField NOT rlike \"?a\"", "error": [ - "Argument of [+] must be [date], found value [1 day] type [duration]" + "Argument of [not_rlike] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 day", + "query": "from a_index | eval NOT doubleField rlike \"?a\"", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 day] type [duration]" + "Argument of [rlike] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 day", + "query": "from a_index | eval NOT doubleField NOT rlike \"?a\"", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 day] type [duration]" + "Argument of [not_rlike] must be [text], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 day", - "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 day] type [duration]" - ], + "query": "from a_index | eval 1 in (1, 2, 3)", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 days", - "error": [ - "EVAL does not support [date_period] in expression [1 days]" - ], + "query": "from a_index | eval doubleField in (1, 2, 3)", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 days", - "error": [ - "EVAL does not support [date_period] in expression [1 days]" - ], + "query": "from a_index | eval doubleField not in (1, 2, 3)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 days", + "query": "from a_index | eval doubleField not in (1, 2, 3, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 days", + "query": "from a_index | eval 1 in (1, 2, 3, round(doubleField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 DAYS", + "query": "from a_index | eval \"a\" in (\"a\", \"b\", \"c\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Days", + "query": "from a_index | eval textField in (\"a\", \"b\", \"c\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 days", + "query": "from a_index | eval textField not in (\"a\", \"b\", \"c\")", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 days + 1 year", - "error": [ - "Argument of [+] must be [date], found value [1 days] type [duration]" - ], + "query": "from a_index | eval textField not in (\"a\", \"b\", \"c\", textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 days", - "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 days] type [duration]" - ], + "query": "from a_index | eval 1 in (\"a\", \"b\", \"c\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 days", - "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 days] type [duration]" - ], + "query": "from a_index | eval doubleField in (\"a\", \"b\", \"c\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 days", - "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 days] type [duration]" - ], + "query": "from a_index | eval doubleField not in (\"a\", \"b\", \"c\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 hour", - "error": [ - "EVAL does not support [date_period] in expression [1 hour]" - ], + "query": "from a_index | eval doubleField not in (1, 2, 3, textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval 1 hour", + "query": "from a_index | eval avg(doubleField)", "error": [ - "EVAL does not support [date_period] in expression [1 hour]" + "EVAL does not support function avg" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 hour", + "query": "from a_index | stats avg(doubleField) | eval `avg(doubleField)` + 1", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 hour", - "error": [], + "query": "from a_index | eval not", + "error": [ + "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", + "Error: [not] function expects exactly one argument, got 0." + ], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 HOUR", - "error": [], + "query": "from a_index | eval in", + "error": [ + "SyntaxError: mismatched input 'in' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" + ], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Hour", - "error": [], + "query": "from a_index | eval textField in textField", + "error": [ + "SyntaxError: missing '(' at 'textField'", + "SyntaxError: mismatched input '' expecting {',', ')'}" + ], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 hour", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval 1 hour + 1 year", - "error": [ - "Argument of [+] must be [date], found value [1 hour] type [duration]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = now() * 1 hour", - "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 hour] type [duration]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = now() / 1 hour", - "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 hour] type [duration]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = now() % 1 hour", + "query": "from a_index | eval textField in textField)", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 hour] type [duration]" + "SyntaxError: missing '(' at 'textField'", + "Error: [in] function expects exactly 2 arguments, got 1." ], "warning": [] }, { - "query": "from a_index | eval 1 hours", + "query": "from a_index | eval textField not in textField", "error": [ - "EVAL does not support [date_period] in expression [1 hours]" + "SyntaxError: missing '(' at 'textField'", + "SyntaxError: mismatched input '' expecting {',', ')'}" ], "warning": [] }, { - "query": "from a_index | eval 1 hours", - "error": [ - "EVAL does not support [date_period] in expression [1 hours]" - ], - "warning": [] + "query": "from a_index | eval mv_sort([\"a\", \"b\"], \"bogus\")", + "error": [], + "warning": [ + "Invalid option [\"bogus\"] for mv_sort. Supported options: [\"asc\", \"desc\"]." + ] }, { - "query": "from a_index | eval var = now() - 1 hours", + "query": "from a_index | eval mv_sort([\"a\", \"b\"], \"ASC\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 hours", + "query": "from a_index | eval mv_sort([\"a\", \"b\"], \"DESC\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 HOURS", + "query": "from a_index | eval result = case(false, 0, 1), round(result)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Hours", + "query": "from a_index | eval result = case(false, 0, 1) | stats sum(result)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 hours", + "query": "from a_index | eval result = case(false, 0, 1) | stats var0 = sum(result)", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 hours + 1 year", - "error": [ - "Argument of [+] must be [date], found value [1 hours] type [duration]" - ], + "query": "from a_index | eval round(case(false, 0, 1))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 hours", + "query": "from a_index | eval 1 anno", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 hours] type [duration]" + "EVAL does not support [date_period] in expression [1 anno]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 hours", + "query": "from a_index | eval var = 1 anno", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 hours] type [duration]" + "Unexpected time interval qualifier: 'anno'" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 hours", + "query": "from a_index | eval now() + 1 anno", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 hours] type [duration]" + "Unexpected time interval qualifier: 'anno'" ], "warning": [] }, { - "query": "from a_index | eval 1 minute", + "query": "from a_index | eval 1 year", "error": [ - "EVAL does not support [date_period] in expression [1 minute]" + "EVAL does not support [date_period] in expression [1 year]" ], "warning": [] }, { - "query": "from a_index | eval 1 minute", + "query": "from a_index | eval 1 year", "error": [ - "EVAL does not support [date_period] in expression [1 minute]" + "EVAL does not support [date_period] in expression [1 year]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 minute", + "query": "from a_index | eval var = now() - 1 year", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 minute", + "query": "from a_index | eval var = dateField - 1 year", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 MINUTE", + "query": "from a_index | eval var = dateField - 1 YEAR", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Minute", + "query": "from a_index | eval var = dateField - 1 Year", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 minute", + "query": "from a_index | eval var = dateField + 1 year", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 minute + 1 year", + "query": "from a_index | eval 1 year + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 minute] type [duration]" + "Argument of [+] must be [date], found value [1 year] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 minute", + "query": "from a_index | eval var = now() * 1 year", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 minute] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 year] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 minute", + "query": "from a_index | eval var = now() / 1 year", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 minute] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 year] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 minute", + "query": "from a_index | eval var = now() % 1 year", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 minute] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 year] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 minutes", + "query": "from a_index | eval 1 years", "error": [ - "EVAL does not support [date_period] in expression [1 minutes]" + "EVAL does not support [date_period] in expression [1 years]" ], "warning": [] }, { - "query": "from a_index | eval 1 minutes", + "query": "from a_index | eval 1 years", "error": [ - "EVAL does not support [date_period] in expression [1 minutes]" + "EVAL does not support [date_period] in expression [1 years]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 minutes", + "query": "from a_index | eval var = now() - 1 years", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 minutes", + "query": "from a_index | eval var = dateField - 1 years", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 MINUTES", + "query": "from a_index | eval var = dateField - 1 YEARS", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Minutes", + "query": "from a_index | eval var = dateField - 1 Years", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 minutes", + "query": "from a_index | eval var = dateField + 1 years", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 minutes + 1 year", + "query": "from a_index | eval 1 years + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 minutes] type [duration]" + "Argument of [+] must be [date], found value [1 years] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 minutes", + "query": "from a_index | eval var = now() * 1 years", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 minutes] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 years] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 minutes", + "query": "from a_index | eval var = now() / 1 years", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 minutes] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 years] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 minutes", + "query": "from a_index | eval var = now() % 1 years", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 minutes] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 years] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 second", + "query": "from a_index | eval 1 quarter", "error": [ - "EVAL does not support [date_period] in expression [1 second]" + "EVAL does not support [date_period] in expression [1 quarter]" ], "warning": [] }, { - "query": "from a_index | eval 1 second", + "query": "from a_index | eval 1 quarter", "error": [ - "EVAL does not support [date_period] in expression [1 second]" + "EVAL does not support [date_period] in expression [1 quarter]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 second", + "query": "from a_index | eval var = now() - 1 quarter", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 second", + "query": "from a_index | eval var = dateField - 1 quarter", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 SECOND", + "query": "from a_index | eval var = dateField - 1 QUARTER", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Second", + "query": "from a_index | eval var = dateField - 1 Quarter", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 second", + "query": "from a_index | eval var = dateField + 1 quarter", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 second + 1 year", + "query": "from a_index | eval 1 quarter + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 second] type [duration]" + "Argument of [+] must be [date], found value [1 quarter] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 second", + "query": "from a_index | eval var = now() * 1 quarter", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 second] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 quarter] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 second", + "query": "from a_index | eval var = now() / 1 quarter", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 second] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 quarter] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 second", + "query": "from a_index | eval var = now() % 1 quarter", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 second] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 quarter] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 seconds", + "query": "from a_index | eval 1 quarters", "error": [ - "EVAL does not support [date_period] in expression [1 seconds]" + "EVAL does not support [date_period] in expression [1 quarters]" ], "warning": [] }, { - "query": "from a_index | eval 1 seconds", + "query": "from a_index | eval 1 quarters", "error": [ - "EVAL does not support [date_period] in expression [1 seconds]" + "EVAL does not support [date_period] in expression [1 quarters]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 seconds", + "query": "from a_index | eval var = now() - 1 quarters", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 seconds", + "query": "from a_index | eval var = dateField - 1 quarters", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 SECONDS", + "query": "from a_index | eval var = dateField - 1 QUARTERS", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Seconds", + "query": "from a_index | eval var = dateField - 1 Quarters", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 seconds", + "query": "from a_index | eval var = dateField + 1 quarters", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 seconds + 1 year", + "query": "from a_index | eval 1 quarters + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 seconds] type [duration]" + "Argument of [+] must be [date], found value [1 quarters] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 seconds", + "query": "from a_index | eval var = now() * 1 quarters", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 seconds] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 quarters] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 seconds", + "query": "from a_index | eval var = now() / 1 quarters", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 seconds] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 quarters] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 seconds", + "query": "from a_index | eval var = now() % 1 quarters", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 seconds] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 quarters] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 millisecond", + "query": "from a_index | eval 1 month", "error": [ - "EVAL does not support [date_period] in expression [1 millisecond]" + "EVAL does not support [date_period] in expression [1 month]" ], "warning": [] }, { - "query": "from a_index | eval 1 millisecond", + "query": "from a_index | eval 1 month", "error": [ - "EVAL does not support [date_period] in expression [1 millisecond]" + "EVAL does not support [date_period] in expression [1 month]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 millisecond", + "query": "from a_index | eval var = now() - 1 month", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 millisecond", + "query": "from a_index | eval var = dateField - 1 month", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 MILLISECOND", + "query": "from a_index | eval var = dateField - 1 MONTH", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Millisecond", + "query": "from a_index | eval var = dateField - 1 Month", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 millisecond", + "query": "from a_index | eval var = dateField + 1 month", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 millisecond + 1 year", + "query": "from a_index | eval 1 month + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 millisecond] type [duration]" + "Argument of [+] must be [date], found value [1 month] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 millisecond", + "query": "from a_index | eval var = now() * 1 month", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 millisecond] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 month] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 millisecond", + "query": "from a_index | eval var = now() / 1 month", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 millisecond] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 month] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 millisecond", + "query": "from a_index | eval var = now() % 1 month", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 millisecond] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 month] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 milliseconds", + "query": "from a_index | eval 1 months", "error": [ - "EVAL does not support [date_period] in expression [1 milliseconds]" + "EVAL does not support [date_period] in expression [1 months]" ], "warning": [] }, { - "query": "from a_index | eval 1 milliseconds", + "query": "from a_index | eval 1 months", "error": [ - "EVAL does not support [date_period] in expression [1 milliseconds]" + "EVAL does not support [date_period] in expression [1 months]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 milliseconds", + "query": "from a_index | eval var = now() - 1 months", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 milliseconds", + "query": "from a_index | eval var = dateField - 1 months", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 MILLISECONDS", + "query": "from a_index | eval var = dateField - 1 MONTHS", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Milliseconds", + "query": "from a_index | eval var = dateField - 1 Months", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 milliseconds", + "query": "from a_index | eval var = dateField + 1 months", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 milliseconds + 1 year", + "query": "from a_index | eval 1 months + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 milliseconds] type [duration]" + "Argument of [+] must be [date], found value [1 months] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 milliseconds", + "query": "from a_index | eval var = now() * 1 months", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 milliseconds] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 months] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 milliseconds", + "query": "from a_index | eval var = now() / 1 months", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 milliseconds] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 months] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 milliseconds", + "query": "from a_index | eval var = now() % 1 months", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 milliseconds] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 months] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 ms", + "query": "from a_index | eval 1 week", "error": [ - "EVAL does not support [date_period] in expression [1 ms]" + "EVAL does not support [date_period] in expression [1 week]" ], "warning": [] }, { - "query": "from a_index | eval 1 ms", + "query": "from a_index | eval 1 week", "error": [ - "EVAL does not support [date_period] in expression [1 ms]" + "EVAL does not support [date_period] in expression [1 week]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 ms", + "query": "from a_index | eval var = now() - 1 week", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 ms", + "query": "from a_index | eval var = dateField - 1 week", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 MS", + "query": "from a_index | eval var = dateField - 1 WEEK", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Ms", + "query": "from a_index | eval var = dateField - 1 Week", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 ms", + "query": "from a_index | eval var = dateField + 1 week", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 ms + 1 year", + "query": "from a_index | eval 1 week + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 ms] type [duration]" + "Argument of [+] must be [date], found value [1 week] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 ms", + "query": "from a_index | eval var = now() * 1 week", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 ms] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 week] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 ms", + "query": "from a_index | eval var = now() / 1 week", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 ms] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 week] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 ms", + "query": "from a_index | eval var = now() % 1 week", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 ms] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 week] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 s", + "query": "from a_index | eval 1 weeks", "error": [ - "EVAL does not support [date_period] in expression [1 s]" + "EVAL does not support [date_period] in expression [1 weeks]" ], "warning": [] }, { - "query": "from a_index | eval 1 s", + "query": "from a_index | eval 1 weeks", "error": [ - "EVAL does not support [date_period] in expression [1 s]" + "EVAL does not support [date_period] in expression [1 weeks]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 s", + "query": "from a_index | eval var = now() - 1 weeks", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 s", + "query": "from a_index | eval var = dateField - 1 weeks", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 S", + "query": "from a_index | eval var = dateField - 1 WEEKS", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 S", + "query": "from a_index | eval var = dateField - 1 Weeks", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 s", + "query": "from a_index | eval var = dateField + 1 weeks", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 s + 1 year", + "query": "from a_index | eval 1 weeks + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 s] type [duration]" + "Argument of [+] must be [date], found value [1 weeks] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 s", + "query": "from a_index | eval var = now() * 1 weeks", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 s] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 weeks] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 s", + "query": "from a_index | eval var = now() / 1 weeks", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 s] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 weeks] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 s", + "query": "from a_index | eval var = now() % 1 weeks", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 s] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 weeks] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 m", + "query": "from a_index | eval 1 day", "error": [ - "EVAL does not support [date_period] in expression [1 m]" + "EVAL does not support [date_period] in expression [1 day]" ], "warning": [] }, { - "query": "from a_index | eval 1 m", + "query": "from a_index | eval 1 day", "error": [ - "EVAL does not support [date_period] in expression [1 m]" + "EVAL does not support [date_period] in expression [1 day]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 m", + "query": "from a_index | eval var = now() - 1 day", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 m", + "query": "from a_index | eval var = dateField - 1 day", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 M", + "query": "from a_index | eval var = dateField - 1 DAY", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 M", + "query": "from a_index | eval var = dateField - 1 Day", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 m", + "query": "from a_index | eval var = dateField + 1 day", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 m + 1 year", + "query": "from a_index | eval 1 day + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 m] type [duration]" + "Argument of [+] must be [date], found value [1 day] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 m", + "query": "from a_index | eval var = now() * 1 day", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 m] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 day] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 m", + "query": "from a_index | eval var = now() / 1 day", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 m] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 day] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 m", + "query": "from a_index | eval var = now() % 1 day", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 m] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 day] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 h", + "query": "from a_index | eval 1 days", "error": [ - "EVAL does not support [date_period] in expression [1 h]" + "EVAL does not support [date_period] in expression [1 days]" ], "warning": [] }, { - "query": "from a_index | eval 1 h", + "query": "from a_index | eval 1 days", "error": [ - "EVAL does not support [date_period] in expression [1 h]" + "EVAL does not support [date_period] in expression [1 days]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 h", + "query": "from a_index | eval var = now() - 1 days", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 h", + "query": "from a_index | eval var = dateField - 1 days", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 H", + "query": "from a_index | eval var = dateField - 1 DAYS", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 H", + "query": "from a_index | eval var = dateField - 1 Days", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 h", + "query": "from a_index | eval var = dateField + 1 days", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 h + 1 year", + "query": "from a_index | eval 1 days + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 h] type [duration]" + "Argument of [+] must be [date], found value [1 days] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 h", + "query": "from a_index | eval var = now() * 1 days", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 h] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 days] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 h", + "query": "from a_index | eval var = now() / 1 days", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 h] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 days] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 h", + "query": "from a_index | eval var = now() % 1 days", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 h] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 days] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 d", + "query": "from a_index | eval 1 hour", "error": [ - "EVAL does not support [date_period] in expression [1 d]" + "EVAL does not support [date_period] in expression [1 hour]" ], "warning": [] }, { - "query": "from a_index | eval 1 d", + "query": "from a_index | eval 1 hour", "error": [ - "EVAL does not support [date_period] in expression [1 d]" + "EVAL does not support [date_period] in expression [1 hour]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 d", + "query": "from a_index | eval var = now() - 1 hour", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 d", + "query": "from a_index | eval var = dateField - 1 hour", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 D", + "query": "from a_index | eval var = dateField - 1 HOUR", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 D", + "query": "from a_index | eval var = dateField - 1 Hour", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 d", + "query": "from a_index | eval var = dateField + 1 hour", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 d + 1 year", + "query": "from a_index | eval 1 hour + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 d] type [duration]" + "Argument of [+] must be [date], found value [1 hour] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 d", + "query": "from a_index | eval var = now() * 1 hour", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 d] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 hour] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 d", + "query": "from a_index | eval var = now() / 1 hour", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 d] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 hour] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 d", + "query": "from a_index | eval var = now() % 1 hour", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 d] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 hour] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 w", + "query": "from a_index | eval 1 hours", "error": [ - "EVAL does not support [date_period] in expression [1 w]" + "EVAL does not support [date_period] in expression [1 hours]" ], "warning": [] }, { - "query": "from a_index | eval 1 w", + "query": "from a_index | eval 1 hours", "error": [ - "EVAL does not support [date_period] in expression [1 w]" + "EVAL does not support [date_period] in expression [1 hours]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 w", + "query": "from a_index | eval var = now() - 1 hours", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 w", + "query": "from a_index | eval var = dateField - 1 hours", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 W", + "query": "from a_index | eval var = dateField - 1 HOURS", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 W", + "query": "from a_index | eval var = dateField - 1 Hours", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 w", + "query": "from a_index | eval var = dateField + 1 hours", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 w + 1 year", + "query": "from a_index | eval 1 hours + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 w] type [duration]" + "Argument of [+] must be [date], found value [1 hours] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 w", + "query": "from a_index | eval var = now() * 1 hours", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 w] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 hours] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 w", + "query": "from a_index | eval var = now() / 1 hours", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 w] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 hours] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 w", + "query": "from a_index | eval var = now() % 1 hours", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 w] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 hours] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 mo", + "query": "from a_index | eval 1 minute", "error": [ - "EVAL does not support [date_period] in expression [1 mo]" + "EVAL does not support [date_period] in expression [1 minute]" ], "warning": [] }, { - "query": "from a_index | eval 1 mo", + "query": "from a_index | eval 1 minute", "error": [ - "EVAL does not support [date_period] in expression [1 mo]" + "EVAL does not support [date_period] in expression [1 minute]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 mo", + "query": "from a_index | eval var = now() - 1 minute", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 mo", + "query": "from a_index | eval var = dateField - 1 minute", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 MO", + "query": "from a_index | eval var = dateField - 1 MINUTE", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Mo", + "query": "from a_index | eval var = dateField - 1 Minute", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 mo", + "query": "from a_index | eval var = dateField + 1 minute", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 mo + 1 year", + "query": "from a_index | eval 1 minute + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 mo] type [duration]" + "Argument of [+] must be [date], found value [1 minute] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 mo", + "query": "from a_index | eval var = now() * 1 minute", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 mo] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 minute] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 mo", + "query": "from a_index | eval var = now() / 1 minute", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 mo] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 minute] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 mo", + "query": "from a_index | eval var = now() % 1 minute", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 mo] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 minute] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 q", + "query": "from a_index | eval 1 minutes", "error": [ - "EVAL does not support [date_period] in expression [1 q]" + "EVAL does not support [date_period] in expression [1 minutes]" ], "warning": [] }, { - "query": "from a_index | eval 1 q", + "query": "from a_index | eval 1 minutes", "error": [ - "EVAL does not support [date_period] in expression [1 q]" + "EVAL does not support [date_period] in expression [1 minutes]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 q", + "query": "from a_index | eval var = now() - 1 minutes", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 q", + "query": "from a_index | eval var = dateField - 1 minutes", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Q", + "query": "from a_index | eval var = dateField - 1 MINUTES", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Q", + "query": "from a_index | eval var = dateField - 1 Minutes", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 q", + "query": "from a_index | eval var = dateField + 1 minutes", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 q + 1 year", + "query": "from a_index | eval 1 minutes + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 q] type [duration]" + "Argument of [+] must be [date], found value [1 minutes] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 q", + "query": "from a_index | eval var = now() * 1 minutes", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 q] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 minutes] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 q", + "query": "from a_index | eval var = now() / 1 minutes", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 q] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 minutes] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 q", + "query": "from a_index | eval var = now() % 1 minutes", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 q] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 minutes] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 y", + "query": "from a_index | eval 1 second", "error": [ - "EVAL does not support [date_period] in expression [1 y]" + "EVAL does not support [date_period] in expression [1 second]" ], "warning": [] }, { - "query": "from a_index | eval 1 y", + "query": "from a_index | eval 1 second", "error": [ - "EVAL does not support [date_period] in expression [1 y]" + "EVAL does not support [date_period] in expression [1 second]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 y", + "query": "from a_index | eval var = now() - 1 second", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 y", + "query": "from a_index | eval var = dateField - 1 second", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Y", + "query": "from a_index | eval var = dateField - 1 SECOND", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Y", + "query": "from a_index | eval var = dateField - 1 Second", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 y", + "query": "from a_index | eval var = dateField + 1 second", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 y + 1 year", + "query": "from a_index | eval 1 second + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 y] type [duration]" + "Argument of [+] must be [date], found value [1 second] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 y", + "query": "from a_index | eval var = now() * 1 second", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 y] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 second] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 y", + "query": "from a_index | eval var = now() / 1 second", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 y] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 second] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 y", + "query": "from a_index | eval var = now() % 1 second", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 y] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 second] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval 1 yr", + "query": "from a_index | eval 1 seconds", "error": [ - "EVAL does not support [date_period] in expression [1 yr]" + "EVAL does not support [date_period] in expression [1 seconds]" ], "warning": [] }, { - "query": "from a_index | eval 1 yr", + "query": "from a_index | eval 1 seconds", "error": [ - "EVAL does not support [date_period] in expression [1 yr]" + "EVAL does not support [date_period] in expression [1 seconds]" ], "warning": [] }, { - "query": "from a_index | eval var = now() - 1 yr", + "query": "from a_index | eval var = now() - 1 seconds", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 yr", + "query": "from a_index | eval var = dateField - 1 seconds", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 YR", + "query": "from a_index | eval var = dateField - 1 SECONDS", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField - 1 Yr", + "query": "from a_index | eval var = dateField - 1 Seconds", "error": [], "warning": [] }, { - "query": "from a_index | eval var = dateField + 1 yr", + "query": "from a_index | eval var = dateField + 1 seconds", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 yr + 1 year", + "query": "from a_index | eval 1 seconds + 1 year", "error": [ - "Argument of [+] must be [date], found value [1 yr] type [duration]" + "Argument of [+] must be [date], found value [1 seconds] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() * 1 yr", + "query": "from a_index | eval var = now() * 1 seconds", "error": [ - "Argument of [*] must be [number], found value [now()] type [date]", - "Argument of [*] must be [number], found value [1 yr] type [duration]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 seconds] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() / 1 yr", + "query": "from a_index | eval var = now() / 1 seconds", "error": [ - "Argument of [/] must be [number], found value [now()] type [date]", - "Argument of [/] must be [number], found value [1 yr] type [duration]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 seconds] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = now() % 1 yr", + "query": "from a_index | eval var = now() % 1 seconds", "error": [ - "Argument of [%] must be [number], found value [now()] type [date]", - "Argument of [%] must be [number], found value [1 yr] type [duration]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 seconds] type [duration]" ], "warning": [] }, { - "query": "from a_index | sort ", + "query": "from a_index | eval 1 millisecond", "error": [ - "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" + "EVAL does not support [date_period] in expression [1 millisecond]" ], "warning": [] }, { - "query": "from a_index | sort \"field\" ", - "error": [], + "query": "from a_index | eval 1 millisecond", + "error": [ + "EVAL does not support [date_period] in expression [1 millisecond]" + ], "warning": [] }, { - "query": "from a_index | sort wrongField ", - "error": [ - "Unknown column [wrongField]" - ], + "query": "from a_index | eval var = now() - 1 millisecond", + "error": [], "warning": [] }, { - "query": "from a_index | sort numberField, ", - "error": [ - "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" - ], + "query": "from a_index | eval var = dateField - 1 millisecond", + "error": [], "warning": [] }, { - "query": "from a_index | sort numberField, stringField", + "query": "from a_index | eval var = dateField - 1 MILLISECOND", "error": [], "warning": [] }, { - "query": "from a_index | sort \"field\" desc ", + "query": "from a_index | eval var = dateField - 1 Millisecond", "error": [], "warning": [] }, { - "query": "from a_index | sort numberField desc ", + "query": "from a_index | eval var = dateField + 1 millisecond", "error": [], "warning": [] }, { - "query": "from a_index | sort numberField desc nulls ", + "query": "from a_index | eval 1 millisecond + 1 year", "error": [ - "SyntaxError: missing {'first', 'last'} at ''" + "Argument of [+] must be [date], found value [1 millisecond] type [duration]" ], "warning": [] }, { - "query": "from a_index | sort numberField desc nulls first", - "error": [], + "query": "from a_index | eval var = now() * 1 millisecond", + "error": [ + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 millisecond] type [duration]" + ], "warning": [] }, { - "query": "from a_index | sort numberField desc first", + "query": "from a_index | eval var = now() / 1 millisecond", "error": [ - "SyntaxError: extraneous input 'first' expecting " + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 millisecond] type [duration]" ], "warning": [] }, { - "query": "from a_index | sort numberField desc nulls last", - "error": [], + "query": "from a_index | eval var = now() % 1 millisecond", + "error": [ + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 millisecond] type [duration]" + ], "warning": [] }, { - "query": "from a_index | sort numberField desc last", + "query": "from a_index | eval 1 milliseconds", "error": [ - "SyntaxError: extraneous input 'last' expecting " + "EVAL does not support [date_period] in expression [1 milliseconds]" ], "warning": [] }, { - "query": "from a_index | sort \"field\" asc ", - "error": [], + "query": "from a_index | eval 1 milliseconds", + "error": [ + "EVAL does not support [date_period] in expression [1 milliseconds]" + ], "warning": [] }, { - "query": "from a_index | sort numberField asc ", + "query": "from a_index | eval var = now() - 1 milliseconds", "error": [], "warning": [] }, { - "query": "from a_index | sort numberField asc nulls ", - "error": [ - "SyntaxError: missing {'first', 'last'} at ''" - ], + "query": "from a_index | eval var = dateField - 1 milliseconds", + "error": [], "warning": [] }, { - "query": "from a_index | sort numberField asc nulls first", + "query": "from a_index | eval var = dateField - 1 MILLISECONDS", "error": [], "warning": [] }, { - "query": "from a_index | sort numberField asc first", - "error": [ - "SyntaxError: extraneous input 'first' expecting " - ], + "query": "from a_index | eval var = dateField - 1 Milliseconds", + "error": [], "warning": [] }, { - "query": "from a_index | sort numberField asc nulls last", + "query": "from a_index | eval var = dateField + 1 milliseconds", "error": [], "warning": [] }, { - "query": "from a_index | sort numberField asc last", + "query": "from a_index | eval 1 milliseconds + 1 year", "error": [ - "SyntaxError: extraneous input 'last' expecting " + "Argument of [+] must be [date], found value [1 milliseconds] type [duration]" ], "warning": [] }, { - "query": "from a_index | sort numberField nulls first", - "error": [], + "query": "from a_index | eval var = now() * 1 milliseconds", + "error": [ + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 milliseconds] type [duration]" + ], "warning": [] }, { - "query": "from a_index | sort numberField first", + "query": "from a_index | eval var = now() / 1 milliseconds", "error": [ - "SyntaxError: extraneous input 'first' expecting " + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 milliseconds] type [duration]" ], "warning": [] }, { - "query": "from a_index | sort numberField nulls last", - "error": [], + "query": "from a_index | eval var = now() % 1 milliseconds", + "error": [ + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 milliseconds] type [duration]" + ], "warning": [] }, { - "query": "from a_index | sort numberField last", + "query": "from a_index | eval 1 ms", "error": [ - "SyntaxError: extraneous input 'last' expecting " + "EVAL does not support [date_period] in expression [1 ms]" ], "warning": [] }, { - "query": "row a = 1 | stats COUNT(*) | sort `COUNT(*)`", - "error": [], + "query": "from a_index | eval 1 ms", + "error": [ + "EVAL does not support [date_period] in expression [1 ms]" + ], "warning": [] }, { - "query": "ROW a = 1 | STATS couNt(*) | SORT `couNt(*)`", + "query": "from a_index | eval var = now() - 1 ms", "error": [], "warning": [] }, { - "query": "from a_index | sort abs(numberField) - to_long(stringField) desc nulls first", + "query": "from a_index | eval var = dateField - 1 ms", "error": [], "warning": [] }, { - "query": "from a_index | sort sin(stringField)", - "error": [ - "Argument of [sin] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = dateField - 1 MS", + "error": [], "warning": [] }, { - "query": "from a_index | sort numberField + stringField", - "error": [ - "Argument of [+] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = dateField - 1 Ms", + "error": [], "warning": [] }, { - "query": "from a_index | enrich", - "error": [ - "SyntaxError: missing ENRICH_POLICY_NAME at ''" - ], + "query": "from a_index | eval var = dateField + 1 ms", + "error": [], "warning": [] }, { - "query": "from a_index | enrich _", + "query": "from a_index | eval 1 ms + 1 year", "error": [ - "Unknown policy [_]" + "Argument of [+] must be [date], found value [1 ms] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich _:", + "query": "from a_index | eval var = now() * 1 ms", "error": [ - "SyntaxError: token recognition error at: ':'", - "Unknown policy [_]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 ms] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich _:policy", + "query": "from a_index | eval var = now() / 1 ms", "error": [ - "Unrecognized value [_] for ENRICH, mode needs to be one of [_ANY, _COORDINATOR, _REMOTE]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 ms] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich :policy", + "query": "from a_index | eval var = now() % 1 ms", "error": [ - "SyntaxError: token recognition error at: ':'" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 ms] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich any:", + "query": "from a_index | eval 1 s", "error": [ - "SyntaxError: token recognition error at: ':'", - "Unknown policy [any]" + "EVAL does not support [date_period] in expression [1 s]" ], "warning": [] }, { - "query": "from a_index | enrich _any:", + "query": "from a_index | eval 1 s", "error": [ - "SyntaxError: token recognition error at: ':'", - "Unknown policy [_any]" + "EVAL does not support [date_period] in expression [1 s]" ], "warning": [] }, { - "query": "from a_index | enrich any:policy", - "error": [ - "Unrecognized value [any] for ENRICH, mode needs to be one of [_ANY, _COORDINATOR, _REMOTE]" - ], + "query": "from a_index | eval var = now() - 1 s", + "error": [], "warning": [] }, { - "query": "from a_index | enrich policy ", + "query": "from a_index | eval var = dateField - 1 s", "error": [], "warning": [] }, { - "query": "from a_index | enrich `this``is fine`", - "error": [ - "SyntaxError: extraneous input 'fine`' expecting ", - "Unknown policy [`this``is]" - ], + "query": "from a_index | eval var = dateField - 1 S", + "error": [], "warning": [] }, { - "query": "from a_index | enrich this is fine", - "error": [ - "SyntaxError: mismatched input 'is' expecting ", - "Unknown policy [this]" - ], + "query": "from a_index | eval var = dateField - 1 S", + "error": [], "warning": [] }, { - "query": "from a_index | enrich _any:policy ", + "query": "from a_index | eval var = dateField + 1 s", "error": [], "warning": [] }, { - "query": "from a_index | enrich _any : policy ", + "query": "from a_index | eval 1 s + 1 year", "error": [ - "SyntaxError: token recognition error at: ':'", - "SyntaxError: extraneous input 'policy' expecting ", - "Unknown policy [_any]" + "Argument of [+] must be [date], found value [1 s] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich _any: policy ", + "query": "from a_index | eval var = now() * 1 s", "error": [ - "SyntaxError: token recognition error at: ':'", - "SyntaxError: extraneous input 'policy' expecting ", - "Unknown policy [_any]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 s] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich _any:policy ", - "error": [], - "warning": [] - }, - { - "query": "from a_index | enrich _ANY:policy ", - "error": [], + "query": "from a_index | eval var = now() / 1 s", + "error": [ + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 s] type [duration]" + ], "warning": [] }, { - "query": "from a_index | enrich _coordinator:policy ", - "error": [], + "query": "from a_index | eval var = now() % 1 s", + "error": [ + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 s] type [duration]" + ], "warning": [] }, { - "query": "from a_index | enrich _coordinator : policy ", + "query": "from a_index | eval 1 m", "error": [ - "SyntaxError: token recognition error at: ':'", - "SyntaxError: extraneous input 'policy' expecting ", - "Unknown policy [_coordinator]" + "EVAL does not support [date_period] in expression [1 m]" ], "warning": [] }, { - "query": "from a_index | enrich _coordinator: policy ", + "query": "from a_index | eval 1 m", "error": [ - "SyntaxError: token recognition error at: ':'", - "SyntaxError: extraneous input 'policy' expecting ", - "Unknown policy [_coordinator]" + "EVAL does not support [date_period] in expression [1 m]" ], "warning": [] }, { - "query": "from a_index | enrich _coordinator:policy ", + "query": "from a_index | eval var = now() - 1 m", "error": [], "warning": [] }, { - "query": "from a_index | enrich _COORDINATOR:policy ", + "query": "from a_index | eval var = dateField - 1 m", "error": [], "warning": [] }, { - "query": "from a_index | enrich _remote:policy ", + "query": "from a_index | eval var = dateField - 1 M", "error": [], "warning": [] }, { - "query": "from a_index | enrich _remote : policy ", - "error": [ - "SyntaxError: token recognition error at: ':'", - "SyntaxError: extraneous input 'policy' expecting ", - "Unknown policy [_remote]" - ], - "warning": [] - }, - { - "query": "from a_index | enrich _remote: policy ", - "error": [ - "SyntaxError: token recognition error at: ':'", - "SyntaxError: extraneous input 'policy' expecting ", - "Unknown policy [_remote]" - ], - "warning": [] - }, - { - "query": "from a_index | enrich _remote:policy ", + "query": "from a_index | eval var = dateField - 1 M", "error": [], "warning": [] }, { - "query": "from a_index | enrich _REMOTE:policy ", + "query": "from a_index | eval var = dateField + 1 m", "error": [], "warning": [] }, { - "query": "from a_index | enrich _unknown:policy", + "query": "from a_index | eval 1 m + 1 year", "error": [ - "Unrecognized value [_unknown] for ENRICH, mode needs to be one of [_ANY, _COORDINATOR, _REMOTE]" + "Argument of [+] must be [date], found value [1 m] type [duration]" ], "warning": [] }, { - "query": "from a_index |enrich missing-policy ", + "query": "from a_index | eval var = now() * 1 m", "error": [ - "Unknown policy [missing-policy]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 m] type [duration]" ], "warning": [] }, { - "query": "from a_index |enrich policy on ", + "query": "from a_index | eval var = now() / 1 m", "error": [ - "SyntaxError: missing ID_PATTERN at ''" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 m] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich policy on b ", + "query": "from a_index | eval var = now() % 1 m", "error": [ - "Unknown column [b]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 m] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich policy on `this``is fine`", + "query": "from a_index | eval 1 h", "error": [ - "Unknown column [this`is fine]" + "EVAL does not support [date_period] in expression [1 h]" ], "warning": [] }, { - "query": "from a_index | enrich policy on this is fine", + "query": "from a_index | eval 1 h", "error": [ - "SyntaxError: mismatched input 'is' expecting ", - "Unknown column [this]" + "EVAL does not support [date_period] in expression [1 h]" ], "warning": [] }, { - "query": "from a_index | enrich policy on stringField with ", - "error": [ - "SyntaxError: mismatched input '' expecting ID_PATTERN" - ], + "query": "from a_index | eval var = now() - 1 h", + "error": [], "warning": [] }, { - "query": "from a_index | enrich policy on stringField with var0 ", - "error": [ - "Unknown column [var0]" - ], + "query": "from a_index | eval var = dateField - 1 h", + "error": [], "warning": [] }, { - "query": "from a_index |enrich policy on numberField with var0 = ", - "error": [ - "SyntaxError: missing ID_PATTERN at ''", - "Unknown column [var0]" - ], + "query": "from a_index | eval var = dateField - 1 H", + "error": [], "warning": [] }, { - "query": "from a_index | enrich policy on stringField with var0 = c ", - "error": [ - "Unknown column [var0]", - "Unknown column [c]" - ], + "query": "from a_index | eval var = dateField - 1 H", + "error": [], "warning": [] }, { - "query": "from a_index |enrich policy on numberField with var0 = , ", + "query": "from a_index | eval var = dateField + 1 h", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval 1 h + 1 year", "error": [ - "SyntaxError: missing ID_PATTERN at ','", - "SyntaxError: mismatched input '' expecting ID_PATTERN", - "Unknown column [var0]" + "Argument of [+] must be [date], found value [1 h] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich policy on stringField with var0 = otherField, var1 ", + "query": "from a_index | eval var = now() * 1 h", "error": [ - "Unknown column [var1]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 h] type [duration]" ], "warning": [] }, { - "query": "from a_index | enrich policy on stringField with var0 = otherField ", - "error": [], + "query": "from a_index | eval var = now() / 1 h", + "error": [ + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 h] type [duration]" + ], "warning": [] }, { - "query": "from a_index | enrich policy on stringField with var0 = otherField, yetAnotherField ", - "error": [], + "query": "from a_index | eval var = now() % 1 h", + "error": [ + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 h] type [duration]" + ], "warning": [] }, { - "query": "from a_index |enrich policy on numberField with var0 = otherField, var1 = ", + "query": "from a_index | eval 1 d", "error": [ - "SyntaxError: missing ID_PATTERN at ''", - "Unknown column [var1]" + "EVAL does not support [date_period] in expression [1 d]" ], "warning": [] }, { - "query": "from a_index | enrich policy on stringField with var0 = otherField, var1 = yetAnotherField", - "error": [], + "query": "from a_index | eval 1 d", + "error": [ + "EVAL does not support [date_period] in expression [1 d]" + ], "warning": [] }, { - "query": "from a_index | enrich policy on stringField with var0 = otherField, `this``is fine` = yetAnotherField", + "query": "from a_index | eval var = now() - 1 d", "error": [], "warning": [] }, { - "query": "from a_index | enrich policy with ", - "error": [ - "SyntaxError: mismatched input '' expecting ID_PATTERN" - ], + "query": "from a_index | eval var = dateField - 1 d", + "error": [], "warning": [] }, { - "query": "from a_index | enrich policy with otherField", + "query": "from a_index | eval var = dateField - 1 D", "error": [], "warning": [] }, { - "query": "from a_index | enrich policy | eval otherField", + "query": "from a_index | eval var = dateField - 1 D", "error": [], "warning": [] }, { - "query": "from a_index | enrich policy with var0 = otherField | eval var0", + "query": "from a_index | eval var = dateField + 1 d", "error": [], "warning": [] }, { - "query": "from a_index | enrich my-pol*", + "query": "from a_index | eval 1 d + 1 year", "error": [ - "Using wildcards (*) in ENRICH is not allowed [my-pol*]" + "Argument of [+] must be [date], found value [1 d] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval stringField = 5", - "error": [], - "warning": [ - "Column [stringField] of type string has been overwritten as new type: number" - ] - }, - { - "query": "from a_index | eval numberField = \"5\"", - "error": [], - "warning": [ - "Column [numberField] of type number has been overwritten as new type: string" - ] + "query": "from a_index | eval var = now() * 1 d", + "error": [ + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 d] type [duration]" + ], + "warning": [] }, { - "query": "from a_index | eval round(numberField) + 1 | eval `round(numberField) + 1` + 1 | keep ```round(numberField) + 1`` + 1`", - "error": [], + "query": "from a_index | eval var = now() / 1 d", + "error": [ + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 d] type [duration]" + ], "warning": [] }, { - "query": "from a_index | eval round(numberField) + 1 | eval `round(numberField) + 1` + 1 | eval ```round(numberField) + 1`` + 1` + 1 | keep ```````round(numberField) + 1```` + 1`` + 1`", - "error": [], + "query": "from a_index | eval var = now() % 1 d", + "error": [ + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 d] type [duration]" + ], "warning": [] }, { - "query": "from a_index | eval round(numberField) + 1 | eval `round(numberField) + 1` + 1 | eval ```round(numberField) + 1`` + 1` + 1 | eval ```````round(numberField) + 1```` + 1`` + 1` + 1 | keep ```````````````round(numberField) + 1```````` + 1```` + 1`` + 1`", - "error": [], + "query": "from a_index | eval 1 w", + "error": [ + "EVAL does not support [date_period] in expression [1 w]" + ], "warning": [] }, { - "query": "from a_index | eval round(numberField) + 1 | eval `round(numberField) + 1` + 1 | eval ```round(numberField) + 1`` + 1` + 1 | eval ```````round(numberField) + 1```` + 1`` + 1` + 1 | eval ```````````````round(numberField) + 1```````` + 1```` + 1`` + 1` + 1 | keep ```````````````````````````````round(numberField) + 1```````````````` + 1```````` + 1```` + 1`` + 1`", - "error": [], + "query": "from a_index | eval 1 w", + "error": [ + "EVAL does not support [date_period] in expression [1 w]" + ], "warning": [] }, { - "query": "from a_index | eval 1::string", + "query": "from a_index | eval var = now() - 1 w", "error": [], "warning": [] }, { - "query": "from a_index | eval 1::string::long::double", + "query": "from a_index | eval var = dateField - 1 w", "error": [], "warning": [] }, { - "query": "from a_index | eval trim(\"23\"::double)", - "error": [ - "Argument of [trim] must be [string], found value [\"23\"::double] type [double]" - ], + "query": "from a_index | eval var = dateField - 1 W", + "error": [], "warning": [] }, { - "query": "from a_index | eval trim(23::string)", + "query": "from a_index | eval var = dateField - 1 W", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + \"2\"::long", + "query": "from a_index | eval var = dateField + 1 w", "error": [], "warning": [] }, { - "query": "from a_index | eval 1 + \"2\"", + "query": "from a_index | eval 1 w + 1 year", "error": [ - "Argument of [+] must be [number], found value [\"2\"] type [string]" + "Argument of [+] must be [date], found value [1 w] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval trim(to_double(\"23\")::string::double::long::string::double)", + "query": "from a_index | eval var = now() * 1 w", "error": [ - "Argument of [trim] must be [string], found value [to_double(\"23\")::string::double::long::string::double] type [double]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 w] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval CEIL(23::long)", - "error": [], + "query": "from a_index | eval var = now() / 1 w", + "error": [ + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 w] type [duration]" + ], "warning": [] }, { - "query": "from a_index | eval CEIL(23::unsigned_long)", - "error": [], + "query": "from a_index | eval var = now() % 1 w", + "error": [ + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 w] type [duration]" + ], "warning": [] }, { - "query": "from a_index | eval CEIL(23::int)", - "error": [], + "query": "from a_index | eval 1 mo", + "error": [ + "EVAL does not support [date_period] in expression [1 mo]" + ], "warning": [] }, { - "query": "from a_index | eval CEIL(23::integer)", - "error": [], + "query": "from a_index | eval 1 mo", + "error": [ + "EVAL does not support [date_period] in expression [1 mo]" + ], "warning": [] }, { - "query": "from a_index | eval CEIL(23::double)", + "query": "from a_index | eval var = now() - 1 mo", "error": [], "warning": [] }, { - "query": "from a_index | eval TRIM(23::string)", + "query": "from a_index | eval var = dateField - 1 mo", "error": [], "warning": [] }, { - "query": "from a_index | eval TRIM(23::text)", + "query": "from a_index | eval var = dateField - 1 MO", "error": [], "warning": [] }, { - "query": "from a_index | eval TRIM(23::keyword)", + "query": "from a_index | eval var = dateField - 1 Mo", "error": [], "warning": [] }, { - "query": "from a_index | eval true AND \"false\"::boolean", + "query": "from a_index | eval var = dateField + 1 mo", "error": [], "warning": [] }, { - "query": "from a_index | eval true AND \"false\"::bool", - "error": [], + "query": "from a_index | eval 1 mo + 1 year", + "error": [ + "Argument of [+] must be [date], found value [1 mo] type [duration]" + ], "warning": [] }, { - "query": "from a_index | eval true AND \"false\"", + "query": "from a_index | eval var = now() * 1 mo", "error": [ - "Argument of [and] must be [boolean], found value [\"false\"] type [string]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 mo] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval to_lower(trim(numberField)::string)", + "query": "from a_index | eval var = now() / 1 mo", "error": [ - "Argument of [trim] must be [string], found value [numberField] type [number]" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 mo] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval to_upper(trim(numberField)::string::string::string::string)", + "query": "from a_index | eval var = now() % 1 mo", "error": [ - "Argument of [trim] must be [string], found value [numberField] type [number]" + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 mo] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval to_lower(to_upper(trim(numberField)::string)::string)", + "query": "from a_index | eval 1 q", "error": [ - "Argument of [trim] must be [string], found value [numberField] type [number]" + "EVAL does not support [date_period] in expression [1 q]" ], "warning": [] }, { - "query": "row var = date_diff(\"month\", \"2023-12-02T11:00:00.000Z\", \"2023-12-02T11:00:00.000Z\")", - "error": [], + "query": "from a_index | eval 1 q", + "error": [ + "EVAL does not support [date_period] in expression [1 q]" + ], "warning": [] }, { - "query": "row var = date_diff(\"mm\", \"2023-12-02T11:00:00.000Z\", \"2023-12-02T11:00:00.000Z\")", + "query": "from a_index | eval var = now() - 1 q", "error": [], "warning": [] }, { - "query": "row var = date_diff(\"bogus\", \"2023-12-02T11:00:00.000Z\", \"2023-12-02T11:00:00.000Z\")", + "query": "from a_index | eval var = dateField - 1 q", "error": [], - "warning": [ - "Invalid option [\"bogus\"] for date_diff. Supported options: [\"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\"]." - ] + "warning": [] }, { - "query": "from a_index | eval date_diff(stringField, \"2023-12-02T11:00:00.000Z\", \"2023-12-02T11:00:00.000Z\")", + "query": "from a_index | eval var = dateField - 1 Q", "error": [], "warning": [] }, { - "query": "from a_index | eval date_diff(\"month\", dateField, \"2023-12-02T11:00:00.000Z\")", + "query": "from a_index | eval var = dateField - 1 Q", "error": [], "warning": [] }, { - "query": "from a_index | eval date_diff(\"month\", \"2023-12-02T11:00:00.000Z\", dateField)", + "query": "from a_index | eval var = dateField + 1 q", "error": [], "warning": [] }, { - "query": "from a_index | eval date_diff(\"month\", stringField, dateField)", + "query": "from a_index | eval 1 q + 1 year", "error": [ - "Argument of [date_diff] must be [date], found value [stringField] type [string]" + "Argument of [+] must be [date], found value [1 q] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval date_diff(\"month\", dateField, stringField)", + "query": "from a_index | eval var = now() * 1 q", "error": [ - "Argument of [date_diff] must be [date], found value [stringField] type [string]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 q] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = date_diff(\"year\", dateField, dateField)", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval date_diff(\"year\", dateField, dateField)", - "error": [], + "query": "from a_index | eval var = now() / 1 q", + "error": [ + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 q] type [duration]" + ], "warning": [] }, { - "query": "from a_index | eval var = date_diff(\"year\", to_datetime(stringField), to_datetime(stringField))", - "error": [], + "query": "from a_index | eval var = now() % 1 q", + "error": [ + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 q] type [duration]" + ], "warning": [] }, { - "query": "from a_index | eval date_diff(numberField, stringField, stringField)", + "query": "from a_index | eval 1 y", "error": [ - "Argument of [date_diff] must be [string], found value [numberField] type [number]", - "Argument of [date_diff] must be [date], found value [stringField] type [string]", - "Argument of [date_diff] must be [date], found value [stringField] type [string]" + "EVAL does not support [date_period] in expression [1 y]" ], "warning": [] }, { - "query": "from a_index | eval date_diff(\"year\", dateField, dateField, extraArg)", + "query": "from a_index | eval 1 y", "error": [ - "Error: [date_diff] function expects exactly 3 arguments, got 4." + "EVAL does not support [date_period] in expression [1 y]" ], "warning": [] }, { - "query": "from a_index | sort date_diff(\"year\", dateField, dateField)", + "query": "from a_index | eval var = now() - 1 y", "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_diff(\"year\", to_datetime(dateField), to_datetime(dateField))", + "query": "from a_index | eval var = dateField - 1 y", "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]" - ], + "query": "from a_index | eval var = dateField - 1 Y", + "error": [], "warning": [] }, { - "query": "from a_index | eval date_diff(null, null, null)", + "query": "from a_index | eval var = dateField - 1 Y", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval date_diff(nullVar, nullVar, nullVar)", + "query": "from a_index | eval var = dateField + 1 y", "error": [], "warning": [] }, { - "query": "from a_index | eval date_diff(\"year\", \"2022\", \"2022\")", - "error": [], + "query": "from a_index | eval 1 y + 1 year", + "error": [ + "Argument of [+] must be [date], found value [1 y] type [duration]" + ], "warning": [] }, { - "query": "from a_index | eval date_diff(\"year\", concat(\"20\", \"22\"), concat(\"20\", \"22\"))", + "query": "from a_index | eval var = now() * 1 y", "error": [ - "Argument of [date_diff] must be [date], found value [concat(\"20\",\"22\")] type [string]", - "Argument of [date_diff] must be [date], found value [concat(\"20\",\"22\")] type [string]" + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 y] type [duration]" ], "warning": [] }, { - "query": "row var = abs(5)", - "error": [], + "query": "from a_index | eval var = now() / 1 y", + "error": [ + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 y] type [duration]" + ], "warning": [] }, { - "query": "row abs(5)", - "error": [], + "query": "from a_index | eval var = now() % 1 y", + "error": [ + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 y] type [duration]" + ], "warning": [] }, { - "query": "row var = abs(to_integer(\"a\"))", - "error": [], + "query": "from a_index | eval 1 yr", + "error": [ + "EVAL does not support [date_period] in expression [1 yr]" + ], "warning": [] }, { - "query": "row var = abs(\"a\")", + "query": "from a_index | eval 1 yr", "error": [ - "Argument of [abs] must be [number], found value [\"a\"] type [string]" + "EVAL does not support [date_period] in expression [1 yr]" ], "warning": [] }, { - "query": "from a_index | where abs(numberField) > 0", + "query": "from a_index | eval var = now() - 1 yr", "error": [], "warning": [] }, { - "query": "from a_index | where abs(stringField) > 0", - "error": [ - "Argument of [abs] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = dateField - 1 yr", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = abs(numberField)", + "query": "from a_index | eval var = dateField - 1 YR", "error": [], "warning": [] }, { - "query": "from a_index | eval abs(numberField)", + "query": "from a_index | eval var = dateField - 1 Yr", "error": [], "warning": [] }, { - "query": "from a_index | eval var = abs(to_integer(stringField))", + "query": "from a_index | eval var = dateField + 1 yr", "error": [], "warning": [] }, { - "query": "from a_index | eval abs(stringField)", + "query": "from a_index | eval 1 yr + 1 year", "error": [ - "Argument of [abs] must be [number], found value [stringField] type [string]" + "Argument of [+] must be [date], found value [1 yr] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval abs(numberField, extraArg)", + "query": "from a_index | eval var = now() * 1 yr", "error": [ - "Error: [abs] function expects exactly one argument, got 2." + "Argument of [*] must be [double], found value [now()] type [date]", + "Argument of [*] must be [double], found value [1 yr] type [duration]" ], "warning": [] }, { - "query": "from a_index | eval var = abs(*)", + "query": "from a_index | eval var = now() / 1 yr", "error": [ - "Using wildcards (*) in abs is not allowed" + "Argument of [/] must be [double], found value [now()] type [date]", + "Argument of [/] must be [double], found value [1 yr] type [duration]" ], "warning": [] }, { - "query": "from a_index | sort abs(numberField)", - "error": [], + "query": "from a_index | eval var = now() % 1 yr", + "error": [ + "Argument of [%] must be [double], found value [now()] type [date]", + "Argument of [%] must be [double], found value [1 yr] type [duration]" + ], "warning": [] }, { - "query": "row var = abs(to_integer(true))", + "query": "from a_index | sort ", + "error": [ + "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" + ], + "warning": [] + }, + { + "query": "from a_index | sort \"field\" ", "error": [], "warning": [] }, { - "query": "row var = abs(true)", + "query": "from a_index | sort wrongField ", "error": [ - "Argument of [abs] must be [number], found value [true] type [boolean]" + "Unknown column [wrongField]" ], "warning": [] }, { - "query": "from a_index | where abs(booleanField) > 0", + "query": "from a_index | sort doubleField, ", "error": [ - "Argument of [abs] must be [number], found value [booleanField] type [boolean]" + "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}" ], "warning": [] }, { - "query": "from a_index | eval var = abs(to_integer(booleanField))", + "query": "from a_index | sort doubleField, textField", "error": [], "warning": [] }, { - "query": "from a_index | eval abs(booleanField)", - "error": [ - "Argument of [abs] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | sort \"field\" desc ", + "error": [], "warning": [] }, { - "query": "from a_index | eval abs(null)", + "query": "from a_index | sort doubleField desc ", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval abs(nullVar)", - "error": [], + "query": "from a_index | sort doubleField desc nulls ", + "error": [ + "SyntaxError: missing {'first', 'last'} at ''" + ], "warning": [] }, { - "query": "row var = acos(5)", + "query": "from a_index | sort doubleField desc nulls first", "error": [], "warning": [] }, { - "query": "row acos(5)", - "error": [], - "warning": [] - }, - { - "query": "row var = acos(to_integer(\"a\"))", - "error": [], - "warning": [] - }, - { - "query": "row var = acos(\"a\")", + "query": "from a_index | sort doubleField desc first", "error": [ - "Argument of [acos] must be [number], found value [\"a\"] type [string]" + "SyntaxError: extraneous input 'first' expecting " ], "warning": [] }, { - "query": "from a_index | where acos(numberField) > 0", + "query": "from a_index | sort doubleField desc nulls last", "error": [], "warning": [] }, { - "query": "from a_index | where acos(stringField) > 0", + "query": "from a_index | sort doubleField desc last", "error": [ - "Argument of [acos] must be [number], found value [stringField] type [string]" + "SyntaxError: extraneous input 'last' expecting " ], "warning": [] }, { - "query": "from a_index | eval var = acos(numberField)", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval acos(numberField)", + "query": "from a_index | sort \"field\" asc ", "error": [], "warning": [] }, { - "query": "from a_index | eval var = acos(to_integer(stringField))", + "query": "from a_index | sort doubleField asc ", "error": [], "warning": [] }, { - "query": "from a_index | eval acos(stringField)", + "query": "from a_index | sort doubleField asc nulls ", "error": [ - "Argument of [acos] must be [number], found value [stringField] type [string]" + "SyntaxError: missing {'first', 'last'} at ''" ], "warning": [] }, { - "query": "from a_index | eval acos(numberField, extraArg)", - "error": [ - "Error: [acos] function expects exactly one argument, got 2." - ], + "query": "from a_index | sort doubleField asc nulls first", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = acos(*)", + "query": "from a_index | sort doubleField asc first", "error": [ - "Using wildcards (*) in acos is not allowed" + "SyntaxError: extraneous input 'first' expecting " ], "warning": [] }, { - "query": "from a_index | sort acos(numberField)", + "query": "from a_index | sort doubleField asc nulls last", "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", + "query": "from a_index | sort doubleField asc last", "error": [ - "Argument of [acos] must be [number], found value [booleanField] type [boolean]" + "SyntaxError: extraneous input 'last' expecting " ], "warning": [] }, { - "query": "from a_index | eval var = acos(to_integer(booleanField))", + "query": "from a_index | sort doubleField nulls first", "error": [], "warning": [] }, { - "query": "from a_index | eval acos(booleanField)", + "query": "from a_index | sort doubleField first", "error": [ - "Argument of [acos] must be [number], found value [booleanField] type [boolean]" + "SyntaxError: extraneous input 'first' expecting " ], "warning": [] }, { - "query": "from a_index | eval acos(null)", + "query": "from a_index | sort doubleField nulls last", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval acos(nullVar)", - "error": [], + "query": "from a_index | sort doubleField last", + "error": [ + "SyntaxError: extraneous input 'last' expecting " + ], "warning": [] }, { - "query": "row var = asin(5)", + "query": "row a = 1 | stats COUNT(*) | sort `COUNT(*)`", "error": [], "warning": [] }, { - "query": "row asin(5)", + "query": "ROW a = 1 | STATS couNt(*) | SORT `couNt(*)`", "error": [], "warning": [] }, { - "query": "row var = asin(to_integer(\"a\"))", + "query": "from a_index | sort abs(doubleField) - to_long(textField) desc nulls first", "error": [], "warning": [] }, { - "query": "row var = asin(\"a\")", + "query": "from a_index | sort sin(textField)", "error": [ - "Argument of [asin] must be [number], found value [\"a\"] type [string]" + "Argument of [sin] must be [double], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | where asin(numberField) > 0", - "error": [], + "query": "from a_index | sort doubleField + textField", + "error": [ + "Argument of [+] must be [double], found value [textField] type [text]" + ], "warning": [] }, { - "query": "from a_index | where asin(stringField) > 0", + "query": "from a_index | enrich", "error": [ - "Argument of [asin] must be [number], found value [stringField] type [string]" + "SyntaxError: missing ENRICH_POLICY_NAME at ''" ], "warning": [] }, { - "query": "from a_index | eval var = asin(numberField)", - "error": [], + "query": "from a_index | enrich _", + "error": [ + "Unknown policy [_]" + ], "warning": [] }, { - "query": "from a_index | eval asin(numberField)", - "error": [], + "query": "from a_index | enrich _:", + "error": [ + "SyntaxError: token recognition error at: ':'", + "Unknown policy [_]" + ], "warning": [] }, { - "query": "from a_index | eval var = asin(to_integer(stringField))", - "error": [], + "query": "from a_index | enrich _:policy", + "error": [ + "Unrecognized value [_] for ENRICH, mode needs to be one of [_ANY, _COORDINATOR, _REMOTE]" + ], "warning": [] }, { - "query": "from a_index | eval asin(stringField)", + "query": "from a_index | enrich :policy", "error": [ - "Argument of [asin] must be [number], found value [stringField] type [string]" + "SyntaxError: token recognition error at: ':'" ], "warning": [] }, { - "query": "from a_index | eval asin(numberField, extraArg)", + "query": "from a_index | enrich any:", "error": [ - "Error: [asin] function expects exactly one argument, got 2." + "SyntaxError: token recognition error at: ':'", + "Unknown policy [any]" ], "warning": [] }, { - "query": "from a_index | eval var = asin(*)", + "query": "from a_index | enrich _any:", "error": [ - "Using wildcards (*) in asin is not allowed" + "SyntaxError: token recognition error at: ':'", + "Unknown policy [_any]" ], "warning": [] }, { - "query": "from a_index | sort asin(numberField)", - "error": [], + "query": "from a_index | enrich any:policy", + "error": [ + "Unrecognized value [any] for ENRICH, mode needs to be one of [_ANY, _COORDINATOR, _REMOTE]" + ], "warning": [] }, { - "query": "row var = asin(to_integer(true))", + "query": "from a_index | enrich policy ", "error": [], "warning": [] }, { - "query": "row var = asin(true)", + "query": "from a_index | enrich `this``is fine`", "error": [ - "Argument of [asin] must be [number], found value [true] type [boolean]" + "SyntaxError: extraneous input 'fine`' expecting ", + "Unknown policy [`this``is]" ], "warning": [] }, { - "query": "from a_index | where asin(booleanField) > 0", + "query": "from a_index | enrich this is fine", "error": [ - "Argument of [asin] must be [number], found value [booleanField] type [boolean]" + "SyntaxError: mismatched input 'is' expecting ", + "Unknown policy [this]" ], "warning": [] }, { - "query": "from a_index | eval var = asin(to_integer(booleanField))", + "query": "from a_index | enrich _any:policy ", "error": [], "warning": [] }, { - "query": "from a_index | eval asin(booleanField)", + "query": "from a_index | enrich _any : policy ", "error": [ - "Argument of [asin] must be [number], found value [booleanField] type [boolean]" + "SyntaxError: token recognition error at: ':'", + "SyntaxError: extraneous input 'policy' expecting ", + "Unknown policy [_any]" ], "warning": [] }, { - "query": "from a_index | eval asin(null)", - "error": [], - "warning": [] - }, - { - "query": "row nullVar = null | eval asin(nullVar)", - "error": [], + "query": "from a_index | enrich _any: policy ", + "error": [ + "SyntaxError: token recognition error at: ':'", + "SyntaxError: extraneous input 'policy' expecting ", + "Unknown policy [_any]" + ], "warning": [] }, { - "query": "row var = atan(5)", + "query": "from a_index | enrich _any:policy ", "error": [], "warning": [] }, { - "query": "row atan(5)", + "query": "from a_index | enrich _ANY:policy ", "error": [], "warning": [] }, { - "query": "row var = atan(to_integer(\"a\"))", + "query": "from a_index | enrich _coordinator:policy ", "error": [], "warning": [] }, { - "query": "row var = atan(\"a\")", + "query": "from a_index | enrich _coordinator : policy ", "error": [ - "Argument of [atan] must be [number], found value [\"a\"] type [string]" + "SyntaxError: token recognition error at: ':'", + "SyntaxError: extraneous input 'policy' expecting ", + "Unknown policy [_coordinator]" ], "warning": [] }, { - "query": "from a_index | where atan(numberField) > 0", - "error": [], - "warning": [] - }, - { - "query": "from a_index | where atan(stringField) > 0", + "query": "from a_index | enrich _coordinator: policy ", "error": [ - "Argument of [atan] must be [number], found value [stringField] type [string]" + "SyntaxError: token recognition error at: ':'", + "SyntaxError: extraneous input 'policy' expecting ", + "Unknown policy [_coordinator]" ], "warning": [] }, { - "query": "from a_index | eval var = atan(numberField)", + "query": "from a_index | enrich _coordinator:policy ", "error": [], "warning": [] }, { - "query": "from a_index | eval atan(numberField)", + "query": "from a_index | enrich _COORDINATOR:policy ", "error": [], "warning": [] }, { - "query": "from a_index | eval var = atan(to_integer(stringField))", + "query": "from a_index | enrich _remote:policy ", "error": [], "warning": [] }, { - "query": "from a_index | eval atan(stringField)", - "error": [ - "Argument of [atan] must be [number], found value [stringField] type [string]" - ], - "warning": [] - }, - { - "query": "from a_index | eval atan(numberField, extraArg)", + "query": "from a_index | enrich _remote : policy ", "error": [ - "Error: [atan] function expects exactly one argument, got 2." + "SyntaxError: token recognition error at: ':'", + "SyntaxError: extraneous input 'policy' expecting ", + "Unknown policy [_remote]" ], "warning": [] }, { - "query": "from a_index | eval var = atan(*)", + "query": "from a_index | enrich _remote: policy ", "error": [ - "Using wildcards (*) in atan is not allowed" + "SyntaxError: token recognition error at: ':'", + "SyntaxError: extraneous input 'policy' expecting ", + "Unknown policy [_remote]" ], "warning": [] }, { - "query": "from a_index | sort atan(numberField)", + "query": "from a_index | enrich _remote:policy ", "error": [], "warning": [] }, { - "query": "row var = atan(to_integer(true))", + "query": "from a_index | enrich _REMOTE:policy ", "error": [], "warning": [] }, { - "query": "row var = atan(true)", + "query": "from a_index | enrich _unknown:policy", "error": [ - "Argument of [atan] must be [number], found value [true] type [boolean]" + "Unrecognized value [_unknown] for ENRICH, mode needs to be one of [_ANY, _COORDINATOR, _REMOTE]" ], "warning": [] }, { - "query": "from a_index | where atan(booleanField) > 0", + "query": "from a_index |enrich missing-policy ", "error": [ - "Argument of [atan] must be [number], found value [booleanField] type [boolean]" + "Unknown policy [missing-policy]" ], "warning": [] }, { - "query": "from a_index | eval var = atan(to_integer(booleanField))", - "error": [], + "query": "from a_index |enrich policy on ", + "error": [ + "SyntaxError: missing ID_PATTERN at ''" + ], "warning": [] }, { - "query": "from a_index | eval atan(booleanField)", + "query": "from a_index | enrich policy on b ", "error": [ - "Argument of [atan] must be [number], found value [booleanField] type [boolean]" + "Unknown column [b]" ], "warning": [] }, { - "query": "from a_index | eval atan(null)", - "error": [], + "query": "from a_index | enrich policy on `this``is fine`", + "error": [ + "Unknown column [this`is fine]" + ], "warning": [] }, { - "query": "row nullVar = null | eval atan(nullVar)", - "error": [], + "query": "from a_index | enrich policy on this is fine", + "error": [ + "SyntaxError: mismatched input 'is' expecting ", + "Unknown column [this]" + ], "warning": [] }, { - "query": "row var = atan2(5, 5)", - "error": [], + "query": "from a_index | enrich policy on textField with ", + "error": [ + "SyntaxError: mismatched input '' expecting ID_PATTERN" + ], "warning": [] }, { - "query": "row atan2(5, 5)", - "error": [], + "query": "from a_index | enrich policy on textField with var0 ", + "error": [ + "Unknown column [var0]" + ], "warning": [] }, { - "query": "row var = atan2(to_integer(\"a\"), to_integer(\"a\"))", - "error": [], + "query": "from a_index |enrich policy on doubleField with var0 = ", + "error": [ + "SyntaxError: missing ID_PATTERN at ''", + "Unknown column [var0]" + ], "warning": [] }, { - "query": "row var = atan2(\"a\", \"a\")", + "query": "from a_index | enrich policy on textField with var0 = c ", "error": [ - "Argument of [atan2] must be [number], found value [\"a\"] type [string]", - "Argument of [atan2] must be [number], found value [\"a\"] type [string]" + "Unknown column [var0]", + "Unknown column [c]" ], "warning": [] }, { - "query": "from a_index | where atan2(numberField, numberField) > 0", - "error": [], + "query": "from a_index |enrich policy on doubleField with var0 = , ", + "error": [ + "SyntaxError: missing ID_PATTERN at ','", + "SyntaxError: mismatched input '' expecting ID_PATTERN", + "Unknown column [var0]" + ], "warning": [] }, { - "query": "from a_index | where atan2(stringField, stringField) > 0", + "query": "from a_index | enrich policy on textField with var0 = otherField, var1 ", "error": [ - "Argument of [atan2] must be [number], found value [stringField] type [string]", - "Argument of [atan2] must be [number], found value [stringField] type [string]" + "Unknown column [var1]" ], "warning": [] }, { - "query": "from a_index | eval var = atan2(numberField, numberField)", + "query": "from a_index | enrich policy on textField with var0 = otherField ", "error": [], "warning": [] }, { - "query": "from a_index | eval atan2(numberField, numberField)", + "query": "from a_index | enrich policy on textField with var0 = otherField, yetAnotherField ", "error": [], "warning": [] }, { - "query": "from a_index | eval var = atan2(to_integer(stringField), to_integer(stringField))", + "query": "from a_index |enrich policy on doubleField with var0 = otherField, var1 = ", + "error": [ + "SyntaxError: missing ID_PATTERN at ''", + "Unknown column [var1]" + ], + "warning": [] + }, + { + "query": "from a_index | enrich policy on textField with var0 = otherField, var1 = yetAnotherField", "error": [], "warning": [] }, { - "query": "from a_index | eval atan2(stringField, stringField)", - "error": [ - "Argument of [atan2] must be [number], found value [stringField] type [string]", - "Argument of [atan2] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | enrich policy on textField with var0 = otherField, `this``is fine` = yetAnotherField", + "error": [], "warning": [] }, { - "query": "from a_index | eval atan2(numberField, numberField, extraArg)", + "query": "from a_index | enrich policy with ", "error": [ - "Error: [atan2] function expects exactly 2 arguments, got 3." + "SyntaxError: mismatched input '' expecting ID_PATTERN" ], "warning": [] }, { - "query": "from a_index | sort atan2(numberField, numberField)", + "query": "from a_index | enrich policy with otherField", "error": [], "warning": [] }, { - "query": "row var = atan2(to_integer(true), to_integer(true))", + "query": "from a_index | enrich policy | eval otherField", "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]" - ], + "query": "from a_index | enrich policy with var0 = otherField | eval var0", + "error": [], "warning": [] }, { - "query": "from a_index | where atan2(booleanField, booleanField) > 0", + "query": "from a_index | enrich my-pol*", "error": [ - "Argument of [atan2] must be [number], found value [booleanField] type [boolean]", - "Argument of [atan2] must be [number], found value [booleanField] type [boolean]" + "Using wildcards (*) in ENRICH is not allowed [my-pol*]" ], "warning": [] }, { - "query": "from a_index | eval var = atan2(to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval textField = 5", "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": [] + "warning": [ + "Column [textField] of type text has been overwritten as new type: integer" + ] }, { - "query": "from a_index | eval atan2(null, null)", + "query": "from a_index | eval doubleField = \"5\"", "error": [], - "warning": [] + "warning": [ + "Column [doubleField] of type double has been overwritten as new type: string" + ] }, { - "query": "row nullVar = null | eval atan2(nullVar, nullVar)", + "query": "from a_index | eval round(doubleField) + 1 | eval `round(doubleField) + 1` + 1 | keep ```round(doubleField) + 1`` + 1`", "error": [], "warning": [] }, { - "query": "row var = case(true, \"a\")", + "query": "from a_index | eval round(doubleField) + 1 | eval `round(doubleField) + 1` + 1 | eval ```round(doubleField) + 1`` + 1` + 1 | keep ```````round(doubleField) + 1```` + 1`` + 1`", "error": [], "warning": [] }, { - "query": "row case(true, \"a\")", + "query": "from a_index | eval round(doubleField) + 1 | eval `round(doubleField) + 1` + 1 | eval ```round(doubleField) + 1`` + 1` + 1 | eval ```````round(doubleField) + 1```` + 1`` + 1` + 1 | keep ```````````````round(doubleField) + 1```````` + 1```` + 1`` + 1`", "error": [], "warning": [] }, { - "query": "from a_index | eval var = case(booleanField, stringField)", + "query": "from a_index | eval round(doubleField) + 1 | eval `round(doubleField) + 1` + 1 | eval ```round(doubleField) + 1`` + 1` + 1 | eval ```````round(doubleField) + 1```` + 1`` + 1` + 1 | eval ```````````````round(doubleField) + 1```````` + 1```` + 1`` + 1` + 1 | keep ```````````````````````````````round(doubleField) + 1```````````````` + 1```````` + 1```` + 1`` + 1`", "error": [], "warning": [] }, { - "query": "from a_index | eval case(booleanField, stringField)", + "query": "from a_index | eval 1::keyword", "error": [], "warning": [] }, { - "query": "from a_index | sort case(booleanField, stringField)", + "query": "from a_index | eval 1::keyword::long::double", "error": [], "warning": [] }, { - "query": "row var = case(to_cartesianpoint(\"POINT (30 10)\"), true)", + "query": "from a_index | eval trim(\"23\"::double)", "error": [ - "Argument of [case] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]" + "Argument of [trim] must be [keyword], found value [\"23\"::double] type [double]" ], "warning": [] }, { - "query": "from a_index | eval case(null, null)", + "query": "from a_index | eval trim(23::keyword)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval case(nullVar, nullVar)", + "query": "from a_index | eval 1 + \"2\"::long", "error": [], "warning": [] }, { - "query": "row var = ceil(5)", + "query": "from a_index | eval 1 + \"2\"::LONG", "error": [], "warning": [] }, { - "query": "row ceil(5)", + "query": "from a_index | eval 1 + \"2\"::Long", "error": [], "warning": [] }, { - "query": "row var = ceil(to_integer(\"a\"))", + "query": "from a_index | eval 1 + \"2\"::LoNg", "error": [], "warning": [] }, { - "query": "row var = ceil(\"a\")", + "query": "from a_index | eval 1 + \"2\"", + "error": [ + "Argument of [+] must be [date_period], found value [1] type [integer]" + ], + "warning": [] + }, + { + "query": "from a_index | eval trim(to_double(\"23\")::keyword::double::long::keyword::double)", "error": [ - "Argument of [ceil] must be [number], found value [\"a\"] type [string]" + "Argument of [trim] must be [keyword], found value [to_double(\"23\")::keyword::double::long::keyword::double] type [double]" ], "warning": [] }, { - "query": "from a_index | where ceil(numberField) > 0", + "query": "from a_index | eval CEIL(23::long)", "error": [], "warning": [] }, { - "query": "from a_index | where ceil(stringField) > 0", - "error": [ - "Argument of [ceil] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval CEIL(23::unsigned_long)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = ceil(numberField)", + "query": "from a_index | eval CEIL(23::int)", "error": [], "warning": [] }, { - "query": "from a_index | eval ceil(numberField)", + "query": "from a_index | eval CEIL(23::integer)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = ceil(to_integer(stringField))", + "query": "from a_index | eval CEIL(23::Integer)", "error": [], "warning": [] }, { - "query": "from a_index | eval ceil(stringField)", - "error": [ - "Argument of [ceil] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval CEIL(23::double)", + "error": [], "warning": [] }, { - "query": "from a_index | eval ceil(numberField, extraArg)", - "error": [ - "Error: [ceil] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval CEIL(23::DOUBLE)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = ceil(*)", + "query": "from a_index | eval CEIL(23::doubla)", "error": [ - "Using wildcards (*) in ceil is not allowed" + "Argument of [ceil] must be [double], found value [23::doubla] type [doubla]" ], "warning": [] }, { - "query": "from a_index | sort ceil(numberField)", + "query": "from a_index | eval TRIM(23::keyword)", "error": [], "warning": [] }, { - "query": "row var = ceil(to_integer(true))", + "query": "from a_index | eval TRIM(23::text)", "error": [], "warning": [] }, { - "query": "row var = ceil(true)", + "query": "from a_index | eval TRIM(23::keyword)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval true AND \"false\"::boolean", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval true AND \"false\"::bool", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval true AND \"false\"", "error": [ - "Argument of [ceil] must be [number], found value [true] type [boolean]" + "Argument of [and] must be [boolean], found value [\"false\"] type [string]" ], "warning": [] }, { - "query": "from a_index | where ceil(booleanField) > 0", + "query": "from a_index | eval to_lower(trim(doubleField)::keyword)", "error": [ - "Argument of [ceil] must be [number], found value [booleanField] type [boolean]" + "Argument of [trim] must be [keyword], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval var = ceil(to_integer(booleanField))", - "error": [], + "query": "from a_index | eval to_upper(trim(doubleField)::keyword::keyword::keyword::keyword)", + "error": [ + "Argument of [trim] must be [keyword], found value [doubleField] type [double]" + ], "warning": [] }, { - "query": "from a_index | eval ceil(booleanField)", + "query": "from a_index | eval to_lower(to_upper(trim(doubleField)::keyword)::keyword)", "error": [ - "Argument of [ceil] must be [number], found value [booleanField] type [boolean]" + "Argument of [trim] must be [keyword], found value [doubleField] type [double]" ], "warning": [] }, { - "query": "from a_index | eval ceil(null)", + "query": "row var = abs(5.5)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval ceil(nullVar)", + "query": "row abs(5.5)", "error": [], "warning": [] }, { - "query": "row var = cidr_match(to_ip(\"127.0.0.1\"), \"a\")", + "query": "row var = abs(to_double(true))", "error": [], "warning": [] }, { - "query": "row cidr_match(to_ip(\"127.0.0.1\"), \"a\")", + "query": "row var = abs(5)", "error": [], "warning": [] }, { - "query": "row var = cidr_match(to_ip(\"a\"), to_string(\"a\"))", + "query": "row abs(5)", + "error": [], + "warning": [] + }, + { + "query": "row var = abs(to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = cidr_match(\"a\", 5)", + "query": "row var = abs(true)", "error": [ - "Argument of [cidr_match] must be [ip], found value [\"a\"] type [string]", - "Argument of [cidr_match] must be [string], found value [5] type [number]" + "Argument of [abs] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = cidr_match(ipField, stringField)", + "query": "from a_index | where abs(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval cidr_match(ipField, stringField)", - "error": [], + "query": "from a_index | where abs(booleanField) > 0", + "error": [ + "Argument of [abs] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = cidr_match(to_ip(stringField), to_string(stringField))", + "query": "from a_index | where abs(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval cidr_match(stringField, numberField)", - "error": [ - "Argument of [cidr_match] must be [ip], found value [stringField] type [string]", - "Argument of [cidr_match] must be [string], found value [numberField] type [number]" - ], + "query": "from a_index | where abs(longField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | sort cidr_match(ipField, stringField)", + "query": "from a_index | where abs(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = cidr_match(to_ip(to_ip(\"127.0.0.1\")), to_string(true))", + "query": "from a_index | eval var = abs(doubleField)", "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]" - ], + "query": "from a_index | eval abs(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = cidr_match(to_ip(ipField), to_string(booleanField))", + "query": "from a_index | eval var = abs(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval cidr_match(booleanField, booleanField)", + "query": "from a_index | eval abs(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]" + "Argument of [abs] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval cidr_match(null, null)", - "error": [], + "query": "from a_index | eval var = abs(*)", + "error": [ + "Using wildcards (*) in abs is not allowed" + ], "warning": [] }, { - "query": "row nullVar = null | eval cidr_match(nullVar, nullVar)", + "query": "from a_index | eval var = abs(integerField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(5)", + "query": "from a_index | eval abs(integerField)", "error": [], "warning": [] }, { - "query": "row coalesce(5)", + "query": "from a_index | eval var = abs(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_integer(true))", + "query": "from a_index | eval var = abs(longField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(5, 5)", + "query": "from a_index | eval abs(longField)", "error": [], "warning": [] }, { - "query": "row coalesce(5, 5)", + "query": "from a_index | eval var = abs(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_integer(true), to_integer(true))", + "query": "from a_index | eval abs(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(now())", - "error": [], + "query": "from a_index | eval abs(doubleField, extraArg)", + "error": [ + "Error: [abs] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "row coalesce(now())", + "query": "from a_index | sort abs(doubleField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_datetime(now()))", + "query": "from a_index | eval abs(null)", "error": [], "warning": [] }, { - "query": "row var = coalesce(now(), now())", + "query": "row nullVar = null | eval abs(nullVar)", "error": [], "warning": [] }, { - "query": "row coalesce(now(), now())", + "query": "row var = acos(5.5)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_datetime(now()), to_datetime(now()))", + "query": "row acos(5.5)", "error": [], "warning": [] }, { - "query": "row var = coalesce(\"a\")", + "query": "row var = acos(to_double(true))", "error": [], "warning": [] }, { - "query": "row coalesce(\"a\")", + "query": "row var = acos(5)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_string(true))", + "query": "row acos(5)", "error": [], "warning": [] }, { - "query": "row var = coalesce(\"a\", \"a\")", + "query": "row var = acos(to_integer(true))", "error": [], "warning": [] }, { - "query": "row coalesce(\"a\", \"a\")", - "error": [], + "query": "row var = acos(true)", + "error": [ + "Argument of [acos] must be [double], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = coalesce(to_string(true), to_string(true))", + "query": "from a_index | where acos(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = coalesce(true)", - "error": [], + "query": "from a_index | where acos(booleanField) > 0", + "error": [ + "Argument of [acos] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row coalesce(true)", + "query": "from a_index | where acos(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_boolean(true))", + "query": "from a_index | where acos(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = coalesce(true, true)", + "query": "from a_index | where acos(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row coalesce(true, true)", + "query": "from a_index | eval var = acos(doubleField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_boolean(true), to_boolean(true))", + "query": "from a_index | eval acos(doubleField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = acos(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row coalesce(to_ip(\"127.0.0.1\"))", - "error": [], + "query": "from a_index | eval acos(booleanField)", + "error": [ + "Argument of [acos] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = coalesce(to_ip(to_ip(\"127.0.0.1\")))", - "error": [], + "query": "from a_index | eval var = acos(*)", + "error": [ + "Using wildcards (*) in acos is not allowed" + ], "warning": [] }, { - "query": "row var = coalesce(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = acos(integerField)", "error": [], "warning": [] }, { - "query": "row coalesce(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval acos(integerField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_ip(to_ip(\"127.0.0.1\")), to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | eval var = acos(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = acos(longField)", "error": [], "warning": [] }, { - "query": "row coalesce(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval acos(longField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = acos(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval acos(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row coalesce(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | eval acos(doubleField, extraArg)", + "error": [ + "Error: [acos] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "row var = coalesce(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | sort acos(doubleField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval acos(null)", "error": [], "warning": [] }, { - "query": "row coalesce(to_cartesianshape(\"POINT (30 10)\"))", + "query": "row nullVar = null | eval acos(nullVar)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = asin(5.5)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "row asin(5.5)", "error": [], "warning": [] }, { - "query": "row coalesce(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "row var = asin(to_double(true))", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = asin(5)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_geopoint(\"POINT (30 10)\"))", + "query": "row asin(5)", "error": [], "warning": [] }, { - "query": "row coalesce(to_geopoint(\"POINT (30 10)\"))", + "query": "row var = asin(to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_geopoint(to_geopoint(\"POINT (30 10)\")))", - "error": [], + "query": "row var = asin(true)", + "error": [ + "Argument of [asin] must be [double], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = coalesce(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | where asin(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row coalesce(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | where asin(booleanField) > 0", + "error": [ + "Argument of [asin] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = coalesce(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | where asin(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | where asin(longField) > 0", "error": [], "warning": [] }, { - "query": "row coalesce(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | where asin(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = asin(doubleField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval asin(doubleField)", "error": [], "warning": [] }, { - "query": "row coalesce(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = asin(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", - "error": [], + "query": "from a_index | eval asin(booleanField)", + "error": [ + "Argument of [asin] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = coalesce(to_version(\"1.0.0\"))", - "error": [], + "query": "from a_index | eval var = asin(*)", + "error": [ + "Using wildcards (*) in asin is not allowed" + ], "warning": [] }, { - "query": "row coalesce(to_version(\"1.0.0\"))", + "query": "from a_index | eval var = asin(integerField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_version(\"a\"))", + "query": "from a_index | eval asin(integerField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", + "query": "from a_index | eval var = asin(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row coalesce(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", + "query": "from a_index | eval var = asin(longField)", "error": [], "warning": [] }, { - "query": "row var = coalesce(to_version(\"a\"), to_version(\"a\"))", + "query": "from a_index | eval asin(longField)", "error": [], "warning": [] }, { - "query": "from a_index | where coalesce(numberField) > 0", + "query": "from a_index | eval var = asin(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | where coalesce(numberField, numberField) > 0", + "query": "from a_index | eval asin(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | where length(coalesce(stringField)) > 0", - "error": [], + "query": "from a_index | eval asin(doubleField, extraArg)", + "error": [ + "Error: [asin] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "from a_index | where length(coalesce(stringField, stringField)) > 0", + "query": "from a_index | sort asin(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(numberField)", + "query": "from a_index | eval asin(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(numberField)", + "query": "row nullVar = null | eval asin(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_integer(booleanField))", + "query": "row var = atan(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(numberField, numberField)", + "query": "row atan(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(numberField, numberField)", + "query": "row var = atan(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_integer(booleanField), to_integer(booleanField))", + "query": "row var = atan(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(dateField)", + "query": "row atan(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(dateField)", + "query": "row var = atan(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_datetime(dateField))", - "error": [], + "query": "row var = atan(true)", + "error": [ + "Argument of [atan] must be [double], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = coalesce(dateField, dateField)", + "query": "from a_index | where atan(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(dateField, dateField)", - "error": [], + "query": "from a_index | where atan(booleanField) > 0", + "error": [ + "Argument of [atan] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_datetime(dateField), to_datetime(dateField))", + "query": "from a_index | where atan(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(stringField)", + "query": "from a_index | where atan(longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(stringField)", + "query": "from a_index | where atan(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_string(booleanField))", + "query": "from a_index | eval var = atan(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(stringField, stringField)", + "query": "from a_index | eval atan(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(stringField, stringField)", + "query": "from a_index | eval var = atan(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_string(booleanField), to_string(booleanField))", - "error": [], + "query": "from a_index | eval atan(booleanField)", + "error": [ + "Argument of [atan] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = coalesce(booleanField)", - "error": [], + "query": "from a_index | eval var = atan(*)", + "error": [ + "Using wildcards (*) in atan is not allowed" + ], "warning": [] }, { - "query": "from a_index | eval coalesce(booleanField)", + "query": "from a_index | eval var = atan(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_boolean(booleanField))", + "query": "from a_index | eval atan(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(booleanField, booleanField)", + "query": "from a_index | eval var = atan(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(booleanField, booleanField)", + "query": "from a_index | eval var = atan(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_boolean(booleanField), to_boolean(booleanField))", + "query": "from a_index | eval atan(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(ipField)", + "query": "from a_index | eval var = atan(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(ipField)", + "query": "from a_index | eval atan(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_ip(ipField))", - "error": [], + "query": "from a_index | eval atan(doubleField, extraArg)", + "error": [ + "Error: [atan] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "from a_index | eval var = coalesce(ipField, ipField)", + "query": "from a_index | sort atan(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(ipField, ipField)", + "query": "from a_index | eval atan(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_ip(ipField), to_ip(ipField))", + "query": "row nullVar = null | eval atan(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(cartesianPointField)", + "query": "row var = atan2(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(cartesianPointField)", + "query": "row atan2(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_cartesianpoint(cartesianPointField))", + "query": "row var = atan2(to_double(true), to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(cartesianPointField, cartesianPointField)", + "query": "row var = atan2(5.5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(cartesianPointField, cartesianPointField)", + "query": "row atan2(5.5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "query": "row var = atan2(to_double(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(cartesianShapeField)", + "query": "row var = atan2(to_double(true), 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(cartesianShapeField)", + "query": "row var = atan2(5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_cartesianshape(cartesianPointField))", + "query": "row atan2(5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(cartesianShapeField, cartesianShapeField)", + "query": "row var = atan2(to_integer(true), to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(cartesianShapeField, cartesianShapeField)", + "query": "row var = atan2(5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "row atan2(5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(geoPointField)", + "query": "row var = atan2(to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(geoPointField)", + "query": "row var = atan2(to_integer(true), 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_geopoint(geoPointField))", + "query": "row var = atan2(5, to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(geoPointField, geoPointField)", + "query": "row var = atan2(5, to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(geoPointField, geoPointField)", - "error": [], + "query": "row var = atan2(true, true)", + "error": [ + "Argument of [atan2] must be [double], found value [true] type [boolean]", + "Argument of [atan2] must be [double], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "query": "from a_index | where atan2(doubleField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(geoShapeField)", - "error": [], + "query": "from a_index | where atan2(booleanField, booleanField) > 0", + "error": [ + "Argument of [atan2] must be [double], found value [booleanField] type [boolean]", + "Argument of [atan2] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval coalesce(geoShapeField)", + "query": "from a_index | where atan2(doubleField, integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_geoshape(geoPointField))", + "query": "from a_index | where atan2(doubleField, longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(geoShapeField, geoShapeField)", + "query": "from a_index | where atan2(doubleField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(geoShapeField, geoShapeField)", + "query": "from a_index | where atan2(integerField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_geoshape(geoPointField), to_geoshape(geoPointField))", + "query": "from a_index | where atan2(integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(versionField)", + "query": "from a_index | where atan2(integerField, longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(versionField)", + "query": "from a_index | where atan2(integerField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_version(stringField))", + "query": "from a_index | where atan2(longField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(versionField, versionField)", + "query": "from a_index | where atan2(longField, integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(versionField, versionField)", + "query": "from a_index | where atan2(longField, longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = coalesce(to_version(stringField), to_version(stringField))", + "query": "from a_index | where atan2(longField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | sort coalesce(numberField)", + "query": "from a_index | where atan2(unsignedLongField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval coalesce(null)", + "query": "from a_index | where atan2(unsignedLongField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval coalesce(nullVar)", + "query": "from a_index | where atan2(unsignedLongField, longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | sort coalesce(booleanField)", + "query": "from a_index | where atan2(unsignedLongField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = concat(\"a\", \"a\")", + "query": "from a_index | eval var = atan2(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "row concat(\"a\", \"a\")", + "query": "from a_index | eval atan2(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "row var = concat(to_string(\"a\"), to_string(\"a\"))", + "query": "from a_index | eval var = atan2(to_double(booleanField), to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = concat(5, 5)", + "query": "from a_index | eval atan2(booleanField, booleanField)", "error": [ - "Argument of [concat] must be [string], found value [5] type [number]", - "Argument of [concat] must be [string], found value [5] type [number]" + "Argument of [atan2] must be [double], found value [booleanField] type [boolean]", + "Argument of [atan2] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where length(concat(stringField, stringField)) > 0", + "query": "from a_index | eval var = atan2(doubleField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | where length(concat(numberField, numberField)) > 0", - "error": [ - "Argument of [concat] must be [string], found value [numberField] type [number]", - "Argument of [concat] must be [string], found value [numberField] type [number]" - ], + "query": "from a_index | eval atan2(doubleField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = concat(stringField, stringField)", + "query": "from a_index | eval var = atan2(to_double(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval concat(stringField, stringField)", + "query": "from a_index | eval var = atan2(doubleField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = concat(to_string(stringField), to_string(stringField))", + "query": "from a_index | eval atan2(doubleField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval concat(numberField, numberField)", - "error": [ - "Argument of [concat] must be [string], found value [numberField] type [number]", - "Argument of [concat] must be [string], found value [numberField] type [number]" - ], + "query": "from a_index | eval var = atan2(to_double(booleanField), longField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort concat(stringField, stringField)", + "query": "from a_index | eval var = atan2(doubleField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = concat(to_string(true), to_string(true))", + "query": "from a_index | eval atan2(doubleField, unsignedLongField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = atan2(to_double(booleanField), unsignedLongField)", + "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = atan2(integerField, doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = concat(to_string(booleanField), to_string(booleanField))", + "query": "from a_index | eval atan2(integerField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval concat(booleanField, booleanField)", - "error": [ - "Argument of [concat] must be [string], found value [booleanField] type [boolean]", - "Argument of [concat] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = atan2(to_integer(booleanField), to_double(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval concat(null, null)", + "query": "from a_index | eval var = atan2(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval concat(nullVar, nullVar)", + "query": "from a_index | eval atan2(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = cos(5)", + "query": "from a_index | eval var = atan2(to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row cos(5)", + "query": "from a_index | eval var = atan2(integerField, longField)", "error": [], "warning": [] }, { - "query": "row var = cos(to_integer(\"a\"))", + "query": "from a_index | eval atan2(integerField, longField)", "error": [], "warning": [] }, { - "query": "row var = cos(\"a\")", - "error": [ - "Argument of [cos] must be [number], found value [\"a\"] type [string]" - ], + "query": "from a_index | eval var = atan2(to_integer(booleanField), longField)", + "error": [], "warning": [] }, { - "query": "from a_index | where cos(numberField) > 0", + "query": "from a_index | eval var = atan2(integerField, unsignedLongField)", "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 | eval atan2(integerField, unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = cos(numberField)", + "query": "from a_index | eval var = atan2(to_integer(booleanField), unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval cos(numberField)", + "query": "from a_index | eval var = atan2(longField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = cos(to_integer(stringField))", + "query": "from a_index | eval atan2(longField, doubleField)", "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 = atan2(longField, to_double(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 var = atan2(longField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = cos(*)", - "error": [ - "Using wildcards (*) in cos is not allowed" - ], + "query": "from a_index | eval atan2(longField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort cos(numberField)", + "query": "from a_index | eval var = atan2(longField, to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = cos(to_integer(true))", + "query": "from a_index | eval var = atan2(longField, longField)", "error": [], "warning": [] }, { - "query": "row var = cos(true)", - "error": [ - "Argument of [cos] must be [number], found value [true] type [boolean]" - ], + "query": "from a_index | eval atan2(longField, longField)", + "error": [], "warning": [] }, { - "query": "from a_index | where cos(booleanField) > 0", - "error": [ - "Argument of [cos] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = atan2(longField, unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = cos(to_integer(booleanField))", + "query": "from a_index | eval atan2(longField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval cos(booleanField)", - "error": [ - "Argument of [cos] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = atan2(unsignedLongField, doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval cos(null)", + "query": "from a_index | eval atan2(unsignedLongField, doubleField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval cos(nullVar)", + "query": "from a_index | eval var = atan2(unsignedLongField, to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = cosh(5)", + "query": "from a_index | eval var = atan2(unsignedLongField, integerField)", "error": [], "warning": [] }, { - "query": "row cosh(5)", + "query": "from a_index | eval atan2(unsignedLongField, integerField)", "error": [], "warning": [] }, { - "query": "row var = cosh(to_integer(\"a\"))", + "query": "from a_index | eval var = atan2(unsignedLongField, to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = cosh(\"a\")", - "error": [ - "Argument of [cosh] must be [number], found value [\"a\"] type [string]" - ], + "query": "from a_index | eval var = atan2(unsignedLongField, longField)", + "error": [], "warning": [] }, { - "query": "from a_index | where cosh(numberField) > 0", + "query": "from a_index | eval atan2(unsignedLongField, longField)", "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 = atan2(unsignedLongField, unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = cosh(numberField)", + "query": "from a_index | eval atan2(unsignedLongField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval cosh(numberField)", - "error": [], + "query": "from a_index | eval atan2(doubleField, doubleField, extraArg)", + "error": [ + "Error: [atan2] function expects exactly 2 arguments, got 3." + ], "warning": [] }, { - "query": "from a_index | eval var = cosh(to_integer(stringField))", + "query": "from a_index | sort atan2(doubleField, doubleField)", "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 atan2(null, null)", + "error": [], "warning": [] }, { - "query": "from a_index | eval cosh(numberField, extraArg)", - "error": [ - "Error: [cosh] function expects exactly one argument, got 2." - ], + "query": "row nullVar = null | eval atan2(nullVar, nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = cosh(*)", - "error": [ - "Using wildcards (*) in cosh is not allowed" - ], + "query": "row var = cbrt(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | sort cosh(numberField)", + "query": "row cbrt(5.5)", "error": [], "warning": [] }, { - "query": "row var = cosh(to_integer(true))", + "query": "row var = cbrt(to_double(true))", "error": [], "warning": [] }, { - "query": "row var = cosh(true)", - "error": [ - "Argument of [cosh] must be [number], found value [true] type [boolean]" - ], + "query": "row var = cbrt(5)", + "error": [], "warning": [] }, { - "query": "from a_index | where cosh(booleanField) > 0", - "error": [ - "Argument of [cosh] must be [number], found value [booleanField] type [boolean]" - ], + "query": "row cbrt(5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = cosh(to_integer(booleanField))", + "query": "row var = cbrt(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval cosh(booleanField)", + "query": "row var = cbrt(true)", "error": [ - "Argument of [cosh] must be [number], found value [booleanField] type [boolean]" + "Argument of [cbrt] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval cosh(null)", + "query": "from a_index | where cbrt(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval cosh(nullVar)", - "error": [], + "query": "from a_index | where cbrt(booleanField) > 0", + "error": [ + "Argument of [cbrt] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", now())", + "query": "from a_index | where cbrt(integerField) > 0", "error": [], "warning": [] }, { - "query": "row date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", now())", + "query": "from a_index | where cbrt(longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval date_extract(\"SOME_RANDOM_STRING\", now())", + "query": "from a_index | where cbrt(unsignedLongField) > 0", "error": [], - "warning": [ - "Invalid option [\"SOME_RANDOM_STRING\"] for date_extract. Supported options: [\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", \"ALIGNED_DAY_OF_WEEK_IN_YEAR\", \"ALIGNED_WEEK_OF_MONTH\", \"ALIGNED_WEEK_OF_YEAR\", \"AMPM_OF_DAY\", \"CLOCK_HOUR_OF_AMPM\", \"CLOCK_HOUR_OF_DAY\", \"DAY_OF_MONTH\", \"DAY_OF_WEEK\", \"DAY_OF_YEAR\", \"EPOCH_DAY\", \"ERA\", \"HOUR_OF_AMPM\", \"HOUR_OF_DAY\", \"INSTANT_SECONDS\", \"MICRO_OF_DAY\", \"MICRO_OF_SECOND\", \"MILLI_OF_DAY\", \"MILLI_OF_SECOND\", \"MINUTE_OF_DAY\", \"MINUTE_OF_HOUR\", \"MONTH_OF_YEAR\", \"NANO_OF_DAY\", \"NANO_OF_SECOND\", \"OFFSET_SECONDS\", \"PROLEPTIC_MONTH\", \"SECOND_OF_DAY\", \"SECOND_OF_MINUTE\", \"YEAR\", \"YEAR_OF_ERA\"]." - ] + "warning": [] }, { - "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)", + "query": "from a_index | eval var = cbrt(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)", + "query": "from a_index | eval cbrt(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", to_datetime(stringField))", + "query": "from a_index | eval var = cbrt(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval date_extract(stringField, stringField)", + "query": "from a_index | eval cbrt(booleanField)", "error": [ - "Argument of [date_extract] must be [date], found value [stringField] type [string]" + "Argument of [cbrt] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField, extraArg)", + "query": "from a_index | eval var = cbrt(*)", "error": [ - "Error: [date_extract] function expects exactly 2 arguments, got 3." + "Using wildcards (*) in cbrt is not allowed" ], "warning": [] }, { - "query": "from a_index | sort date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)", + "query": "from a_index | eval var = cbrt(integerField)", "error": [], "warning": [] }, { - "query": "row var = date_extract(true, true)", - "error": [ - "Argument of [date_extract] must be [string], found value [true] type [boolean]", - "Argument of [date_extract] must be [date], found value [true] type [boolean]" - ], + "query": "from a_index | eval cbrt(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", to_datetime(dateField))", + "query": "from a_index | eval var = cbrt(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval date_extract(booleanField, booleanField)", - "error": [ - "Argument of [date_extract] must be [string], found value [booleanField] type [boolean]", - "Argument of [date_extract] must be [date], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = cbrt(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval date_extract(null, null)", + "query": "from a_index | eval cbrt(longField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval date_extract(nullVar, nullVar)", + "query": "from a_index | eval var = cbrt(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", \"2022\")", + "query": "from a_index | eval cbrt(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", concat(\"20\", \"22\"))", + "query": "from a_index | eval cbrt(doubleField, extraArg)", "error": [ - "Argument of [date_extract] must be [date], found value [concat(\"20\",\"22\")] type [string]" + "Error: [cbrt] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "row var = date_format(\"a\", now())", + "query": "from a_index | sort cbrt(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval cbrt(null)", "error": [], "warning": [] }, { - "query": "row date_format(\"a\", now())", + "query": "row nullVar = null | eval cbrt(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_format(stringField, dateField)", + "query": "row var = ceil(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval date_format(stringField, dateField)", + "query": "row ceil(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_format(to_string(stringField), to_datetime(stringField))", + "query": "row var = ceil(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval date_format(stringField, numberField)", - "error": [ - "Argument of [date_format] must be [date], found value [numberField] type [number]" - ], + "query": "row var = ceil(5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval date_format(stringField, dateField, extraArg)", - "error": [ - "Error: [date_format] function expects no more than 2 arguments, got 3." - ], + "query": "row ceil(5)", + "error": [], "warning": [] }, { - "query": "from a_index | sort date_format(stringField, dateField)", + "query": "row var = ceil(to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = date_format(true, true)", + "query": "row var = ceil(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]" + "Argument of [ceil] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = date_format(to_string(booleanField), to_datetime(dateField))", + "query": "from a_index | where ceil(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval date_format(booleanField, booleanField)", + "query": "from a_index | where ceil(booleanField) > 0", "error": [ - "Argument of [date_format] must be [string], found value [booleanField] type [boolean]", - "Argument of [date_format] must be [date], found value [booleanField] type [boolean]" + "Argument of [ceil] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval date_format(null, null)", + "query": "from a_index | where ceil(integerField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval date_format(nullVar, nullVar)", + "query": "from a_index | where ceil(longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval date_format(stringField, \"2022\")", + "query": "from a_index | where ceil(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval date_format(stringField, concat(\"20\", \"22\"))", - "error": [ - "Argument of [date_format] must be [date], found value [concat(\"20\",\"22\")] type [string]" - ], - "warning": [] - }, - { - "query": "row var = date_parse(\"a\", \"a\")", + "query": "from a_index | eval var = ceil(doubleField)", "error": [], "warning": [] }, { - "query": "row var = date_parse(\"a\")", + "query": "from a_index | eval ceil(doubleField)", "error": [], "warning": [] }, { - "query": "row date_parse(\"a\", \"a\")", + "query": "from a_index | eval var = ceil(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = date_parse(to_string(\"a\"), to_string(\"a\"))", - "error": [], + "query": "from a_index | eval ceil(booleanField)", + "error": [ + "Argument of [ceil] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = date_parse(5, 5)", + "query": "from a_index | eval var = ceil(*)", "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]" + "Using wildcards (*) in ceil is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = date_parse(stringField)", + "query": "from a_index | eval var = ceil(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_parse(stringField, stringField)", + "query": "from a_index | eval ceil(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval date_parse(stringField, stringField)", + "query": "from a_index | eval var = ceil(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_parse(to_string(stringField), to_string(stringField))", + "query": "from a_index | eval var = ceil(longField)", "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]" - ], - "warning": [] - }, - { - "query": "from a_index | eval date_parse(stringField, stringField, extraArg)", - "error": [ - "Error: [date_parse] function expects no more than 2 arguments, got 3." - ], + "query": "from a_index | eval ceil(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort date_parse(stringField, stringField)", + "query": "from a_index | eval var = ceil(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = date_parse(to_string(true), to_string(true))", + "query": "from a_index | eval ceil(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = date_parse(true, true)", + "query": "from a_index | eval ceil(doubleField, extraArg)", "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]" + "Error: [ceil] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = date_parse(to_string(booleanField), to_string(booleanField))", + "query": "from a_index | sort ceil(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval date_parse(booleanField, booleanField)", - "error": [ - "Argument of [date_parse] must be [string], found value [booleanField] type [boolean]", - "Argument of [date_parse] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval ceil(null)", + "error": [], "warning": [] }, { - "query": "from a_index | eval date_parse(null, null)", + "query": "row nullVar = null | eval ceil(nullVar)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval date_parse(nullVar, nullVar)", + "query": "row var = cidr_match(to_ip(\"127.0.0.1\"), \"a\")", "error": [], "warning": [] }, { - "query": "row var = date_trunc(1 year, now())", + "query": "row cidr_match(to_ip(\"127.0.0.1\"), \"a\")", "error": [], "warning": [] }, { - "query": "row date_trunc(1 year, now())", + "query": "row var = cidr_match(to_ip(to_ip(\"127.0.0.1\")), to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_trunc(1 year, dateField)", - "error": [], + "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 [keyword], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval date_trunc(1 year, dateField)", + "query": "from a_index | eval var = cidr_match(ipField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_trunc(1 year, to_datetime(stringField))", + "query": "from a_index | eval cidr_match(ipField, keywordField)", "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": "from a_index | eval var = cidr_match(to_ip(ipField), to_string(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval date_trunc(1 year, dateField, extraArg)", + "query": "from a_index | eval cidr_match(booleanField, booleanField)", "error": [ - "Error: [date_trunc] function expects exactly 2 arguments, got 3." + "Argument of [cidr_match] must be [ip], found value [booleanField] type [boolean]", + "Argument of [cidr_match] must be [keyword], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort date_trunc(1 year, dateField)", + "query": "from a_index | eval var = cidr_match(ipField, textField)", "error": [], "warning": [] }, { - "query": "row var = date_trunc(now(), now())", + "query": "from a_index | eval cidr_match(ipField, textField)", "error": [], "warning": [] }, { - "query": "row date_trunc(now(), now())", + "query": "from a_index | sort cidr_match(ipField, keywordField)", "error": [], "warning": [] }, { - "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 var = date_trunc(1 year, to_datetime(dateField))", + "query": "from a_index | eval cidr_match(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval date_trunc(booleanField, booleanField)", - "error": [ - "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]" - ], + "query": "row nullVar = null | eval cidr_match(nullVar, nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_trunc(dateField, dateField)", + "query": "row var = coalesce(true)", "error": [], "warning": [] }, { - "query": "from a_index | eval date_trunc(dateField, dateField)", + "query": "row coalesce(true)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = date_trunc(to_datetime(dateField), to_datetime(dateField))", + "query": "row var = coalesce(to_boolean(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval date_trunc(null, null)", + "query": "row var = coalesce(true, true)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval date_trunc(nullVar, nullVar)", + "query": "row coalesce(true, true)", "error": [], "warning": [] }, { - "query": "from a_index | eval date_trunc(1 year, \"2022\")", + "query": "row var = coalesce(to_boolean(true), to_boolean(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval date_trunc(1 year, concat(\"20\", \"22\"))", + "query": "row var = coalesce(cartesianPointField, cartesianPointField)", "error": [ - "Argument of [date_trunc] must be [date], found value [concat(\"20\",\"22\")] type [string]" + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval date_trunc(\"2022\", \"2022\")", - "error": [], + "query": "row coalesce(cartesianPointField, cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval date_trunc(concat(\"20\", \"22\"), concat(\"20\", \"22\"))", + "query": "row var = coalesce(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [ - "Argument of [date_trunc] must be [time_literal], found value [concat(\"20\",\"22\")] type [string]", - "Argument of [date_trunc] must be [date], found value [concat(\"20\",\"22\")] type [string]" + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "row var = e()", + "query": "row var = coalesce(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row e()", + "query": "row coalesce(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | where e() > 0", + "query": "row var = coalesce(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], + "warning": [] + }, + { + "query": "row var = coalesce(to_datetime(\"2021-01-01T00:00:00Z\"), to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = e()", + "query": "row coalesce(to_datetime(\"2021-01-01T00:00:00Z\"), to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval e()", + "query": "row var = coalesce(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")), to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", "error": [], "warning": [] }, { - "query": "from a_index | eval e(extraArg)", + "query": "row var = coalesce(geoPointField, geoPointField)", "error": [ - "Error: [e] function expects exactly 0 arguments, got 1." + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | sort e()", - "error": [], + "query": "row coalesce(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row nullVar = null | eval e()", - "error": [], - "warning": [] - }, - { - "query": "row var = ends_with(\"a\", \"a\")", - "error": [], + "query": "row var = coalesce(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row ends_with(\"a\", \"a\")", + "query": "row var = coalesce(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = ends_with(to_string(\"a\"), to_string(\"a\"))", + "query": "row coalesce(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = ends_with(5, 5)", + "query": "row var = coalesce(to_geoshape(geoPointField), to_geoshape(geoPointField))", "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]" + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = ends_with(stringField, stringField)", + "query": "row var = coalesce(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval ends_with(stringField, stringField)", + "query": "row coalesce(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = ends_with(to_string(stringField), to_string(stringField))", + "query": "row var = coalesce(to_integer(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]" - ], - "warning": [] - }, - { - "query": "from a_index | eval ends_with(stringField, stringField, extraArg)", - "error": [ - "Error: [ends_with] function expects exactly 2 arguments, got 3." - ], + "query": "row var = coalesce(5, 5)", + "error": [], "warning": [] }, { - "query": "from a_index | sort ends_with(stringField, stringField)", + "query": "row coalesce(5, 5)", "error": [], "warning": [] }, { - "query": "row var = ends_with(to_string(true), to_string(true))", + "query": "row var = coalesce(to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = ends_with(true, true)", - "error": [ - "Argument of [ends_with] must be [string], found value [true] type [boolean]", - "Argument of [ends_with] must be [string], found value [true] type [boolean]" - ], + "query": "row var = coalesce(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = ends_with(to_string(booleanField), to_string(booleanField))", + "query": "row coalesce(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval ends_with(booleanField, booleanField)", - "error": [ - "Argument of [ends_with] must be [string], found value [booleanField] type [boolean]", - "Argument of [ends_with] must be [string], found value [booleanField] type [boolean]" - ], + "query": "row var = coalesce(to_ip(to_ip(\"127.0.0.1\")), to_ip(to_ip(\"127.0.0.1\")))", + "error": [], "warning": [] }, { - "query": "from a_index | eval ends_with(null, null)", + "query": "row var = coalesce(\"a\")", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval ends_with(nullVar, nullVar)", + "query": "row coalesce(\"a\")", "error": [], "warning": [] }, { - "query": "row var = floor(5)", + "query": "row var = coalesce(to_string(true))", "error": [], "warning": [] }, { - "query": "row floor(5)", + "query": "row var = coalesce(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row var = floor(to_integer(\"a\"))", + "query": "row coalesce(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row var = floor(\"a\")", - "error": [ - "Argument of [floor] must be [number], found value [\"a\"] type [string]" - ], + "query": "row var = coalesce(to_string(true), to_string(true))", + "error": [], "warning": [] }, { - "query": "from a_index | where floor(numberField) > 0", + "query": "row var = coalesce(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "from a_index | where floor(stringField) > 0", - "error": [ - "Argument of [floor] must be [number], found value [stringField] type [string]" - ], + "query": "row coalesce(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = floor(numberField)", + "query": "row var = coalesce(to_version(\"a\"), to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval floor(numberField)", + "query": "row var = coalesce(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = floor(to_integer(stringField))", + "query": "from a_index | where coalesce(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval floor(stringField)", + "query": "from a_index | where coalesce(counterDoubleField) > 0", "error": [ - "Argument of [floor] must be [number], found value [stringField] type [string]" + "Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | eval floor(numberField, extraArg)", - "error": [ - "Error: [floor] function expects exactly one argument, got 2." - ], + "query": "from a_index | where coalesce(integerField, integerField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = floor(*)", + "query": "from a_index | where coalesce(counterDoubleField, counterDoubleField) > 0", "error": [ - "Using wildcards (*) in floor is not allowed" + "Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]", + "Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | sort floor(numberField)", + "query": "from a_index | where coalesce(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = floor(to_integer(true))", + "query": "from a_index | where coalesce(longField, longField) > 0", "error": [], "warning": [] }, { - "query": "row var = floor(true)", - "error": [ - "Argument of [floor] must be [number], found value [true] type [boolean]" - ], + "query": "from a_index | eval var = coalesce(booleanField)", + "error": [], "warning": [] }, { - "query": "from a_index | where floor(booleanField) > 0", - "error": [ - "Argument of [floor] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval coalesce(booleanField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = floor(to_integer(booleanField))", + "query": "from a_index | eval var = coalesce(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval floor(booleanField)", + "query": "from a_index | eval coalesce(counterDoubleField)", "error": [ - "Argument of [floor] must be [number], found value [booleanField] type [boolean]" + "Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | eval floor(null)", + "query": "from a_index | eval var = coalesce(booleanField, booleanField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval floor(nullVar)", + "query": "from a_index | eval coalesce(booleanField, booleanField)", "error": [], "warning": [] }, { - "query": "row var = greatest(\"a\")", + "query": "from a_index | eval var = coalesce(to_boolean(booleanField), to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "row greatest(\"a\")", - "error": [], + "query": "from a_index | eval coalesce(counterDoubleField, counterDoubleField)", + "error": [ + "Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]", + "Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]" + ], "warning": [] }, { - "query": "from a_index | eval var = greatest(stringField)", + "query": "from a_index | eval var = coalesce(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(stringField)", + "query": "from a_index | eval coalesce(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | sort greatest(stringField)", + "query": "from a_index | eval var = coalesce(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row var = greatest(true)", + "query": "from a_index | eval var = coalesce(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "row greatest(true)", + "query": "from a_index | eval coalesce(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "row var = greatest(to_boolean(true))", + "query": "from a_index | eval var = coalesce(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row var = greatest(true, true)", + "query": "from a_index | eval var = coalesce(dateField, dateField)", "error": [], "warning": [] }, { - "query": "row greatest(true, true)", + "query": "from a_index | eval coalesce(dateField, dateField)", "error": [], "warning": [] }, { - "query": "row var = greatest(to_boolean(true), to_boolean(true))", + "query": "from a_index | eval var = coalesce(to_datetime(dateField), to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "row var = greatest(5, 5)", + "query": "from a_index | eval var = coalesce(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "row greatest(5, 5)", + "query": "from a_index | eval coalesce(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "row var = greatest(to_integer(true), to_integer(true))", + "query": "from a_index | eval var = coalesce(to_geopoint(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = greatest(5)", + "query": "from a_index | eval var = coalesce(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row greatest(5)", + "query": "from a_index | eval coalesce(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row var = greatest(to_integer(true))", + "query": "from a_index | eval var = coalesce(to_geoshape(geoPointField), to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = greatest(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = coalesce(integerField)", "error": [], "warning": [] }, { - "query": "row greatest(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval coalesce(integerField)", "error": [], "warning": [] }, { - "query": "row var = greatest(to_ip(to_ip(\"127.0.0.1\")), to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | eval var = coalesce(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = greatest(to_string(true))", + "query": "from a_index | eval var = coalesce(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = greatest(\"a\", \"a\")", + "query": "from a_index | eval coalesce(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row greatest(\"a\", \"a\")", + "query": "from a_index | eval var = coalesce(to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = greatest(to_string(true), to_string(true))", + "query": "from a_index | eval var = coalesce(ipField, ipField)", "error": [], "warning": [] }, { - "query": "row var = greatest(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", + "query": "from a_index | eval coalesce(ipField, ipField)", "error": [], "warning": [] }, { - "query": "row greatest(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", + "query": "from a_index | eval var = coalesce(to_ip(ipField), to_ip(ipField))", "error": [], "warning": [] }, { - "query": "row var = greatest(to_version(\"a\"), to_version(\"a\"))", + "query": "from a_index | eval var = coalesce(keywordField)", "error": [], "warning": [] }, { - "query": "row var = greatest(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", - "error": [ - "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 greatest(numberField, numberField) > 0", + "query": "from a_index | eval coalesce(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | where 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]" - ], + "query": "from a_index | eval var = coalesce(to_string(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | where greatest(numberField) > 0", + "query": "from a_index | eval var = coalesce(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | where greatest(cartesianPointField) > 0", - "error": [ - "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]" - ], + "query": "from a_index | eval coalesce(keywordField, keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | where length(greatest(stringField)) > 0", + "query": "from a_index | eval var = coalesce(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | where length(greatest(cartesianPointField)) > 0", - "error": [ - "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]" - ], + "query": "from a_index | eval var = coalesce(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | where length(greatest(stringField, stringField)) > 0", + "query": "from a_index | eval coalesce(longField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = coalesce(longField, longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(booleanField)", + "query": "from a_index | eval coalesce(longField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(booleanField)", + "query": "from a_index | eval var = coalesce(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(to_boolean(booleanField))", + "query": "from a_index | eval coalesce(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(cartesianPointField)", - "error": [ - "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]" - ], + "query": "from a_index | eval var = coalesce(textField, textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(booleanField, booleanField)", + "query": "from a_index | eval coalesce(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(booleanField, booleanField)", + "query": "from a_index | eval var = coalesce(versionField, versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(to_boolean(booleanField), to_boolean(booleanField))", + "query": "from a_index | eval coalesce(versionField, versionField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = coalesce(to_version(keywordField), to_version(keywordField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(numberField, numberField)", + "query": "from a_index | sort coalesce(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(numberField, numberField)", + "query": "from a_index | eval coalesce(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(to_integer(booleanField), to_integer(booleanField))", + "query": "row nullVar = null | eval coalesce(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(numberField)", + "query": "from a_index | eval coalesce(\"2022\", \"2022\")", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(numberField)", + "query": "from a_index | eval coalesce(concat(\"20\", \"22\"), concat(\"20\", \"22\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(to_integer(booleanField))", + "query": "row var = concat(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(ipField, ipField)", + "query": "row concat(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(ipField, ipField)", + "query": "row var = concat(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(to_ip(ipField), to_ip(ipField))", - "error": [], + "query": "row var = concat(true, true)", + "error": [ + "Argument of [concat] must be [keyword], found value [true] type [boolean]", + "Argument of [concat] must be [keyword], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = greatest(to_string(booleanField))", + "query": "from a_index | eval var = concat(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(stringField, stringField)", + "query": "from a_index | eval concat(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(stringField, stringField)", + "query": "from a_index | eval var = concat(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(to_string(booleanField), to_string(booleanField))", - "error": [], + "query": "from a_index | eval concat(booleanField, booleanField)", + "error": [ + "Argument of [concat] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [concat] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = greatest(versionField, versionField)", + "query": "from a_index | eval var = concat(keywordField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(versionField, versionField)", + "query": "from a_index | eval concat(keywordField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = greatest(to_version(stringField), to_version(stringField))", + "query": "from a_index | eval var = concat(textField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | sort greatest(booleanField)", + "query": "from a_index | eval concat(textField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval greatest(null)", + "query": "from a_index | eval var = concat(textField, textField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval greatest(nullVar)", + "query": "from a_index | eval concat(textField, textField)", "error": [], "warning": [] }, { - "query": "row var = least(\"a\")", + "query": "from a_index | sort concat(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row least(\"a\")", + "query": "from a_index | eval concat(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(stringField)", + "query": "row nullVar = null | eval concat(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval least(stringField)", + "query": "row var = cos(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | sort least(stringField)", + "query": "row cos(5.5)", "error": [], "warning": [] }, { - "query": "row var = least(true)", + "query": "row var = cos(to_double(true))", "error": [], "warning": [] }, { - "query": "row least(true)", + "query": "row var = cos(5)", "error": [], "warning": [] }, { - "query": "row var = least(to_boolean(true))", + "query": "row cos(5)", "error": [], "warning": [] }, { - "query": "row var = least(true, true)", + "query": "row var = cos(to_integer(true))", "error": [], "warning": [] }, { - "query": "row least(true, true)", - "error": [], + "query": "row var = cos(true)", + "error": [ + "Argument of [cos] must be [double], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = least(to_boolean(true), to_boolean(true))", + "query": "from a_index | where cos(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = least(5, 5)", - "error": [], + "query": "from a_index | where cos(booleanField) > 0", + "error": [ + "Argument of [cos] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row least(5, 5)", + "query": "from a_index | where cos(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = least(to_integer(true), to_integer(true))", + "query": "from a_index | where cos(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = least(5)", + "query": "from a_index | where cos(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row least(5)", + "query": "from a_index | eval var = cos(doubleField)", "error": [], "warning": [] }, { - "query": "row var = least(to_integer(true))", + "query": "from a_index | eval cos(doubleField)", "error": [], "warning": [] }, { - "query": "row var = least(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = cos(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row least(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", - "error": [], + "query": "from a_index | eval cos(booleanField)", + "error": [ + "Argument of [cos] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = least(to_ip(to_ip(\"127.0.0.1\")), to_ip(to_ip(\"127.0.0.1\")))", - "error": [], + "query": "from a_index | eval var = cos(*)", + "error": [ + "Using wildcards (*) in cos is not allowed" + ], "warning": [] }, { - "query": "row var = least(to_string(true))", + "query": "from a_index | eval var = cos(integerField)", "error": [], "warning": [] }, { - "query": "row var = least(\"a\", \"a\")", + "query": "from a_index | eval cos(integerField)", "error": [], "warning": [] }, { - "query": "row least(\"a\", \"a\")", + "query": "from a_index | eval var = cos(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = least(to_string(true), to_string(true))", + "query": "from a_index | eval var = cos(longField)", "error": [], "warning": [] }, { - "query": "row var = least(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", + "query": "from a_index | eval cos(longField)", "error": [], "warning": [] }, { - "query": "row least(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", + "query": "from a_index | eval var = cos(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = least(to_version(\"a\"), to_version(\"a\"))", + "query": "from a_index | eval cos(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = least(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval cos(doubleField, extraArg)", "error": [ - "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]" + "Error: [cos] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | where least(numberField, numberField) > 0", + "query": "from a_index | sort cos(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | where least(cartesianPointField, cartesianPointField) > 0", - "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]" - ], + "query": "from a_index | eval cos(null)", + "error": [], "warning": [] }, { - "query": "from a_index | where least(numberField) > 0", + "query": "row nullVar = null | eval cos(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | where least(cartesianPointField) > 0", - "error": [ - "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]" - ], + "query": "row var = cosh(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row cosh(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | where length(least(stringField)) > 0", + "query": "row var = cosh(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | where length(least(cartesianPointField)) > 0", + "query": "row var = cosh(5)", + "error": [], + "warning": [] + }, + { + "query": "row cosh(5)", + "error": [], + "warning": [] + }, + { + "query": "row var = cosh(to_integer(true))", + "error": [], + "warning": [] + }, + { + "query": "row var = cosh(true)", "error": [ - "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Argument of [cosh] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where length(least(stringField, stringField)) > 0", + "query": "from a_index | where cosh(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where length(least(cartesianPointField, cartesianPointField)) > 0", + "query": "from a_index | where cosh(booleanField) > 0", "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]" + "Argument of [cosh] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = least(booleanField)", + "query": "from a_index | where cosh(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval least(booleanField)", + "query": "from a_index | where cosh(longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(to_boolean(booleanField))", + "query": "from a_index | where cosh(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval least(cartesianPointField)", - "error": [ - "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]" - ], + "query": "from a_index | eval var = cosh(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(booleanField, booleanField)", + "query": "from a_index | eval cosh(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval least(booleanField, booleanField)", + "query": "from a_index | eval var = cosh(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(to_boolean(booleanField), to_boolean(booleanField))", - "error": [], + "query": "from a_index | eval cosh(booleanField)", + "error": [ + "Argument of [cosh] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval least(cartesianPointField, cartesianPointField)", + "query": "from a_index | eval var = cosh(*)", "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]" + "Using wildcards (*) in cosh is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = least(numberField, numberField)", + "query": "from a_index | eval var = cosh(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval least(numberField, numberField)", + "query": "from a_index | eval cosh(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval var = cosh(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(numberField)", + "query": "from a_index | eval var = cosh(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval least(numberField)", + "query": "from a_index | eval cosh(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(to_integer(booleanField))", + "query": "from a_index | eval var = cosh(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(ipField, ipField)", + "query": "from a_index | eval cosh(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval least(ipField, ipField)", - "error": [], + "query": "from a_index | eval cosh(doubleField, extraArg)", + "error": [ + "Error: [cosh] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "from a_index | eval var = least(to_ip(ipField), to_ip(ipField))", + "query": "from a_index | sort cosh(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(to_string(booleanField))", + "query": "from a_index | eval cosh(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(stringField, stringField)", + "query": "row nullVar = null | eval cosh(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval least(stringField, stringField)", + "query": "from a_index | eval var = date_diff(\"year\", dateField, dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(to_string(booleanField), to_string(booleanField))", + "query": "from a_index | eval date_diff(\"year\", dateField, dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = least(versionField, versionField)", + "query": "from a_index | eval var = date_diff(\"year\", to_datetime(dateField), to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "from a_index | eval least(versionField, versionField)", - "error": [], + "query": "from a_index | eval date_diff(booleanField, booleanField, booleanField)", + "error": [ + "Argument of [date_diff] must be [keyword], 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": "from a_index | eval var = least(to_version(stringField), to_version(stringField))", + "query": "from a_index | eval var = date_diff(textField, dateField, dateField)", "error": [], "warning": [] }, { - "query": "from a_index | sort least(booleanField)", + "query": "from a_index | eval date_diff(textField, dateField, dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval least(null)", + "query": "from a_index | eval var = date_diff(to_string(booleanField), to_datetime(dateField), to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval least(nullVar)", + "query": "from a_index | eval date_diff(\"year\", dateField, dateField, extraArg)", + "error": [ + "Error: [date_diff] function expects exactly 3 arguments, got 4." + ], + "warning": [] + }, + { + "query": "from a_index | sort date_diff(\"year\", dateField, dateField)", "error": [], "warning": [] }, { - "query": "row var = left(\"a\", 5)", + "query": "from a_index | eval date_diff(null, null, null)", "error": [], "warning": [] }, { - "query": "row left(\"a\", 5)", + "query": "row nullVar = null | eval date_diff(nullVar, nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row var = left(to_string(\"a\"), to_integer(\"a\"))", + "query": "from a_index | eval date_diff(\"year\", \"2022\", \"2022\")", "error": [], "warning": [] }, { - "query": "row var = left(5, \"a\")", + "query": "from a_index | eval date_diff(\"year\", concat(\"20\", \"22\"), concat(\"20\", \"22\"))", "error": [ - "Argument of [left] must be [string], found value [5] type [number]", - "Argument of [left] must be [number], found value [\"a\"] type [string]" + "Argument of [date_diff] must be [date], found value [concat(\"20\",\"22\")] type [keyword]", + "Argument of [date_diff] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" ], "warning": [] }, { - "query": "from a_index | where length(left(stringField, numberField)) > 0", + "query": "from a_index | eval date_diff(textField, \"2022\", \"2022\")", "error": [], "warning": [] }, { - "query": "from a_index | where length(left(numberField, stringField)) > 0", + "query": "from a_index | eval date_diff(textField, concat(\"20\", \"22\"), concat(\"20\", \"22\"))", "error": [ - "Argument of [left] must be [string], found value [numberField] type [number]", - "Argument of [left] must be [number], found value [stringField] type [string]" + "Argument of [date_diff] must be [date], found value [concat(\"20\",\"22\")] type [keyword]", + "Argument of [date_diff] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval var = left(stringField, numberField)", + "query": "row var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval left(stringField, numberField)", + "query": "row date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = left(to_string(stringField), to_integer(stringField))", + "query": "row var = date_extract(\"a\", to_datetime(\"2021-01-01T00:00:00Z\"))", "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": "row date_extract(\"a\", to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval left(stringField, numberField, extraArg)", + "query": "row var = date_extract(true, true)", "error": [ - "Error: [left] function expects exactly 2 arguments, got 3." + "Argument of [date_extract] must be [keyword], found value [true] type [boolean]", + "Argument of [date_extract] must be [date], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort left(stringField, numberField)", + "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)", "error": [], "warning": [] }, { - "query": "row var = left(to_string(true), to_integer(true))", + "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", to_datetime(dateField))", + "error": [], "warning": [] }, { - "query": "from a_index | where length(left(booleanField, booleanField)) > 0", + "query": "from a_index | eval date_extract(booleanField, booleanField)", "error": [ - "Argument of [left] must be [string], found value [booleanField] type [boolean]", - "Argument of [left] must be [number], found value [booleanField] type [boolean]" + "Argument of [date_extract] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [date_extract] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = left(to_string(booleanField), to_integer(booleanField))", + "query": "from a_index | eval var = date_extract(textField, dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval left(booleanField, booleanField)", - "error": [ - "Argument of [left] must be [string], found value [booleanField] type [boolean]", - "Argument of [left] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval date_extract(textField, dateField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval left(null, null)", + "query": "from a_index | eval var = date_extract(to_string(booleanField), to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval left(nullVar, nullVar)", + "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": "from a_index | sort date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)", "error": [], "warning": [] }, { - "query": "row var = length(\"a\")", + "query": "from a_index | eval date_extract(null, null)", "error": [], "warning": [] }, { - "query": "row length(\"a\")", + "query": "row nullVar = null | eval date_extract(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row var = length(to_string(\"a\"))", + "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", \"2022\")", "error": [], "warning": [] }, { - "query": "row var = length(5)", + "query": "from a_index | eval date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", concat(\"20\", \"22\"))", "error": [ - "Argument of [length] must be [string], found value [5] type [number]" + "Argument of [date_extract] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" ], "warning": [] }, { - "query": "from a_index | where length(stringField) > 0", + "query": "from a_index | eval date_extract(textField, \"2022\")", "error": [], "warning": [] }, { - "query": "from a_index | where length(numberField) > 0", + "query": "from a_index | eval date_extract(textField, concat(\"20\", \"22\"))", "error": [ - "Argument of [length] must be [string], found value [numberField] type [number]" + "Argument of [date_extract] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval var = length(stringField)", + "query": "row var = date_format(\"a\", to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval length(stringField)", + "query": "row date_format(\"a\", to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = length(to_string(stringField))", + "query": "row var = date_format(true, true)", + "error": [ + "Argument of [date_format] must be [keyword], found value [true] type [boolean]", + "Argument of [date_format] must be [date], found value [true] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = date_format(keywordField, dateField)", "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 date_format(keywordField, dateField)", + "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 = date_format(to_string(booleanField), to_datetime(dateField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = length(*)", + "query": "from a_index | eval date_format(booleanField, booleanField)", "error": [ - "Using wildcards (*) in length is not allowed" + "Argument of [date_format] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [date_format] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort length(stringField)", + "query": "from a_index | eval var = date_format(textField, dateField)", "error": [], "warning": [] }, { - "query": "row var = length(to_string(true))", + "query": "from a_index | eval date_format(textField, dateField)", "error": [], "warning": [] }, { - "query": "row var = length(true)", + "query": "from a_index | eval date_format(keywordField, dateField, extraArg)", "error": [ - "Argument of [length] must be [string], found value [true] type [boolean]" + "Error: [date_format] function expects no more than 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | where length(booleanField) > 0", - "error": [ - "Argument of [length] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | sort date_format(keywordField, dateField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = length(to_string(booleanField))", + "query": "from a_index | eval date_format(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval length(booleanField)", - "error": [ - "Argument of [length] must be [string], found value [booleanField] type [boolean]" - ], + "query": "row nullVar = null | eval date_format(nullVar, nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | eval length(null)", + "query": "from a_index | eval date_format(keywordField, \"2022\")", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval length(nullVar)", - "error": [], + "query": "from a_index | eval date_format(keywordField, concat(\"20\", \"22\"))", + "error": [ + "Argument of [date_format] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" + ], "warning": [] }, { - "query": "row var = log(5, 5)", + "query": "from a_index | eval date_format(textField, \"2022\")", "error": [], "warning": [] }, { - "query": "row log(5, 5)", - "error": [], + "query": "from a_index | eval date_format(textField, concat(\"20\", \"22\"))", + "error": [ + "Argument of [date_format] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" + ], "warning": [] }, { - "query": "row var = log(to_integer(\"a\"), to_integer(\"a\"))", + "query": "row var = date_parse(\"a\", \"a\")", "error": [], "warning": [] }, { - "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]" - ], + "query": "row date_parse(\"a\", \"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | where log(numberField, numberField) > 0", + "query": "row var = date_parse(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | where log(stringField, stringField) > 0", + "query": "row var = date_parse(true, true)", "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 [date_parse] must be [keyword], found value [true] type [boolean]", + "Argument of [date_parse] must be [keyword], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = log(numberField, numberField)", + "query": "from a_index | eval var = date_parse(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval log(numberField, numberField)", + "query": "from a_index | eval date_parse(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = log(to_integer(stringField), to_integer(stringField))", + "query": "from a_index | eval var = date_parse(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval log(stringField, stringField)", + "query": "from a_index | eval date_parse(booleanField, booleanField)", "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 [date_parse] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [date_parse] must be [keyword], found value [booleanField] type [boolean]" ], "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 | eval var = date_parse(keywordField, textField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort log(numberField, numberField)", + "query": "from a_index | eval date_parse(keywordField, textField)", "error": [], "warning": [] }, { - "query": "row var = log(5)", + "query": "from a_index | eval var = date_parse(textField, keywordField)", "error": [], "warning": [] }, { - "query": "row log(5)", + "query": "from a_index | eval date_parse(textField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = log(to_integer(true))", + "query": "from a_index | eval var = date_parse(textField, textField)", "error": [], "warning": [] }, { - "query": "row var = log(to_integer(true), to_integer(true))", + "query": "from a_index | eval date_parse(textField, textField)", "error": [], "warning": [] }, { - "query": "row var = log(true, true)", + "query": "from a_index | eval date_parse(keywordField, keywordField, extraArg)", "error": [ - "Argument of [log] must be [number], found value [true] type [boolean]", - "Argument of [log] must be [number], found value [true] type [boolean]" + "Error: [date_parse] function expects no more than 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | where log(numberField) > 0", + "query": "from a_index | sort date_parse(keywordField, keywordField)", "error": [], "warning": [] }, { - "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 | where log(booleanField, booleanField) > 0", - "error": [ - "Argument of [log] must be [number], found value [booleanField] type [boolean]", - "Argument of [log] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval date_parse(null, null)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = log(numberField)", + "query": "row nullVar = null | eval date_parse(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval log(numberField)", + "query": "row var = date_trunc(1 year, to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = log(to_integer(booleanField))", + "query": "row date_trunc(1 year, to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval log(booleanField)", + "query": "row var = date_trunc(\"a\", to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [ - "Argument of [log] must be [number], found value [booleanField] type [boolean]" + "Argument of [date_trunc] must be [time_literal], found value [\"a\"] type [string]" ], "warning": [] }, { - "query": "from a_index | eval var = log(*)", + "query": "row date_trunc(\"a\", to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [ - "Using wildcards (*) in log is not allowed" + "Argument of [date_trunc] must be [time_literal], found value [\"a\"] type [string]" ], "warning": [] }, { - "query": "from a_index | eval var = log(to_integer(booleanField), to_integer(booleanField))", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval log(booleanField, booleanField)", + "query": "row var = date_trunc(true, true)", "error": [ - "Argument of [log] must be [number], found value [booleanField] type [boolean]", - "Argument of [log] must be [number], found value [booleanField] type [boolean]" + "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 | sort log(numberField)", + "query": "from a_index | eval var = date_trunc(1 year, dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval log(null, null)", + "query": "from a_index | eval date_trunc(1 year, dateField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval log(nullVar, nullVar)", + "query": "from a_index | eval var = date_trunc(1 year, to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "row var = log10(5)", - "error": [], + "query": "from a_index | eval date_trunc(booleanField, booleanField)", + "error": [ + "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": "row log10(5)", - "error": [], + "query": "from a_index | eval var = date_trunc(textField, dateField)", + "error": [ + "Argument of [date_trunc] must be [time_literal], found value [textField] type [text]" + ], "warning": [] }, { - "query": "row var = log10(to_integer(\"a\"))", - "error": [], + "query": "from a_index | eval date_trunc(textField, dateField)", + "error": [ + "Argument of [date_trunc] must be [time_literal], found value [textField] type [text]" + ], "warning": [] }, { - "query": "row var = log10(\"a\")", + "query": "from a_index | eval var = date_trunc(textField, to_datetime(dateField))", "error": [ - "Argument of [log10] must be [number], found value [\"a\"] type [string]" + "Argument of [date_trunc] must be [time_literal], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | where log10(numberField) > 0", - "error": [], + "query": "from a_index | eval date_trunc(1 year, dateField, extraArg)", + "error": [ + "Error: [date_trunc] function expects exactly 2 arguments, got 3." + ], "warning": [] }, { - "query": "from a_index | where log10(stringField) > 0", - "error": [ - "Argument of [log10] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | sort date_trunc(1 year, dateField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = log10(numberField)", + "query": "from a_index | eval date_trunc(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval log10(numberField)", + "query": "row nullVar = null | eval date_trunc(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = log10(to_integer(stringField))", + "query": "from a_index | eval date_trunc(1 year, \"2022\")", "error": [], "warning": [] }, { - "query": "from a_index | eval log10(stringField)", + "query": "from a_index | eval date_trunc(1 year, concat(\"20\", \"22\"))", "error": [ - "Argument of [log10] must be [number], found value [stringField] type [string]" + "Argument of [date_trunc] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" ], "warning": [] }, { - "query": "from a_index | eval log10(numberField, extraArg)", + "query": "from a_index | eval date_trunc(textField, \"2022\")", "error": [ - "Error: [log10] function expects exactly one argument, got 2." + "Argument of [date_trunc] must be [time_literal], found value [textField] type [text]" ], "warning": [] }, { - "query": "from a_index | eval var = log10(*)", + "query": "from a_index | eval date_trunc(textField, concat(\"20\", \"22\"))", "error": [ - "Using wildcards (*) in log10 is not allowed" + "Argument of [date_trunc] must be [time_literal], found value [textField] type [text]", + "Argument of [date_trunc] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" ], "warning": [] }, { - "query": "from a_index | sort log10(numberField)", + "query": "row var = e()", "error": [], "warning": [] }, { - "query": "row var = log10(to_integer(true))", + "query": "row e()", "error": [], "warning": [] }, { - "query": "row var = log10(true)", - "error": [ - "Argument of [log10] must be [number], found value [true] type [boolean]" - ], + "query": "from a_index | where e() > 0", + "error": [], "warning": [] }, { - "query": "from a_index | where log10(booleanField) > 0", - "error": [ - "Argument of [log10] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = e()", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = log10(to_integer(booleanField))", + "query": "from a_index | eval e()", "error": [], "warning": [] }, { - "query": "from a_index | eval log10(booleanField)", + "query": "from a_index | eval e(extraArg)", "error": [ - "Argument of [log10] must be [number], found value [booleanField] type [boolean]" + "Error: [e] function expects exactly 0 arguments, got 1." ], "warning": [] }, { - "query": "from a_index | eval log10(null)", + "query": "from a_index | sort e()", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval log10(nullVar)", + "query": "row nullVar = null | eval e()", "error": [], "warning": [] }, { - "query": "row var = ltrim(\"a\")", + "query": "row var = ends_with(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row ltrim(\"a\")", + "query": "row ends_with(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row var = ltrim(to_string(\"a\"))", + "query": "row var = ends_with(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "row var = ltrim(5)", + "query": "row var = ends_with(true, true)", "error": [ - "Argument of [ltrim] must be [string], found value [5] type [number]" + "Argument of [ends_with] must be [keyword], found value [true] type [boolean]", + "Argument of [ends_with] must be [keyword], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where length(ltrim(stringField)) > 0", + "query": "from a_index | eval var = ends_with(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | where length(ltrim(numberField)) > 0", - "error": [ - "Argument of [ltrim] must be [string], found value [numberField] type [number]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = ltrim(stringField)", + "query": "from a_index | eval ends_with(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval ltrim(stringField)", + "query": "from a_index | eval var = ends_with(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = ltrim(to_string(stringField))", - "error": [], + "query": "from a_index | eval ends_with(booleanField, booleanField)", + "error": [ + "Argument of [ends_with] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [ends_with] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval ltrim(numberField)", - "error": [ - "Argument of [ltrim] must be [string], found value [numberField] type [number]" - ], + "query": "from a_index | eval var = ends_with(textField, textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval ltrim(stringField, extraArg)", - "error": [ - "Error: [ltrim] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval ends_with(textField, textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = ltrim(*)", + "query": "from a_index | eval ends_with(keywordField, keywordField, extraArg)", "error": [ - "Using wildcards (*) in ltrim is not allowed" + "Error: [ends_with] function expects exactly 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | sort ltrim(stringField)", + "query": "from a_index | sort ends_with(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = ltrim(to_string(true))", + "query": "from a_index | eval ends_with(null, null)", "error": [], "warning": [] }, { - "query": "row var = ltrim(true)", - "error": [ - "Argument of [ltrim] must be [string], found value [true] type [boolean]" - ], - "warning": [] - }, - { - "query": "from a_index | where length(ltrim(booleanField)) > 0", - "error": [ - "Argument of [ltrim] must be [string], found value [booleanField] type [boolean]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = ltrim(to_string(booleanField))", + "query": "row nullVar = null | eval ends_with(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval ltrim(booleanField)", - "error": [ - "Argument of [ltrim] must be [string], found value [booleanField] type [boolean]" - ], + "query": "row var = exp(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval ltrim(null)", + "query": "row exp(5.5)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval ltrim(nullVar)", + "query": "row var = exp(to_double(true))", "error": [], "warning": [] }, { - "query": "row var = mv_avg(5)", + "query": "row var = exp(5)", "error": [], "warning": [] }, { - "query": "row mv_avg(5)", + "query": "row exp(5)", "error": [], "warning": [] }, { - "query": "row var = mv_avg(to_integer(\"a\"))", + "query": "row var = exp(to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = mv_avg(\"a\")", + "query": "row var = exp(true)", "error": [ - "Argument of [mv_avg] must be [number], found value [\"a\"] type [string]" + "Argument of [exp] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where mv_avg(numberField) > 0", + "query": "from a_index | where exp(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where mv_avg(stringField) > 0", + "query": "from a_index | where exp(booleanField) > 0", "error": [ - "Argument of [mv_avg] must be [number], found value [stringField] type [string]" + "Argument of [exp] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = mv_avg(numberField)", + "query": "from a_index | where exp(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_avg(numberField)", + "query": "from a_index | where exp(longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_avg(to_integer(stringField))", + "query": "from a_index | where exp(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_avg(stringField)", - "error": [ - "Argument of [mv_avg] must be [number], found value [stringField] type [string]" - ], - "warning": [] - }, - { - "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 var = mv_avg(*)", - "error": [ - "Using wildcards (*) in mv_avg is not allowed" - ], + "query": "from a_index | eval var = exp(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort mv_avg(numberField)", + "query": "from a_index | eval exp(doubleField)", "error": [], "warning": [] }, { - "query": "row var = mv_avg(to_integer(true))", + "query": "from a_index | eval var = exp(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_avg(true)", + "query": "from a_index | eval exp(booleanField)", "error": [ - "Argument of [mv_avg] must be [number], found value [true] type [boolean]" + "Argument of [exp] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where mv_avg(booleanField) > 0", + "query": "from a_index | eval var = exp(*)", "error": [ - "Argument of [mv_avg] must be [number], found value [booleanField] type [boolean]" + "Using wildcards (*) in exp is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = mv_avg(to_integer(booleanField))", + "query": "from a_index | eval var = exp(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_avg(booleanField)", - "error": [ - "Argument of [mv_avg] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval exp(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval mv_avg(null)", + "query": "from a_index | eval var = exp(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_avg(nullVar)", + "query": "from a_index | eval var = exp(longField)", "error": [], "warning": [] }, { - "query": "row var = mv_concat(\"a\", \"a\")", + "query": "from a_index | eval exp(longField)", "error": [], "warning": [] }, { - "query": "row mv_concat(\"a\", \"a\")", + "query": "from a_index | eval var = exp(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = mv_concat(to_string(\"a\"), to_string(\"a\"))", + "query": "from a_index | eval exp(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = mv_concat(5, 5)", + "query": "from a_index | eval exp(doubleField, extraArg)", "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]" + "Error: [exp] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | where length(mv_concat(stringField, stringField)) > 0", + "query": "from a_index | sort exp(doubleField)", "error": [], "warning": [] }, { - "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)", + "query": "from a_index | eval exp(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_concat(stringField, stringField)", + "query": "row nullVar = null | eval exp(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_concat(to_string(stringField), to_string(stringField))", + "query": "row var = floor(5.5)", "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": "row floor(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval mv_concat(stringField, stringField, extraArg)", - "error": [ - "Error: [mv_concat] function expects exactly 2 arguments, got 3." - ], + "query": "row var = floor(to_double(true))", + "error": [], "warning": [] }, { - "query": "from a_index | sort mv_concat(stringField, stringField)", + "query": "row var = floor(5)", "error": [], "warning": [] }, { - "query": "row var = mv_concat(to_string(true), to_string(true))", + "query": "row floor(5)", "error": [], "warning": [] }, { - "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]" - ], + "query": "row var = floor(to_integer(true))", + "error": [], "warning": [] }, { - "query": "from a_index | where length(mv_concat(booleanField, booleanField)) > 0", + "query": "row var = floor(true)", "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]" + "Argument of [floor] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = mv_concat(to_string(booleanField), to_string(booleanField))", + "query": "from a_index | where floor(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_concat(booleanField, booleanField)", + "query": "from a_index | where floor(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]" + "Argument of [floor] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval mv_concat(null, null)", + "query": "from a_index | where floor(integerField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_concat(nullVar, nullVar)", + "query": "from a_index | where floor(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_count(\"a\")", + "query": "from a_index | where floor(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row mv_count(\"a\")", + "query": "from a_index | eval var = floor(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(stringField)", + "query": "from a_index | eval floor(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_count(stringField)", + "query": "from a_index | eval var = floor(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(*)", + "query": "from a_index | eval floor(booleanField)", "error": [ - "Using wildcards (*) in mv_count is not allowed" + "Argument of [floor] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort mv_count(stringField)", - "error": [], + "query": "from a_index | eval var = floor(*)", + "error": [ + "Using wildcards (*) in floor is not allowed" + ], "warning": [] }, { - "query": "row var = mv_count(true)", + "query": "from a_index | eval var = floor(integerField)", "error": [], "warning": [] }, { - "query": "row mv_count(true)", + "query": "from a_index | eval floor(integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_boolean(true))", + "query": "from a_index | eval var = floor(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = floor(longField)", "error": [], "warning": [] }, { - "query": "row mv_count(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval floor(longField)", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = floor(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval floor(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row mv_count(to_cartesianshape(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | eval floor(doubleField, extraArg)", + "error": [ + "Error: [floor] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "row var = mv_count(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | sort floor(doubleField)", "error": [], "warning": [] }, { - "query": "row var = mv_count(now())", + "query": "from a_index | eval floor(null)", "error": [], "warning": [] }, { - "query": "row mv_count(now())", + "query": "row nullVar = null | eval floor(nullVar)", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_datetime(now()))", + "query": "row var = from_base64(\"a\")", "error": [], "warning": [] }, { - "query": "row var = mv_count(5)", + "query": "row from_base64(\"a\")", "error": [], "warning": [] }, { - "query": "row mv_count(5)", + "query": "row var = from_base64(to_string(true))", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_integer(true))", - "error": [], + "query": "row var = from_base64(true)", + "error": [ + "Argument of [from_base64] must be [keyword], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = mv_count(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = from_base64(keywordField)", "error": [], "warning": [] }, { - "query": "row mv_count(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval from_base64(keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = from_base64(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_geoshape(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | eval from_base64(booleanField)", + "error": [ + "Argument of [from_base64] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row mv_count(to_geoshape(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | eval var = from_base64(*)", + "error": [ + "Using wildcards (*) in from_base64 is not allowed" + ], "warning": [] }, { - "query": "row var = mv_count(to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = from_base64(textField)", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval from_base64(textField)", "error": [], "warning": [] }, { - "query": "row mv_count(to_ip(\"127.0.0.1\"))", - "error": [], + "query": "from a_index | eval from_base64(keywordField, extraArg)", + "error": [ + "Error: [from_base64] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "row var = mv_count(to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | sort from_base64(keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_string(true))", + "query": "from a_index | eval from_base64(null)", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_version(\"1.0.0\"))", + "query": "row nullVar = null | eval from_base64(nullVar)", "error": [], "warning": [] }, { - "query": "row mv_count(to_version(\"1.0.0\"))", + "query": "row var = greatest(true)", "error": [], "warning": [] }, { - "query": "row var = mv_count(to_version(\"a\"))", + "query": "row greatest(true)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(booleanField) > 0", + "query": "row var = greatest(to_boolean(true))", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(cartesianPointField) > 0", + "query": "row var = greatest(true, true)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(cartesianShapeField) > 0", + "query": "row greatest(true, true)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(dateField) > 0", + "query": "row var = greatest(to_boolean(true), to_boolean(true))", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(numberField) > 0", + "query": "row var = greatest(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(geoPointField) > 0", + "query": "row greatest(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(geoShapeField) > 0", + "query": "row var = greatest(to_double(true), to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(ipField) > 0", + "query": "row var = greatest(5)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(stringField) > 0", + "query": "row greatest(5)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_count(versionField) > 0", + "query": "row var = greatest(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(booleanField)", + "query": "row var = greatest(5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_count(booleanField)", + "query": "row greatest(5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(to_boolean(booleanField))", + "query": "row var = greatest(to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(cartesianPointField)", + "query": "row var = greatest(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_count(cartesianPointField)", + "query": "row greatest(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(to_cartesianpoint(cartesianPointField))", + "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 = mv_count(cartesianShapeField)", + "query": "row var = greatest(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_count(cartesianShapeField)", + "query": "row greatest(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(to_cartesianshape(cartesianPointField))", + "query": "row var = greatest(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(dateField)", + "query": "row var = greatest(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_count(dateField)", + "query": "row greatest(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(to_datetime(dateField))", + "query": "row var = greatest(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(numberField)", + "query": "row var = greatest(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_count(numberField)", + "query": "row greatest(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(to_integer(booleanField))", + "query": "row var = greatest(to_version(\"a\"), to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(geoPointField)", - "error": [], + "query": "row var = greatest(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "error": [ + "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 | eval mv_count(geoPointField)", + "query": "from a_index | where greatest(doubleField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(to_geopoint(geoPointField))", + "query": "from a_index | where greatest(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(geoShapeField)", - "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 mv_count(geoShapeField)", + "query": "from a_index | where greatest(integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(to_geoshape(geoPointField))", + "query": "from a_index | where greatest(longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(ipField)", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval mv_count(ipField)", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval var = mv_count(to_ip(ipField))", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval var = mv_count(to_string(booleanField))", + "query": "from a_index | where greatest(longField, longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(versionField)", + "query": "from a_index | eval var = greatest(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_count(versionField)", + "query": "from a_index | eval greatest(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_count(to_version(stringField))", + "query": "from a_index | eval var = greatest(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_count(booleanField, extraArg)", + "query": "from a_index | eval greatest(cartesianPointField)", "error": [ - "Error: [mv_count] function expects exactly one argument, got 2." + "Argument of [greatest] must be [boolean], found value [cartesianPointField] type [cartesian_point]" ], "warning": [] }, { - "query": "from a_index | sort mv_count(booleanField)", + "query": "from a_index | eval var = greatest(booleanField, booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_count(null)", + "query": "from a_index | eval greatest(booleanField, booleanField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_count(nullVar)", + "query": "from a_index | eval var = greatest(to_boolean(booleanField), to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(\"a\")", - "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": "row mv_dedupe(\"a\")", + "query": "from a_index | eval var = greatest(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(stringField)", + "query": "from a_index | eval greatest(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(stringField)", + "query": "from a_index | eval var = greatest(to_double(booleanField), to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(*)", - "error": [ - "Using wildcards (*) in mv_dedupe is not allowed" - ], + "query": "from a_index | eval var = greatest(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort mv_dedupe(stringField)", + "query": "from a_index | eval greatest(integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(true)", + "query": "from a_index | eval var = greatest(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row mv_dedupe(true)", + "query": "from a_index | eval var = greatest(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_boolean(true))", + "query": "from a_index | eval greatest(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(now())", + "query": "from a_index | eval var = greatest(to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row mv_dedupe(now())", + "query": "from a_index | eval var = greatest(ipField, ipField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_datetime(now()))", + "query": "from a_index | eval greatest(ipField, ipField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(5)", + "query": "from a_index | eval var = greatest(to_ip(ipField), to_ip(ipField))", "error": [], "warning": [] }, { - "query": "row mv_dedupe(5)", + "query": "from a_index | eval var = greatest(keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_integer(true))", + "query": "from a_index | eval greatest(keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = greatest(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row mv_dedupe(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = greatest(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | eval greatest(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_string(true))", + "query": "from a_index | eval var = greatest(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_version(\"1.0.0\"))", + "query": "from a_index | eval var = greatest(longField)", "error": [], "warning": [] }, { - "query": "row mv_dedupe(to_version(\"1.0.0\"))", + "query": "from a_index | eval greatest(longField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_version(\"a\"))", + "query": "from a_index | eval var = greatest(longField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_dedupe(numberField) > 0", + "query": "from a_index | eval greatest(longField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | where length(mv_dedupe(stringField)) > 0", + "query": "from a_index | eval var = greatest(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(booleanField)", + "query": "from a_index | eval greatest(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(booleanField)", + "query": "from a_index | eval var = greatest(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(to_boolean(booleanField))", + "query": "from a_index | eval greatest(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(dateField)", + "query": "from a_index | eval var = greatest(versionField, versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(dateField)", + "query": "from a_index | eval greatest(versionField, versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(to_datetime(dateField))", + "query": "from a_index | eval var = greatest(to_version(keywordField), to_version(keywordField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(numberField)", + "query": "from a_index | sort greatest(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(numberField)", + "query": "from a_index | eval greatest(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(to_integer(booleanField))", + "query": "row nullVar = null | eval greatest(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(ipField)", + "query": "row var = ip_prefix(to_ip(\"127.0.0.1\"), 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(ipField)", + "query": "row ip_prefix(to_ip(\"127.0.0.1\"), 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(to_ip(ipField))", + "query": "row var = ip_prefix(to_ip(to_ip(\"127.0.0.1\")), to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(to_string(booleanField))", - "error": [], + "query": "row var = ip_prefix(true, true, true)", + "error": [ + "Argument of [ip_prefix] must be [ip], found value [true] type [boolean]", + "Argument of [ip_prefix] must be [integer], found value [true] type [boolean]", + "Argument of [ip_prefix] must be [integer], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(versionField)", + "query": "from a_index | eval var = ip_prefix(ipField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(versionField)", + "query": "from a_index | eval ip_prefix(ipField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(to_version(stringField))", + "query": "from a_index | eval var = ip_prefix(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(booleanField, extraArg)", + "query": "from a_index | eval ip_prefix(booleanField, booleanField, booleanField)", "error": [ - "Error: [mv_dedupe] function expects exactly one argument, got 2." + "Argument of [ip_prefix] must be [ip], found value [booleanField] type [boolean]", + "Argument of [ip_prefix] must be [integer], found value [booleanField] type [boolean]", + "Argument of [ip_prefix] must be [integer], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort mv_dedupe(booleanField)", - "error": [], + "query": "from a_index | eval ip_prefix(ipField, integerField, integerField, extraArg)", + "error": [ + "Error: [ip_prefix] function expects exactly 3 arguments, got 4." + ], "warning": [] }, { - "query": "row mv_dedupe(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | sort ip_prefix(ipField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval ip_prefix(null, null, null)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_cartesianshape(\"POINT (30 10)\"))", + "query": "row nullVar = null | eval ip_prefix(nullVar, nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row mv_dedupe(to_cartesianshape(\"POINT (30 10)\"))", + "query": "row var = least(true)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row least(true)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_geopoint(\"POINT (30 10)\"))", + "query": "row var = least(to_boolean(true))", "error": [], "warning": [] }, { - "query": "row mv_dedupe(to_geopoint(\"POINT (30 10)\"))", + "query": "row var = least(true, true)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "row least(true, true)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_geoshape(\"POINT (30 10)\"))", + "query": "row var = least(to_boolean(true), to_boolean(true))", "error": [], "warning": [] }, { - "query": "row mv_dedupe(to_geoshape(\"POINT (30 10)\"))", + "query": "row var = least(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "row least(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(cartesianPointField)", + "query": "row var = least(to_double(true), to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(to_cartesianpoint(cartesianPointField))", + "query": "row var = least(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(cartesianShapeField)", + "query": "row least(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(cartesianShapeField)", + "query": "row var = least(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(to_cartesianshape(cartesianPointField))", + "query": "row var = least(5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(geoPointField)", + "query": "row least(5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(geoPointField)", + "query": "row var = least(to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(to_geopoint(geoPointField))", + "query": "row var = least(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_dedupe(geoShapeField)", + "query": "row least(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(geoShapeField)", + "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 var = mv_dedupe(to_geoshape(geoPointField))", + "query": "row var = least(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(numberField, extraArg)", - "error": [ - "Error: [mv_dedupe] function expects exactly one argument, got 2." - ], + "query": "row least(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | sort mv_dedupe(numberField)", + "query": "row var = least(to_string(true))", "error": [], "warning": [] }, { - "query": "row var = mv_dedupe(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "row var = least(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(cartesianPointField)", + "query": "row least(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_dedupe(null)", + "query": "row var = least(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_dedupe(nullVar)", + "query": "row var = least(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "row var = mv_first(\"a\")", + "query": "row least(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "row mv_first(\"a\")", + "query": "row var = least(to_version(\"a\"), to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(stringField)", - "error": [], + "query": "row var = least(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "error": [ + "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 | eval mv_first(stringField)", + "query": "from a_index | where least(doubleField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(*)", + "query": "from a_index | where least(cartesianPointField, cartesianPointField) > 0", "error": [ - "Using wildcards (*) in mv_first 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 mv_first(stringField)", + "query": "from a_index | where least(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_first(true)", - "error": [], + "query": "from a_index | where least(cartesianPointField) > 0", + "error": [ + "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + ], "warning": [] }, { - "query": "row mv_first(true)", + "query": "from a_index | where least(integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_boolean(true))", + "query": "from a_index | where least(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | where least(longField, longField) > 0", "error": [], "warning": [] }, { - "query": "row mv_first(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = least(booleanField)", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval least(booleanField)", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = least(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "row mv_first(to_cartesianshape(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | eval least(cartesianPointField)", + "error": [ + "Argument of [least] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + ], "warning": [] }, { - "query": "row var = mv_first(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = least(booleanField, booleanField)", "error": [], "warning": [] }, { - "query": "row var = mv_first(now())", + "query": "from a_index | eval least(booleanField, booleanField)", "error": [], "warning": [] }, { - "query": "row mv_first(now())", + "query": "from a_index | eval var = least(to_boolean(booleanField), to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_datetime(now()))", - "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": "row var = mv_first(5)", + "query": "from a_index | eval var = least(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "row mv_first(5)", + "query": "from a_index | eval least(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_integer(true))", + "query": "from a_index | eval var = least(to_double(booleanField), to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = least(integerField)", "error": [], "warning": [] }, { - "query": "row mv_first(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval least(integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = least(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = least(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row mv_first(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval least(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = least(to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = least(ipField, ipField)", "error": [], "warning": [] }, { - "query": "row mv_first(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval least(ipField, ipField)", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | eval var = least(to_ip(ipField), to_ip(ipField))", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_string(true))", + "query": "from a_index | eval var = least(keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_version(\"1.0.0\"))", + "query": "from a_index | eval least(keywordField)", "error": [], "warning": [] }, { - "query": "row mv_first(to_version(\"1.0.0\"))", + "query": "from a_index | eval var = least(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_first(to_version(\"a\"))", + "query": "from a_index | eval var = least(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_first(numberField) > 0", + "query": "from a_index | eval least(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | where length(mv_first(stringField)) > 0", + "query": "from a_index | eval var = least(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(booleanField)", + "query": "from a_index | eval var = least(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(booleanField)", + "query": "from a_index | eval least(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_boolean(booleanField))", + "query": "from a_index | eval var = least(longField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(cartesianPointField)", + "query": "from a_index | eval least(longField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(cartesianPointField)", + "query": "from a_index | eval var = least(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_cartesianpoint(cartesianPointField))", + "query": "from a_index | eval least(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(cartesianShapeField)", + "query": "from a_index | eval var = least(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(cartesianShapeField)", + "query": "from a_index | eval least(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_cartesianshape(cartesianPointField))", + "query": "from a_index | eval var = least(versionField, versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(dateField)", + "query": "from a_index | eval least(versionField, versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(dateField)", + "query": "from a_index | eval var = least(to_version(keywordField), to_version(keywordField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_datetime(dateField))", + "query": "from a_index | sort least(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(numberField)", + "query": "from a_index | eval least(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(numberField)", + "query": "row nullVar = null | eval least(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_integer(booleanField))", + "query": "row var = left(\"a\", 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(geoPointField)", + "query": "row left(\"a\", 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(geoPointField)", + "query": "row var = left(to_string(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_geopoint(geoPointField))", - "error": [], + "query": "row var = left(true, true)", + "error": [ + "Argument of [left] must be [keyword], found value [true] type [boolean]", + "Argument of [left] must be [integer], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = mv_first(geoShapeField)", + "query": "from a_index | eval var = left(keywordField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(geoShapeField)", + "query": "from a_index | eval left(keywordField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_geoshape(geoPointField))", + "query": "from a_index | eval var = left(to_string(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(ipField)", - "error": [], + "query": "from a_index | eval left(booleanField, booleanField)", + "error": [ + "Argument of [left] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [left] must be [integer], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval mv_first(ipField)", + "query": "from a_index | eval var = left(textField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_ip(ipField))", + "query": "from a_index | eval left(textField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_string(booleanField))", - "error": [], + "query": "from a_index | eval left(keywordField, integerField, extraArg)", + "error": [ + "Error: [left] function expects exactly 2 arguments, got 3." + ], "warning": [] }, { - "query": "from a_index | eval var = mv_first(versionField)", + "query": "from a_index | sort left(keywordField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(versionField)", + "query": "from a_index | eval left(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_first(to_version(stringField))", + "query": "row nullVar = null | eval left(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(booleanField, extraArg)", - "error": [ - "Error: [mv_first] function expects exactly one argument, got 2." - ], + "query": "row var = length(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | sort mv_first(booleanField)", + "query": "row length(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_first(null)", + "query": "row var = length(to_string(true))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_first(nullVar)", - "error": [], + "query": "row var = length(true)", + "error": [ + "Argument of [length] must be [keyword], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = mv_last(\"a\")", + "query": "from a_index | eval var = length(keywordField)", "error": [], "warning": [] }, { - "query": "row mv_last(\"a\")", + "query": "from a_index | eval length(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(stringField)", + "query": "from a_index | eval var = length(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(stringField)", - "error": [], + "query": "from a_index | eval length(booleanField)", + "error": [ + "Argument of [length] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = mv_last(*)", + "query": "from a_index | eval var = length(*)", "error": [ - "Using wildcards (*) in mv_last is not allowed" + "Using wildcards (*) in length is not allowed" ], "warning": [] }, { - "query": "from a_index | sort mv_last(stringField)", + "query": "from a_index | eval var = length(textField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(true)", + "query": "from a_index | eval length(textField)", "error": [], "warning": [] }, { - "query": "row mv_last(true)", - "error": [], + "query": "from a_index | eval length(keywordField, extraArg)", + "error": [ + "Error: [length] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "row var = mv_last(to_boolean(true))", + "query": "from a_index | sort length(keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval length(null)", "error": [], "warning": [] }, { - "query": "row mv_last(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "row nullVar = null | eval length(nullVar)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = locate(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_cartesianshape(\"POINT (30 10)\"))", + "query": "row locate(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row mv_last(to_cartesianshape(\"POINT (30 10)\"))", + "query": "row var = locate(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = locate(\"a\", \"a\", 5)", "error": [], "warning": [] }, { - "query": "row var = mv_last(now())", + "query": "row locate(\"a\", \"a\", 5)", "error": [], "warning": [] }, { - "query": "row mv_last(now())", + "query": "row var = locate(to_string(true), to_string(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_datetime(now()))", - "error": [], + "query": "row var = locate(true, true, true)", + "error": [ + "Argument of [locate] must be [keyword], found value [true] type [boolean]", + "Argument of [locate] must be [keyword], found value [true] type [boolean]", + "Argument of [locate] must be [integer], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = mv_last(5)", + "query": "from a_index | eval var = locate(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row mv_last(5)", + "query": "from a_index | eval locate(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_integer(true))", + "query": "from a_index | eval var = locate(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_geopoint(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | eval locate(booleanField, booleanField)", + "error": [ + "Argument of [locate] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [locate] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row mv_last(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = locate(keywordField, keywordField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval locate(keywordField, keywordField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = locate(to_string(booleanField), to_string(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row mv_last(to_geoshape(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | eval locate(booleanField, booleanField, booleanField)", + "error": [ + "Argument of [locate] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [locate] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [locate] must be [integer], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = mv_last(to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = locate(keywordField, textField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval locate(keywordField, textField)", "error": [], "warning": [] }, { - "query": "row mv_last(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = locate(keywordField, textField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | eval locate(keywordField, textField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_string(true))", + "query": "from a_index | eval var = locate(textField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_version(\"1.0.0\"))", + "query": "from a_index | eval locate(textField, keywordField)", "error": [], "warning": [] }, { - "query": "row mv_last(to_version(\"1.0.0\"))", + "query": "from a_index | eval var = locate(textField, keywordField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_last(to_version(\"a\"))", + "query": "from a_index | eval locate(textField, keywordField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_last(numberField) > 0", + "query": "from a_index | eval var = locate(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | where length(mv_last(stringField)) > 0", + "query": "from a_index | eval locate(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(booleanField)", + "query": "from a_index | eval var = locate(textField, textField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(booleanField)", + "query": "from a_index | eval locate(textField, textField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_boolean(booleanField))", - "error": [], + "query": "from a_index | eval locate(keywordField, keywordField, integerField, extraArg)", + "error": [ + "Error: [locate] function expects no more than 3 arguments, got 4." + ], "warning": [] }, { - "query": "from a_index | eval var = mv_last(cartesianPointField)", + "query": "from a_index | sort locate(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(cartesianPointField)", + "query": "from a_index | eval locate(null, null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_cartesianpoint(cartesianPointField))", + "query": "row nullVar = null | eval locate(nullVar, nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(cartesianShapeField)", + "query": "row var = log(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(cartesianShapeField)", + "query": "row log(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_cartesianshape(cartesianPointField))", + "query": "row var = log(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(dateField)", + "query": "row var = log(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(dateField)", + "query": "row log(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_datetime(dateField))", + "query": "row var = log(to_double(true), to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(numberField)", + "query": "row var = log(5.5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(numberField)", + "query": "row log(5.5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_integer(booleanField))", + "query": "row var = log(to_double(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(geoPointField)", + "query": "row var = log(to_double(true), 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(geoPointField)", + "query": "row var = log(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_geopoint(geoPointField))", + "query": "row log(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(geoShapeField)", + "query": "row var = log(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(geoShapeField)", + "query": "row var = log(5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_geoshape(geoPointField))", + "query": "row log(5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(ipField)", + "query": "row var = log(to_integer(true), to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(ipField)", + "query": "row var = log(5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_ip(ipField))", + "query": "row log(5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_string(booleanField))", + "query": "row var = log(to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(versionField)", + "query": "row var = log(to_integer(true), 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(versionField)", + "query": "row var = log(5, to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_last(to_version(stringField))", + "query": "row var = log(5, to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(booleanField, extraArg)", + "query": "row var = log(true, true)", "error": [ - "Error: [mv_last] function expects exactly one argument, got 2." + "Argument of [log] must be [double], found value [true] type [boolean]", + "Argument of [log] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort mv_last(booleanField)", + "query": "from a_index | where log(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_last(null)", - "error": [], + "query": "from a_index | where log(booleanField) > 0", + "error": [ + "Argument of [log] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row nullVar = null | eval mv_last(nullVar)", + "query": "from a_index | where log(doubleField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(\"a\")", - "error": [], + "query": "from a_index | where log(booleanField, booleanField) > 0", + "error": [ + "Argument of [log] must be [double], found value [booleanField] type [boolean]", + "Argument of [log] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row mv_max(\"a\")", + "query": "from a_index | where log(doubleField, integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(stringField)", + "query": "from a_index | where log(doubleField, longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_max(stringField)", + "query": "from a_index | where log(doubleField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(*)", - "error": [ - "Using wildcards (*) in mv_max is not allowed" - ], - "warning": [] - }, - { - "query": "from a_index | sort mv_max(stringField)", + "query": "from a_index | where log(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(true)", + "query": "from a_index | where log(integerField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "row mv_max(true)", + "query": "from a_index | where log(integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(to_boolean(true))", + "query": "from a_index | where log(integerField, longField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(now())", + "query": "from a_index | where log(integerField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row mv_max(now())", + "query": "from a_index | where log(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(to_datetime(now()))", + "query": "from a_index | where log(longField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(5)", + "query": "from a_index | where log(longField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row mv_max(5)", + "query": "from a_index | where log(longField, longField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(to_integer(true))", + "query": "from a_index | where log(longField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(to_ip(\"127.0.0.1\"))", + "query": "from a_index | where log(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row mv_max(to_ip(\"127.0.0.1\"))", + "query": "from a_index | where log(unsignedLongField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | where log(unsignedLongField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(to_string(true))", + "query": "from a_index | where log(unsignedLongField, longField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_max(to_version(\"1.0.0\"))", + "query": "from a_index | where log(unsignedLongField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row mv_max(to_version(\"1.0.0\"))", + "query": "from a_index | eval var = log(doubleField)", "error": [], "warning": [] }, { - "query": "row var = mv_max(to_version(\"a\"))", + "query": "from a_index | eval log(doubleField)", "error": [], "warning": [] }, { - "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", + "query": "from a_index | eval var = log(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | where mv_max(cartesianPointField) > 0", + "query": "from a_index | eval log(booleanField)", "error": [ - "Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Argument of [log] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where length(mv_max(stringField)) > 0", - "error": [], - "warning": [] - }, - { - "query": "from a_index | where length(mv_max(cartesianPointField)) > 0", + "query": "from a_index | eval var = log(*)", "error": [ - "Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Using wildcards (*) in log is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = mv_max(booleanField)", + "query": "from a_index | eval var = log(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_max(booleanField)", + "query": "from a_index | eval log(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(to_boolean(booleanField))", + "query": "from a_index | eval var = log(to_double(booleanField), to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_max(cartesianPointField)", + "query": "from a_index | eval log(booleanField, booleanField)", "error": [ - "Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Argument of [log] must be [double], found value [booleanField] type [boolean]", + "Argument of [log] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = mv_max(dateField)", + "query": "from a_index | eval var = log(doubleField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_max(dateField)", + "query": "from a_index | eval log(doubleField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(to_datetime(dateField))", + "query": "from a_index | eval var = log(to_double(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(numberField)", + "query": "from a_index | eval var = log(doubleField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_max(numberField)", + "query": "from a_index | eval log(doubleField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(to_integer(booleanField))", + "query": "from a_index | eval var = log(to_double(booleanField), longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(ipField)", + "query": "from a_index | eval var = log(doubleField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_max(ipField)", + "query": "from a_index | eval log(doubleField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(to_ip(ipField))", + "query": "from a_index | eval var = log(to_double(booleanField), unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(to_string(booleanField))", + "query": "from a_index | eval var = log(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(versionField)", + "query": "from a_index | eval log(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_max(versionField)", + "query": "from a_index | eval var = log(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_max(to_version(stringField))", + "query": "from a_index | eval var = log(integerField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_max(booleanField, extraArg)", - "error": [ - "Error: [mv_max] function expects exactly one argument, got 2." - ], - "warning": [] - }, - { - "query": "from a_index | sort mv_max(booleanField)", + "query": "from a_index | eval log(integerField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_max(null)", + "query": "from a_index | eval var = log(to_integer(booleanField), to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_max(nullVar)", + "query": "from a_index | eval var = log(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_median(5)", + "query": "from a_index | eval log(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row mv_median(5)", + "query": "from a_index | eval var = log(to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_median(to_integer(\"a\"))", + "query": "from a_index | eval var = log(integerField, longField)", "error": [], "warning": [] }, { - "query": "row var = mv_median(\"a\")", - "error": [ - "Argument of [mv_median] must be [number], found value [\"a\"] type [string]" - ], + "query": "from a_index | eval log(integerField, longField)", + "error": [], "warning": [] }, { - "query": "from a_index | where mv_median(numberField) > 0", + "query": "from a_index | eval var = log(to_integer(booleanField), longField)", "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": "from a_index | eval var = log(integerField, unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_median(numberField)", + "query": "from a_index | eval log(integerField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_median(numberField)", + "query": "from a_index | eval var = log(to_integer(booleanField), unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_median(to_integer(stringField))", + "query": "from a_index | eval var = log(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_median(stringField)", - "error": [ - "Argument of [mv_median] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval log(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval mv_median(numberField, extraArg)", - "error": [ - "Error: [mv_median] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval var = log(longField, doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_median(*)", - "error": [ - "Using wildcards (*) in mv_median is not allowed" - ], + "query": "from a_index | eval log(longField, doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort mv_median(numberField)", + "query": "from a_index | eval var = log(longField, to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_median(to_integer(true))", + "query": "from a_index | eval var = log(longField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_median(true)", - "error": [ - "Argument of [mv_median] must be [number], found value [true] type [boolean]" - ], + "query": "from a_index | eval log(longField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | where mv_median(booleanField) > 0", - "error": [ - "Argument of [mv_median] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = log(longField, to_integer(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_median(to_integer(booleanField))", + "query": "from a_index | eval var = log(longField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_median(booleanField)", - "error": [ - "Argument of [mv_median] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval log(longField, longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval mv_median(null)", + "query": "from a_index | eval var = log(longField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_median(nullVar)", + "query": "from a_index | eval log(longField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = mv_min(\"a\")", + "query": "from a_index | eval var = log(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row mv_min(\"a\")", + "query": "from a_index | eval log(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(stringField)", + "query": "from a_index | eval var = log(unsignedLongField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_min(stringField)", + "query": "from a_index | eval log(unsignedLongField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(*)", - "error": [ - "Using wildcards (*) in mv_min is not allowed" - ], + "query": "from a_index | eval var = log(unsignedLongField, to_double(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | sort mv_min(stringField)", + "query": "from a_index | eval var = log(unsignedLongField, integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_min(true)", + "query": "from a_index | eval log(unsignedLongField, integerField)", "error": [], "warning": [] }, { - "query": "row mv_min(true)", + "query": "from a_index | eval var = log(unsignedLongField, to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_min(to_boolean(true))", + "query": "from a_index | eval var = log(unsignedLongField, longField)", "error": [], "warning": [] }, { - "query": "row var = mv_min(now())", + "query": "from a_index | eval log(unsignedLongField, longField)", "error": [], "warning": [] }, { - "query": "row mv_min(now())", + "query": "from a_index | eval var = log(unsignedLongField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = mv_min(to_datetime(now()))", + "query": "from a_index | eval log(unsignedLongField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = mv_min(5)", - "error": [], + "query": "from a_index | eval log(doubleField, doubleField, extraArg)", + "error": [ + "Error: [log] function expects no more than 2 arguments, got 3." + ], "warning": [] }, { - "query": "row mv_min(5)", + "query": "from a_index | sort log(doubleField)", "error": [], "warning": [] }, { - "query": "row var = mv_min(to_integer(true))", + "query": "from a_index | eval log(null, null)", "error": [], "warning": [] }, { - "query": "row var = mv_min(to_ip(\"127.0.0.1\"))", + "query": "row nullVar = null | eval log(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row mv_min(to_ip(\"127.0.0.1\"))", + "query": "row var = log10(5.5)", "error": [], "warning": [] }, { - "query": "row var = mv_min(to_ip(to_ip(\"127.0.0.1\")))", + "query": "row log10(5.5)", "error": [], "warning": [] }, { - "query": "row var = mv_min(to_string(true))", + "query": "row var = log10(to_double(true))", "error": [], "warning": [] }, { - "query": "row var = mv_min(to_version(\"1.0.0\"))", + "query": "row var = log10(5)", "error": [], "warning": [] }, { - "query": "row mv_min(to_version(\"1.0.0\"))", + "query": "row log10(5)", "error": [], "warning": [] }, { - "query": "row var = mv_min(to_version(\"a\"))", + "query": "row var = log10(to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = mv_min(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "row var = log10(true)", "error": [ - "Argument of [mv_min] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]" + "Argument of [log10] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where mv_min(numberField) > 0", + "query": "from a_index | where log10(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where mv_min(cartesianPointField) > 0", + "query": "from a_index | where log10(booleanField) > 0", "error": [ - "Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Argument of [log10] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where length(mv_min(stringField)) > 0", + "query": "from a_index | where log10(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where length(mv_min(cartesianPointField)) > 0", - "error": [ - "Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]" - ], + "query": "from a_index | where log10(longField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(booleanField)", + "query": "from a_index | where log10(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_min(booleanField)", + "query": "from a_index | eval var = log10(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(to_boolean(booleanField))", + "query": "from a_index | eval log10(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_min(cartesianPointField)", + "query": "from a_index | eval var = log10(to_double(booleanField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval log10(booleanField)", "error": [ - "Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Argument of [log10] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = mv_min(dateField)", + "query": "from a_index | eval var = log10(*)", + "error": [ + "Using wildcards (*) in log10 is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = log10(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_min(dateField)", + "query": "from a_index | eval log10(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(to_datetime(dateField))", + "query": "from a_index | eval var = log10(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(numberField)", + "query": "from a_index | eval var = log10(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_min(numberField)", + "query": "from a_index | eval log10(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(to_integer(booleanField))", + "query": "from a_index | eval var = log10(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(ipField)", + "query": "from a_index | eval log10(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_min(ipField)", + "query": "from a_index | eval log10(doubleField, extraArg)", + "error": [ + "Error: [log10] function expects exactly one argument, got 2." + ], + "warning": [] + }, + { + "query": "from a_index | sort log10(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(to_ip(ipField))", + "query": "from a_index | eval log10(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(to_string(booleanField))", + "query": "row nullVar = null | eval log10(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(versionField)", + "query": "row var = ltrim(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_min(versionField)", + "query": "row ltrim(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_min(to_version(stringField))", + "query": "row var = ltrim(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_min(booleanField, extraArg)", + "query": "row var = ltrim(true)", "error": [ - "Error: [mv_min] function expects exactly one argument, got 2." + "Argument of [ltrim] must be [keyword], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort mv_min(booleanField)", + "query": "from a_index | eval var = ltrim(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_min(null)", + "query": "from a_index | eval ltrim(keywordField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_min(nullVar)", + "query": "from a_index | eval var = ltrim(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(\"a\", 5, 5)", - "error": [], + "query": "from a_index | eval ltrim(booleanField)", + "error": [ + "Argument of [ltrim] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row mv_slice(\"a\", 5, 5)", - "error": [], + "query": "from a_index | eval var = ltrim(*)", + "error": [ + "Using wildcards (*) in ltrim is not allowed" + ], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(stringField, numberField, numberField)", + "query": "from a_index | eval var = ltrim(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(stringField, numberField, numberField)", + "query": "from a_index | eval ltrim(textField)", "error": [], "warning": [] }, { - "query": "from a_index | sort mv_slice(stringField, numberField, numberField)", - "error": [], + "query": "from a_index | eval ltrim(keywordField, extraArg)", + "error": [ + "Error: [ltrim] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "row var = mv_slice(true, 5, 5)", + "query": "from a_index | sort ltrim(keywordField)", "error": [], "warning": [] }, { - "query": "row mv_slice(true, 5, 5)", + "query": "from a_index | eval ltrim(null)", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_boolean(true), to_integer(true), to_integer(true))", + "query": "row nullVar = null | eval ltrim(nullVar)", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_cartesianpoint(\"POINT (30 10)\"), 5, 5)", + "query": "row var = mv_append(true, true)", "error": [], "warning": [] }, { - "query": "row mv_slice(to_cartesianpoint(\"POINT (30 10)\"), 5, 5)", + "query": "row mv_append(true, true)", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_integer(true), to_integer(true))", + "query": "row var = mv_append(to_boolean(true), to_boolean(true))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_cartesianshape(\"POINT (30 10)\"), 5, 5)", - "error": [], + "query": "row var = mv_append(cartesianPointField, cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row mv_slice(to_cartesianshape(\"POINT (30 10)\"), 5, 5)", + "query": "row mv_append(cartesianPointField, cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], + "warning": [] + }, + { + "query": "row var = mv_append(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], + "warning": [] + }, + { + "query": "row var = mv_append(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_integer(true), to_integer(true))", + "query": "row mv_append(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(now(), 5, 5)", + "query": "row var = mv_append(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], + "warning": [] + }, + { + "query": "row var = mv_append(to_datetime(\"2021-01-01T00:00:00Z\"), to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "row mv_slice(now(), 5, 5)", + "query": "row mv_append(to_datetime(\"2021-01-01T00:00:00Z\"), to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_datetime(now()), to_integer(true), to_integer(true))", + "query": "row var = mv_append(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")), to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(5, 5, 5)", + "query": "row var = mv_append(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "row mv_slice(5, 5, 5)", + "query": "row mv_append(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_integer(true), to_integer(true), to_integer(true))", + "query": "row var = mv_append(to_double(true), to_double(true))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_geopoint(\"POINT (30 10)\"), 5, 5)", + "query": "row var = mv_append(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], + "warning": [] + }, + { + "query": "row mv_append(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], + "warning": [] + }, + { + "query": "row var = mv_append(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], + "warning": [] + }, + { + "query": "row var = mv_append(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row mv_slice(to_geopoint(\"POINT (30 10)\"), 5, 5)", + "query": "row mv_append(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_integer(true), to_integer(true))", + "query": "row var = mv_append(to_geoshape(geoPointField), to_geoshape(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], + "warning": [] + }, + { + "query": "row var = mv_append(5, 5)", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_geoshape(\"POINT (30 10)\"), 5, 5)", + "query": "row mv_append(5, 5)", "error": [], "warning": [] }, { - "query": "row mv_slice(to_geoshape(\"POINT (30 10)\"), 5, 5)", + "query": "row var = mv_append(to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_integer(true), to_integer(true))", + "query": "row var = mv_append(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_ip(\"127.0.0.1\"), 5, 5)", + "query": "row mv_append(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "row mv_slice(to_ip(\"127.0.0.1\"), 5, 5)", + "query": "row var = mv_append(to_ip(to_ip(\"127.0.0.1\")), to_ip(to_ip(\"127.0.0.1\")))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_ip(to_ip(\"127.0.0.1\")), to_integer(true), to_integer(true))", + "query": "row var = mv_append(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_string(true), to_integer(true), to_integer(true))", + "query": "row mv_append(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_version(\"1.0.0\"), 5, 5)", + "query": "row var = mv_append(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "row mv_slice(to_version(\"1.0.0\"), 5, 5)", + "query": "row var = mv_append(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_version(\"a\"), to_integer(true), to_integer(true))", + "query": "row mv_append(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "row var = mv_slice(to_version(\"1.0.0\"), true, true)", - "error": [ - "Argument of [mv_slice] must be [number], found value [true] type [boolean]", - "Argument of [mv_slice] must be [number], found value [true] type [boolean]" - ], + "query": "row var = mv_append(to_version(\"a\"), to_version(\"a\"))", + "error": [], "warning": [] }, { - "query": "from a_index | where mv_slice(numberField, numberField, numberField) > 0", + "query": "from a_index | where mv_append(doubleField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where mv_slice(numberField, booleanField, booleanField) > 0", + "query": "from a_index | where mv_append(counterDoubleField, counterDoubleField) > 0", "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]" + "Argument of [mv_append] must be [boolean], found value [counterDoubleField] type [counter_double]", + "Argument of [mv_append] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | where length(mv_slice(stringField, numberField, numberField)) > 0", + "query": "from a_index | where mv_append(integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where length(mv_slice(stringField, booleanField, booleanField)) > 0", - "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]" - ], + "query": "from a_index | where mv_append(longField, longField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(booleanField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(booleanField, booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(booleanField, numberField, numberField)", + "query": "from a_index | eval mv_append(booleanField, booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_boolean(booleanField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval var = mv_append(to_boolean(booleanField), to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(booleanField, booleanField, booleanField)", + "query": "from a_index | eval mv_append(counterDoubleField, counterDoubleField)", "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]" + "Argument of [mv_append] must be [boolean], found value [counterDoubleField] type [counter_double]", + "Argument of [mv_append] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(cartesianPointField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(cartesianPointField, numberField, numberField)", + "query": "from a_index | eval mv_append(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_cartesianpoint(cartesianPointField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval var = mv_append(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_append(cartesianShapeField, cartesianShapeField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(cartesianShapeField, numberField, numberField)", + "query": "from a_index | eval mv_append(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(cartesianShapeField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_cartesianshape(cartesianPointField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval var = mv_append(dateField, dateField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval mv_append(dateField, dateField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(dateField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(to_datetime(dateField), to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(dateField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_datetime(dateField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval mv_append(doubleField, doubleField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_append(to_double(booleanField), to_double(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(numberField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(numberField, numberField, numberField)", + "query": "from a_index | eval mv_append(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_integer(booleanField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval var = mv_append(to_geopoint(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(numberField, 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]" - ], + "query": "from a_index | eval var = mv_append(geoShapeField, geoShapeField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(geoPointField, numberField, numberField)", + "query": "from a_index | eval mv_append(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(geoPointField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(to_geoshape(geoPointField), to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_geopoint(geoPointField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval var = mv_append(integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(geoPointField, 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]" - ], + "query": "from a_index | eval mv_append(integerField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(geoShapeField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(geoShapeField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(ipField, ipField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_geoshape(geoPointField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval mv_append(ipField, ipField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(geoShapeField, 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]" - ], + "query": "from a_index | eval var = mv_append(to_ip(ipField), to_ip(ipField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(ipField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(ipField, numberField, numberField)", + "query": "from a_index | eval mv_append(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval var = mv_append(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_append(longField, longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval mv_append(longField, longField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_append(textField, textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(versionField, numberField, numberField)", + "query": "from a_index | eval mv_append(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(versionField, numberField, numberField)", + "query": "from a_index | eval var = mv_append(versionField, versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_slice(to_version(stringField), to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval mv_append(versionField, versionField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_append(to_version(keywordField), to_version(keywordField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(booleanField, numberField, numberField, extraArg)", + "query": "from a_index | eval mv_append(booleanField, booleanField, extraArg)", "error": [ - "Error: [mv_slice] function expects no more than 3 arguments, got 4." + "Error: [mv_append] function expects exactly 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | sort mv_slice(booleanField, numberField, numberField)", + "query": "from a_index | sort mv_append(booleanField, booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_slice(null, null, null)", + "query": "from a_index | eval mv_append(null, null)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_slice(nullVar, nullVar, nullVar)", + "query": "row nullVar = null | eval mv_append(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row var = mv_sort(\"a\", \"asc\")", + "query": "from a_index | eval mv_append(\"2022\", \"2022\")", "error": [], "warning": [] }, { - "query": "row mv_sort(\"a\", \"asc\")", + "query": "from a_index | eval mv_append(concat(\"20\", \"22\"), concat(\"20\", \"22\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_sort(stringField, \"asc\")", + "query": "row var = mv_avg(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sort(stringField, \"asc\")", + "query": "row mv_avg(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | sort mv_sort(stringField, \"asc\")", + "query": "row var = mv_avg(to_double(true))", "error": [], "warning": [] }, { - "query": "row var = mv_sort(true, \"asc\")", + "query": "row var = mv_avg(5)", "error": [], "warning": [] }, { - "query": "row mv_sort(true, \"asc\")", + "query": "row mv_avg(5)", "error": [], "warning": [] }, { - "query": "row var = mv_sort(now(), \"asc\")", + "query": "row var = mv_avg(to_integer(true))", "error": [], "warning": [] }, { - "query": "row mv_sort(now(), \"asc\")", - "error": [], + "query": "row var = mv_avg(true)", + "error": [ + "Argument of [mv_avg] must be [double], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = mv_sort(5, \"asc\")", + "query": "from a_index | where mv_avg(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row mv_sort(5, \"asc\")", - "error": [], + "query": "from a_index | where mv_avg(booleanField) > 0", + "error": [ + "Argument of [mv_avg] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = mv_sort(to_ip(\"127.0.0.1\"), \"asc\")", + "query": "from a_index | where mv_avg(integerField) > 0", "error": [], "warning": [] }, { - "query": "row mv_sort(to_ip(\"127.0.0.1\"), \"asc\")", + "query": "from a_index | where mv_avg(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_sort(to_version(\"1.0.0\"), \"asc\")", + "query": "from a_index | where mv_avg(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row mv_sort(to_version(\"1.0.0\"), \"asc\")", + "query": "from a_index | eval var = mv_avg(doubleField)", "error": [], "warning": [] }, { - "query": "row var = mv_sort(to_cartesianpoint(\"POINT (30 10)\"), true)", - "error": [ - "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]" - ], + "query": "from a_index | eval mv_avg(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | where mv_sort(numberField, \"asc\") > 0", + "query": "from a_index | eval var = mv_avg(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | where mv_sort(cartesianPointField, booleanField) > 0", + "query": "from a_index | eval mv_avg(booleanField)", "error": [ - "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]" + "Argument of [mv_avg] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where length(mv_sort(stringField, \"asc\")) > 0", - "error": [], - "warning": [] - }, - { - "query": "from a_index | where length(mv_sort(cartesianPointField, booleanField)) > 0", + "query": "from a_index | eval var = mv_avg(*)", "error": [ - "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]" + "Using wildcards (*) in mv_avg is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = mv_sort(booleanField, \"asc\")", + "query": "from a_index | eval var = mv_avg(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sort(booleanField, \"asc\")", + "query": "from a_index | eval mv_avg(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_sort(dateField, \"asc\")", + "query": "from a_index | eval var = mv_avg(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sort(dateField, \"asc\")", + "query": "from a_index | eval var = mv_avg(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_sort(numberField, \"asc\")", + "query": "from a_index | eval mv_avg(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sort(numberField, \"asc\")", + "query": "from a_index | eval var = mv_avg(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_sort(ipField, \"asc\")", + "query": "from a_index | eval mv_avg(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sort(ipField, \"asc\")", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval var = mv_sort(versionField, \"asc\")", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval mv_sort(versionField, \"asc\")", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval mv_sort(booleanField, \"asc\", extraArg)", + "query": "from a_index | eval mv_avg(doubleField, extraArg)", "error": [ - "Error: [mv_sort] function expects no more than 2 arguments, got 3." + "Error: [mv_avg] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | sort mv_sort(booleanField, \"asc\")", + "query": "from a_index | sort mv_avg(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sort(null, null)", + "query": "from a_index | eval mv_avg(null)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_sort(nullVar, nullVar)", + "query": "row nullVar = null | eval mv_avg(nullVar)", "error": [], "warning": [] }, { - "query": "row var = mv_sum(5)", + "query": "row var = mv_concat(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row mv_sum(5)", + "query": "row mv_concat(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "row var = mv_sum(to_integer(\"a\"))", + "query": "row var = mv_concat(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "row var = mv_sum(\"a\")", + "query": "row var = mv_concat(true, true)", "error": [ - "Argument of [mv_sum] must be [number], found value [\"a\"] type [string]" + "Argument of [mv_concat] must be [keyword], found value [true] type [boolean]", + "Argument of [mv_concat] must be [keyword], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where mv_sum(numberField) > 0", + "query": "from a_index | eval var = mv_concat(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_sum(stringField) > 0", - "error": [ - "Argument of [mv_sum] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval mv_concat(keywordField, keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_sum(numberField)", + "query": "from a_index | eval var = mv_concat(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sum(numberField)", - "error": [], + "query": "from a_index | eval mv_concat(booleanField, booleanField)", + "error": [ + "Argument of [mv_concat] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [mv_concat] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = mv_sum(to_integer(stringField))", + "query": "from a_index | eval var = mv_concat(keywordField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sum(stringField)", - "error": [ - "Argument of [mv_sum] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval mv_concat(keywordField, textField)", + "error": [], "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 = mv_concat(textField, keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_sum(*)", - "error": [ - "Using wildcards (*) in mv_sum is not allowed" - ], + "query": "from a_index | eval mv_concat(textField, keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort mv_sum(numberField)", + "query": "from a_index | eval var = mv_concat(textField, textField)", "error": [], "warning": [] }, { - "query": "row var = mv_sum(to_integer(true))", + "query": "from a_index | eval mv_concat(textField, textField)", "error": [], "warning": [] }, { - "query": "row var = mv_sum(true)", + "query": "from a_index | eval mv_concat(keywordField, keywordField, extraArg)", "error": [ - "Argument of [mv_sum] must be [number], found value [true] type [boolean]" + "Error: [mv_concat] function expects exactly 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | where mv_sum(booleanField) > 0", - "error": [ - "Argument of [mv_sum] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | sort mv_concat(keywordField, keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_sum(to_integer(booleanField))", + "query": "from a_index | eval mv_concat(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sum(booleanField)", - "error": [ - "Argument of [mv_sum] must be [number], found value [booleanField] type [boolean]" - ], + "query": "row nullVar = null | eval mv_concat(nullVar, nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | eval mv_sum(null)", + "query": "row var = mv_count(true)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_sum(nullVar)", + "query": "row mv_count(true)", "error": [], "warning": [] }, { - "query": "row var = mv_zip(\"a\", \"a\", \"a\")", + "query": "row var = mv_count(to_boolean(true))", "error": [], "warning": [] }, { - "query": "row var = mv_zip(\"a\", \"a\")", - "error": [], + "query": "row var = mv_count(cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row mv_zip(\"a\", \"a\", \"a\")", - "error": [], + "query": "row mv_count(cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row mv_zip(\"a\", \"a\")", + "query": "row var = mv_count(to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]" + ], + "warning": [] + }, + { + "query": "row var = mv_count(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = mv_zip(to_string(\"a\"), to_string(\"a\"), to_string(\"a\"))", + "query": "row mv_count(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = mv_zip(5, 5, 5)", + "query": "row var = mv_count(to_cartesianshape(cartesianPointField))", "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]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | where length(mv_zip(stringField, stringField, stringField)) > 0", + "query": "row var = mv_count(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "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]" - ], + "query": "row mv_count(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_zip(stringField, stringField, stringField)", + "query": "row var = mv_count(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_zip(stringField, stringField)", + "query": "row var = mv_count(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_zip(stringField, stringField, stringField)", + "query": "row mv_count(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_zip(to_string(stringField), to_string(stringField), to_string(stringField))", + "query": "row var = mv_count(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_zip(numberField, numberField, numberField)", + "query": "row var = mv_count(geoPointField)", "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]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval mv_zip(stringField, stringField, stringField, extraArg)", + "query": "row mv_count(geoPointField)", "error": [ - "Error: [mv_zip] function expects no more than 3 arguments, got 4." + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | sort mv_zip(stringField, stringField, stringField)", - "error": [], - "warning": [] - }, - { - "query": "row var = mv_zip(to_string(true), to_string(true), to_string(true))", - "error": [], - "warning": [] - }, - { - "query": "row var = mv_zip(true, true, true)", + "query": "row var = mv_count(to_geopoint(geoPointField))", "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]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "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]" - ], + "query": "row var = mv_count(to_geoshape(\"POINT (30 10)\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_zip(to_string(booleanField), to_string(booleanField), to_string(booleanField))", + "query": "row mv_count(to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_zip(booleanField, booleanField, booleanField)", + "query": "row var = mv_count(to_geoshape(geoPointField))", "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]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval mv_zip(null, null, null)", + "query": "row var = mv_count(5)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval mv_zip(nullVar, nullVar, nullVar)", + "query": "row mv_count(5)", "error": [], "warning": [] }, { - "query": "row var = mv_zip(to_string(true), to_string(true))", + "query": "row var = mv_count(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | where length(mv_zip(stringField, stringField)) > 0", + "query": "row var = mv_count(to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | where length(mv_zip(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]" - ], + "query": "row mv_count(to_ip(\"127.0.0.1\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_zip(stringField, stringField)", + "query": "row var = mv_count(to_ip(to_ip(\"127.0.0.1\")))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_zip(to_string(booleanField), to_string(booleanField))", + "query": "row var = mv_count(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_zip(booleanField, booleanField)", - "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]" - ], + "query": "row mv_count(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | sort mv_zip(stringField, stringField)", + "query": "row var = mv_count(to_string(true))", "error": [], "warning": [] }, { - "query": "row var = now()", + "query": "row var = mv_count(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "row now()", + "query": "row mv_count(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = now()", + "query": "row var = mv_count(to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval now()", + "query": "from a_index | where mv_count(booleanField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval now(extraArg)", + "query": "from a_index | where mv_count(counterDoubleField) > 0", "error": [ - "Error: [now] function expects exactly 0 arguments, got 1." + "Argument of [mv_count] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | sort now()", + "query": "from a_index | where mv_count(cartesianPointField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval now()", + "query": "from a_index | where mv_count(cartesianShapeField) > 0", "error": [], "warning": [] }, { - "query": "row var = pi()", + "query": "from a_index | where mv_count(dateField) > 0", "error": [], "warning": [] }, { - "query": "row pi()", + "query": "from a_index | where mv_count(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where pi() > 0", + "query": "from a_index | where mv_count(geoPointField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = pi()", + "query": "from a_index | where mv_count(geoShapeField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval pi()", + "query": "from a_index | where mv_count(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval pi(extraArg)", - "error": [ - "Error: [pi] function expects exactly 0 arguments, got 1." - ], - "warning": [] - }, - { - "query": "from a_index | sort pi()", + "query": "from a_index | where mv_count(ipField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval pi()", + "query": "from a_index | where mv_count(keywordField) > 0", "error": [], "warning": [] }, { - "query": "row var = pow(5, 5)", + "query": "from a_index | where mv_count(longField) > 0", "error": [], "warning": [] }, { - "query": "row pow(5, 5)", + "query": "from a_index | where mv_count(textField) > 0", "error": [], "warning": [] }, { - "query": "row var = pow(to_integer(\"a\"), to_integer(\"a\"))", + "query": "from a_index | where mv_count(unsignedLongField) > 0", "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]" - ], - "warning": [] - }, - { - "query": "from a_index | where pow(numberField, numberField) > 0", + "query": "from a_index | where mv_count(versionField) > 0", "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]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = pow(numberField, numberField)", + "query": "from a_index | eval var = mv_count(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval pow(numberField, numberField)", + "query": "from a_index | eval mv_count(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = pow(to_integer(stringField), to_integer(stringField))", + "query": "from a_index | eval var = mv_count(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval pow(stringField, stringField)", + "query": "from a_index | eval mv_count(counterDoubleField)", "error": [ - "Argument of [pow] must be [number], found value [stringField] type [string]", - "Argument of [pow] must be [number], found value [stringField] type [string]" + "Argument of [mv_count] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | eval pow(numberField, numberField, extraArg)", + "query": "from a_index | eval var = mv_count(*)", "error": [ - "Error: [pow] function expects exactly 2 arguments, got 3." + "Using wildcards (*) in mv_count is not allowed" ], "warning": [] }, { - "query": "from a_index | sort pow(numberField, numberField)", + "query": "from a_index | eval var = mv_count(cartesianPointField)", "error": [], "warning": [] }, { - "query": "row var = pow(to_integer(true), to_integer(true))", + "query": "from a_index | eval mv_count(cartesianPointField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_count(to_cartesianpoint(cartesianPointField))", + "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_count(cartesianShapeField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = pow(to_integer(booleanField), to_integer(booleanField))", + "query": "from a_index | eval mv_count(cartesianShapeField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_count(to_cartesianshape(cartesianPointField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval pow(null, null)", + "query": "from a_index | eval var = mv_count(dateField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval pow(nullVar, nullVar)", + "query": "from a_index | eval mv_count(dateField)", "error": [], "warning": [] }, { - "query": "row var = replace(\"a\", \"a\", \"a\")", + "query": "from a_index | eval var = mv_count(to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "row replace(\"a\", \"a\", \"a\")", + "query": "from a_index | eval var = mv_count(doubleField)", "error": [], "warning": [] }, { - "query": "row var = replace(to_string(\"a\"), to_string(\"a\"), to_string(\"a\"))", + "query": "from a_index | eval mv_count(doubleField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_count(to_double(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | where length(replace(stringField, stringField, stringField)) > 0", + "query": "from a_index | eval var = mv_count(geoPointField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval mv_count(geoPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = replace(stringField, stringField, stringField)", + "query": "from a_index | eval var = mv_count(to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval replace(stringField, stringField, stringField)", + "query": "from a_index | eval var = mv_count(geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = replace(to_string(stringField), to_string(stringField), to_string(stringField))", + "query": "from a_index | eval mv_count(geoShapeField)", "error": [], "warning": [] }, { - "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]" - ], + "query": "from a_index | eval var = mv_count(to_geoshape(geoPointField))", + "error": [], "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 | eval var = mv_count(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort replace(stringField, stringField, stringField)", + "query": "from a_index | eval mv_count(integerField)", "error": [], "warning": [] }, { - "query": "row var = replace(to_string(true), to_string(true), to_string(true))", + "query": "from a_index | eval var = mv_count(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = replace(true, true, true)", - "error": [ - "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]" - ], + "query": "from a_index | eval var = mv_count(ipField)", + "error": [], "warning": [] }, { - "query": "from a_index | where length(replace(booleanField, booleanField, booleanField)) > 0", - "error": [ - "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]" - ], + "query": "from a_index | eval mv_count(ipField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = replace(to_string(booleanField), to_string(booleanField), to_string(booleanField))", + "query": "from a_index | eval var = mv_count(to_ip(ipField))", "error": [], "warning": [] }, { - "query": "from a_index | eval replace(booleanField, booleanField, booleanField)", - "error": [ - "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]" - ], + "query": "from a_index | eval var = mv_count(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval replace(null, null, null)", + "query": "from a_index | eval mv_count(keywordField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval replace(nullVar, nullVar, nullVar)", + "query": "from a_index | eval var = mv_count(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = right(\"a\", 5)", + "query": "from a_index | eval var = mv_count(longField)", "error": [], "warning": [] }, { - "query": "row right(\"a\", 5)", + "query": "from a_index | eval mv_count(longField)", "error": [], "warning": [] }, { - "query": "row var = right(to_string(\"a\"), to_integer(\"a\"))", + "query": "from a_index | eval var = mv_count(textField)", "error": [], "warning": [] }, { - "query": "row var = right(5, \"a\")", - "error": [ - "Argument of [right] must be [string], found value [5] type [number]", - "Argument of [right] must be [number], found value [\"a\"] type [string]" - ], + "query": "from a_index | eval mv_count(textField)", + "error": [], "warning": [] }, { - "query": "from a_index | where length(right(stringField, numberField)) > 0", + "query": "from a_index | eval var = mv_count(unsignedLongField)", "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]" - ], + "query": "from a_index | eval mv_count(unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = right(stringField, numberField)", + "query": "from a_index | eval var = mv_count(versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval right(stringField, numberField)", + "query": "from a_index | eval mv_count(versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = right(to_string(stringField), to_integer(stringField))", + "query": "from a_index | eval var = mv_count(to_version(keywordField))", "error": [], "warning": [] }, { - "query": "from a_index | eval right(numberField, stringField)", + "query": "from a_index | eval mv_count(booleanField, extraArg)", "error": [ - "Argument of [right] must be [string], found value [numberField] type [number]", - "Argument of [right] must be [number], found value [stringField] type [string]" + "Error: [mv_count] function expects exactly one argument, got 2." ], "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)", + "query": "from a_index | sort mv_count(booleanField)", "error": [], "warning": [] }, { - "query": "row var = right(to_string(true), to_integer(true))", + "query": "from a_index | eval mv_count(null)", "error": [], "warning": [] }, { - "query": "row var = right(true, true)", - "error": [ - "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 length(right(booleanField, booleanField)) > 0", - "error": [ - "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 | eval var = right(to_string(booleanField), to_integer(booleanField))", + "query": "row nullVar = null | eval mv_count(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval right(booleanField, booleanField)", - "error": [ - "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 | eval right(null, null)", + "query": "from a_index | eval mv_count(\"2022\")", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval right(nullVar, nullVar)", + "query": "from a_index | eval mv_count(concat(\"20\", \"22\"))", "error": [], "warning": [] }, { - "query": "row var = round(5, 5)", + "query": "row var = mv_dedupe(true)", "error": [], "warning": [] }, { - "query": "row round(5, 5)", + "query": "row mv_dedupe(true)", "error": [], "warning": [] }, { - "query": "row var = round(to_integer(\"a\"), to_integer(\"a\"))", + "query": "row var = mv_dedupe(to_boolean(true))", "error": [], "warning": [] }, { - "query": "row var = round(\"a\", \"a\")", + "query": "row var = mv_dedupe(cartesianPointField)", "error": [ - "Argument of [round] must be [number], found value [\"a\"] type [string]", - "Argument of [round] must be [number], found value [\"a\"] type [string]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | where round(numberField, numberField) > 0", - "error": [], - "warning": [] - }, - { - "query": "from a_index | where round(stringField, stringField) > 0", + "query": "row mv_dedupe(cartesianPointField)", "error": [ - "Argument of [round] must be [number], found value [stringField] type [string]", - "Argument of [round] must be [number], found value [stringField] type [string]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = round(numberField, numberField)", - "error": [], + "query": "row var = mv_dedupe(to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval round(numberField, numberField)", + "query": "row var = mv_dedupe(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = round(to_integer(stringField), to_integer(stringField))", + "query": "row mv_dedupe(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval round(stringField, stringField)", + "query": "row var = mv_dedupe(to_cartesianshape(cartesianPointField))", "error": [ - "Argument of [round] must be [number], found value [stringField] type [string]", - "Argument of [round] must be [number], found value [stringField] type [string]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval round(numberField, numberField, extraArg)", - "error": [ - "Error: [round] function expects no more than 2 arguments, got 3." - ], + "query": "row var = mv_dedupe(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | sort round(numberField, numberField)", + "query": "row mv_dedupe(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "row var = round(5)", + "query": "row var = mv_dedupe(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", "error": [], "warning": [] }, { - "query": "row round(5)", + "query": "row var = mv_dedupe(5.5)", "error": [], "warning": [] }, { - "query": "row var = round(to_integer(true))", + "query": "row mv_dedupe(5.5)", "error": [], "warning": [] }, { - "query": "row var = round(to_integer(true), to_integer(true))", + "query": "row var = mv_dedupe(to_double(true))", "error": [], "warning": [] }, { - "query": "row var = round(true, true)", + "query": "row var = mv_dedupe(geoPointField)", "error": [ - "Argument of [round] must be [number], found value [true] type [boolean]", - "Argument of [round] must be [number], found value [true] type [boolean]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | where round(numberField) > 0", - "error": [], + "query": "row mv_dedupe(geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | where round(booleanField) > 0", + "query": "row var = mv_dedupe(to_geopoint(geoPointField))", "error": [ - "Argument of [round] must be [number], found value [booleanField] type [boolean]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | where round(booleanField, booleanField) > 0", + "query": "row var = mv_dedupe(to_geoshape(\"POINT (30 10)\"))", + "error": [], + "warning": [] + }, + { + "query": "row mv_dedupe(to_geoshape(\"POINT (30 10)\"))", + "error": [], + "warning": [] + }, + { + "query": "row var = mv_dedupe(to_geoshape(geoPointField))", "error": [ - "Argument of [round] must be [number], found value [booleanField] type [boolean]", - "Argument of [round] must be [number], found value [booleanField] type [boolean]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = round(numberField)", + "query": "row var = mv_dedupe(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval round(numberField)", + "query": "row mv_dedupe(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = round(to_integer(booleanField))", + "query": "row var = mv_dedupe(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval round(booleanField)", - "error": [ - "Argument of [round] must be [number], found value [booleanField] type [boolean]" - ], + "query": "row var = mv_dedupe(to_ip(\"127.0.0.1\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = round(*)", - "error": [ - "Using wildcards (*) in round is not allowed" - ], + "query": "row mv_dedupe(to_ip(\"127.0.0.1\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = round(to_integer(booleanField), to_integer(booleanField))", + "query": "row var = mv_dedupe(to_ip(to_ip(\"127.0.0.1\")))", "error": [], "warning": [] }, { - "query": "from a_index | eval round(booleanField, booleanField)", - "error": [ - "Argument of [round] must be [number], found value [booleanField] type [boolean]", - "Argument of [round] must be [number], found value [booleanField] type [boolean]" - ], + "query": "row var = mv_dedupe(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | sort round(numberField)", + "query": "row mv_dedupe(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval round(null, null)", + "query": "row var = mv_dedupe(to_string(true))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval round(nullVar, nullVar)", + "query": "row var = mv_dedupe(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "row var = rtrim(\"a\")", + "query": "row mv_dedupe(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "row rtrim(\"a\")", + "query": "row var = mv_dedupe(to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "row var = rtrim(to_string(\"a\"))", + "query": "from a_index | where mv_dedupe(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = rtrim(5)", + "query": "from a_index | where mv_dedupe(counterDoubleField) > 0", "error": [ - "Argument of [rtrim] must be [string], found value [5] type [number]" + "Argument of [mv_dedupe] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | where length(rtrim(stringField)) > 0", + "query": "from a_index | where mv_dedupe(integerField) > 0", "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 | where mv_dedupe(longField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = rtrim(stringField)", + "query": "from a_index | eval var = mv_dedupe(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval rtrim(stringField)", + "query": "from a_index | eval mv_dedupe(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = rtrim(to_string(stringField))", + "query": "from a_index | eval var = mv_dedupe(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval rtrim(numberField)", + "query": "from a_index | eval mv_dedupe(counterDoubleField)", "error": [ - "Argument of [rtrim] must be [string], found value [numberField] type [number]" + "Argument of [mv_dedupe] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | eval rtrim(stringField, extraArg)", + "query": "from a_index | eval var = mv_dedupe(*)", "error": [ - "Error: [rtrim] function expects exactly one argument, got 2." + "Using wildcards (*) in mv_dedupe is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = rtrim(*)", - "error": [ - "Using wildcards (*) in rtrim is not allowed" - ], + "query": "from a_index | eval var = mv_dedupe(cartesianPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort rtrim(stringField)", + "query": "from a_index | eval mv_dedupe(cartesianPointField)", "error": [], "warning": [] }, { - "query": "row var = rtrim(to_string(true))", + "query": "from a_index | eval var = mv_dedupe(to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row var = rtrim(true)", - "error": [ - "Argument of [rtrim] must be [string], found value [true] type [boolean]" - ], + "query": "from a_index | eval var = mv_dedupe(cartesianShapeField)", + "error": [], "warning": [] }, { - "query": "from a_index | where length(rtrim(booleanField)) > 0", - "error": [ - "Argument of [rtrim] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval mv_dedupe(cartesianShapeField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = rtrim(to_string(booleanField))", + "query": "from a_index | eval var = mv_dedupe(to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval rtrim(booleanField)", - "error": [ - "Argument of [rtrim] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = mv_dedupe(dateField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval rtrim(null)", + "query": "from a_index | eval mv_dedupe(dateField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval rtrim(nullVar)", + "query": "from a_index | eval var = mv_dedupe(to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "row var = signum(5)", + "query": "from a_index | eval var = mv_dedupe(doubleField)", "error": [], "warning": [] }, { - "query": "row signum(5)", + "query": "from a_index | eval mv_dedupe(doubleField)", "error": [], "warning": [] }, { - "query": "row var = signum(to_integer(\"a\"))", + "query": "from a_index | eval var = mv_dedupe(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = signum(\"a\")", - "error": [ - "Argument of [signum] must be [number], found value [\"a\"] type [string]" - ], + "query": "from a_index | eval var = mv_dedupe(geoPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | where signum(numberField) > 0", + "query": "from a_index | eval mv_dedupe(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | where signum(stringField) > 0", - "error": [ - "Argument of [signum] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = mv_dedupe(to_geopoint(geoPointField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = signum(numberField)", + "query": "from a_index | eval var = mv_dedupe(geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval signum(numberField)", + "query": "from a_index | eval mv_dedupe(geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = signum(to_integer(stringField))", + "query": "from a_index | eval var = mv_dedupe(to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval signum(stringField)", - "error": [ - "Argument of [signum] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = mv_dedupe(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval signum(numberField, extraArg)", - "error": [ - "Error: [signum] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval mv_dedupe(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = signum(*)", - "error": [ - "Using wildcards (*) in signum is not allowed" - ], + "query": "from a_index | eval var = mv_dedupe(to_integer(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | sort signum(numberField)", + "query": "from a_index | eval var = mv_dedupe(ipField)", "error": [], "warning": [] }, { - "query": "row var = signum(to_integer(true))", + "query": "from a_index | eval mv_dedupe(ipField)", "error": [], "warning": [] }, { - "query": "row var = signum(true)", - "error": [ - "Argument of [signum] must be [number], found value [true] type [boolean]" - ], + "query": "from a_index | eval var = mv_dedupe(to_ip(ipField))", + "error": [], "warning": [] }, { - "query": "from a_index | where signum(booleanField) > 0", - "error": [ - "Argument of [signum] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = mv_dedupe(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = signum(to_integer(booleanField))", + "query": "from a_index | eval mv_dedupe(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval signum(booleanField)", - "error": [ - "Argument of [signum] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = mv_dedupe(to_string(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval signum(null)", + "query": "from a_index | eval var = mv_dedupe(longField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval signum(nullVar)", + "query": "from a_index | eval mv_dedupe(longField)", "error": [], "warning": [] }, { - "query": "row var = sin(5)", + "query": "from a_index | eval var = mv_dedupe(textField)", "error": [], "warning": [] }, { - "query": "row sin(5)", + "query": "from a_index | eval mv_dedupe(textField)", "error": [], "warning": [] }, { - "query": "row var = sin(to_integer(\"a\"))", + "query": "from a_index | eval var = mv_dedupe(versionField)", "error": [], "warning": [] }, { - "query": "row var = sin(\"a\")", - "error": [ - "Argument of [sin] must be [number], found value [\"a\"] type [string]" - ], + "query": "from a_index | eval mv_dedupe(versionField)", + "error": [], "warning": [] }, { - "query": "from a_index | where sin(numberField) > 0", + "query": "from a_index | eval var = mv_dedupe(to_version(keywordField))", "error": [], "warning": [] }, { - "query": "from a_index | where sin(stringField) > 0", + "query": "from a_index | eval mv_dedupe(booleanField, extraArg)", "error": [ - "Argument of [sin] must be [number], found value [stringField] type [string]" + "Error: [mv_dedupe] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = sin(numberField)", + "query": "from a_index | sort mv_dedupe(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval sin(numberField)", + "query": "from a_index | eval mv_dedupe(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = sin(to_integer(stringField))", + "query": "row nullVar = null | eval mv_dedupe(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval sin(stringField)", - "error": [ - "Argument of [sin] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval mv_dedupe(\"2022\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval sin(numberField, extraArg)", - "error": [ - "Error: [sin] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval mv_dedupe(concat(\"20\", \"22\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = sin(*)", - "error": [ - "Using wildcards (*) in sin is not allowed" - ], + "query": "row var = mv_first(true)", + "error": [], "warning": [] }, { - "query": "from a_index | sort sin(numberField)", + "query": "row mv_first(true)", "error": [], "warning": [] }, { - "query": "row var = sin(to_integer(true))", + "query": "row var = mv_first(to_boolean(true))", "error": [], "warning": [] }, { - "query": "row var = sin(true)", + "query": "row var = mv_first(cartesianPointField)", "error": [ - "Argument of [sin] must be [number], found value [true] type [boolean]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | where sin(booleanField) > 0", + "query": "row mv_first(cartesianPointField)", "error": [ - "Argument of [sin] must be [number], found value [booleanField] type [boolean]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = sin(to_integer(booleanField))", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval sin(booleanField)", + "query": "row var = mv_first(to_cartesianpoint(cartesianPointField))", "error": [ - "Argument of [sin] must be [number], found value [booleanField] type [boolean]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval sin(null)", + "query": "row var = mv_first(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval sin(nullVar)", + "query": "row mv_first(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = sinh(5)", - "error": [], + "query": "row var = mv_first(to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row sinh(5)", + "query": "row var = mv_first(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "row var = sinh(to_integer(\"a\"))", + "query": "row mv_first(to_datetime(\"2021-01-01T00:00:00Z\"))", "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", + "query": "row var = mv_first(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", "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)", + "query": "row var = mv_first(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval sinh(numberField)", + "query": "row mv_first(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = sinh(to_integer(stringField))", + "query": "row var = mv_first(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval sinh(stringField)", + "query": "row var = mv_first(geoPointField)", "error": [ - "Argument of [sinh] must be [number], found value [stringField] type [string]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval sinh(numberField, extraArg)", + "query": "row mv_first(geoPointField)", "error": [ - "Error: [sinh] function expects exactly one argument, got 2." + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = sinh(*)", + "query": "row var = mv_first(to_geopoint(geoPointField))", "error": [ - "Using wildcards (*) in sinh is not allowed" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | sort sinh(numberField)", + "query": "row var = mv_first(to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = sinh(to_integer(true))", + "query": "row mv_first(to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = sinh(true)", + "query": "row var = mv_first(to_geoshape(geoPointField))", "error": [ - "Argument of [sinh] must be [number], found value [true] type [boolean]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | where sinh(booleanField) > 0", - "error": [ - "Argument of [sinh] must be [number], found value [booleanField] type [boolean]" - ], + "query": "row var = mv_first(5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = sinh(to_integer(booleanField))", + "query": "row mv_first(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval sinh(booleanField)", - "error": [ - "Argument of [sinh] must be [number], found value [booleanField] type [boolean]" - ], - "warning": [] - }, - { - "query": "from a_index | eval sinh(null)", + "query": "row var = mv_first(to_integer(true))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval sinh(nullVar)", + "query": "row var = mv_first(to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "row var = split(\"a\", \"a\")", + "query": "row mv_first(to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "row split(\"a\", \"a\")", + "query": "row var = mv_first(to_ip(to_ip(\"127.0.0.1\")))", "error": [], "warning": [] }, { - "query": "row var = split(to_string(\"a\"), to_string(\"a\"))", + "query": "row var = mv_first(\"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]" - ], + "query": "row mv_first(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | where length(split(stringField, stringField)) > 0", + "query": "row var = mv_first(to_string(true))", "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": "row var = mv_first(to_version(\"1.0.0\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = split(stringField, stringField)", + "query": "row mv_first(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval split(stringField, stringField)", + "query": "row var = mv_first(to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = split(to_string(stringField), to_string(stringField))", + "query": "from a_index | where mv_first(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval split(numberField, numberField)", + "query": "from a_index | where mv_first(counterDoubleField) > 0", "error": [ - "Argument of [split] must be [string], found value [numberField] type [number]", - "Argument of [split] must be [string], found value [numberField] type [number]" + "Argument of [mv_first] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | eval split(stringField, stringField, extraArg)", - "error": [ - "Error: [split] function expects exactly 2 arguments, got 3." - ], + "query": "from a_index | where mv_first(integerField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | sort split(stringField, stringField)", + "query": "from a_index | where mv_first(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = split(to_string(true), to_string(true))", + "query": "from a_index | where mv_first(unsignedLongField) > 0", "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]" - ], + "query": "from a_index | eval var = mv_first(booleanField)", + "error": [], "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]" - ], + "query": "from a_index | eval mv_first(booleanField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = split(to_string(booleanField), to_string(booleanField))", + "query": "from a_index | eval var = mv_first(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval split(booleanField, booleanField)", + "query": "from a_index | eval mv_first(counterDoubleField)", "error": [ - "Argument of [split] must be [string], found value [booleanField] type [boolean]", - "Argument of [split] must be [string], found value [booleanField] type [boolean]" + "Argument of [mv_first] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | eval split(null, null)", - "error": [], + "query": "from a_index | eval var = mv_first(*)", + "error": [ + "Using wildcards (*) in mv_first is not allowed" + ], "warning": [] }, { - "query": "row nullVar = null | eval split(nullVar, nullVar)", + "query": "from a_index | eval var = mv_first(cartesianPointField)", "error": [], "warning": [] }, { - "query": "row var = sqrt(5)", + "query": "from a_index | eval mv_first(cartesianPointField)", "error": [], "warning": [] }, { - "query": "row sqrt(5)", + "query": "from a_index | eval var = mv_first(to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row var = sqrt(to_integer(\"a\"))", + "query": "from a_index | eval var = mv_first(cartesianShapeField)", "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", + "query": "from a_index | eval mv_first(cartesianShapeField)", "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)", + "query": "from a_index | eval var = mv_first(to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval sqrt(numberField)", + "query": "from a_index | eval var = mv_first(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = sqrt(to_integer(stringField))", + "query": "from a_index | eval mv_first(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval sqrt(stringField)", - "error": [ - "Argument of [sqrt] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = mv_first(to_datetime(dateField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval sqrt(numberField, extraArg)", - "error": [ - "Error: [sqrt] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval var = mv_first(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = sqrt(*)", - "error": [ - "Using wildcards (*) in sqrt is not allowed" - ], + "query": "from a_index | eval mv_first(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort sqrt(numberField)", + "query": "from a_index | eval var = mv_first(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = sqrt(to_integer(true))", + "query": "from a_index | eval var = mv_first(geoPointField)", "error": [], "warning": [] }, { - "query": "row var = sqrt(true)", - "error": [ - "Argument of [sqrt] must be [number], found value [true] type [boolean]" - ], + "query": "from a_index | eval mv_first(geoPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | where sqrt(booleanField) > 0", - "error": [ - "Argument of [sqrt] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = mv_first(to_geopoint(geoPointField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = sqrt(to_integer(booleanField))", + "query": "from a_index | eval var = mv_first(geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval sqrt(booleanField)", - "error": [ - "Argument of [sqrt] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval mv_first(geoShapeField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval sqrt(null)", + "query": "from a_index | eval var = mv_first(to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval sqrt(nullVar)", + "query": "from a_index | eval var = mv_first(integerField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_first(integerField)", "error": [], "warning": [] }, { - "query": "row st_contains(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_first(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geopoint(\"a\"), to_geopoint(\"a\"))", + "query": "from a_index | eval var = mv_first(ipField)", "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]" - ], + "query": "from a_index | eval mv_first(ipField)", + "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_first(to_ip(ipField))", "error": [], "warning": [] }, { - "query": "row st_contains(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_first(keywordField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_first(keywordField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_first(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row st_contains(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_first(longField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))", + "query": "from a_index | eval mv_first(longField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_first(textField)", "error": [], "warning": [] }, { - "query": "row st_contains(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_first(textField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_first(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_first(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))", + "query": "from a_index | eval var = mv_first(versionField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_first(versionField)", "error": [], "warning": [] }, { - "query": "row st_contains(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_first(to_version(keywordField))", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | eval mv_first(booleanField, extraArg)", + "error": [ + "Error: [mv_first] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | sort mv_first(booleanField)", "error": [], "warning": [] }, { - "query": "row st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_first(null)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))", + "query": "row nullVar = null | eval mv_first(nullVar)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_first(\"2022\")", "error": [], "warning": [] }, { - "query": "row st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_first(concat(\"20\", \"22\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(geoPointField, geoPointField)", + "query": "row var = mv_last(true)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(geoPointField, geoPointField)", + "query": "row mv_last(true)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_geopoint(stringField), to_geopoint(stringField))", + "query": "row var = mv_last(to_boolean(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(stringField, stringField)", + "query": "row var = mv_last(cartesianPointField)", "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]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval st_contains(geoPointField, geoPointField, extraArg)", + "query": "row mv_last(cartesianPointField)", "error": [ - "Error: [st_contains] function expects exactly 2 arguments, got 3." + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = st_contains(geoPointField, geoShapeField)", - "error": [], + "query": "row var = mv_last(to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval st_contains(geoPointField, geoShapeField)", + "query": "row var = mv_last(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_geopoint(stringField), geoShapeField)", + "query": "row mv_last(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(geoPointField, geoShapeField, extraArg)", + "query": "row var = mv_last(to_cartesianshape(cartesianPointField))", "error": [ - "Error: [st_contains] function expects exactly 2 arguments, got 3." + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = st_contains(geoShapeField, geoPointField)", + "query": "row var = mv_last(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(geoShapeField, geoPointField)", + "query": "row mv_last(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(geoShapeField, to_geopoint(stringField))", + "query": "row var = mv_last(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", "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 var = mv_last(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(geoShapeField, geoShapeField)", + "query": "row mv_last(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(geoShapeField, geoShapeField)", + "query": "row var = mv_last(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(geoShapeField, geoShapeField, extraArg)", + "query": "row var = mv_last(geoPointField)", "error": [ - "Error: [st_contains] function expects exactly 2 arguments, got 3." + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = st_contains(cartesianPointField, cartesianPointField)", - "error": [], + "query": "row mv_last(geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval st_contains(cartesianPointField, cartesianPointField)", + "query": "row var = mv_last(to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]" + ], + "warning": [] + }, + { + "query": "row var = mv_last(to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_cartesianpoint(stringField), to_cartesianpoint(stringField))", + "query": "row mv_last(to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(cartesianPointField, cartesianPointField, extraArg)", + "query": "row var = mv_last(to_geoshape(geoPointField))", "error": [ - "Error: [st_contains] function expects exactly 2 arguments, got 3." + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = st_contains(cartesianPointField, cartesianShapeField)", + "query": "row var = mv_last(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(cartesianPointField, cartesianShapeField)", + "query": "row mv_last(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_cartesianpoint(stringField), cartesianShapeField)", + "query": "row var = mv_last(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(cartesianPointField, cartesianShapeField, extraArg)", - "error": [ - "Error: [st_contains] function expects exactly 2 arguments, got 3." - ], + "query": "row var = mv_last(to_ip(\"127.0.0.1\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(cartesianShapeField, cartesianPointField)", + "query": "row mv_last(to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(cartesianShapeField, cartesianPointField)", + "query": "row var = mv_last(to_ip(to_ip(\"127.0.0.1\")))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(cartesianShapeField, to_cartesianpoint(stringField))", + "query": "row var = mv_last(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(cartesianShapeField, cartesianPointField, extraArg)", - "error": [ - "Error: [st_contains] function expects exactly 2 arguments, got 3." - ], + "query": "row mv_last(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(cartesianShapeField, cartesianShapeField)", + "query": "row var = mv_last(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(cartesianShapeField, cartesianShapeField)", + "query": "row var = mv_last(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(cartesianShapeField, cartesianShapeField, extraArg)", - "error": [ - "Error: [st_contains] function expects exactly 2 arguments, got 3." - ], + "query": "row mv_last(to_version(\"1.0.0\"))", + "error": [], "warning": [] }, { - "query": "from a_index | sort st_contains(geoPointField, geoPointField)", + "query": "row var = mv_last(to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | where mv_last(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", - "error": [], + "query": "from a_index | where mv_last(counterDoubleField) > 0", + "error": [ + "Argument of [mv_last] must be [boolean], found value [counterDoubleField] type [counter_double]" + ], "warning": [] }, { - "query": "row var = st_contains(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | where mv_last(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | where mv_last(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | where mv_last(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = mv_last(booleanField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval mv_last(booleanField)", "error": [], "warning": [] }, { - "query": "row var = st_contains(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = mv_last(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_contains(true, true)", + "query": "from a_index | eval mv_last(counterDoubleField)", "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]" + "Argument of [mv_last] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "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)", + "query": "from a_index | eval var = mv_last(*)", "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]" + "Using wildcards (*) in mv_last is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "from a_index | eval var = mv_last(cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "query": "from a_index | eval mv_last(cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "from a_index | eval var = mv_last(to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "query": "from a_index | eval var = mv_last(cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geoshape(geoPointField))", + "query": "from a_index | eval mv_last(cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geopoint(geoPointField))", + "query": "from a_index | eval var = mv_last(to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geoshape(geoPointField))", + "query": "from a_index | eval var = mv_last(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | sort st_contains(cartesianPointField, cartesianPointField)", + "query": "from a_index | eval mv_last(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_contains(null, null)", + "query": "from a_index | eval var = mv_last(to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval st_contains(nullVar, nullVar)", + "query": "from a_index | eval var = mv_last(doubleField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_last(doubleField)", "error": [], "warning": [] }, { - "query": "row st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geopoint(\"a\"), to_geopoint(\"a\"))", + "query": "from a_index | eval var = mv_last(geoPointField)", "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]" - ], + "query": "from a_index | eval mv_last(geoPointField)", + "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "row st_disjoint(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(geoShapeField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_last(geoShapeField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "row st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(integerField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))", + "query": "from a_index | eval mv_last(integerField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(ipField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_last(ipField)", "error": [], "warning": [] }, { - "query": "row st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(to_ip(ipField))", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))", + "query": "from a_index | eval var = mv_last(keywordField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_last(keywordField)", "error": [], "warning": [] }, { - "query": "row st_disjoint(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(longField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_last(longField)", "error": [], "warning": [] }, { - "query": "row st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(textField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))", + "query": "from a_index | eval mv_last(textField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_last(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_last(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(geoPointField, geoPointField)", + "query": "from a_index | eval var = mv_last(versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(geoPointField, geoPointField)", + "query": "from a_index | eval mv_last(versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_geopoint(stringField), to_geopoint(stringField))", + "query": "from a_index | eval var = mv_last(to_version(keywordField))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(stringField, stringField)", + "query": "from a_index | eval mv_last(booleanField, extraArg)", "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]" + "Error: [mv_last] function expects exactly one argument, got 2." ], "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 | sort mv_last(booleanField)", + "error": [], + "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(geoPointField, geoShapeField)", + "query": "from a_index | eval mv_last(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(geoPointField, geoShapeField)", + "query": "row nullVar = null | eval mv_last(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_geopoint(stringField), geoShapeField)", + "query": "from a_index | eval mv_last(\"2022\")", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(geoPointField, geoShapeField, extraArg)", - "error": [ - "Error: [st_disjoint] function expects exactly 2 arguments, got 3." - ], + "query": "from a_index | eval mv_last(concat(\"20\", \"22\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(geoShapeField, geoPointField)", + "query": "row var = mv_max(true)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(geoShapeField, geoPointField)", + "query": "row mv_max(true)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(geoShapeField, to_geopoint(stringField))", + "query": "row var = mv_max(to_boolean(true))", "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 var = mv_max(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(geoShapeField, geoShapeField)", + "query": "row mv_max(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(geoShapeField, geoShapeField)", + "query": "row var = mv_max(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(geoShapeField, geoShapeField, extraArg)", - "error": [ - "Error: [st_disjoint] function expects exactly 2 arguments, got 3." - ], + "query": "row var = mv_max(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(cartesianPointField, cartesianPointField)", + "query": "row mv_max(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianPointField)", + "query": "row var = mv_max(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(stringField), to_cartesianpoint(stringField))", + "query": "row var = mv_max(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianPointField, extraArg)", - "error": [ - "Error: [st_disjoint] function expects exactly 2 arguments, got 3." - ], + "query": "row mv_max(5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(cartesianPointField, cartesianShapeField)", + "query": "row var = mv_max(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField)", + "query": "row var = mv_max(to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(stringField), cartesianShapeField)", + "query": "row mv_max(to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField, extraArg)", - "error": [ - "Error: [st_disjoint] function expects exactly 2 arguments, got 3." - ], + "query": "row var = mv_max(to_ip(to_ip(\"127.0.0.1\")))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(cartesianShapeField, cartesianPointField)", + "query": "row var = mv_max(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianPointField)", + "query": "row mv_max(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(cartesianShapeField, to_cartesianpoint(stringField))", + "query": "row var = mv_max(to_string(true))", "error": [], "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_max(to_version(\"1.0.0\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(cartesianShapeField, cartesianShapeField)", + "query": "row mv_max(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField)", + "query": "row var = mv_max(to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField, extraArg)", + "query": "row var = mv_max(to_cartesianpoint(\"POINT (30 10)\"))", "error": [ - "Error: [st_disjoint] function expects exactly 2 arguments, got 3." + "Argument of [mv_max] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]" ], "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)\")))", + "query": "from a_index | where mv_max(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", - "error": [], + "query": "from a_index | where mv_max(cartesianPointField) > 0", + "error": [ + "Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + ], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | where mv_max(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | where mv_max(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | where mv_max(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = mv_max(booleanField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval mv_max(booleanField)", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = mv_max(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_disjoint(true, true)", + "query": "from a_index | eval mv_max(cartesianPointField)", "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]" + "Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]" ], "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)", + "query": "from a_index | eval var = mv_max(*)", "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]" + "Using wildcards (*) in mv_max is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "from a_index | eval var = mv_max(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "query": "from a_index | eval mv_max(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "from a_index | eval var = mv_max(to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "query": "from a_index | eval var = mv_max(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geoshape(geoPointField))", + "query": "from a_index | eval mv_max(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geopoint(geoPointField))", + "query": "from a_index | eval var = mv_max(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geoshape(geoPointField))", + "query": "from a_index | eval var = mv_max(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | sort st_disjoint(cartesianPointField, cartesianPointField)", + "query": "from a_index | eval mv_max(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_disjoint(null, null)", + "query": "from a_index | eval var = mv_max(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval st_disjoint(nullVar, nullVar)", + "query": "from a_index | eval var = mv_max(ipField)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_max(ipField)", "error": [], "warning": [] }, { - "query": "row st_intersects(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_max(to_ip(ipField))", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geopoint(\"a\"), to_geopoint(\"a\"))", + "query": "from a_index | eval var = mv_max(keywordField)", "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]" - ], + "query": "from a_index | eval mv_max(keywordField)", + "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_max(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row st_intersects(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_max(longField)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_max(longField)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_max(textField)", "error": [], "warning": [] }, { - "query": "row st_intersects(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_max(textField)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))", + "query": "from a_index | eval var = mv_max(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_max(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row st_intersects(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_max(versionField)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_max(versionField)", "error": [], "warning": [] }, { - "query": "row st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_max(to_version(keywordField))", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))", - "error": [], + "query": "from a_index | eval mv_max(booleanField, extraArg)", + "error": [ + "Error: [mv_max] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | sort mv_max(booleanField)", "error": [], "warning": [] }, { - "query": "row st_intersects(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_max(null)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "row nullVar = null | eval mv_max(nullVar)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_max(\"2022\")", "error": [], "warning": [] }, { - "query": "row st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_max(concat(\"20\", \"22\"))", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))", + "query": "row var = mv_median(5.5)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "row mv_median(5.5)", "error": [], "warning": [] }, { - "query": "row st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "row var = mv_median(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(geoPointField, geoPointField)", + "query": "row var = mv_median(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(geoPointField, geoPointField)", + "query": "row mv_median(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_geopoint(stringField), to_geopoint(stringField))", + "query": "row var = mv_median(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(stringField, stringField)", + "query": "row var = mv_median(true)", "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]" + "Argument of [mv_median] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval st_intersects(geoPointField, geoPointField, extraArg)", - "error": [ - "Error: [st_intersects] function expects exactly 2 arguments, got 3." - ], + "query": "from a_index | where mv_median(doubleField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(geoPointField, geoShapeField)", - "error": [], + "query": "from a_index | where mv_median(booleanField) > 0", + "error": [ + "Argument of [mv_median] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval st_intersects(geoPointField, geoShapeField)", + "query": "from a_index | where mv_median(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_geopoint(stringField), geoShapeField)", + "query": "from a_index | where mv_median(longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(geoPointField, geoShapeField, extraArg)", - "error": [ - "Error: [st_intersects] function expects exactly 2 arguments, got 3." - ], + "query": "from a_index | where mv_median(unsignedLongField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(geoShapeField, geoPointField)", + "query": "from a_index | eval var = mv_median(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(geoShapeField, geoPointField)", + "query": "from a_index | eval mv_median(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(geoShapeField, to_geopoint(stringField))", + "query": "from a_index | eval var = mv_median(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(geoShapeField, geoPointField, extraArg)", + "query": "from a_index | eval mv_median(booleanField)", "error": [ - "Error: [st_intersects] function expects exactly 2 arguments, got 3." + "Argument of [mv_median] must be [double], found value [booleanField] type [boolean]" ], "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)", + "query": "from a_index | eval var = mv_median(*)", "error": [ - "Error: [st_intersects] function expects exactly 2 arguments, got 3." + "Using wildcards (*) in mv_median is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(cartesianPointField, cartesianPointField)", + "query": "from a_index | eval var = mv_median(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(cartesianPointField, cartesianPointField)", + "query": "from a_index | eval mv_median(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_cartesianpoint(stringField), to_cartesianpoint(stringField))", + "query": "from a_index | eval var = mv_median(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(cartesianPointField, cartesianPointField, extraArg)", - "error": [ - "Error: [st_intersects] function expects exactly 2 arguments, got 3." - ], + "query": "from a_index | eval var = mv_median(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(cartesianPointField, cartesianShapeField)", + "query": "from a_index | eval mv_median(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(cartesianPointField, cartesianShapeField)", + "query": "from a_index | eval var = mv_median(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_cartesianpoint(stringField), cartesianShapeField)", + "query": "from a_index | eval mv_median(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(cartesianPointField, cartesianShapeField, extraArg)", + "query": "from a_index | eval mv_median(doubleField, extraArg)", "error": [ - "Error: [st_intersects] function expects exactly 2 arguments, got 3." + "Error: [mv_median] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(cartesianShapeField, cartesianPointField)", + "query": "from a_index | sort mv_median(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianPointField)", + "query": "from a_index | eval mv_median(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(cartesianShapeField, to_cartesianpoint(stringField))", + "query": "row nullVar = null | eval mv_median(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianPointField, extraArg)", - "error": [ - "Error: [st_intersects] function expects exactly 2 arguments, got 3." - ], + "query": "row var = mv_min(true)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(cartesianShapeField, cartesianShapeField)", + "query": "row mv_min(true)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField)", + "query": "row var = mv_min(to_boolean(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField, extraArg)", - "error": [ - "Error: [st_intersects] function expects exactly 2 arguments, got 3." - ], + "query": "row var = mv_min(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | sort st_intersects(geoPointField, geoPointField)", + "query": "row mv_min(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = mv_min(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = mv_min(5.5)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row mv_min(5.5)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = mv_min(to_double(true))", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "row var = mv_min(5)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "row mv_min(5)", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "row var = mv_min(to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = st_intersects(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "row var = mv_min(to_ip(\"127.0.0.1\"))", "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]" - ], + "query": "row mv_min(to_ip(\"127.0.0.1\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "query": "row var = mv_min(to_ip(to_ip(\"127.0.0.1\")))", "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]" - ], + "query": "row var = mv_min(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "row mv_min(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "query": "row var = mv_min(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "row var = mv_min(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "query": "row mv_min(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geoshape(geoPointField))", + "query": "row var = mv_min(to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geopoint(geoPointField))", - "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 | eval var = st_intersects(to_geoshape(geoPointField), to_geoshape(geoPointField))", + "query": "from a_index | where mv_min(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | sort st_intersects(cartesianPointField, cartesianPointField)", + "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 | where mv_min(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval st_intersects(null, null)", + "query": "from a_index | where mv_min(longField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval st_intersects(nullVar, nullVar)", + "query": "from a_index | where mv_min(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_within(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(booleanField)", "error": [], "warning": [] }, { - "query": "row st_within(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_min(booleanField)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_geopoint(\"a\"), to_geopoint(\"a\"))", + "query": "from a_index | eval var = mv_min(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_within(\"a\", \"a\")", + "query": "from a_index | eval mv_min(cartesianPointField)", "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]" + "Argument of [mv_min] must be [boolean], found value [cartesianPointField] type [cartesian_point]" ], "warning": [] }, { - "query": "row var = st_within(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | eval var = mv_min(*)", + "error": [ + "Using wildcards (*) in mv_min is not allowed" + ], "warning": [] }, { - "query": "row st_within(to_geopoint(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(dateField)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_geopoint(\"a\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_min(dateField)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "row st_within(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(doubleField)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geopoint(\"a\"))", + "query": "from a_index | eval mv_min(doubleField)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row st_within(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(integerField)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_min(integerField)", "error": [], "warning": [] }, { - "query": "row st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_within(to_cartesianpoint(\"a\"), to_cartesianpoint(\"a\"))", + "query": "from a_index | eval var = mv_min(ipField)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_min(ipField)", "error": [], "warning": [] }, { - "query": "row st_within(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(to_ip(ipField))", "error": [], "warning": [] }, { - "query": "row var = st_within(to_cartesianpoint(\"a\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(keywordField)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_min(keywordField)", "error": [], "warning": [] }, { - "query": "row st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianpoint(\"a\"))", + "query": "from a_index | eval var = mv_min(longField)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_min(longField)", "error": [], "warning": [] }, { - "query": "row st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_min(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(geoPointField, geoPointField)", + "query": "from a_index | eval mv_min(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(geoPointField, geoPointField)", + "query": "from a_index | eval var = mv_min(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_geopoint(stringField), to_geopoint(stringField))", + "query": "from a_index | eval mv_min(unsignedLongField)", "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)", + "query": "from a_index | eval var = mv_min(versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(geoPointField, geoShapeField)", + "query": "from a_index | eval mv_min(versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_geopoint(stringField), geoShapeField)", + "query": "from a_index | eval var = mv_min(to_version(keywordField))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(geoPointField, geoShapeField, extraArg)", + "query": "from a_index | eval mv_min(booleanField, extraArg)", "error": [ - "Error: [st_within] function expects exactly 2 arguments, got 3." + "Error: [mv_min] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = st_within(geoShapeField, geoPointField)", + "query": "from a_index | sort mv_min(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(geoShapeField, geoPointField)", + "query": "from a_index | eval mv_min(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(geoShapeField, to_geopoint(stringField))", + "query": "row nullVar = null | eval mv_min(nullVar)", "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)", + "query": "from a_index | eval mv_min(\"2022\")", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(geoShapeField, geoShapeField)", + "query": "from a_index | eval mv_min(concat(\"20\", \"22\"))", "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 var = mv_slice(true, 5, 5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(cartesianPointField, cartesianPointField)", + "query": "row mv_slice(true, 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(cartesianPointField, cartesianPointField)", + "query": "row var = mv_slice(to_boolean(true), to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_cartesianpoint(stringField), to_cartesianpoint(stringField))", - "error": [], + "query": "row var = mv_slice(cartesianPointField, 5, 5)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval st_within(cartesianPointField, cartesianPointField, extraArg)", + "query": "row mv_slice(cartesianPointField, 5, 5)", "error": [ - "Error: [st_within] function expects exactly 2 arguments, got 3." + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = st_within(cartesianPointField, cartesianShapeField)", - "error": [], + "query": "row var = mv_slice(to_cartesianpoint(cartesianPointField), to_integer(true), to_integer(true))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval st_within(cartesianPointField, cartesianShapeField)", + "query": "row var = mv_slice(to_cartesianshape(\"POINT (30 10)\"), 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_cartesianpoint(stringField), cartesianShapeField)", + "query": "row mv_slice(to_cartesianshape(\"POINT (30 10)\"), 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(cartesianPointField, cartesianShapeField, extraArg)", + "query": "row var = mv_slice(to_cartesianshape(cartesianPointField), to_integer(true), to_integer(true))", "error": [ - "Error: [st_within] function expects exactly 2 arguments, got 3." + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = st_within(cartesianShapeField, cartesianPointField)", + "query": "row var = mv_slice(to_datetime(\"2021-01-01T00:00:00Z\"), 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(cartesianShapeField, cartesianPointField)", + "query": "row mv_slice(to_datetime(\"2021-01-01T00:00:00Z\"), 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(cartesianShapeField, to_cartesianpoint(stringField))", + "query": "row var = mv_slice(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")), to_integer(true), to_integer(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_slice(5.5, 5, 5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(cartesianShapeField, cartesianShapeField)", + "query": "row mv_slice(5.5, 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(cartesianShapeField, cartesianShapeField)", + "query": "row var = mv_slice(to_double(true), to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(cartesianShapeField, cartesianShapeField, extraArg)", + "query": "row var = mv_slice(geoPointField, 5, 5)", "error": [ - "Error: [st_within] function expects exactly 2 arguments, got 3." + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | sort st_within(geoPointField, geoPointField)", - "error": [], + "query": "row mv_slice(geoPointField, 5, 5)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = st_within(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", - "error": [], + "query": "row var = mv_slice(to_geopoint(geoPointField), to_integer(true), to_integer(true))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = st_within(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = mv_slice(to_geoshape(\"POINT (30 10)\"), 5, 5)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row mv_slice(to_geoshape(\"POINT (30 10)\"), 5, 5)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", - "error": [], + "query": "row var = mv_slice(to_geoshape(geoPointField), to_integer(true), to_integer(true))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = st_within(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "row var = mv_slice(5, 5, 5)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "row mv_slice(5, 5, 5)", "error": [], "warning": [] }, { - "query": "row var = st_within(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "row var = mv_slice(to_integer(true), to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = st_within(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "row var = mv_slice(to_ip(\"127.0.0.1\"), 5, 5)", "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]" - ], + "query": "row mv_slice(to_ip(\"127.0.0.1\"), 5, 5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "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 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]" - ], + "query": "row var = mv_slice(\"a\", 5, 5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "row mv_slice(\"a\", 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "query": "row var = mv_slice(to_string(true), to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "row var = mv_slice(5, to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "query": "row var = mv_slice(to_version(\"1.0.0\"), 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_geopoint(geoPointField), to_geoshape(geoPointField))", + "query": "row mv_slice(to_version(\"1.0.0\"), 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_geoshape(geoPointField), to_geopoint(geoPointField))", + "query": "row var = mv_slice(to_version(\"a\"), to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_within(to_geoshape(geoPointField), to_geoshape(geoPointField))", - "error": [], + "query": "row var = mv_slice(5.5, true, true)", + "error": [ + "Argument of [mv_slice] must be [integer], found value [true] type [boolean]", + "Argument of [mv_slice] must be [integer], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | sort st_within(cartesianPointField, cartesianPointField)", + "query": "from a_index | where mv_slice(doubleField, integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval st_within(null, null)", + "query": "from a_index | where mv_slice(counterDoubleField, booleanField, booleanField) > 0", + "error": [ + "Argument of [mv_slice] must be [boolean], found value [counterDoubleField] type [counter_double]", + "Argument of [mv_slice] must be [integer], found value [booleanField] type [boolean]", + "Argument of [mv_slice] must be [integer], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | where mv_slice(integerField, integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval st_within(nullVar, nullVar)", + "query": "from a_index | where mv_slice(longField, integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = st_x(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_slice(booleanField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row st_x(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_slice(booleanField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_x(to_geopoint(\"a\"))", + "query": "from a_index | eval var = mv_slice(to_boolean(booleanField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_x(\"a\")", + "query": "from a_index | eval mv_slice(counterDoubleField, booleanField, booleanField)", "error": [ - "Argument of [st_x] must be [cartesian_point], found value [\"a\"] type [string]" + "Argument of [mv_slice] must be [boolean], found value [counterDoubleField] type [counter_double]", + "Argument of [mv_slice] must be [integer], found value [booleanField] type [boolean]", + "Argument of [mv_slice] must be [integer], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "row var = st_x(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_slice(cartesianPointField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row st_x(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_slice(cartesianPointField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_x(to_cartesianpoint(\"a\"))", + "query": "from a_index | eval var = mv_slice(to_cartesianpoint(cartesianPointField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_x(geoPointField)", + "query": "from a_index | eval var = mv_slice(cartesianShapeField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_x(geoPointField)", + "query": "from a_index | eval mv_slice(cartesianShapeField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_x(to_geopoint(stringField))", + "query": "from a_index | eval var = mv_slice(to_cartesianshape(cartesianPointField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_x(stringField)", - "error": [ - "Argument of [st_x] must be [cartesian_point], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = mv_slice(dateField, integerField, integerField)", + "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 mv_slice(dateField, integerField, integerField)", + "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_slice(to_datetime(dateField), to_integer(booleanField), to_integer(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_x(cartesianPointField)", + "query": "from a_index | eval var = mv_slice(doubleField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_x(cartesianPointField)", + "query": "from a_index | eval mv_slice(doubleField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_x(to_cartesianpoint(stringField))", + "query": "from a_index | eval var = mv_slice(to_double(booleanField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_x(cartesianPointField, extraArg)", - "error": [ - "Error: [st_x] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval var = mv_slice(geoPointField, integerField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort st_x(geoPointField)", + "query": "from a_index | eval mv_slice(geoPointField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_x(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = mv_slice(to_geopoint(geoPointField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_x(to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = mv_slice(geoShapeField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_x(true)", - "error": [ - "Argument of [st_x] must be [cartesian_point], found value [true] type [boolean]" - ], + "query": "from a_index | eval mv_slice(geoShapeField, integerField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_x(to_cartesianpoint(cartesianPointField))", + "query": "from a_index | eval var = mv_slice(to_geoshape(geoPointField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_x(booleanField)", - "error": [ - "Argument of [st_x] must be [cartesian_point], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = mv_slice(integerField, integerField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_x(to_geopoint(geoPointField))", + "query": "from a_index | eval mv_slice(integerField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | sort st_x(cartesianPointField)", + "query": "from a_index | eval var = mv_slice(to_integer(booleanField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval st_x(null)", + "query": "from a_index | eval var = mv_slice(ipField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval st_x(nullVar)", + "query": "from a_index | eval mv_slice(ipField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_y(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_slice(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row st_y(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_slice(keywordField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_y(to_geopoint(\"a\"))", + "query": "from a_index | eval mv_slice(keywordField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_y(\"a\")", - "error": [ - "Argument of [st_y] must be [cartesian_point], found value [\"a\"] type [string]" - ], + "query": "from a_index | eval var = mv_slice(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))", + "error": [], "warning": [] }, { - "query": "row var = st_y(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = mv_slice(longField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row st_y(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval mv_slice(longField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_y(to_cartesianpoint(\"a\"))", + "query": "from a_index | eval var = mv_slice(longField, to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_y(geoPointField)", + "query": "from a_index | eval var = mv_slice(textField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_y(geoPointField)", + "query": "from a_index | eval mv_slice(textField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_y(to_geopoint(stringField))", + "query": "from a_index | eval var = mv_slice(versionField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_y(stringField)", - "error": [ - "Argument of [st_y] must be [cartesian_point], found value [stringField] type [string]" - ], + "query": "from a_index | eval mv_slice(versionField, integerField, integerField)", + "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_slice(to_version(keywordField), to_integer(booleanField), to_integer(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_y(*)", + "query": "from a_index | eval mv_slice(booleanField, integerField, integerField, extraArg)", "error": [ - "Using wildcards (*) in st_y is not allowed" + "Error: [mv_slice] function expects no more than 3 arguments, got 4." ], "warning": [] }, { - "query": "from a_index | eval var = st_y(cartesianPointField)", + "query": "from a_index | sort mv_slice(booleanField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_y(cartesianPointField)", + "query": "from a_index | eval mv_slice(null, null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_y(to_cartesianpoint(stringField))", + "query": "row nullVar = null | eval mv_slice(nullVar, nullVar, nullVar)", "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)", + "query": "from a_index | eval mv_slice(\"2022\", integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_y(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval mv_slice(concat(\"20\", \"22\"), integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = st_y(to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "row var = mv_sort(true, \"asc\")", "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))", + "query": "row mv_sort(true, \"asc\")", "error": [], "warning": [] }, { - "query": "from a_index | eval st_y(booleanField)", - "error": [ - "Argument of [st_y] must be [cartesian_point], found value [booleanField] type [boolean]" - ], + "query": "row var = mv_sort(to_datetime(\"2021-01-01T00:00:00Z\"), \"asc\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_y(to_geopoint(geoPointField))", + "query": "row mv_sort(to_datetime(\"2021-01-01T00:00:00Z\"), \"asc\")", "error": [], "warning": [] }, { - "query": "from a_index | sort st_y(cartesianPointField)", + "query": "row var = mv_sort(5.5, \"asc\")", "error": [], "warning": [] }, { - "query": "from a_index | eval st_y(null)", + "query": "row mv_sort(5.5, \"asc\")", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval st_y(nullVar)", + "query": "row var = mv_sort(5, \"asc\")", "error": [], "warning": [] }, { - "query": "row var = starts_with(\"a\", \"a\")", + "query": "row mv_sort(5, \"asc\")", "error": [], "warning": [] }, { - "query": "row starts_with(\"a\", \"a\")", + "query": "row var = mv_sort(to_ip(\"127.0.0.1\"), \"asc\")", "error": [], "warning": [] }, { - "query": "row var = starts_with(to_string(\"a\"), to_string(\"a\"))", + "query": "row mv_sort(to_ip(\"127.0.0.1\"), \"asc\")", "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]" - ], + "query": "row var = mv_sort(\"a\", \"asc\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = starts_with(stringField, stringField)", + "query": "row mv_sort(\"a\", \"asc\")", "error": [], "warning": [] }, { - "query": "from a_index | eval starts_with(stringField, stringField)", + "query": "row var = mv_sort(to_version(\"1.0.0\"), \"asc\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = starts_with(to_string(stringField), to_string(stringField))", + "query": "row mv_sort(to_version(\"1.0.0\"), \"asc\")", "error": [], "warning": [] }, { - "query": "from a_index | eval starts_with(numberField, numberField)", + "query": "row var = mv_sort(to_cartesianpoint(\"POINT (30 10)\"), true)", "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]" + "Argument of [mv_sort] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]", + "Argument of [mv_sort] must be [keyword], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval starts_with(stringField, stringField, extraArg)", - "error": [ - "Error: [starts_with] function expects exactly 2 arguments, got 3." - ], + "query": "from a_index | eval var = mv_sort(booleanField, \"asc\")", + "error": [], "warning": [] }, { - "query": "from a_index | sort starts_with(stringField, stringField)", + "query": "from a_index | eval mv_sort(booleanField, \"asc\")", "error": [], "warning": [] }, { - "query": "row var = starts_with(to_string(true), to_string(true))", + "query": "from a_index | eval var = mv_sort(dateField, \"asc\")", "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]" - ], + "query": "from a_index | eval mv_sort(dateField, \"asc\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = starts_with(to_string(booleanField), to_string(booleanField))", + "query": "from a_index | eval var = mv_sort(doubleField, \"asc\")", "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]" - ], + "query": "from a_index | eval mv_sort(doubleField, \"asc\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval starts_with(null, null)", + "query": "from a_index | eval var = mv_sort(integerField, \"asc\")", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval starts_with(nullVar, nullVar)", + "query": "from a_index | eval mv_sort(integerField, \"asc\")", "error": [], "warning": [] }, { - "query": "row var = substring(\"a\", 5, 5)", + "query": "from a_index | eval var = mv_sort(ipField, \"asc\")", "error": [], "warning": [] }, { - "query": "row var = substring(\"a\", 5)", + "query": "from a_index | eval mv_sort(ipField, \"asc\")", "error": [], "warning": [] }, { - "query": "row substring(\"a\", 5, 5)", + "query": "from a_index | eval var = mv_sort(keywordField, \"asc\")", "error": [], "warning": [] }, { - "query": "row substring(\"a\", 5)", + "query": "from a_index | eval mv_sort(keywordField, \"asc\")", "error": [], "warning": [] }, { - "query": "row var = substring(to_string(\"a\"), to_integer(\"a\"), to_integer(\"a\"))", + "query": "from a_index | eval var = mv_sort(longField, \"asc\")", "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": "from a_index | eval mv_sort(longField, \"asc\")", + "error": [], "warning": [] }, { - "query": "from a_index | where length(substring(stringField, numberField, numberField)) > 0", + "query": "from a_index | eval var = mv_sort(textField, \"asc\")", "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": "from a_index | eval mv_sort(textField, \"asc\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = substring(stringField, numberField, numberField)", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval substring(stringField, numberField, numberField)", + "query": "from a_index | eval var = mv_sort(versionField, \"asc\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = substring(to_string(stringField), to_integer(stringField), to_integer(stringField))", + "query": "from a_index | eval mv_sort(versionField, \"asc\")", "error": [], "warning": [] }, { - "query": "from a_index | eval substring(numberField, stringField, stringField)", + "query": "from a_index | eval mv_sort(booleanField, \"asc\", extraArg)", "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]" + "Error: [mv_sort] function expects no more than 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | eval substring(stringField, numberField, numberField, extraArg)", - "error": [ - "Error: [substring] function expects no more than 3 arguments, got 4." - ], + "query": "from a_index | sort mv_sort(booleanField, \"asc\")", + "error": [], "warning": [] }, { - "query": "from a_index | sort substring(stringField, numberField, numberField)", + "query": "from a_index | eval mv_sort(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | sort substring(stringField, numberField)", + "query": "row nullVar = null | eval mv_sort(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row var = substring(to_string(true), to_integer(true), to_integer(true))", + "query": "from a_index | eval mv_sort(\"2022\", \"asc\")", "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]" - ], + "query": "from a_index | eval mv_sort(concat(\"20\", \"22\"), \"asc\")", + "error": [], "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]" - ], + "query": "row var = mv_sum(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = substring(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))", + "query": "row mv_sum(5.5)", "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]" - ], + "query": "row var = mv_sum(to_double(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval substring(null, null, null)", + "query": "row var = mv_sum(5)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval substring(nullVar, nullVar, nullVar)", + "query": "row mv_sum(5)", "error": [], "warning": [] }, { - "query": "row var = tan(5)", + "query": "row var = mv_sum(to_integer(true))", "error": [], "warning": [] }, { - "query": "row tan(5)", - "error": [], + "query": "row var = mv_sum(true)", + "error": [ + "Argument of [mv_sum] must be [double], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = tan(to_integer(\"a\"))", + "query": "from a_index | where mv_sum(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = tan(\"a\")", + "query": "from a_index | where mv_sum(booleanField) > 0", "error": [ - "Argument of [tan] must be [number], found value [\"a\"] type [string]" + "Argument of [mv_sum] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where tan(numberField) > 0", + "query": "from a_index | where mv_sum(integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | where tan(stringField) > 0", - "error": [ - "Argument of [tan] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | where mv_sum(longField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = tan(numberField)", + "query": "from a_index | where mv_sum(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval tan(numberField)", + "query": "from a_index | eval var = mv_sum(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = tan(to_integer(stringField))", + "query": "from a_index | eval mv_sum(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval tan(stringField)", - "error": [ - "Argument of [tan] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = mv_sum(to_double(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval tan(numberField, extraArg)", + "query": "from a_index | eval mv_sum(booleanField)", "error": [ - "Error: [tan] function expects exactly one argument, got 2." + "Argument of [mv_sum] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = tan(*)", + "query": "from a_index | eval var = mv_sum(*)", "error": [ - "Using wildcards (*) in tan is not allowed" + "Using wildcards (*) in mv_sum is not allowed" ], "warning": [] }, { - "query": "from a_index | sort tan(numberField)", + "query": "from a_index | eval var = mv_sum(integerField)", "error": [], "warning": [] }, { - "query": "row var = tan(to_integer(true))", + "query": "from a_index | eval mv_sum(integerField)", "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]" - ], + "query": "from a_index | eval var = mv_sum(to_integer(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = tan(to_integer(booleanField))", + "query": "from a_index | eval var = mv_sum(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval tan(booleanField)", - "error": [ - "Argument of [tan] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval mv_sum(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval tan(null)", + "query": "from a_index | eval var = mv_sum(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval tan(nullVar)", + "query": "from a_index | eval mv_sum(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = tanh(5)", - "error": [], + "query": "from a_index | eval mv_sum(doubleField, extraArg)", + "error": [ + "Error: [mv_sum] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "row tanh(5)", + "query": "from a_index | sort mv_sum(doubleField)", "error": [], "warning": [] }, { - "query": "row var = tanh(to_integer(\"a\"))", + "query": "from a_index | eval mv_sum(null)", "error": [], "warning": [] }, { - "query": "row var = tanh(\"a\")", - "error": [ - "Argument of [tanh] must be [number], found value [\"a\"] type [string]" - ], + "query": "row nullVar = null | eval mv_sum(nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | where tanh(numberField) > 0", + "query": "row var = mv_zip(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | where tanh(stringField) > 0", - "error": [ - "Argument of [tanh] must be [number], found value [stringField] type [string]" - ], + "query": "row mv_zip(\"a\", \"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = tanh(numberField)", + "query": "row var = mv_zip(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval tanh(numberField)", + "query": "row var = mv_zip(\"a\", \"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = tanh(to_integer(stringField))", + "query": "row mv_zip(\"a\", \"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval tanh(stringField)", - "error": [ - "Argument of [tanh] must be [number], found value [stringField] type [string]" - ], + "query": "row var = mv_zip(to_string(true), to_string(true), to_string(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval tanh(numberField, extraArg)", + "query": "row var = mv_zip(true, true, true)", "error": [ - "Error: [tanh] function expects exactly one argument, got 2." + "Argument of [mv_zip] must be [keyword], found value [true] type [boolean]", + "Argument of [mv_zip] must be [keyword], found value [true] type [boolean]", + "Argument of [mv_zip] must be [keyword], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = tanh(*)", - "error": [ - "Using wildcards (*) in tanh is not allowed" - ], + "query": "from a_index | eval var = mv_zip(keywordField, keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort tanh(numberField)", + "query": "from a_index | eval mv_zip(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = tanh(to_integer(true))", + "query": "from a_index | eval var = mv_zip(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = tanh(true)", + "query": "from a_index | eval mv_zip(booleanField, booleanField)", "error": [ - "Argument of [tanh] must be [number], found value [true] type [boolean]" + "Argument of [mv_zip] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [mv_zip] must be [keyword], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where tanh(booleanField) > 0", - "error": [ - "Argument of [tanh] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = mv_zip(keywordField, keywordField, keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = tanh(to_integer(booleanField))", + "query": "from a_index | eval mv_zip(keywordField, keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval tanh(booleanField)", + "query": "from a_index | eval var = mv_zip(to_string(booleanField), to_string(booleanField), to_string(booleanField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval mv_zip(booleanField, booleanField, booleanField)", "error": [ - "Argument of [tanh] must be [number], found value [booleanField] type [boolean]" + "Argument of [mv_zip] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [mv_zip] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [mv_zip] must be [keyword], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval tanh(null)", + "query": "from a_index | eval var = mv_zip(keywordField, keywordField, textField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval tanh(nullVar)", + "query": "from a_index | eval mv_zip(keywordField, keywordField, textField)", "error": [], "warning": [] }, { - "query": "row var = tau()", + "query": "from a_index | eval var = mv_zip(keywordField, textField)", "error": [], "warning": [] }, { - "query": "row tau()", + "query": "from a_index | eval mv_zip(keywordField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | where tau() > 0", + "query": "from a_index | eval var = mv_zip(keywordField, textField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = tau()", + "query": "from a_index | eval mv_zip(keywordField, textField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval tau()", + "query": "from a_index | eval var = mv_zip(keywordField, textField, textField)", "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_zip(keywordField, textField, textField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort tau()", + "query": "from a_index | eval var = mv_zip(textField, keywordField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval tau()", + "query": "from a_index | eval mv_zip(textField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = to_boolean(\"a\")", + "query": "from a_index | eval var = mv_zip(textField, keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row to_boolean(\"a\")", + "query": "from a_index | eval mv_zip(textField, keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = to_bool(\"a\")", + "query": "from a_index | eval var = mv_zip(textField, keywordField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_boolean(stringField)", + "query": "from a_index | eval mv_zip(textField, keywordField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_boolean(stringField)", + "query": "from a_index | eval var = mv_zip(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_bool(stringField)", + "query": "from a_index | eval mv_zip(textField, textField)", "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_zip(textField, textField, keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_boolean(stringField)", + "query": "from a_index | eval mv_zip(textField, textField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = to_boolean(true)", + "query": "from a_index | eval var = mv_zip(textField, textField, textField)", "error": [], "warning": [] }, { - "query": "row to_boolean(true)", + "query": "from a_index | eval mv_zip(textField, textField, textField)", "error": [], "warning": [] }, { - "query": "row var = to_bool(true)", + "query": "from a_index | eval mv_zip(keywordField, keywordField, keywordField, extraArg)", + "error": [ + "Error: [mv_zip] function expects no more than 3 arguments, got 4." + ], + "warning": [] + }, + { + "query": "from a_index | sort mv_zip(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = to_boolean(to_boolean(true))", + "query": "from a_index | eval mv_zip(null, null, null)", "error": [], "warning": [] }, { - "query": "row var = to_boolean(5)", + "query": "row nullVar = null | eval mv_zip(nullVar, nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row to_boolean(5)", + "query": "row var = now()", "error": [], "warning": [] }, { - "query": "row var = to_bool(5)", + "query": "row now()", "error": [], "warning": [] }, { - "query": "row var = to_boolean(to_integer(true))", + "query": "from a_index | eval var = now()", "error": [], "warning": [] }, { - "query": "row var = to_boolean(to_string(true))", + "query": "from a_index | eval now()", "error": [], "warning": [] }, { - "query": "row var = to_boolean(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval now(extraArg)", "error": [ - "Argument of [to_boolean] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]" + "Error: [now] function expects exactly 0 arguments, got 1." ], "warning": [] }, { - "query": "from a_index | eval var = to_boolean(booleanField)", + "query": "from a_index | sort now()", "error": [], "warning": [] }, { - "query": "from a_index | eval to_boolean(booleanField)", + "query": "row nullVar = null | eval now()", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_bool(booleanField)", + "query": "row var = pi()", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_boolean(to_boolean(booleanField))", + "query": "row pi()", "error": [], "warning": [] }, { - "query": "from a_index | eval to_boolean(cartesianPointField)", - "error": [ - "Argument of [to_boolean] must be [boolean], found value [cartesianPointField] type [cartesian_point]" - ], + "query": "from a_index | where pi() > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_boolean(numberField)", + "query": "from a_index | eval var = pi()", "error": [], "warning": [] }, { - "query": "from a_index | eval to_boolean(numberField)", + "query": "from a_index | eval pi()", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_bool(numberField)", - "error": [], + "query": "from a_index | eval pi(extraArg)", + "error": [ + "Error: [pi] function expects exactly 0 arguments, got 1." + ], "warning": [] }, { - "query": "from a_index | eval var = to_boolean(to_integer(booleanField))", + "query": "from a_index | sort pi()", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_boolean(to_string(booleanField))", + "query": "row nullVar = null | eval pi()", "error": [], "warning": [] }, { - "query": "from a_index | eval to_boolean(booleanField, extraArg)", - "error": [ - "Error: [to_boolean] function expects exactly one argument, got 2." - ], + "query": "row var = pow(5.5, 5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_boolean(booleanField)", + "query": "row pow(5.5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_boolean(null)", + "query": "row var = pow(to_double(true), to_double(true))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_boolean(nullVar)", + "query": "row var = pow(5.5, 5)", "error": [], "warning": [] }, { - "query": "row var = to_cartesianpoint(\"a\")", + "query": "row pow(5.5, 5)", "error": [], "warning": [] }, { - "query": "row to_cartesianpoint(\"a\")", + "query": "row var = pow(to_double(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianpoint(stringField)", + "query": "row var = pow(to_double(true), 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianpoint(stringField)", + "query": "row var = pow(5, 5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianpoint(*)", - "error": [ - "Using wildcards (*) in to_cartesianpoint is not allowed" - ], + "query": "row pow(5, 5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_cartesianpoint(stringField)", + "query": "row var = pow(to_integer(true), to_double(true))", "error": [], "warning": [] }, { - "query": "row var = to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "row var = pow(5, 5)", "error": [], "warning": [] }, { - "query": "row to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "row pow(5, 5)", "error": [], "warning": [] }, { - "query": "row var = to_cartesianpoint(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = pow(to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = to_cartesianpoint(to_string(true))", + "query": "row var = pow(to_integer(true), 5)", "error": [], "warning": [] }, { - "query": "row var = to_cartesianpoint(true)", - "error": [ - "Argument of [to_cartesianpoint] must be [cartesian_point], found value [true] type [boolean]" - ], + "query": "row var = pow(5, to_double(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianpoint(cartesianPointField)", + "query": "row var = pow(5, to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianpoint(cartesianPointField)", - "error": [], + "query": "row var = pow(true, true)", + "error": [ + "Argument of [pow] must be [double], found value [true] type [boolean]", + "Argument of [pow] must be [double], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianpoint(to_cartesianpoint(cartesianPointField))", + "query": "from a_index | where pow(doubleField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianpoint(booleanField)", + "query": "from a_index | where pow(booleanField, booleanField) > 0", "error": [ - "Argument of [to_cartesianpoint] must be [cartesian_point], found value [booleanField] type [boolean]" + "Argument of [pow] must be [double], found value [booleanField] type [boolean]", + "Argument of [pow] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianpoint(to_string(booleanField))", + "query": "from a_index | where pow(doubleField, integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianpoint(cartesianPointField, extraArg)", - "error": [ - "Error: [to_cartesianpoint] function expects exactly one argument, got 2." - ], + "query": "from a_index | where pow(doubleField, longField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_cartesianpoint(cartesianPointField)", + "query": "from a_index | where pow(doubleField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianpoint(null)", + "query": "from a_index | where pow(integerField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_cartesianpoint(nullVar)", + "query": "from a_index | where pow(integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_cartesianshape(\"a\")", + "query": "from a_index | where pow(integerField, longField) > 0", "error": [], "warning": [] }, { - "query": "row to_cartesianshape(\"a\")", + "query": "from a_index | where pow(integerField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianshape(stringField)", + "query": "from a_index | where pow(longField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianshape(stringField)", + "query": "from a_index | where pow(longField, integerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianshape(*)", - "error": [ - "Using wildcards (*) in to_cartesianshape is not allowed" - ], + "query": "from a_index | where pow(longField, longField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_cartesianshape(stringField)", + "query": "from a_index | where pow(longField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | where pow(unsignedLongField, doubleField) > 0", "error": [], "warning": [] }, { - "query": "row to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | where pow(unsignedLongField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_cartesianshape(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | where pow(unsignedLongField, longField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_cartesianshape(to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | where pow(unsignedLongField, unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row to_cartesianshape(to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = pow(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_cartesianshape(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval pow(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_cartesianshape(to_string(true))", + "query": "from a_index | eval var = pow(to_double(booleanField), to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = to_cartesianshape(true)", + "query": "from a_index | eval pow(booleanField, booleanField)", "error": [ - "Argument of [to_cartesianshape] must be [cartesian_point], found value [true] type [boolean]" + "Argument of [pow] must be [double], found value [booleanField] type [boolean]", + "Argument of [pow] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianshape(cartesianPointField)", + "query": "from a_index | eval var = pow(doubleField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianshape(cartesianPointField)", + "query": "from a_index | eval pow(doubleField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianshape(to_cartesianpoint(cartesianPointField))", + "query": "from a_index | eval var = pow(to_double(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianshape(booleanField)", - "error": [ - "Argument of [to_cartesianshape] must be [cartesian_point], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = pow(doubleField, longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianshape(cartesianShapeField)", + "query": "from a_index | eval pow(doubleField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianshape(cartesianShapeField)", + "query": "from a_index | eval var = pow(to_double(booleanField), longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianshape(to_cartesianshape(cartesianPointField))", + "query": "from a_index | eval var = pow(doubleField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_cartesianshape(to_string(booleanField))", + "query": "from a_index | eval pow(doubleField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianshape(cartesianPointField, extraArg)", - "error": [ - "Error: [to_cartesianshape] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval var = pow(to_double(booleanField), unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_cartesianshape(cartesianPointField)", + "query": "from a_index | eval var = pow(integerField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_cartesianshape(null)", + "query": "from a_index | eval pow(integerField, doubleField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_cartesianshape(nullVar)", + "query": "from a_index | eval var = pow(to_integer(booleanField), to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = to_datetime(\"a\")", + "query": "from a_index | eval var = pow(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row to_datetime(\"a\")", + "query": "from a_index | eval pow(integerField, integerField)", "error": [], "warning": [] }, { - "query": "row var = to_dt(\"a\")", + "query": "from a_index | eval var = pow(to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_datetime(stringField)", + "query": "from a_index | eval var = pow(integerField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_datetime(stringField)", + "query": "from a_index | eval pow(integerField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_dt(stringField)", + "query": "from a_index | eval var = pow(to_integer(booleanField), longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_datetime(*)", - "error": [ - "Using wildcards (*) in to_datetime is not allowed" - ], + "query": "from a_index | eval var = pow(integerField, unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_datetime(stringField)", + "query": "from a_index | eval pow(integerField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = to_datetime(now())", + "query": "from a_index | eval var = pow(to_integer(booleanField), unsignedLongField)", "error": [], "warning": [] }, { - "query": "row to_datetime(now())", + "query": "from a_index | eval var = pow(longField, doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_dt(now())", + "query": "from a_index | eval pow(longField, doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_datetime(to_datetime(now()))", + "query": "from a_index | eval var = pow(longField, to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = to_datetime(5)", + "query": "from a_index | eval var = pow(longField, integerField)", "error": [], "warning": [] }, { - "query": "row to_datetime(5)", + "query": "from a_index | eval pow(longField, integerField)", "error": [], "warning": [] }, { - "query": "row var = to_dt(5)", + "query": "from a_index | eval var = pow(longField, to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = to_datetime(to_integer(true))", + "query": "from a_index | eval var = pow(longField, longField)", "error": [], "warning": [] }, { - "query": "row var = to_datetime(to_string(true))", + "query": "from a_index | eval pow(longField, longField)", "error": [], "warning": [] }, { - "query": "row var = to_datetime(true)", - "error": [ - "Argument of [to_datetime] must be [date], found value [true] type [boolean]" - ], + "query": "from a_index | eval var = pow(longField, unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_datetime(dateField)", + "query": "from a_index | eval pow(longField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_datetime(dateField)", + "query": "from a_index | eval var = pow(unsignedLongField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_dt(dateField)", + "query": "from a_index | eval pow(unsignedLongField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_datetime(to_datetime(dateField))", + "query": "from a_index | eval var = pow(unsignedLongField, to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_datetime(booleanField)", - "error": [ - "Argument of [to_datetime] must be [date], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = pow(unsignedLongField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_datetime(numberField)", + "query": "from a_index | eval pow(unsignedLongField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_datetime(numberField)", + "query": "from a_index | eval var = pow(unsignedLongField, to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_dt(numberField)", + "query": "from a_index | eval var = pow(unsignedLongField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_datetime(to_integer(booleanField))", + "query": "from a_index | eval pow(unsignedLongField, longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_datetime(to_string(booleanField))", + "query": "from a_index | eval var = pow(unsignedLongField, unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_datetime(dateField, extraArg)", + "query": "from a_index | eval pow(unsignedLongField, unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval pow(doubleField, doubleField, extraArg)", "error": [ - "Error: [to_datetime] function expects exactly one argument, got 2." + "Error: [pow] function expects exactly 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | sort to_datetime(dateField)", + "query": "from a_index | sort pow(doubleField, doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_datetime(null)", + "query": "from a_index | eval pow(null, null)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_datetime(nullVar)", + "query": "row nullVar = null | eval pow(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row var = to_degrees(5)", + "query": "row var = repeat(\"a\", 5)", "error": [], "warning": [] }, { - "query": "row to_degrees(5)", + "query": "row repeat(\"a\", 5)", "error": [], "warning": [] }, { - "query": "row var = to_degrees(to_integer(\"a\"))", + "query": "row var = repeat(to_string(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = to_degrees(\"a\")", + "query": "row var = repeat(true, true)", "error": [ - "Argument of [to_degrees] must be [number], found value [\"a\"] type [string]" + "Argument of [repeat] must be [keyword], found value [true] type [boolean]", + "Argument of [repeat] must be [integer], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where to_degrees(numberField) > 0", + "query": "from a_index | eval var = repeat(keywordField, integerField)", "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": "from a_index | eval repeat(keywordField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_degrees(numberField)", + "query": "from a_index | eval var = repeat(to_string(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_degrees(numberField)", - "error": [], + "query": "from a_index | eval repeat(booleanField, booleanField)", + "error": [ + "Argument of [repeat] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [repeat] must be [integer], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_degrees(to_integer(stringField))", + "query": "from a_index | eval var = repeat(textField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_degrees(stringField)", - "error": [ - "Argument of [to_degrees] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval repeat(textField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval to_degrees(numberField, extraArg)", + "query": "from a_index | eval repeat(keywordField, integerField, extraArg)", "error": [ - "Error: [to_degrees] function expects exactly one argument, got 2." + "Error: [repeat] function expects exactly 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | eval var = to_degrees(*)", - "error": [ - "Using wildcards (*) in to_degrees is not allowed" - ], + "query": "from a_index | sort repeat(keywordField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_degrees(numberField)", + "query": "from a_index | eval repeat(null, null)", "error": [], "warning": [] }, { - "query": "row var = to_degrees(to_integer(true))", + "query": "row nullVar = null | eval repeat(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row var = to_degrees(true)", - "error": [ - "Argument of [to_degrees] must be [number], found value [true] type [boolean]" - ], + "query": "row var = replace(\"a\", \"a\", \"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | where to_degrees(booleanField) > 0", - "error": [ - "Argument of [to_degrees] must be [number], found value [booleanField] type [boolean]" - ], + "query": "row replace(\"a\", \"a\", \"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_degrees(to_integer(booleanField))", + "query": "row var = replace(to_string(true), to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_degrees(booleanField)", + "query": "row var = replace(true, true, true)", "error": [ - "Argument of [to_degrees] must be [number], found value [booleanField] type [boolean]" + "Argument of [replace] must be [keyword], found value [true] type [boolean]", + "Argument of [replace] must be [keyword], found value [true] type [boolean]", + "Argument of [replace] must be [keyword], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval to_degrees(null)", + "query": "from a_index | eval var = replace(keywordField, keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_degrees(nullVar)", + "query": "from a_index | eval replace(keywordField, keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = to_double(\"a\")", + "query": "from a_index | eval var = replace(to_string(booleanField), to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row to_double(\"a\")", - "error": [], + "query": "from a_index | eval replace(booleanField, booleanField, booleanField)", + "error": [ + "Argument of [replace] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [replace] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [replace] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = to_dbl(\"a\")", + "query": "from a_index | eval var = replace(keywordField, keywordField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_double(stringField)", + "query": "from a_index | eval replace(keywordField, keywordField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_double(stringField)", + "query": "from a_index | eval var = replace(keywordField, textField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_dbl(stringField)", + "query": "from a_index | eval replace(keywordField, textField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_double(*)", - "error": [ - "Using wildcards (*) in to_double is not allowed" - ], + "query": "from a_index | eval var = replace(keywordField, textField, textField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_double(stringField)", + "query": "from a_index | eval replace(keywordField, textField, textField)", "error": [], "warning": [] }, { - "query": "row var = to_double(true)", + "query": "from a_index | eval var = replace(textField, keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row to_double(true)", + "query": "from a_index | eval replace(textField, keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = to_dbl(true)", + "query": "from a_index | eval var = replace(textField, keywordField, textField)", "error": [], "warning": [] }, { - "query": "row var = to_double(to_boolean(true))", + "query": "from a_index | eval replace(textField, keywordField, textField)", "error": [], "warning": [] }, { - "query": "row var = to_double(5)", + "query": "from a_index | eval var = replace(textField, textField, keywordField)", "error": [], "warning": [] }, { - "query": "row to_double(5)", + "query": "from a_index | eval replace(textField, textField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = to_dbl(5)", + "query": "from a_index | eval var = replace(textField, textField, textField)", "error": [], "warning": [] }, { - "query": "row var = to_double(to_integer(true))", + "query": "from a_index | eval replace(textField, textField, textField)", "error": [], "warning": [] }, { - "query": "row var = to_double(now())", - "error": [], + "query": "from a_index | eval replace(keywordField, keywordField, keywordField, extraArg)", + "error": [ + "Error: [replace] function expects exactly 3 arguments, got 4." + ], "warning": [] }, { - "query": "row to_double(now())", + "query": "from a_index | sort replace(keywordField, keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = to_dbl(now())", + "query": "from a_index | eval replace(null, null, null)", "error": [], "warning": [] }, { - "query": "row var = to_double(to_datetime(now()))", + "query": "row nullVar = null | eval replace(nullVar, nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row var = to_double(to_string(true))", + "query": "row var = right(\"a\", 5)", "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]" - ], + "query": "row right(\"a\", 5)", + "error": [], "warning": [] }, { - "query": "from a_index | where to_double(booleanField) > 0", + "query": "row var = right(to_string(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | where to_double(cartesianPointField) > 0", + "query": "row var = right(true, true)", "error": [ - "Argument of [to_double] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Argument of [right] must be [keyword], found value [true] type [boolean]", + "Argument of [right] must be [integer], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where to_double(numberField) > 0", - "error": [], - "warning": [] - }, - { - "query": "from a_index | where to_double(dateField) > 0", + "query": "from a_index | eval var = right(keywordField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | where to_double(stringField) > 0", + "query": "from a_index | eval right(keywordField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_double(booleanField)", + "query": "from a_index | eval var = right(to_string(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_double(booleanField)", - "error": [], + "query": "from a_index | eval right(booleanField, booleanField)", + "error": [ + "Argument of [right] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [right] must be [integer], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_dbl(booleanField)", + "query": "from a_index | eval var = right(textField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_double(to_boolean(booleanField))", + "query": "from a_index | eval right(textField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_double(cartesianPointField)", + "query": "from a_index | eval right(keywordField, integerField, extraArg)", "error": [ - "Argument of [to_double] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Error: [right] function expects exactly 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | eval var = to_double(numberField)", + "query": "from a_index | sort right(keywordField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_double(numberField)", + "query": "from a_index | eval right(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_dbl(numberField)", + "query": "row nullVar = null | eval right(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_double(to_integer(booleanField))", + "query": "row var = round(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_double(dateField)", + "query": "row round(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_double(dateField)", + "query": "row var = round(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_dbl(dateField)", + "query": "row var = round(5.5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_double(to_datetime(dateField))", + "query": "row round(5.5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_double(to_string(booleanField))", + "query": "row var = round(to_double(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_double(booleanField, extraArg)", - "error": [ - "Error: [to_double] function expects exactly one argument, got 2." - ], + "query": "row var = round(5)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_double(booleanField)", + "query": "row round(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_double(null)", + "query": "row var = round(to_integer(true))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_double(nullVar)", + "query": "row var = round(5, 5)", "error": [], "warning": [] }, { - "query": "row var = to_geopoint(\"a\")", + "query": "row round(5, 5)", "error": [], "warning": [] }, { - "query": "row to_geopoint(\"a\")", + "query": "row var = round(to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geopoint(stringField)", + "query": "row var = round(5, to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geopoint(stringField)", + "query": "row var = round(true, true)", + "error": [ + "Argument of [round] must be [double], found value [true] type [boolean]", + "Argument of [round] must be [integer], found value [true] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | where round(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geopoint(*)", + "query": "from a_index | where round(booleanField) > 0", "error": [ - "Using wildcards (*) in to_geopoint is not allowed" + "Argument of [round] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort to_geopoint(stringField)", + "query": "from a_index | where round(doubleField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_geopoint(to_geopoint(\"POINT (30 10)\"))", - "error": [], + "query": "from a_index | where round(booleanField, booleanField) > 0", + "error": [ + "Argument of [round] must be [double], found value [booleanField] type [boolean]", + "Argument of [round] must be [integer], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row to_geopoint(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | where round(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_geopoint(to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | where round(integerField, integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_geopoint(to_string(true))", + "query": "from a_index | where round(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_geopoint(true)", - "error": [ - "Argument of [to_geopoint] must be [geo_point], found value [true] type [boolean]" - ], + "query": "from a_index | where round(longField, integerField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geopoint(geoPointField)", + "query": "from a_index | where round(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geopoint(geoPointField)", + "query": "from a_index | eval var = round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geopoint(to_geopoint(geoPointField))", + "query": "from a_index | eval round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geopoint(booleanField)", - "error": [ - "Argument of [to_geopoint] must be [geo_point], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = round(to_double(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geopoint(to_string(booleanField))", - "error": [], + "query": "from a_index | eval round(booleanField)", + "error": [ + "Argument of [round] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval to_geopoint(geoPointField, extraArg)", + "query": "from a_index | eval var = round(*)", "error": [ - "Error: [to_geopoint] function expects exactly one argument, got 2." + "Using wildcards (*) in round is not allowed" ], "warning": [] }, { - "query": "from a_index | sort to_geopoint(geoPointField)", + "query": "from a_index | eval var = round(doubleField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geopoint(null)", + "query": "from a_index | eval round(doubleField, integerField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_geopoint(nullVar)", + "query": "from a_index | eval var = round(to_double(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = to_geoshape(\"a\")", + "query": "from a_index | eval round(booleanField, booleanField)", + "error": [ + "Argument of [round] must be [double], found value [booleanField] type [boolean]", + "Argument of [round] must be [integer], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = round(integerField)", "error": [], "warning": [] }, { - "query": "row to_geoshape(\"a\")", + "query": "from a_index | eval round(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geoshape(stringField)", + "query": "from a_index | eval var = round(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geoshape(stringField)", + "query": "from a_index | eval var = round(integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geoshape(*)", - "error": [ - "Using wildcards (*) in to_geoshape is not allowed" - ], + "query": "from a_index | eval round(integerField, integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_geoshape(stringField)", + "query": "from a_index | eval var = round(to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = to_geoshape(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = round(longField)", "error": [], "warning": [] }, { - "query": "row to_geoshape(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval round(longField)", "error": [], "warning": [] }, { - "query": "row var = to_geoshape(to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = round(longField, integerField)", "error": [], "warning": [] }, { - "query": "row var = to_geoshape(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval round(longField, integerField)", "error": [], "warning": [] }, { - "query": "row to_geoshape(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = round(longField, to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = to_geoshape(to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = round(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = to_geoshape(to_string(true))", + "query": "from a_index | eval round(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = to_geoshape(true)", + "query": "from a_index | eval round(doubleField, integerField, extraArg)", "error": [ - "Argument of [to_geoshape] must be [geo_point], found value [true] type [boolean]" + "Error: [round] function expects no more than 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | eval var = to_geoshape(geoPointField)", + "query": "from a_index | sort round(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geoshape(geoPointField)", + "query": "from a_index | eval round(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geoshape(to_geopoint(geoPointField))", + "query": "row nullVar = null | eval round(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geoshape(booleanField)", - "error": [ - "Argument of [to_geoshape] must be [geo_point], found value [booleanField] type [boolean]" - ], + "query": "row var = rtrim(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geoshape(geoShapeField)", + "query": "row rtrim(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geoshape(geoShapeField)", + "query": "row var = rtrim(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_geoshape(to_geoshape(geoPointField))", - "error": [], + "query": "row var = rtrim(true)", + "error": [ + "Argument of [rtrim] must be [keyword], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_geoshape(to_string(booleanField))", + "query": "from a_index | eval var = rtrim(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geoshape(geoPointField, extraArg)", - "error": [ - "Error: [to_geoshape] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval rtrim(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_geoshape(geoPointField)", + "query": "from a_index | eval var = rtrim(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_geoshape(null)", - "error": [], + "query": "from a_index | eval rtrim(booleanField)", + "error": [ + "Argument of [rtrim] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row nullVar = null | eval to_geoshape(nullVar)", - "error": [], + "query": "from a_index | eval var = rtrim(*)", + "error": [ + "Using wildcards (*) in rtrim is not allowed" + ], "warning": [] }, { - "query": "row var = to_integer(\"a\")", + "query": "from a_index | eval var = rtrim(textField)", "error": [], "warning": [] }, { - "query": "row to_integer(\"a\")", + "query": "from a_index | eval rtrim(textField)", "error": [], "warning": [] }, { - "query": "row var = to_int(\"a\")", - "error": [], + "query": "from a_index | eval rtrim(keywordField, extraArg)", + "error": [ + "Error: [rtrim] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "from a_index | eval var = to_integer(stringField)", + "query": "from a_index | sort rtrim(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_integer(stringField)", + "query": "from a_index | eval rtrim(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_int(stringField)", + "query": "row nullVar = null | eval rtrim(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_integer(*)", - "error": [ - "Using wildcards (*) in to_integer is not allowed" - ], + "query": "row var = signum(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_integer(stringField)", + "query": "row signum(5.5)", "error": [], "warning": [] }, { - "query": "row var = to_integer(true)", + "query": "row var = signum(to_double(true))", "error": [], "warning": [] }, { - "query": "row to_integer(true)", + "query": "row var = signum(5)", "error": [], "warning": [] }, { - "query": "row var = to_int(true)", + "query": "row signum(5)", "error": [], "warning": [] }, { - "query": "row var = to_integer(to_boolean(true))", + "query": "row var = signum(to_integer(true))", "error": [], "warning": [] }, { - "query": "row var = to_integer(5)", - "error": [], + "query": "row var = signum(true)", + "error": [ + "Argument of [signum] must be [double], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row to_integer(5)", + "query": "from a_index | where signum(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_int(5)", - "error": [], + "query": "from a_index | where signum(booleanField) > 0", + "error": [ + "Argument of [signum] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = to_integer(to_integer(true))", + "query": "from a_index | where signum(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_integer(now())", + "query": "from a_index | where signum(longField) > 0", "error": [], "warning": [] }, { - "query": "row to_integer(now())", + "query": "from a_index | where signum(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_int(now())", + "query": "from a_index | eval var = signum(doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_integer(to_datetime(now()))", + "query": "from a_index | eval signum(doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_integer(to_string(true))", + "query": "from a_index | eval var = signum(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = to_integer(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | eval signum(booleanField)", "error": [ - "Argument of [to_integer] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]" + "Argument of [signum] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where to_integer(booleanField) > 0", - "error": [], - "warning": [] - }, - { - "query": "from a_index | where to_integer(cartesianPointField) > 0", + "query": "from a_index | eval var = signum(*)", "error": [ - "Argument of [to_integer] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Using wildcards (*) in signum is not allowed" ], "warning": [] }, { - "query": "from a_index | where to_integer(numberField) > 0", + "query": "from a_index | eval var = signum(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | where to_integer(dateField) > 0", + "query": "from a_index | eval signum(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | where to_integer(stringField) > 0", + "query": "from a_index | eval var = signum(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_integer(booleanField)", + "query": "from a_index | eval var = signum(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_integer(booleanField)", + "query": "from a_index | eval signum(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_int(booleanField)", + "query": "from a_index | eval var = signum(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_integer(to_boolean(booleanField))", + "query": "from a_index | eval signum(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_integer(cartesianPointField)", + "query": "from a_index | eval signum(doubleField, extraArg)", "error": [ - "Argument of [to_integer] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Error: [signum] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = to_integer(numberField)", + "query": "from a_index | sort signum(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_integer(numberField)", + "query": "from a_index | eval signum(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_int(numberField)", + "query": "row nullVar = null | eval signum(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_integer(to_integer(booleanField))", + "query": "row var = sin(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_integer(dateField)", + "query": "row sin(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_integer(dateField)", + "query": "row var = sin(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_int(dateField)", + "query": "row var = sin(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_integer(to_datetime(dateField))", + "query": "row sin(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_integer(to_string(booleanField))", + "query": "row var = sin(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_integer(booleanField, extraArg)", + "query": "row var = sin(true)", "error": [ - "Error: [to_integer] function expects exactly one argument, got 2." + "Argument of [sin] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort to_integer(booleanField)", + "query": "from a_index | where sin(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval to_integer(null)", + "query": "from a_index | where sin(booleanField) > 0", + "error": [ + "Argument of [sin] must be [double], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | where sin(integerField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_integer(nullVar)", + "query": "from a_index | where sin(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_ip(\"a\")", + "query": "from a_index | where sin(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row to_ip(\"a\")", + "query": "from a_index | eval var = sin(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_ip(stringField)", + "query": "from a_index | eval sin(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_ip(stringField)", + "query": "from a_index | eval var = sin(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_ip(*)", + "query": "from a_index | eval sin(booleanField)", "error": [ - "Using wildcards (*) in to_ip is not allowed" + "Argument of [sin] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort to_ip(stringField)", - "error": [], + "query": "from a_index | eval var = sin(*)", + "error": [ + "Using wildcards (*) in sin is not allowed" + ], "warning": [] }, { - "query": "row var = to_ip(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = sin(integerField)", "error": [], "warning": [] }, { - "query": "row to_ip(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval sin(integerField)", "error": [], "warning": [] }, { - "query": "row var = to_ip(to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | eval var = sin(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row var = to_ip(to_string(true))", + "query": "from a_index | eval var = sin(longField)", "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)", + "query": "from a_index | eval sin(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_ip(ipField)", + "query": "from a_index | eval var = sin(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_ip(to_ip(ipField))", + "query": "from a_index | eval sin(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_ip(booleanField)", + "query": "from a_index | eval sin(doubleField, extraArg)", "error": [ - "Argument of [to_ip] must be [ip], found value [booleanField] type [boolean]" + "Error: [sin] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = to_ip(to_string(booleanField))", + "query": "from a_index | sort sin(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_ip(ipField, extraArg)", - "error": [ - "Error: [to_ip] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval sin(null)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_ip(ipField)", + "query": "row nullVar = null | eval sin(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_ip(null)", + "query": "row var = sinh(5.5)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_ip(nullVar)", + "query": "row sinh(5.5)", "error": [], "warning": [] }, { - "query": "row var = to_long(\"a\")", + "query": "row var = sinh(to_double(true))", "error": [], "warning": [] }, { - "query": "row to_long(\"a\")", + "query": "row var = sinh(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_long(stringField)", + "query": "row sinh(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_long(stringField)", + "query": "row var = sinh(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_long(*)", + "query": "row var = sinh(true)", "error": [ - "Using wildcards (*) in to_long is not allowed" + "Argument of [sinh] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort to_long(stringField)", + "query": "from a_index | where sinh(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_long(true)", - "error": [], + "query": "from a_index | where sinh(booleanField) > 0", + "error": [ + "Argument of [sinh] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row to_long(true)", + "query": "from a_index | where sinh(integerField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_long(to_boolean(true))", + "query": "from a_index | where sinh(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_long(5)", + "query": "from a_index | where sinh(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row to_long(5)", + "query": "from a_index | eval var = sinh(doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_long(to_integer(true))", + "query": "from a_index | eval sinh(doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_long(now())", + "query": "from a_index | eval var = sinh(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row to_long(now())", - "error": [], + "query": "from a_index | eval sinh(booleanField)", + "error": [ + "Argument of [sinh] must be [double], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = to_long(to_datetime(now()))", - "error": [], + "query": "from a_index | eval var = sinh(*)", + "error": [ + "Using wildcards (*) in sinh is not allowed" + ], "warning": [] }, { - "query": "row var = to_long(to_string(true))", + "query": "from a_index | eval var = sinh(integerField)", "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]" - ], + "query": "from a_index | eval sinh(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | where to_long(booleanField) > 0", + "query": "from a_index | eval var = sinh(to_integer(booleanField))", "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]" - ], + "query": "from a_index | eval var = sinh(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | where to_long(numberField) > 0", + "query": "from a_index | eval sinh(longField)", "error": [], "warning": [] }, { - "query": "from a_index | where to_long(dateField) > 0", + "query": "from a_index | eval var = sinh(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | where to_long(stringField) > 0", + "query": "from a_index | eval sinh(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_long(booleanField)", - "error": [], + "query": "from a_index | eval sinh(doubleField, extraArg)", + "error": [ + "Error: [sinh] function expects exactly one argument, got 2." + ], "warning": [] }, { - "query": "from a_index | eval to_long(booleanField)", + "query": "from a_index | sort sinh(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_long(to_boolean(booleanField))", + "query": "from a_index | eval sinh(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_long(cartesianPointField)", - "error": [ - "Argument of [to_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]" - ], + "query": "row nullVar = null | eval sinh(nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_long(numberField)", + "query": "row var = split(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval to_long(numberField)", + "query": "row split(\"a\", \"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_long(to_integer(booleanField))", + "query": "row var = split(to_string(true), to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_long(dateField)", - "error": [], + "query": "row var = split(true, true)", + "error": [ + "Argument of [split] must be [keyword], found value [true] type [boolean]", + "Argument of [split] must be [keyword], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | eval to_long(dateField)", + "query": "from a_index | eval var = split(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_long(to_datetime(dateField))", + "query": "from a_index | eval split(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_long(to_string(booleanField))", + "query": "from a_index | eval var = split(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_long(booleanField, extraArg)", + "query": "from a_index | eval split(booleanField, booleanField)", "error": [ - "Error: [to_long] function expects exactly one argument, got 2." + "Argument of [split] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [split] must be [keyword], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | sort to_long(booleanField)", + "query": "from a_index | eval var = split(keywordField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_long(null)", + "query": "from a_index | eval split(keywordField, textField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_long(nullVar)", + "query": "from a_index | eval var = split(textField, keywordField)", "error": [], "warning": [] }, { - "query": "row var = to_lower(\"a\")", + "query": "from a_index | eval split(textField, keywordField)", "error": [], "warning": [] }, { - "query": "row to_lower(\"a\")", + "query": "from a_index | eval var = split(textField, textField)", "error": [], "warning": [] }, { - "query": "row var = to_lower(to_string(\"a\"))", + "query": "from a_index | eval split(textField, textField)", "error": [], "warning": [] }, { - "query": "row var = to_lower(5)", + "query": "from a_index | eval split(keywordField, keywordField, extraArg)", "error": [ - "Argument of [to_lower] must be [string], found value [5] type [number]" + "Error: [split] function expects exactly 2 arguments, got 3." ], "warning": [] }, { - "query": "from a_index | where length(to_lower(stringField)) > 0", + "query": "from a_index | sort split(keywordField, keywordField)", "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)", + "query": "from a_index | eval split(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_lower(stringField)", + "query": "row nullVar = null | eval split(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_lower(to_string(stringField))", + "query": "row var = sqrt(5.5)", "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." - ], + "query": "row sqrt(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_lower(*)", - "error": [ - "Using wildcards (*) in to_lower is not allowed" - ], + "query": "row var = sqrt(to_double(true))", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_lower(stringField)", + "query": "row var = sqrt(5)", "error": [], "warning": [] }, { - "query": "row var = to_lower(to_string(true))", + "query": "row sqrt(5)", "error": [], "warning": [] }, { - "query": "row var = to_lower(true)", - "error": [ - "Argument of [to_lower] must be [string], found value [true] type [boolean]" - ], + "query": "row var = sqrt(to_integer(true))", + "error": [], "warning": [] }, { - "query": "from a_index | where length(to_lower(booleanField)) > 0", + "query": "row var = sqrt(true)", "error": [ - "Argument of [to_lower] must be [string], found value [booleanField] type [boolean]" + "Argument of [sqrt] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = to_lower(to_string(booleanField))", + "query": "from a_index | where sqrt(doubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval to_lower(booleanField)", + "query": "from a_index | where sqrt(booleanField) > 0", "error": [ - "Argument of [to_lower] must be [string], found value [booleanField] type [boolean]" + "Argument of [sqrt] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval to_lower(null)", + "query": "from a_index | where sqrt(integerField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_lower(nullVar)", + "query": "from a_index | where sqrt(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = to_radians(5)", + "query": "from a_index | where sqrt(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row to_radians(5)", + "query": "from a_index | eval var = sqrt(doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_radians(to_integer(\"a\"))", + "query": "from a_index | eval sqrt(doubleField)", "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", + "query": "from a_index | eval var = sqrt(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | where to_radians(stringField) > 0", + "query": "from a_index | eval sqrt(booleanField)", "error": [ - "Argument of [to_radians] must be [number], found value [stringField] type [string]" + "Argument of [sqrt] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = to_radians(numberField)", - "error": [], + "query": "from a_index | eval var = sqrt(*)", + "error": [ + "Using wildcards (*) in sqrt is not allowed" + ], "warning": [] }, { - "query": "from a_index | eval to_radians(numberField)", + "query": "from a_index | eval var = sqrt(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_radians(to_integer(stringField))", + "query": "from a_index | eval sqrt(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_radians(stringField)", - "error": [ - "Argument of [to_radians] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = sqrt(to_integer(booleanField))", + "error": [], "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 | eval var = sqrt(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_radians(*)", + "query": "from a_index | eval sqrt(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = sqrt(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval sqrt(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval sqrt(doubleField, extraArg)", "error": [ - "Using wildcards (*) in to_radians is not allowed" + "Error: [sqrt] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | sort to_radians(numberField)", + "query": "from a_index | sort sqrt(doubleField)", "error": [], "warning": [] }, { - "query": "row var = to_radians(to_integer(true))", + "query": "from a_index | eval sqrt(null)", "error": [], "warning": [] }, { - "query": "row var = to_radians(true)", + "query": "row nullVar = null | eval sqrt(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "row var = st_contains(cartesianPointField, cartesianPointField)", "error": [ - "Argument of [to_radians] must be [number], found value [true] type [boolean]" + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | where to_radians(booleanField) > 0", + "query": "row st_contains(cartesianPointField, cartesianPointField)", "error": [ - "Argument of [to_radians] must be [number], found value [booleanField] type [boolean]" + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = to_radians(to_integer(booleanField))", - "error": [], + "query": "row var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_radians(booleanField)", + "query": "row var = st_contains(cartesianPointField, to_cartesianshape(\"POINT (30 10)\"))", "error": [ - "Argument of [to_radians] must be [number], found value [booleanField] type [boolean]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval to_radians(null)", - "error": [], + "query": "row st_contains(cartesianPointField, to_cartesianshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row nullVar = null | eval to_radians(nullVar)", - "error": [], + "query": "row var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row var = to_string(\"a\")", - "error": [], + "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row to_string(\"a\")", - "error": [], + "query": "row st_contains(to_cartesianshape(\"POINT (30 10)\"), cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row var = to_str(\"a\")", - "error": [], + "query": "row var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_string(stringField)", + "query": "row var = st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_string(stringField)", + "query": "row st_contains(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_str(stringField)", - "error": [], + "query": "row var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_string(*)", + "query": "row var = st_contains(geoPointField, geoPointField)", "error": [ - "Using wildcards (*) in to_string is not allowed" + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | sort to_string(stringField)", - "error": [], + "query": "row st_contains(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = to_string(true)", - "error": [], + "query": "row var = st_contains(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row to_string(true)", - "error": [], + "query": "row var = st_contains(geoPointField, to_geoshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = to_str(true)", - "error": [], + "query": "row st_contains(geoPointField, to_geoshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = to_string(to_boolean(true))", - "error": [], + "query": "row var = st_contains(to_geopoint(geoPointField), to_geoshape(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = to_string(to_cartesianpoint(\"POINT (30 10)\"))", - "error": [], + "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row to_string(to_cartesianpoint(\"POINT (30 10)\"))", - "error": [], + "query": "row st_contains(to_geoshape(\"POINT (30 10)\"), geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = to_str(to_cartesianpoint(\"POINT (30 10)\"))", - "error": [], + "query": "row var = st_contains(to_geoshape(geoPointField), to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = to_string(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "row var = st_contains(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = to_string(to_cartesianshape(\"POINT (30 10)\"))", + "query": "row st_contains(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row to_string(to_cartesianshape(\"POINT (30 10)\"))", - "error": [], + "query": "row var = st_contains(to_geoshape(geoPointField), to_geoshape(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = to_str(to_cartesianshape(\"POINT (30 10)\"))", - "error": [], + "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": "row var = to_string(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = st_contains(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "row var = to_string(now())", + "query": "from a_index | eval st_contains(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "row to_string(now())", + "query": "from a_index | eval var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row var = to_str(now())", - "error": [], + "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": "row var = to_string(to_datetime(now()))", + "query": "from a_index | eval var = st_contains(cartesianPointField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_string(5)", + "query": "from a_index | eval st_contains(cartesianPointField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "row to_string(5)", + "query": "from a_index | eval var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row var = to_str(5)", + "query": "from a_index | eval var = st_contains(cartesianShapeField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "row var = to_string(to_integer(true))", + "query": "from a_index | eval st_contains(cartesianShapeField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "row var = to_string(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row to_string(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = st_contains(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_str(to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval st_contains(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_string(to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row var = to_string(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = st_contains(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "row to_string(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval st_contains(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "row var = to_str(to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = to_string(to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = st_contains(geoPointField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_string(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval st_contains(geoPointField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row to_string(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = to_str(to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = st_contains(geoShapeField, geoPointField)", "error": [], "warning": [] }, { - "query": "row var = to_string(to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | eval st_contains(geoShapeField, geoPointField)", "error": [], "warning": [] }, { - "query": "row var = to_string(to_string(true))", + "query": "from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = to_string(to_version(\"1.0.0\"))", + "query": "from a_index | eval var = st_contains(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row to_string(to_version(\"1.0.0\"))", + "query": "from a_index | eval st_contains(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_str(to_version(\"1.0.0\"))", + "query": "from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = to_string(to_version(\"a\"))", - "error": [], + "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 | where length(to_string(booleanField)) > 0", + "query": "from a_index | sort st_contains(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | where length(to_string(cartesianPointField)) > 0", + "query": "from a_index | eval st_contains(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | where length(to_string(cartesianShapeField)) > 0", + "query": "row nullVar = null | eval st_contains(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | where length(to_string(dateField)) > 0", - "error": [], + "query": "row var = st_disjoint(cartesianPointField, cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where length(to_string(numberField)) > 0", - "error": [], + "query": "row st_disjoint(cartesianPointField, cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where length(to_string(geoPointField)) > 0", - "error": [], + "query": "row var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where length(to_string(geoShapeField)) > 0", - "error": [], + "query": "row var = st_disjoint(cartesianPointField, to_cartesianshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where length(to_string(ipField)) > 0", - "error": [], + "query": "row st_disjoint(cartesianPointField, to_cartesianshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where length(to_string(stringField)) > 0", - "error": [], + "query": "row var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where length(to_string(versionField)) > 0", - "error": [], + "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_string(booleanField)", - "error": [], + "query": "row st_disjoint(to_cartesianshape(\"POINT (30 10)\"), cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_string(booleanField)", - "error": [], + "query": "row var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_str(booleanField)", + "query": "row var = st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_boolean(booleanField))", + "query": "row st_disjoint(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(cartesianPointField)", - "error": [], + "query": "row var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_string(cartesianPointField)", - "error": [], + "query": "row var = st_disjoint(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_str(cartesianPointField)", - "error": [], + "query": "row st_disjoint(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_cartesianpoint(cartesianPointField))", - "error": [], + "query": "row var = st_disjoint(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_string(cartesianShapeField)", - "error": [], + "query": "row var = st_disjoint(geoPointField, to_geoshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_string(cartesianShapeField)", - "error": [], + "query": "row st_disjoint(geoPointField, to_geoshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_str(cartesianShapeField)", - "error": [], + "query": "row var = st_disjoint(to_geopoint(geoPointField), to_geoshape(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_cartesianshape(cartesianPointField))", - "error": [], + "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_string(dateField)", - "error": [], + "query": "row st_disjoint(to_geoshape(\"POINT (30 10)\"), geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_string(dateField)", - "error": [], + "query": "row var = st_disjoint(to_geoshape(geoPointField), to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_str(dateField)", + "query": "row var = st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_datetime(dateField))", + "query": "row st_disjoint(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(numberField)", - "error": [], + "query": "row var = st_disjoint(to_geoshape(geoPointField), to_geoshape(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_string(numberField)", - "error": [], + "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 = to_str(numberField)", + "query": "from a_index | eval var = st_disjoint(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_integer(booleanField))", + "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(geoPointField)", + "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_string(geoPointField)", - "error": [], + "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 = to_str(geoPointField)", + "query": "from a_index | eval var = st_disjoint(cartesianPointField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_geopoint(geoPointField))", + "query": "from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(geoShapeField)", + "query": "from a_index | eval var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_string(geoShapeField)", + "query": "from a_index | eval var = st_disjoint(cartesianShapeField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_str(geoShapeField)", + "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_geoshape(geoPointField))", + "query": "from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(ipField)", + "query": "from a_index | eval var = st_disjoint(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_string(ipField)", + "query": "from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_str(ipField)", + "query": "from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_ip(ipField))", + "query": "from a_index | eval var = st_disjoint(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_string(booleanField))", + "query": "from a_index | eval st_disjoint(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(versionField)", + "query": "from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_string(versionField)", + "query": "from a_index | eval var = st_disjoint(geoPointField, geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_str(versionField)", + "query": "from a_index | eval st_disjoint(geoPointField, geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_string(to_version(stringField))", + "query": "from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geoshape(geoPointField))", "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)", + "query": "from a_index | eval var = st_disjoint(geoShapeField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_string(null)", + "query": "from a_index | eval st_disjoint(geoShapeField, geoPointField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_string(nullVar)", + "query": "from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = to_unsigned_long(\"a\")", + "query": "from a_index | eval var = st_disjoint(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row to_unsigned_long(\"a\")", + "query": "from a_index | eval st_disjoint(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_ul(\"a\")", + "query": "from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = to_ulong(\"a\")", - "error": [], + "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 = to_unsigned_long(stringField)", + "query": "from a_index | sort st_disjoint(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_unsigned_long(stringField)", + "query": "from a_index | eval st_disjoint(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_ul(stringField)", + "query": "row nullVar = null | eval st_disjoint(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_ulong(stringField)", - "error": [], + "query": "row var = st_distance(cartesianPointField, cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_unsigned_long(*)", + "query": "row st_distance(cartesianPointField, cartesianPointField)", "error": [ - "Using wildcards (*) in to_unsigned_long is not allowed" + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | sort to_unsigned_long(stringField)", - "error": [], + "query": "row var = st_distance(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row var = to_unsigned_long(true)", - "error": [], + "query": "row var = st_distance(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row to_unsigned_long(true)", - "error": [], + "query": "row st_distance(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = to_ul(true)", - "error": [], + "query": "row var = st_distance(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row var = to_ulong(true)", - "error": [], + "query": "row var = st_distance(true, true)", + "error": [ + "Argument of [st_distance] must be [cartesian_point], found value [true] type [boolean]", + "Argument of [st_distance] must be [cartesian_point], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = to_unsigned_long(to_boolean(true))", + "query": "from a_index | eval var = st_distance(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "row var = to_unsigned_long(now())", + "query": "from a_index | eval st_distance(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "row to_unsigned_long(now())", + "query": "from a_index | eval var = st_distance(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row var = to_ul(now())", - "error": [], + "query": "from a_index | eval st_distance(booleanField, booleanField)", + "error": [ + "Argument of [st_distance] must be [cartesian_point], found value [booleanField] type [boolean]", + "Argument of [st_distance] must be [cartesian_point], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "row var = to_ulong(now())", + "query": "from a_index | eval var = st_distance(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "row var = to_unsigned_long(to_datetime(now()))", + "query": "from a_index | eval st_distance(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "row var = to_unsigned_long(5)", + "query": "from a_index | eval var = st_distance(to_geopoint(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "row to_unsigned_long(5)", - "error": [], + "query": "from a_index | eval st_distance(cartesianPointField, cartesianPointField, extraArg)", + "error": [ + "Error: [st_distance] function expects exactly 2 arguments, got 3." + ], "warning": [] }, { - "query": "row var = to_ul(5)", + "query": "from a_index | sort st_distance(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "row var = to_ulong(5)", + "query": "from a_index | eval st_distance(null, null)", "error": [], "warning": [] }, { - "query": "row var = to_unsigned_long(to_integer(true))", + "query": "row nullVar = null | eval st_distance(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "row var = to_unsigned_long(to_string(true))", - "error": [], + "query": "row var = st_intersects(cartesianPointField, cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row var = to_unsigned_long(to_cartesianpoint(\"POINT (30 10)\"))", + "query": "row st_intersects(cartesianPointField, cartesianPointField)", "error": [ - "Argument of [to_unsigned_long] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]" + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | where to_unsigned_long(booleanField) > 0", - "error": [], + "query": "row var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where to_unsigned_long(cartesianPointField) > 0", + "query": "row var = st_intersects(cartesianPointField, to_cartesianshape(\"POINT (30 10)\"))", "error": [ - "Argument of [to_unsigned_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | where to_unsigned_long(dateField) > 0", - "error": [], + "query": "row st_intersects(cartesianPointField, to_cartesianshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where to_unsigned_long(numberField) > 0", - "error": [], + "query": "row var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where to_unsigned_long(stringField) > 0", - "error": [], + "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_unsigned_long(booleanField)", - "error": [], + "query": "row st_intersects(to_cartesianshape(\"POINT (30 10)\"), cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_unsigned_long(booleanField)", - "error": [], + "query": "row var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_ul(booleanField)", + "query": "row var = st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_ulong(booleanField)", + "query": "row st_intersects(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_unsigned_long(to_boolean(booleanField))", - "error": [], + "query": "row var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_unsigned_long(cartesianPointField)", + "query": "row var = st_intersects(geoPointField, geoPointField)", "error": [ - "Argument of [to_unsigned_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]" + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = to_unsigned_long(dateField)", - "error": [], + "query": "row st_intersects(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_unsigned_long(dateField)", - "error": [], + "query": "row var = st_intersects(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_ul(dateField)", - "error": [], + "query": "row var = st_intersects(geoPointField, to_geoshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_ulong(dateField)", - "error": [], + "query": "row st_intersects(geoPointField, to_geoshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_unsigned_long(to_datetime(dateField))", - "error": [], + "query": "row var = st_intersects(to_geopoint(geoPointField), to_geoshape(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_unsigned_long(numberField)", - "error": [], + "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_unsigned_long(numberField)", - "error": [], + "query": "row st_intersects(to_geoshape(\"POINT (30 10)\"), geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_ul(numberField)", - "error": [], + "query": "row var = st_intersects(to_geoshape(geoPointField), to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_ulong(numberField)", + "query": "row var = st_intersects(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_unsigned_long(to_integer(booleanField))", + "query": "row st_intersects(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_unsigned_long(to_string(booleanField))", - "error": [], + "query": "row var = st_intersects(to_geoshape(geoPointField), to_geoshape(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_unsigned_long(booleanField, extraArg)", + "query": "row var = st_intersects(true, true)", "error": [ - "Error: [to_unsigned_long] function expects exactly one argument, got 2." + "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 | sort to_unsigned_long(booleanField)", + "query": "from a_index | eval var = st_intersects(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_unsigned_long(null)", + "query": "from a_index | eval st_intersects(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_unsigned_long(nullVar)", + "query": "from a_index | eval var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row var = to_upper(\"a\")", - "error": [], + "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": "row to_upper(\"a\")", + "query": "from a_index | eval var = st_intersects(cartesianPointField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_upper(to_string(\"a\"))", + "query": "from a_index | eval st_intersects(cartesianPointField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_upper(5)", - "error": [ - "Argument of [to_upper] must be [string], found value [5] type [number]" - ], + "query": "from a_index | eval var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [], "warning": [] }, { - "query": "from a_index | where length(to_upper(stringField)) > 0", + "query": "from a_index | eval var = st_intersects(cartesianShapeField, cartesianPointField)", "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]" - ], + "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_upper(stringField)", + "query": "from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_upper(stringField)", + "query": "from a_index | eval var = st_intersects(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_upper(to_string(stringField))", + "query": "from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_upper(numberField)", - "error": [ - "Argument of [to_upper] must be [string], found value [numberField] type [number]" - ], + "query": "from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval to_upper(stringField, extraArg)", - "error": [ - "Error: [to_upper] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval var = st_intersects(geoPointField, geoPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_upper(*)", - "error": [ - "Using wildcards (*) in to_upper is not allowed" - ], + "query": "from a_index | eval st_intersects(geoPointField, geoPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort to_upper(stringField)", + "query": "from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = to_upper(to_string(true))", + "query": "from a_index | eval var = st_intersects(geoPointField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_upper(true)", - "error": [ - "Argument of [to_upper] must be [string], found value [true] type [boolean]" - ], + "query": "from a_index | eval st_intersects(geoPointField, geoShapeField)", + "error": [], "warning": [] }, { - "query": "from a_index | where length(to_upper(booleanField)) > 0", - "error": [ - "Argument of [to_upper] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geoshape(geoPointField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_upper(to_string(booleanField))", + "query": "from a_index | eval var = st_intersects(geoShapeField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_upper(booleanField)", - "error": [ - "Argument of [to_upper] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval st_intersects(geoShapeField, geoPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval to_upper(null)", + "query": "from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_upper(nullVar)", + "query": "from a_index | eval var = st_intersects(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row var = to_version(\"a\")", + "query": "from a_index | eval st_intersects(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "row to_version(\"a\")", + "query": "from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = to_ver(\"a\")", - "error": [], + "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 = to_version(stringField)", + "query": "from a_index | sort st_intersects(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_version(stringField)", + "query": "from a_index | eval st_intersects(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_ver(stringField)", + "query": "row nullVar = null | eval st_intersects(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_version(*)", + "query": "row var = st_within(cartesianPointField, cartesianPointField)", "error": [ - "Using wildcards (*) in to_version is not allowed" + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" ], "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": [], + "query": "row st_within(cartesianPointField, cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row var = to_version(true)", + "query": "row var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [ - "Argument of [to_version] must be [string], found value [true] type [boolean]" + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = to_version(versionField)", - "error": [], + "query": "row var = st_within(cartesianPointField, to_cartesianshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_version(versionField)", - "error": [], + "query": "row st_within(cartesianPointField, to_cartesianshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = to_ver(versionField)", - "error": [], + "query": "row var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval to_version(stringField, extraArg)", + "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), cartesianPointField)", "error": [ - "Error: [to_version] function expects exactly one argument, got 2." + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval to_version(null)", - "error": [], + "query": "row st_within(to_cartesianshape(\"POINT (30 10)\"), cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row nullVar = null | eval to_version(nullVar)", - "error": [], + "query": "row var = st_within(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row var = trim(\"a\")", + "query": "row var = st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row trim(\"a\")", + "query": "row st_within(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = trim(to_string(\"a\"))", - "error": [], + "query": "row var = st_within(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]", + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "row var = trim(5)", + "query": "row var = st_within(geoPointField, geoPointField)", "error": [ - "Argument of [trim] must be [string], found value [5] type [number]" + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | where length(trim(stringField)) > 0", - "error": [], + "query": "row st_within(geoPointField, geoPointField)", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | where length(trim(numberField)) > 0", + "query": "row var = st_within(to_geopoint(geoPointField), to_geopoint(geoPointField))", "error": [ - "Argument of [trim] must be [string], found value [numberField] type [number]" + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = trim(stringField)", - "error": [], + "query": "row var = st_within(geoPointField, to_geoshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval trim(stringField)", - "error": [], + "query": "row st_within(geoPointField, to_geoshape(\"POINT (30 10)\"))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval var = trim(to_string(stringField))", - "error": [], + "query": "row var = st_within(to_geopoint(geoPointField), to_geoshape(geoPointField))", + "error": [ + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval trim(numberField)", + "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), geoPointField)", "error": [ - "Argument of [trim] must be [string], found value [numberField] type [number]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval trim(stringField, extraArg)", + "query": "row st_within(to_geoshape(\"POINT (30 10)\"), geoPointField)", "error": [ - "Error: [trim] function expects exactly one argument, got 2." + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = trim(*)", + "query": "row var = st_within(to_geoshape(geoPointField), to_geopoint(geoPointField))", "error": [ - "Using wildcards (*) in trim is not allowed" + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | sort trim(stringField)", + "query": "row var = st_within(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = trim(to_string(true))", + "query": "row st_within(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = trim(true)", + "query": "row var = st_within(to_geoshape(geoPointField), to_geoshape(geoPointField))", "error": [ - "Argument of [trim] must be [string], found value [true] type [boolean]" + "Unknown column [geoPointField]", + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | where length(trim(booleanField)) > 0", + "query": "row var = st_within(true, true)", "error": [ - "Argument of [trim] must be [string], found value [booleanField] type [boolean]" + "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 = trim(to_string(booleanField))", + "query": "from a_index | eval var = st_within(cartesianPointField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval trim(booleanField)", + "query": "from a_index | eval st_within(cartesianPointField, cartesianPointField)", + "error": [], + "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 [trim] must be [string], found value [booleanField] type [boolean]" + "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 trim(null)", + "query": "from a_index | eval var = st_within(cartesianPointField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval trim(nullVar)", + "query": "from a_index | eval st_within(cartesianPointField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = avg(numberField)", + "query": "from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField)", + "query": "from a_index | eval var = st_within(cartesianShapeField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(avg(numberField))", + "query": "from a_index | eval st_within(cartesianShapeField, cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(avg(numberField))", + "query": "from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(avg(numberField)) + avg(numberField)", + "query": "from a_index | eval var = st_within(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(avg(numberField)) + avg(numberField)", + "query": "from a_index | eval st_within(cartesianShapeField, cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField / 2)", + "query": "from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = avg(numberField / 2)", + "query": "from a_index | eval var = st_within(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), avg(numberField / 2)", + "query": "from a_index | eval st_within(geoPointField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = avg(numberField / 2)", + "query": "from a_index | eval var = st_within(to_geopoint(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = avg(numberField)", + "query": "from a_index | eval var = st_within(geoPointField, geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), avg(numberField)", + "query": "from a_index | eval st_within(geoPointField, geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = avg(numberField)", + "query": "from a_index | eval var = st_within(to_geopoint(geoPointField), to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField) by round(numberField / 2)", + "query": "from a_index | eval var = st_within(geoShapeField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = avg(numberField) by var1 = round(numberField / 2)", + "query": "from a_index | eval st_within(geoShapeField, geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), avg(numberField) by round(numberField / 2), ipField", + "query": "from a_index | eval var = st_within(to_geoshape(geoPointField), to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = avg(numberField) by var1 = round(numberField / 2), ipField", + "query": "from a_index | eval var = st_within(geoShapeField, geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), avg(numberField) by round(numberField / 2), numberField / 2", + "query": "from a_index | eval st_within(geoShapeField, geoShapeField)", "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 = st_within(to_geoshape(geoPointField), to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = avg(avg(numberField))", + "query": "from a_index | eval st_within(cartesianPointField, cartesianPointField, extraArg)", "error": [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]" + "Error: [st_within] function expects exactly 2 arguments, got 3." ], "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 | sort st_within(cartesianPointField, cartesianPointField)", + "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 st_within(null, null)", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = avg(*)", - "error": [ - "Using wildcards (*) in avg is not allowed" - ], + "query": "row nullVar = null | eval st_within(nullVar, nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | sort avg(numberField)", + "query": "row var = st_x(cartesianPointField)", "error": [ - "SORT does not support function avg" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | where avg(numberField)", + "query": "row st_x(cartesianPointField)", "error": [ - "WHERE does not support function avg" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | where avg(numberField) > 0", + "query": "row var = st_x(to_cartesianpoint(cartesianPointField))", "error": [ - "WHERE does not support function avg" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = avg(numberField)", + "query": "row var = st_x(geoPointField)", "error": [ - "EVAL does not support function avg" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = avg(numberField) > 0", + "query": "row st_x(geoPointField)", "error": [ - "EVAL does not support function avg" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval avg(numberField)", + "query": "row var = st_x(to_geopoint(geoPointField))", "error": [ - "EVAL does not support function avg" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval avg(numberField) > 0", + "query": "row var = st_x(true)", "error": [ - "EVAL does not support function avg" + "Argument of [st_x] must be [cartesian_point], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | stats avg(booleanField)", - "error": [ - "Argument of [avg] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = st_x(cartesianPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats avg(null)", + "query": "from a_index | eval st_x(cartesianPointField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats avg(nullVar)", + "query": "from a_index | eval var = st_x(to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = sum(numberField)", - "error": [], + "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 | stats sum(numberField)", - "error": [], + "query": "from a_index | eval var = st_x(*)", + "error": [ + "Using wildcards (*) in st_x is not allowed" + ], "warning": [] }, { - "query": "from a_index | stats var = round(sum(numberField))", + "query": "from a_index | eval var = st_x(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(sum(numberField))", + "query": "from a_index | eval st_x(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(sum(numberField)) + sum(numberField)", + "query": "from a_index | eval var = st_x(to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats round(sum(numberField)) + sum(numberField)", - "error": [], + "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 | stats sum(numberField / 2)", + "query": "from a_index | sort st_x(cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = sum(numberField / 2)", + "query": "from a_index | eval st_x(null)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), sum(numberField / 2)", + "query": "row nullVar = null | eval st_x(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = sum(numberField / 2)", - "error": [], + "query": "row var = st_y(cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | stats var0 = sum(numberField)", - "error": [], + "query": "row st_y(cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | stats avg(numberField), sum(numberField)", - "error": [], + "query": "row var = st_y(to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = sum(numberField)", - "error": [], + "query": "row var = st_y(geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | stats sum(numberField) by round(numberField / 2)", - "error": [], + "query": "row st_y(geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | stats var0 = sum(numberField) by var1 = round(numberField / 2)", - "error": [], + "query": "row var = st_y(to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | stats avg(numberField), sum(numberField) by round(numberField / 2), ipField", - "error": [], + "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 | stats avg(numberField), var0 = sum(numberField) by var1 = round(numberField / 2), ipField", + "query": "from a_index | eval var = st_y(cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), sum(numberField) by round(numberField / 2), numberField / 2", + "query": "from a_index | eval st_y(cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = sum(numberField) by var1 = round(numberField / 2), numberField / 2", + "query": "from a_index | eval var = st_y(to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = sum(avg(numberField))", + "query": "from a_index | eval st_y(booleanField)", "error": [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]" + "Argument of [st_y] must be [cartesian_point], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | stats sum(avg(numberField))", + "query": "from a_index | eval var = st_y(*)", "error": [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]" + "Using wildcards (*) in st_y is not allowed" ], "warning": [] }, { - "query": "from a_index | stats sum(stringField)", - "error": [ - "Argument of [sum] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = st_y(geoPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = sum(*)", - "error": [ - "Using wildcards (*) in sum is not allowed" - ], + "query": "from a_index | eval st_y(geoPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort sum(numberField)", - "error": [ - "SORT does not support function sum" - ], + "query": "from a_index | eval var = st_y(to_geopoint(geoPointField))", + "error": [], "warning": [] }, { - "query": "from a_index | where sum(numberField)", + "query": "from a_index | eval st_y(cartesianPointField, extraArg)", "error": [ - "WHERE does not support function sum" + "Error: [st_y] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | where sum(numberField) > 0", - "error": [ - "WHERE does not support function sum" - ], + "query": "from a_index | sort st_y(cartesianPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = sum(numberField)", - "error": [ - "EVAL does not support function sum" - ], + "query": "from a_index | eval st_y(null)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = sum(numberField) > 0", - "error": [ - "EVAL does not support function sum" - ], + "query": "row nullVar = null | eval st_y(nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | eval sum(numberField)", - "error": [ - "EVAL does not support function sum" - ], + "query": "row var = starts_with(\"a\", \"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval sum(numberField) > 0", - "error": [ - "EVAL does not support function sum" - ], + "query": "row starts_with(\"a\", \"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | stats sum(booleanField)", - "error": [ - "Argument of [sum] must be [number], found value [booleanField] type [boolean]" - ], + "query": "row var = starts_with(to_string(true), to_string(true))", + "error": [], "warning": [] }, { - "query": "from a_index | stats sum(null)", - "error": [], + "query": "row var = starts_with(true, true)", + "error": [ + "Argument of [starts_with] must be [keyword], found value [true] type [boolean]", + "Argument of [starts_with] must be [keyword], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row nullVar = null | stats sum(nullVar)", + "query": "from a_index | eval var = starts_with(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = median(numberField)", + "query": "from a_index | eval starts_with(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats median(numberField)", + "query": "from a_index | eval var = starts_with(to_string(booleanField), to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(median(numberField))", - "error": [], + "query": "from a_index | eval starts_with(booleanField, booleanField)", + "error": [ + "Argument of [starts_with] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [starts_with] must be [keyword], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | stats round(median(numberField))", + "query": "from a_index | eval var = starts_with(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(median(numberField)) + median(numberField)", + "query": "from a_index | eval starts_with(textField, textField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(median(numberField)) + median(numberField)", - "error": [], + "query": "from a_index | eval starts_with(keywordField, keywordField, extraArg)", + "error": [ + "Error: [starts_with] function expects exactly 2 arguments, got 3." + ], "warning": [] }, { - "query": "from a_index | stats median(numberField / 2)", + "query": "from a_index | sort starts_with(keywordField, keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = median(numberField / 2)", + "query": "from a_index | eval starts_with(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), median(numberField / 2)", + "query": "row nullVar = null | eval starts_with(nullVar, nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = median(numberField / 2)", + "query": "row var = substring(\"a\", 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = median(numberField)", + "query": "row substring(\"a\", 5, 5)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), median(numberField)", + "query": "row var = substring(to_string(true), to_integer(true), to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = median(numberField)", - "error": [], + "query": "row var = substring(true, true, true)", + "error": [ + "Argument of [substring] must be [keyword], found value [true] type [boolean]", + "Argument of [substring] must be [integer], found value [true] type [boolean]", + "Argument of [substring] must be [integer], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | stats median(numberField) by round(numberField / 2)", + "query": "from a_index | eval var = substring(keywordField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = median(numberField) by var1 = round(numberField / 2)", + "query": "from a_index | eval substring(keywordField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), median(numberField) by round(numberField / 2), ipField", + "query": "from a_index | eval var = substring(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = median(numberField) by var1 = round(numberField / 2), ipField", - "error": [], + "query": "from a_index | eval substring(booleanField, booleanField, booleanField)", + "error": [ + "Argument of [substring] must be [keyword], found value [booleanField] type [boolean]", + "Argument of [substring] must be [integer], found value [booleanField] type [boolean]", + "Argument of [substring] must be [integer], found value [booleanField] type [boolean]" + ], "warning": [] }, { - "query": "from a_index | stats avg(numberField), median(numberField) by round(numberField / 2), numberField / 2", + "query": "from a_index | eval var = substring(textField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = median(numberField) by var1 = round(numberField / 2), numberField / 2", + "query": "from a_index | eval substring(textField, integerField, integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = median(avg(numberField))", + "query": "from a_index | eval substring(keywordField, integerField, integerField, extraArg)", "error": [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]" + "Error: [substring] function expects no more than 3 arguments, got 4." ], "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 | sort substring(keywordField, integerField, integerField)", + "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 substring(null, null, null)", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = median(*)", - "error": [ - "Using wildcards (*) in median is not allowed" - ], + "query": "row nullVar = null | eval substring(nullVar, nullVar, nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | sort median(numberField)", - "error": [ - "SORT does not support function median" - ], + "query": "row var = tan(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | where median(numberField)", - "error": [ - "WHERE does not support function median" - ], + "query": "row tan(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | where median(numberField) > 0", - "error": [ - "WHERE does not support function median" - ], + "query": "row var = tan(to_double(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = median(numberField)", - "error": [ - "EVAL does not support function median" - ], + "query": "row var = tan(5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = median(numberField) > 0", - "error": [ - "EVAL does not support function median" - ], + "query": "row tan(5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval median(numberField)", - "error": [ - "EVAL does not support function median" - ], + "query": "row var = tan(to_integer(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval median(numberField) > 0", + "query": "row var = tan(true)", "error": [ - "EVAL does not support function median" + "Argument of [tan] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | stats median(booleanField)", + "query": "from a_index | where tan(doubleField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where tan(booleanField) > 0", "error": [ - "Argument of [median] must be [number], found value [booleanField] type [boolean]" + "Argument of [tan] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | stats median(null)", + "query": "from a_index | where tan(integerField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats median(nullVar)", + "query": "from a_index | where tan(longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats var = median_absolute_deviation(numberField)", + "query": "from a_index | where tan(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats median_absolute_deviation(numberField)", + "query": "from a_index | eval var = tan(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(median_absolute_deviation(numberField))", + "query": "from a_index | eval tan(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(median_absolute_deviation(numberField))", + "query": "from a_index | eval var = tan(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(median_absolute_deviation(numberField)) + median_absolute_deviation(numberField)", - "error": [], + "query": "from a_index | eval tan(booleanField)", + "error": [ + "Argument of [tan] must be [double], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = tan(*)", + "error": [ + "Using wildcards (*) in tan is not allowed" + ], "warning": [] }, { - "query": "from a_index | stats round(median_absolute_deviation(numberField)) + median_absolute_deviation(numberField)", + "query": "from a_index | eval var = tan(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats median_absolute_deviation(numberField / 2)", + "query": "from a_index | eval tan(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = median_absolute_deviation(numberField / 2)", + "query": "from a_index | eval var = tan(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField / 2)", + "query": "from a_index | eval var = tan(longField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField / 2)", + "query": "from a_index | eval tan(longField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = median_absolute_deviation(numberField)", + "query": "from a_index | eval var = tan(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField)", + "query": "from a_index | eval tan(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField)", + "query": "from a_index | eval tan(doubleField, extraArg)", + "error": [ + "Error: [tan] function expects exactly one argument, got 2." + ], + "warning": [] + }, + { + "query": "from a_index | sort tan(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats median_absolute_deviation(numberField) by round(numberField / 2)", + "query": "from a_index | eval tan(null)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2)", + "query": "row nullVar = null | eval tan(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField) by round(numberField / 2), ipField", + "query": "row var = tanh(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2), ipField", + "query": "row tanh(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), median_absolute_deviation(numberField) by round(numberField / 2), numberField / 2", + "query": "row var = tanh(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2), numberField / 2", + "query": "row var = tanh(5)", "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 tanh(5)", + "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 var = tanh(to_integer(true))", + "error": [], "warning": [] }, { - "query": "from a_index | stats median_absolute_deviation(stringField)", + "query": "row var = tanh(true)", "error": [ - "Argument of [median_absolute_deviation] must be [number], found value [stringField] type [string]" + "Argument of [tanh] must be [double], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | stats var = median_absolute_deviation(*)", - "error": [ - "Using wildcards (*) in median_absolute_deviation is not allowed" - ], + "query": "from a_index | where tanh(doubleField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | sort median_absolute_deviation(numberField)", + "query": "from a_index | where tanh(booleanField) > 0", "error": [ - "SORT does not support function median_absolute_deviation" + "Argument of [tanh] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where median_absolute_deviation(numberField)", - "error": [ - "WHERE does not support function median_absolute_deviation" - ], + "query": "from a_index | where tanh(integerField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | where median_absolute_deviation(numberField) > 0", - "error": [ - "WHERE does not support function median_absolute_deviation" - ], + "query": "from a_index | where tanh(longField) > 0", + "error": [], "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 tanh(unsignedLongField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = median_absolute_deviation(numberField) > 0", - "error": [ - "EVAL does not support function median_absolute_deviation" - ], + "query": "from a_index | eval var = tanh(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval median_absolute_deviation(numberField)", - "error": [ - "EVAL does not support function median_absolute_deviation" - ], + "query": "from a_index | eval tanh(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval median_absolute_deviation(numberField) > 0", - "error": [ - "EVAL does not support function median_absolute_deviation" - ], + "query": "from a_index | eval var = tanh(to_double(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | stats median_absolute_deviation(booleanField)", + "query": "from a_index | eval tanh(booleanField)", "error": [ - "Argument of [median_absolute_deviation] must be [number], found value [booleanField] type [boolean]" + "Argument of [tanh] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | stats median_absolute_deviation(null)", - "error": [], + "query": "from a_index | eval var = tanh(*)", + "error": [ + "Using wildcards (*) in tanh is not allowed" + ], "warning": [] }, { - "query": "row nullVar = null | stats median_absolute_deviation(nullVar)", + "query": "from a_index | eval var = tanh(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = percentile(numberField, 5)", + "query": "from a_index | eval tanh(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats percentile(numberField, 5)", + "query": "from a_index | eval var = tanh(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(percentile(numberField, 5))", + "query": "from a_index | eval var = tanh(longField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(percentile(numberField, 5))", + "query": "from a_index | eval tanh(longField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(percentile(numberField, 5)) + percentile(numberField, 5)", + "query": "from a_index | eval var = tanh(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(percentile(numberField, 5)) + percentile(numberField, 5)", + "query": "from a_index | eval tanh(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | stats percentile(numberField, numberField)", + "query": "from a_index | eval tanh(doubleField, extraArg)", "error": [ - "Argument of [percentile] must be a constant, received [numberField]" + "Error: [tanh] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | stats percentile(numberField / 2, 5)", + "query": "from a_index | sort tanh(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = percentile(numberField / 2, 5)", + "query": "from a_index | eval tanh(null)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), percentile(numberField / 2, 5)", + "query": "row nullVar = null | eval tanh(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = percentile(numberField / 2, 5)", + "query": "row var = tau()", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = percentile(numberField, 5)", + "query": "row tau()", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), percentile(numberField, 5)", + "query": "from a_index | where tau() > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = percentile(numberField, 5)", + "query": "from a_index | eval var = tau()", "error": [], "warning": [] }, { - "query": "from a_index | stats percentile(numberField, 5) by round(numberField / 2)", + "query": "from a_index | eval tau()", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = percentile(numberField, 5) by var1 = round(numberField / 2)", - "error": [], + "query": "from a_index | eval tau(extraArg)", + "error": [ + "Error: [tau] function expects exactly 0 arguments, got 1." + ], "warning": [] }, { - "query": "from a_index | stats avg(numberField), percentile(numberField, 5) by round(numberField / 2), ipField", + "query": "from a_index | sort tau()", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = percentile(numberField, 5) by var1 = round(numberField / 2), ipField", + "query": "row nullVar = null | eval tau()", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), percentile(numberField, 5) by round(numberField / 2), numberField / 2", + "query": "row var = to_base64(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = percentile(numberField, 5) by var1 = round(numberField / 2), numberField / 2", + "query": "row to_base64(\"a\")", "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": "row var = to_base64(to_string(true))", + "error": [], "warning": [] }, { - "query": "from a_index | stats percentile(avg(numberField), 5)", + "query": "row var = to_base64(true)", "error": [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]" + "Argument of [to_base64] must be [keyword], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | stats percentile(stringField, 5)", - "error": [ - "Argument of [percentile] must be [number], found value [stringField] type [string]" - ], + "query": "from a_index | eval var = to_base64(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort percentile(numberField, 5)", - "error": [ - "SORT does not support function percentile" - ], + "query": "from a_index | eval to_base64(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | where percentile(numberField, 5)", - "error": [ - "WHERE does not support function percentile" - ], + "query": "from a_index | eval var = to_base64(to_string(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | where percentile(numberField, 5) > 0", + "query": "from a_index | eval to_base64(booleanField)", "error": [ - "WHERE does not support function percentile" + "Argument of [to_base64] must be [keyword], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = percentile(numberField, 5)", + "query": "from a_index | eval var = to_base64(*)", "error": [ - "EVAL does not support function percentile" + "Using wildcards (*) in to_base64 is not allowed" ], "warning": [] }, { - "query": "from a_index | eval var = percentile(numberField, 5) > 0", - "error": [ - "EVAL does not support function percentile" - ], + "query": "from a_index | eval var = to_base64(textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval percentile(numberField, 5)", - "error": [ - "EVAL does not support function percentile" - ], + "query": "from a_index | eval to_base64(textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval percentile(numberField, 5) > 0", + "query": "from a_index | eval to_base64(keywordField, extraArg)", "error": [ - "EVAL does not support function percentile" + "Error: [to_base64] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | stats percentile(booleanField, 5)", - "error": [ - "Argument of [percentile] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | sort to_base64(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats percentile(null, null)", + "query": "from a_index | eval to_base64(null)", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats percentile(nullVar, nullVar)", - "error": [ - "Argument of [percentile] must be a constant, received [nullVar]" - ], + "query": "row nullVar = null | eval to_base64(nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = max(numberField)", + "query": "row var = to_boolean(true)", "error": [], "warning": [] }, { - "query": "from a_index | stats max(numberField)", + "query": "row to_boolean(true)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(max(numberField))", + "query": "row var = to_bool(true)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(max(numberField))", + "query": "row var = to_boolean(to_boolean(true))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(max(numberField)) + max(numberField)", + "query": "row var = to_boolean(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(max(numberField)) + max(numberField)", + "query": "row to_boolean(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats max(numberField / 2)", + "query": "row var = to_bool(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = max(numberField / 2)", + "query": "row var = to_boolean(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), max(numberField / 2)", + "query": "row var = to_boolean(5)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = max(numberField / 2)", + "query": "row to_boolean(5)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = max(numberField)", + "query": "row var = to_bool(5)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), max(numberField)", + "query": "row var = to_boolean(to_integer(true))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = max(numberField)", + "query": "row var = to_boolean(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats max(numberField) by round(numberField / 2)", + "query": "row to_boolean(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = max(numberField) by var1 = round(numberField / 2)", + "query": "row var = to_bool(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), max(numberField) by round(numberField / 2), ipField", + "query": "row var = to_boolean(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = max(numberField) by var1 = round(numberField / 2), ipField", + "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 | stats avg(numberField), max(numberField) by round(numberField / 2), numberField / 2", + "query": "from a_index | eval to_boolean(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = max(numberField) by var1 = round(numberField / 2), numberField / 2", + "query": "from a_index | eval var = to_bool(booleanField)", "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]" - ], + "query": "from a_index | eval var = to_boolean(to_boolean(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | stats max(avg(numberField))", + "query": "from a_index | eval to_boolean(cartesianPointField)", "error": [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]" + "Argument of [to_boolean] must be [boolean], found value [cartesianPointField] type [cartesian_point]" ], "warning": [] }, { - "query": "from a_index | stats max(stringField)", + "query": "from a_index | eval var = to_boolean(*)", "error": [ - "Argument of [max] must be [number], found value [stringField] type [string]" + "Using wildcards (*) in to_boolean is not allowed" ], "warning": [] }, { - "query": "from a_index | stats var = max(*)", - "error": [ - "Using wildcards (*) in max is not allowed" - ], + "query": "from a_index | eval var = to_boolean(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = max(dateField)", + "query": "from a_index | eval to_boolean(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats max(dateField)", + "query": "from a_index | eval var = to_bool(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(max(dateField))", + "query": "from a_index | eval var = to_boolean(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats round(max(dateField))", + "query": "from a_index | eval var = to_boolean(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(max(dateField)) + max(dateField)", + "query": "from a_index | eval to_boolean(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(max(dateField)) + max(dateField)", + "query": "from a_index | eval var = to_bool(integerField)", "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" - ], + "query": "from a_index | eval var = to_boolean(to_integer(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = max(numberField)", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval var = to_boolean(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = max(numberField) > 0", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval to_boolean(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval max(numberField)", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval var = to_bool(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval max(numberField) > 0", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval var = to_boolean(to_string(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = max(dateField)", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval var = to_boolean(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = max(dateField) > 0", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval to_boolean(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval max(dateField)", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval var = to_bool(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval max(dateField) > 0", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval var = to_boolean(textField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats max(booleanField)", + "query": "from a_index | eval to_boolean(textField)", "error": [], "warning": [] }, { - "query": "from a_index | stats max(null)", + "query": "from a_index | eval var = to_bool(textField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats max(nullVar)", + "query": "from a_index | eval var = to_boolean(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | stats max(\"2022\")", + "query": "from a_index | eval to_boolean(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | stats max(concat(\"20\", \"22\"))", - "error": [ - "Argument of [max] must be [number], found value [concat(\"20\",\"22\")] type [string]" - ], + "query": "from a_index | eval var = to_bool(unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats max(cartesianPointField)", + "query": "from a_index | eval to_boolean(booleanField, extraArg)", "error": [ - "Argument of [max] must be [number], found value [cartesianPointField] type [cartesian_point]" + "Error: [to_boolean] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | stats var = max(booleanField)", + "query": "from a_index | sort to_boolean(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | where max(booleanField)", - "error": [ - "WHERE does not support function max" - ], + "query": "from a_index | eval to_boolean(null)", + "error": [], "warning": [] }, { - "query": "from a_index | where max(booleanField) > 0", - "error": [ - "WHERE does not support function max" - ], + "query": "row nullVar = null | eval to_boolean(nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = max(booleanField)", + "query": "row var = to_cartesianpoint(cartesianPointField)", "error": [ - "EVAL does not support function max" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = max(booleanField) > 0", + "query": "row to_cartesianpoint(cartesianPointField)", "error": [ - "EVAL does not support function max" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval max(booleanField)", + "query": "row var = to_cartesianpoint(to_cartesianpoint(cartesianPointField))", "error": [ - "EVAL does not support function max" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval max(booleanField) > 0", - "error": [ - "EVAL does not support function max" - ], + "query": "row var = to_cartesianpoint(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = max(ipField)", + "query": "row to_cartesianpoint(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats max(ipField)", + "query": "row var = to_cartesianpoint(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | where max(ipField)", + "query": "row var = to_cartesianpoint(true)", "error": [ - "WHERE does not support function max" + "Argument of [to_cartesianpoint] must be [cartesian_point], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where max(ipField) > 0", - "error": [ - "WHERE does not support function max" - ], + "query": "from a_index | eval var = to_cartesianpoint(cartesianPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = max(ipField)", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval to_cartesianpoint(cartesianPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = max(ipField) > 0", - "error": [ - "EVAL does not support function max" - ], + "query": "from a_index | eval var = to_cartesianpoint(to_cartesianpoint(cartesianPointField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval max(ipField)", + "query": "from a_index | eval to_cartesianpoint(booleanField)", "error": [ - "EVAL does not support function max" + "Argument of [to_cartesianpoint] must be [cartesian_point], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval max(ipField) > 0", + "query": "from a_index | eval var = to_cartesianpoint(*)", "error": [ - "EVAL does not support function max" + "Using wildcards (*) in to_cartesianpoint is not allowed" ], "warning": [] }, { - "query": "from a_index | stats var = min(numberField)", + "query": "from a_index | eval var = to_cartesianpoint(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats min(numberField)", + "query": "from a_index | eval to_cartesianpoint(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(min(numberField))", + "query": "from a_index | eval var = to_cartesianpoint(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats round(min(numberField))", + "query": "from a_index | eval var = to_cartesianpoint(textField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(min(numberField)) + min(numberField)", + "query": "from a_index | eval to_cartesianpoint(textField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(min(numberField)) + min(numberField)", - "error": [], + "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 | stats min(numberField / 2)", + "query": "from a_index | sort to_cartesianpoint(cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = min(numberField / 2)", + "query": "from a_index | eval to_cartesianpoint(null)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), min(numberField / 2)", + "query": "row nullVar = null | eval to_cartesianpoint(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = min(numberField / 2)", - "error": [], + "query": "row var = to_cartesianshape(cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | stats var0 = min(numberField)", - "error": [], + "query": "row to_cartesianshape(cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | stats avg(numberField), min(numberField)", - "error": [], + "query": "row var = to_cartesianshape(to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = min(numberField)", + "query": "row var = to_cartesianshape(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | stats min(numberField) by round(numberField / 2)", + "query": "row to_cartesianshape(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = min(numberField) by var1 = round(numberField / 2)", - "error": [], + "query": "row var = to_cartesianshape(to_cartesianshape(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | stats avg(numberField), min(numberField) by round(numberField / 2), ipField", + "query": "row var = to_cartesianshape(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = min(numberField) by var1 = round(numberField / 2), ipField", + "query": "row to_cartesianshape(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), min(numberField) by round(numberField / 2), numberField / 2", + "query": "row var = to_cartesianshape(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = min(numberField) by var1 = round(numberField / 2), numberField / 2", + "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 | 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]" - ], + "query": "from a_index | eval to_cartesianshape(cartesianPointField)", + "error": [], "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]" - ], + "query": "from a_index | eval var = to_cartesianshape(to_cartesianpoint(cartesianPointField))", + "error": [], "warning": [] }, { - "query": "from a_index | stats min(stringField)", + "query": "from a_index | eval to_cartesianshape(booleanField)", "error": [ - "Argument of [min] must be [number], found value [stringField] type [string]" + "Argument of [to_cartesianshape] must be [cartesian_point], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | stats var = min(*)", + "query": "from a_index | eval var = to_cartesianshape(*)", "error": [ - "Using wildcards (*) in min is not allowed" + "Using wildcards (*) in to_cartesianshape is not allowed" ], "warning": [] }, { - "query": "from a_index | stats var = min(dateField)", + "query": "from a_index | eval var = to_cartesianshape(cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats min(dateField)", + "query": "from a_index | eval to_cartesianshape(cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(min(dateField))", + "query": "from a_index | eval var = to_cartesianshape(to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats round(min(dateField))", + "query": "from a_index | eval var = to_cartesianshape(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(min(dateField)) + min(dateField)", + "query": "from a_index | eval to_cartesianshape(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(min(dateField)) + min(dateField)", + "query": "from a_index | eval var = to_cartesianshape(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | sort min(numberField)", - "error": [ - "SORT does not support function min" - ], + "query": "from a_index | eval var = to_cartesianshape(textField)", + "error": [], "warning": [] }, { - "query": "from a_index | where min(numberField)", - "error": [ - "WHERE does not support function min" - ], + "query": "from a_index | eval to_cartesianshape(textField)", + "error": [], "warning": [] }, { - "query": "from a_index | where min(numberField) > 0", + "query": "from a_index | eval to_cartesianshape(cartesianPointField, extraArg)", "error": [ - "WHERE does not support function min" + "Error: [to_cartesianshape] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | where min(dateField)", - "error": [ - "WHERE does not support function min" - ], + "query": "from a_index | sort to_cartesianshape(cartesianPointField)", + "error": [], "warning": [] }, { - "query": "from a_index | where min(dateField) > 0", - "error": [ - "WHERE does not support function min" - ], + "query": "from a_index | eval to_cartesianshape(null)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = min(numberField)", - "error": [ - "EVAL does not support function min" - ], + "query": "row nullVar = null | eval to_cartesianshape(nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = min(numberField) > 0", - "error": [ - "EVAL does not support function min" - ], + "query": "row var = to_datetime(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval min(numberField)", - "error": [ - "EVAL does not support function min" - ], + "query": "row to_datetime(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval min(numberField) > 0", - "error": [ - "EVAL does not support function min" - ], + "query": "row var = to_dt(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = min(dateField)", - "error": [ - "EVAL does not support function min" - ], + "query": "row var = to_datetime(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = min(dateField) > 0", - "error": [ - "EVAL does not support function min" - ], + "query": "row var = to_datetime(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval min(dateField)", - "error": [ - "EVAL does not support function min" - ], + "query": "row to_datetime(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval min(dateField) > 0", - "error": [ - "EVAL does not support function min" - ], + "query": "row var = to_dt(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | stats min(booleanField)", + "query": "row var = to_datetime(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | stats min(null)", + "query": "row var = to_datetime(5)", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats min(nullVar)", + "query": "row to_datetime(5)", "error": [], "warning": [] }, { - "query": "from a_index | stats min(\"2022\")", + "query": "row var = to_dt(5)", "error": [], "warning": [] }, { - "query": "from a_index | stats min(concat(\"20\", \"22\"))", - "error": [ - "Argument of [min] must be [number], found value [concat(\"20\",\"22\")] type [string]" - ], + "query": "row var = to_datetime(to_integer(true))", + "error": [], "warning": [] }, { - "query": "from a_index | stats min(cartesianPointField)", - "error": [ - "Argument of [min] must be [number], found value [cartesianPointField] type [cartesian_point]" - ], + "query": "row var = to_datetime(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = min(booleanField)", + "query": "row to_datetime(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | where min(booleanField)", - "error": [ - "WHERE does not support function min" - ], + "query": "row var = to_dt(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | where min(booleanField) > 0", - "error": [ - "WHERE does not support function min" - ], + "query": "row var = to_datetime(to_string(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = min(booleanField)", + "query": "row var = to_datetime(true)", "error": [ - "EVAL does not support function min" + "Argument of [to_datetime] must be [date], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = min(booleanField) > 0", - "error": [ - "EVAL does not support function min" - ], + "query": "from a_index | eval var = to_datetime(dateField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval min(booleanField)", + "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": [ - "EVAL does not support function min" + "Argument of [to_datetime] must be [date], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval min(booleanField) > 0", + "query": "from a_index | eval var = to_datetime(*)", "error": [ - "EVAL does not support function min" + "Using wildcards (*) in to_datetime is not allowed" ], "warning": [] }, { - "query": "from a_index | stats var = min(ipField)", + "query": "from a_index | eval var = to_datetime(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats min(ipField)", + "query": "from a_index | eval to_datetime(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | where min(ipField)", - "error": [ - "WHERE does not support function min" - ], + "query": "from a_index | eval var = to_dt(doubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | where min(ipField) > 0", - "error": [ - "WHERE does not support function min" - ], + "query": "from a_index | eval var = to_datetime(to_double(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = min(ipField)", - "error": [ - "EVAL does not support function min" - ], + "query": "from a_index | eval var = to_datetime(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = min(ipField) > 0", - "error": [ - "EVAL does not support function min" - ], + "query": "from a_index | eval to_datetime(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval min(ipField)", - "error": [ - "EVAL does not support function min" - ], + "query": "from a_index | eval var = to_dt(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval min(ipField) > 0", - "error": [ - "EVAL does not support function min" - ], + "query": "from a_index | eval var = to_datetime(to_integer(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = count(stringField)", + "query": "from a_index | eval var = to_datetime(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats count(stringField)", + "query": "from a_index | eval to_datetime(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(count(stringField))", + "query": "from a_index | eval var = to_dt(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(count(stringField))", + "query": "from a_index | eval var = to_datetime(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(count(stringField)) + count(stringField)", + "query": "from a_index | eval var = to_datetime(longField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(count(stringField)) + count(stringField)", + "query": "from a_index | eval to_datetime(longField)", "error": [], "warning": [] }, { - "query": "from a_index | sort count(stringField)", - "error": [ - "SORT does not support function count" - ], + "query": "from a_index | eval var = to_dt(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | where count(stringField)", - "error": [ - "WHERE does not support function count" - ], + "query": "from a_index | eval var = to_datetime(textField)", + "error": [], "warning": [] }, { - "query": "from a_index | where count(stringField) > 0", - "error": [ - "WHERE does not support function count" - ], + "query": "from a_index | eval to_datetime(textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = count(stringField)", - "error": [ - "EVAL does not support function count" - ], + "query": "from a_index | eval var = to_dt(textField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = count(stringField) > 0", - "error": [ - "EVAL does not support function count" - ], + "query": "from a_index | eval var = to_datetime(unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval count(stringField)", - "error": [ - "EVAL does not support function count" - ], + "query": "from a_index | eval to_datetime(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_dt(unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval count(stringField) > 0", + "query": "from a_index | eval to_datetime(dateField, extraArg)", "error": [ - "EVAL does not support function count" + "Error: [to_datetime] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | stats count(null)", + "query": "from a_index | sort to_datetime(dateField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats count(nullVar)", + "query": "from a_index | eval to_datetime(null)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = count_distinct(stringField, numberField)", + "query": "row nullVar = null | eval to_datetime(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | stats count_distinct(stringField, numberField)", + "query": "from a_index | eval to_datetime(\"2022\")", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(count_distinct(stringField, numberField))", + "query": "from a_index | eval to_datetime(concat(\"20\", \"22\"))", "error": [], "warning": [] }, { - "query": "from a_index | stats round(count_distinct(stringField, numberField))", + "query": "row var = to_degrees(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(count_distinct(stringField, numberField)) + count_distinct(stringField, numberField)", + "query": "row to_degrees(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(count_distinct(stringField, numberField)) + count_distinct(stringField, numberField)", + "query": "row var = to_degrees(to_double(true))", "error": [], "warning": [] }, { - "query": "from a_index | sort count_distinct(stringField, numberField)", - "error": [ - "SORT does not support function count_distinct" - ], + "query": "row var = to_degrees(5)", + "error": [], "warning": [] }, { - "query": "from a_index | where count_distinct(stringField, numberField)", - "error": [ - "WHERE does not support function count_distinct" - ], + "query": "row to_degrees(5)", + "error": [], "warning": [] }, { - "query": "from a_index | where count_distinct(stringField, numberField) > 0", - "error": [ - "WHERE does not support function count_distinct" - ], + "query": "row var = to_degrees(to_integer(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = count_distinct(stringField, numberField)", + "query": "row var = to_degrees(true)", "error": [ - "EVAL does not support function count_distinct" + "Argument of [to_degrees] must be [double], 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 to_degrees(doubleField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | eval count_distinct(stringField, numberField)", + "query": "from a_index | where to_degrees(booleanField) > 0", "error": [ - "EVAL does not support function count_distinct" + "Argument of [to_degrees] must be [double], 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 | where to_degrees(integerField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | stats count_distinct(null, null)", + "query": "from a_index | where to_degrees(longField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats count_distinct(nullVar, nullVar)", + "query": "from a_index | where to_degrees(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats var = st_centroid_agg(cartesianPointField)", + "query": "from a_index | eval var = to_degrees(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats st_centroid_agg(cartesianPointField)", + "query": "from a_index | eval to_degrees(doubleField)", "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]" - ], + "query": "from a_index | eval var = to_degrees(to_double(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | stats st_centroid_agg(avg(numberField))", + "query": "from a_index | eval to_degrees(booleanField)", "error": [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]" + "Argument of [to_degrees] must be [double], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | stats st_centroid_agg(stringField)", + "query": "from a_index | eval var = to_degrees(*)", "error": [ - "Argument of [st_centroid_agg] must be [cartesian_point], found value [stringField] type [string]" + "Using wildcards (*) in to_degrees is not allowed" ], "warning": [] }, { - "query": "from a_index | stats var = st_centroid_agg(*)", - "error": [ - "Using wildcards (*) in st_centroid_agg is not allowed" - ], + "query": "from a_index | eval var = to_degrees(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = st_centroid_agg(geoPointField)", + "query": "from a_index | eval to_degrees(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats st_centroid_agg(geoPointField)", + "query": "from a_index | eval var = to_degrees(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | sort st_centroid_agg(cartesianPointField)", - "error": [ - "SORT does not support function st_centroid_agg" - ], + "query": "from a_index | eval var = to_degrees(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | where st_centroid_agg(cartesianPointField)", - "error": [ - "WHERE does not support function st_centroid_agg" - ], + "query": "from a_index | eval to_degrees(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | where st_centroid_agg(cartesianPointField) > 0", - "error": [ - "WHERE does not support function st_centroid_agg" - ], + "query": "from a_index | eval var = to_degrees(unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | where st_centroid_agg(geoPointField)", - "error": [ - "WHERE does not support function st_centroid_agg" - ], + "query": "from a_index | eval to_degrees(unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | where st_centroid_agg(geoPointField) > 0", + "query": "from a_index | eval to_degrees(doubleField, extraArg)", "error": [ - "WHERE does not support function st_centroid_agg" + "Error: [to_degrees] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = st_centroid_agg(cartesianPointField)", - "error": [ - "EVAL does not support function st_centroid_agg" - ], + "query": "from a_index | sort to_degrees(doubleField)", + "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 to_degrees(null)", + "error": [], "warning": [] }, { - "query": "from a_index | eval st_centroid_agg(cartesianPointField)", - "error": [ - "EVAL does not support function st_centroid_agg" - ], + "query": "row nullVar = null | eval to_degrees(nullVar)", + "error": [], "warning": [] }, { - "query": "from a_index | eval st_centroid_agg(cartesianPointField) > 0", - "error": [ - "EVAL does not support function st_centroid_agg" - ], + "query": "row var = to_double(true)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_centroid_agg(geoPointField)", - "error": [ - "EVAL does not support function st_centroid_agg" - ], + "query": "row to_double(true)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_centroid_agg(geoPointField) > 0", - "error": [ - "EVAL does not support function st_centroid_agg" - ], + "query": "row var = to_dbl(true)", + "error": [], "warning": [] }, { - "query": "from a_index | eval st_centroid_agg(geoPointField)", - "error": [ - "EVAL does not support function st_centroid_agg" - ], + "query": "row var = to_double(to_boolean(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval st_centroid_agg(geoPointField) > 0", - "error": [ - "EVAL does not support function st_centroid_agg" - ], + "query": "row var = to_double(5.5)", + "error": [], "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]" - ], + "query": "row to_double(5.5)", + "error": [], "warning": [] }, { - "query": "from a_index | stats st_centroid_agg(null)", + "query": "row var = to_dbl(5.5)", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats st_centroid_agg(nullVar)", + "query": "row var = to_double(5)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = values(stringField)", + "query": "row to_double(5)", "error": [], "warning": [] }, { - "query": "from a_index | stats values(stringField)", + "query": "row var = to_dbl(5)", "error": [], "warning": [] }, { - "query": "from a_index | sort values(stringField)", - "error": [ - "SORT does not support function values" - ], + "query": "row var = to_double(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | where values(stringField)", - "error": [ - "WHERE does not support function values" - ], + "query": "row to_double(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | where values(stringField) > 0", - "error": [ - "WHERE does not support function values" - ], + "query": "row var = to_dbl(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = values(stringField)", - "error": [ - "EVAL does not support function values" - ], + "query": "row var = to_double(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = values(stringField) > 0", - "error": [ - "EVAL does not support function values" - ], + "query": "row var = to_double(to_double(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval values(stringField)", - "error": [ - "EVAL does not support function values" - ], + "query": "row var = to_double(to_integer(true))", + "error": [], "warning": [] }, { - "query": "from a_index | eval values(stringField) > 0", - "error": [ - "EVAL does not support function values" - ], + "query": "row var = to_double(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | stats values(null)", + "query": "row to_double(\"a\")", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats values(nullVar)", + "query": "row var = to_dbl(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(dateField, 1 year)", + "query": "row var = to_double(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | stats by bin(dateField, 1 year)", - "error": [], + "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 | stats by bucket(numberField, 5)", + "query": "from a_index | where to_double(booleanField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(numberField, numberField)", + "query": "from a_index | where to_double(cartesianPointField) > 0", "error": [ - "Argument of [bucket] must be a constant, received [numberField]" + "Argument of [to_double] must be [boolean], found value [cartesianPointField] type [cartesian_point]" ], "warning": [] }, { - "query": "from a_index | stats by bin(numberField, 5)", + "query": "from a_index | where to_double(counterDoubleField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(dateField, 5, \"a\", \"a\")", + "query": "from a_index | where to_double(counterIntegerField) > 0", "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]" - ], + "query": "from a_index | where to_double(counterLongField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | stats by bin(dateField, 5, \"a\", \"a\")", + "query": "from a_index | where to_double(dateField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(dateField, 5, now(), now())", + "query": "from a_index | where to_double(doubleField) > 0", "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": "from a_index | where to_double(integerField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | stats by bin(dateField, 5, now(), now())", + "query": "from a_index | where to_double(keywordField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(dateField, 5, \"a\", now())", + "query": "from a_index | where to_double(longField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(dateField, numberField, stringField, dateField)", - "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]" - ], + "query": "from a_index | where to_double(textField) > 0", + "error": [], "warning": [] }, { - "query": "from a_index | stats by bin(dateField, 5, \"a\", now())", + "query": "from a_index | where to_double(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(dateField, 5, now(), \"a\")", + "query": "from a_index | eval var = to_double(booleanField)", "error": [], "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 to_double(booleanField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats by bin(dateField, 5, now(), \"a\")", + "query": "from a_index | eval var = to_dbl(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(numberField, 5, 5, 5)", + "query": "from a_index | eval var = to_double(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(numberField, numberField, numberField, numberField)", + "query": "from a_index | eval to_double(cartesianPointField)", "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_double] must be [boolean], found value [cartesianPointField] type [cartesian_point]" ], "warning": [] }, { - "query": "from a_index | stats by bin(numberField, 5, 5, 5)", - "error": [], + "query": "from a_index | eval var = to_double(*)", + "error": [ + "Using wildcards (*) in to_double is not allowed" + ], "warning": [] }, { - "query": "from a_index | sort bucket(dateField, 1 year)", - "error": [ - "SORT does not support function bucket" - ], + "query": "from a_index | eval var = to_double(counterDoubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(null, null, null, null)", + "query": "from a_index | eval to_double(counterDoubleField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats bucket(nullVar, nullVar, nullVar, nullVar)", - "error": [ - "Argument of [bucket] must be a constant, received [nullVar]", - "Argument of [bucket] must be a constant, received [nullVar]", - "Argument of [bucket] must be a constant, received [nullVar]" - ], + "query": "from a_index | eval var = to_dbl(counterDoubleField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(\"2022\", 1 year)", + "query": "from a_index | eval var = to_double(counterIntegerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(concat(\"20\", \"22\"), 1 year)", - "error": [ - "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [string]" - ], + "query": "from a_index | eval to_double(counterIntegerField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(concat(\"20\", \"22\"), 1 year)", - "error": [ - "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [string]" - ], + "query": "from a_index | eval var = to_dbl(counterIntegerField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(\"2022\", 5, \"a\", \"a\")", + "query": "from a_index | eval var = to_double(counterLongField)", "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(concat(\"20\", \"22\"), 5, \"a\", \"a\")", - "error": [ - "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [string]" - ], + "query": "from a_index | eval to_double(counterLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(\"2022\", 5, \"2022\", \"2022\")", + "query": "from a_index | eval var = to_dbl(counterLongField)", "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(concat(\"20\", \"22\"), 5, concat(\"20\", \"22\"), concat(\"20\", \"22\"))", - "error": [ - "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [string]" - ], + "query": "from a_index | eval var = to_double(dateField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(\"2022\", 5, \"a\", \"2022\")", + "query": "from a_index | eval to_double(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(concat(\"20\", \"22\"), 5, \"a\", concat(\"20\", \"22\"))", - "error": [ - "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [string]" - ], + "query": "from a_index | eval var = to_dbl(dateField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(\"2022\", 5, \"2022\", \"a\")", + "query": "from a_index | eval var = to_double(to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "from a_index | stats bucket(concat(\"20\", \"22\"), 5, concat(\"20\", \"22\"), \"a\")", - "error": [ - "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [string]" - ], + "query": "from a_index | eval var = to_double(doubleField)", + "error": [], "warning": [] }, { - "query": "row var = cbrt(5)", + "query": "from a_index | eval to_double(doubleField)", "error": [], "warning": [] }, { - "query": "row cbrt(5)", + "query": "from a_index | eval var = to_dbl(doubleField)", "error": [], "warning": [] }, { - "query": "row var = cbrt(to_integer(true))", + "query": "from a_index | eval var = to_double(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = cbrt(true)", - "error": [ - "Argument of [cbrt] must be [number], found value [true] type [boolean]" - ], + "query": "from a_index | eval var = to_double(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | where cbrt(numberField) > 0", + "query": "from a_index | eval to_double(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | where cbrt(booleanField) > 0", - "error": [ - "Argument of [cbrt] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = to_dbl(integerField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = cbrt(numberField)", + "query": "from a_index | eval var = to_double(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval cbrt(numberField)", + "query": "from a_index | eval var = to_double(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = cbrt(to_integer(booleanField))", + "query": "from a_index | eval to_double(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval cbrt(booleanField)", - "error": [ - "Argument of [cbrt] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = to_dbl(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = cbrt(*)", - "error": [ - "Using wildcards (*) in cbrt is not allowed" - ], + "query": "from a_index | eval var = to_double(to_string(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval cbrt(numberField, extraArg)", - "error": [ - "Error: [cbrt] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval var = to_double(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort cbrt(numberField)", + "query": "from a_index | eval to_double(longField)", "error": [], "warning": [] }, { - "query": "from a_index | eval cbrt(null)", + "query": "from a_index | eval var = to_dbl(longField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval cbrt(nullVar)", + "query": "from a_index | eval var = to_double(textField)", "error": [], "warning": [] }, { - "query": "row var = from_base64(\"a\")", + "query": "from a_index | eval to_double(textField)", "error": [], "warning": [] }, { - "query": "row from_base64(\"a\")", + "query": "from a_index | eval var = to_dbl(textField)", "error": [], "warning": [] }, { - "query": "row var = from_base64(to_string(true))", + "query": "from a_index | eval var = to_double(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = from_base64(true)", - "error": [ - "Argument of [from_base64] must be [string], found value [true] type [boolean]" - ], + "query": "from a_index | eval to_double(unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | where length(from_base64(stringField)) > 0", + "query": "from a_index | eval var = to_dbl(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | where length(from_base64(booleanField)) > 0", + "query": "from a_index | eval to_double(booleanField, extraArg)", "error": [ - "Argument of [from_base64] must be [string], found value [booleanField] type [boolean]" + "Error: [to_double] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = from_base64(stringField)", + "query": "from a_index | sort to_double(booleanField)", "error": [], "warning": [] }, { - "query": "from a_index | eval from_base64(stringField)", + "query": "from a_index | eval to_double(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = from_base64(to_string(booleanField))", + "query": "row nullVar = null | eval to_double(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval from_base64(booleanField)", - "error": [ - "Argument of [from_base64] must be [string], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval to_double(\"2022\")", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = from_base64(*)", - "error": [ - "Using wildcards (*) in from_base64 is not allowed" - ], + "query": "from a_index | eval to_double(concat(\"20\", \"22\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval from_base64(stringField, extraArg)", + "query": "row var = to_geopoint(geoPointField)", "error": [ - "Error: [from_base64] function expects exactly one argument, got 2." + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | sort from_base64(stringField)", - "error": [], + "query": "row to_geopoint(geoPointField)", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval from_base64(null)", - "error": [], + "query": "row var = to_geopoint(to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row nullVar = null | eval from_base64(nullVar)", + "query": "row var = to_geopoint(\"a\")", "error": [], "warning": [] }, { - "query": "row var = locate(\"a\", \"a\")", + "query": "row to_geopoint(\"a\")", "error": [], "warning": [] }, { - "query": "row locate(\"a\", \"a\")", + "query": "row var = to_geopoint(to_string(true))", "error": [], "warning": [] }, { - "query": "row var = locate(to_string(true), to_string(true))", - "error": [], + "query": "row var = to_geopoint(true)", + "error": [ + "Argument of [to_geopoint] must be [geo_point], found value [true] type [boolean]" + ], "warning": [] }, { - "query": "row var = locate(\"a\", \"a\", 5)", + "query": "from a_index | eval var = to_geopoint(geoPointField)", "error": [], "warning": [] }, { - "query": "row locate(\"a\", \"a\", 5)", + "query": "from a_index | eval to_geopoint(geoPointField)", "error": [], "warning": [] }, { - "query": "row var = locate(to_string(true), to_string(true), to_integer(true))", + "query": "from a_index | eval var = to_geopoint(to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "row var = locate(true, true, true)", + "query": "from a_index | eval to_geopoint(booleanField)", "error": [ - "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]" + "Argument of [to_geopoint] must be [geo_point], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | where locate(stringField, stringField) > 0", - "error": [], - "warning": [] - }, - { - "query": "from a_index | where locate(booleanField, booleanField) > 0", + "query": "from a_index | eval var = to_geopoint(*)", "error": [ - "Argument of [locate] must be [string], found value [booleanField] type [boolean]", - "Argument of [locate] must be [string], found value [booleanField] type [boolean]" + "Using wildcards (*) in to_geopoint is not allowed" ], "warning": [] }, { - "query": "from a_index | where locate(stringField, stringField, numberField) > 0", + "query": "from a_index | eval var = to_geopoint(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | where locate(booleanField, booleanField, booleanField) > 0", - "error": [ - "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]" - ], + "query": "from a_index | eval to_geopoint(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = locate(stringField, stringField)", + "query": "from a_index | eval var = to_geopoint(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval locate(stringField, stringField)", + "query": "from a_index | eval var = to_geopoint(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = locate(to_string(booleanField), to_string(booleanField))", + "query": "from a_index | eval to_geopoint(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval locate(booleanField, booleanField)", + "query": "from a_index | eval to_geopoint(geoPointField, extraArg)", "error": [ - "Argument of [locate] must be [string], found value [booleanField] type [boolean]", - "Argument of [locate] must be [string], found value [booleanField] type [boolean]" + "Error: [to_geopoint] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = locate(stringField, stringField, numberField)", + "query": "from a_index | sort to_geopoint(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval locate(stringField, stringField, numberField)", + "query": "from a_index | eval to_geopoint(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = locate(to_string(booleanField), to_string(booleanField), to_integer(booleanField))", + "query": "row nullVar = null | eval to_geopoint(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval locate(booleanField, booleanField, booleanField)", + "query": "row var = to_geoshape(geoPointField)", "error": [ - "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]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval locate(stringField, stringField, numberField, extraArg)", + "query": "row to_geoshape(geoPointField)", "error": [ - "Error: [locate] function expects no more than 3 arguments, got 4." + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | sort locate(stringField, stringField)", - "error": [], + "query": "row var = to_geoshape(to_geopoint(geoPointField))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "from a_index | eval locate(null, null, null)", + "query": "row var = to_geoshape(to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval locate(nullVar, nullVar, nullVar)", + "query": "row to_geoshape(to_geoshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "row var = to_base64(\"a\")", - "error": [], + "query": "row var = to_geoshape(to_geoshape(geoPointField))", + "error": [ + "Unknown column [geoPointField]" + ], "warning": [] }, { - "query": "row to_base64(\"a\")", + "query": "row var = to_geoshape(\"a\")", "error": [], "warning": [] }, { - "query": "row var = to_base64(to_string(true))", + "query": "row to_geoshape(\"a\")", "error": [], "warning": [] }, { - "query": "row var = to_base64(true)", - "error": [ - "Argument of [to_base64] must be [string], found value [true] type [boolean]" - ], - "warning": [] - }, - { - "query": "from a_index | where length(to_base64(stringField)) > 0", + "query": "row var = to_geoshape(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | where length(to_base64(booleanField)) > 0", + "query": "row var = to_geoshape(true)", "error": [ - "Argument of [to_base64] must be [string], found value [booleanField] type [boolean]" + "Argument of [to_geoshape] must be [geo_point], found value [true] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = to_base64(stringField)", + "query": "from a_index | eval var = to_geoshape(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval to_base64(stringField)", + "query": "from a_index | eval to_geoshape(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = to_base64(to_string(booleanField))", + "query": "from a_index | eval var = to_geoshape(to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_base64(booleanField)", + "query": "from a_index | eval to_geoshape(booleanField)", "error": [ - "Argument of [to_base64] must be [string], found value [booleanField] type [boolean]" + "Argument of [to_geoshape] must be [geo_point], found value [booleanField] type [boolean]" ], "warning": [] }, { - "query": "from a_index | eval var = to_base64(*)", + "query": "from a_index | eval var = to_geoshape(*)", "error": [ - "Using wildcards (*) in to_base64 is not allowed" + "Using wildcards (*) in to_geoshape is not allowed" ], "warning": [] }, { - "query": "from a_index | eval to_base64(stringField, extraArg)", - "error": [ - "Error: [to_base64] function expects exactly one argument, got 2." - ], + "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 | sort to_base64(stringField)", + "query": "from a_index | eval var = to_geoshape(to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval to_base64(null)", + "query": "from a_index | eval var = to_geoshape(keywordField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval to_base64(nullVar)", + "query": "from a_index | eval to_geoshape(keywordField)", "error": [], "warning": [] }, { - "query": "row var = ip_prefix(to_ip(\"127.0.0.1\"), 5, 5)", + "query": "from a_index | eval var = to_geoshape(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row ip_prefix(to_ip(\"127.0.0.1\"), 5, 5)", + "query": "from a_index | eval var = to_geoshape(textField)", "error": [], "warning": [] }, { - "query": "row var = ip_prefix(to_ip(to_ip(\"127.0.0.1\")), to_integer(true), to_integer(true))", + "query": "from a_index | eval to_geoshape(textField)", "error": [], "warning": [] }, { - "query": "row var = ip_prefix(true, true, true)", + "query": "from a_index | eval to_geoshape(geoPointField, extraArg)", "error": [ - "Argument of [ip_prefix] must be [ip], found value [true] type [boolean]", - "Argument of [ip_prefix] must be [number], found value [true] type [boolean]", - "Argument of [ip_prefix] must be [number], found value [true] type [boolean]" + "Error: [to_geoshape] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = ip_prefix(ipField, numberField, numberField)", + "query": "from a_index | sort to_geoshape(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval ip_prefix(ipField, numberField, numberField)", + "query": "from a_index | eval to_geoshape(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = ip_prefix(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))", + "query": "row nullVar = null | eval to_geoshape(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval ip_prefix(booleanField, booleanField, booleanField)", + "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_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], + "warning": [] + }, + { + "query": "row to_integer(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_int(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_integer(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_integer(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row to_integer(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row var = to_int(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row var = to_integer(to_double(true))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_integer(to_integer(true))", + "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": "row var = to_integer(to_string(true))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_integer(to_cartesianpoint(\"POINT (30 10)\"))", "error": [ - "Argument of [ip_prefix] must be [ip], found value [booleanField] type [boolean]", - "Argument of [ip_prefix] must be [number], found value [booleanField] type [boolean]", - "Argument of [ip_prefix] must be [number], found value [booleanField] type [boolean]" + "Argument of [to_integer] must be [boolean], found value [to_cartesianpoint(\"POINT (30 10)\")] type [cartesian_point]" ], "warning": [] }, { - "query": "from a_index | eval ip_prefix(ipField, numberField, numberField, extraArg)", + "query": "from a_index | where to_integer(booleanField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_integer(cartesianPointField) > 0", "error": [ - "Error: [ip_prefix] function expects exactly 3 arguments, got 4." + "Argument of [to_integer] must be [boolean], found value [cartesianPointField] type [cartesian_point]" ], "warning": [] }, { - "query": "from a_index | sort ip_prefix(ipField, numberField, numberField)", + "query": "from a_index | where to_integer(counterIntegerField) > 0", "error": [], "warning": [] }, { - "query": "from a_index | eval ip_prefix(null, null, null)", + "query": "from a_index | where to_integer(dateField) > 0", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval ip_prefix(nullVar, nullVar, nullVar)", + "query": "from a_index | where to_integer(doubleField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_append(true, true)", + "query": "from a_index | where to_integer(integerField) > 0", "error": [], "warning": [] }, { - "query": "row mv_append(true, true)", + "query": "from a_index | where to_integer(keywordField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_boolean(true), to_boolean(true))", + "query": "from a_index | where to_integer(longField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | where to_integer(textField) > 0", "error": [], "warning": [] }, { - "query": "row mv_append(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "from a_index | where to_integer(unsignedLongField) > 0", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = to_integer(booleanField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "query": "from a_index | eval to_integer(booleanField)", "error": [], "warning": [] }, { - "query": "row mv_append(to_cartesianshape(\"POINT (30 10)\"), to_cartesianshape(\"POINT (30 10)\"))", + "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(*)", + "error": [ + "Using wildcards (*) in to_integer is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_integer(counterIntegerField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianshape(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval to_integer(counterIntegerField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(now(), now())", + "query": "from a_index | eval var = to_int(counterIntegerField)", "error": [], "warning": [] }, { - "query": "row mv_append(now(), now())", + "query": "from a_index | eval var = to_integer(dateField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_datetime(now()), to_datetime(now()))", + "query": "from a_index | eval to_integer(dateField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(5, 5)", + "query": "from a_index | eval var = to_int(dateField)", "error": [], "warning": [] }, { - "query": "row mv_append(5, 5)", + "query": "from a_index | eval var = to_integer(to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_integer(true), to_integer(true))", + "query": "from a_index | eval var = to_integer(doubleField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval to_integer(doubleField)", "error": [], "warning": [] }, { - "query": "row mv_append(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = to_int(doubleField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = to_integer(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval var = to_integer(integerField)", "error": [], "warning": [] }, { - "query": "row mv_append(to_geoshape(\"POINT (30 10)\"), to_geoshape(\"POINT (30 10)\"))", + "query": "from a_index | eval to_integer(integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_geoshape(to_geopoint(\"POINT (30 10)\")), to_geoshape(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = to_int(integerField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = to_integer(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "row mv_append(to_ip(\"127.0.0.1\"), to_ip(\"127.0.0.1\"))", + "query": "from a_index | eval var = to_integer(keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_ip(to_ip(\"127.0.0.1\")), to_ip(to_ip(\"127.0.0.1\")))", + "query": "from a_index | eval to_integer(keywordField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(\"a\", \"a\")", + "query": "from a_index | eval var = to_int(keywordField)", "error": [], "warning": [] }, { - "query": "row mv_append(\"a\", \"a\")", + "query": "from a_index | eval var = to_integer(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_string(true), to_string(true))", + "query": "from a_index | eval var = to_integer(longField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", + "query": "from a_index | eval to_integer(longField)", "error": [], "warning": [] }, { - "query": "row mv_append(to_version(\"1.0.0\"), to_version(\"1.0.0\"))", + "query": "from a_index | eval var = to_int(longField)", "error": [], "warning": [] }, { - "query": "row var = mv_append(to_version(\"a\"), to_version(\"a\"))", + "query": "from a_index | eval var = to_integer(textField)", "error": [], "warning": [] }, { - "query": "from a_index | where mv_append(numberField, numberField) > 0", + "query": "from a_index | eval to_integer(textField)", "error": [], "warning": [] }, { - "query": "from a_index | where length(mv_append(stringField, stringField)) > 0", + "query": "from a_index | eval var = to_int(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(booleanField, booleanField)", + "query": "from a_index | eval var = to_integer(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(booleanField, booleanField)", + "query": "from a_index | eval to_integer(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(to_boolean(booleanField), to_boolean(booleanField))", + "query": "from a_index | eval var = to_int(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(cartesianPointField, cartesianPointField)", + "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": "from a_index | eval mv_append(cartesianPointField, cartesianPointField)", + "query": "from a_index | eval to_integer(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "query": "row nullVar = null | eval to_integer(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(cartesianShapeField, cartesianShapeField)", + "query": "from a_index | eval to_integer(\"2022\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(cartesianShapeField, cartesianShapeField)", + "query": "from a_index | eval to_integer(concat(\"20\", \"22\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))", + "query": "row var = to_ip(to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(dateField, dateField)", + "query": "row to_ip(to_ip(\"127.0.0.1\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(dateField, dateField)", + "query": "row var = to_ip(to_ip(to_ip(\"127.0.0.1\")))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(to_datetime(dateField), to_datetime(dateField))", + "query": "row var = to_ip(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(numberField, numberField)", + "query": "row to_ip(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(numberField, numberField)", + "query": "row var = to_ip(to_string(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(to_integer(booleanField), to_integer(booleanField))", + "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 var = mv_append(geoPointField, geoPointField)", + "query": "from a_index | eval to_ip(ipField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(geoPointField, geoPointField)", + "query": "from a_index | eval var = to_ip(to_ip(ipField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "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(*)", + "error": [ + "Using wildcards (*) in to_ip is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ip(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(geoShapeField, geoShapeField)", + "query": "from a_index | eval to_ip(keywordField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(geoShapeField, geoShapeField)", + "query": "from a_index | eval var = to_ip(to_string(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(to_geoshape(geoPointField), to_geoshape(geoPointField))", + "query": "from a_index | eval var = to_ip(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(ipField, ipField)", + "query": "from a_index | eval to_ip(textField)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(ipField, ipField)", + "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": "from a_index | eval var = mv_append(to_ip(ipField), to_ip(ipField))", + "query": "from a_index | eval to_ip(null)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(stringField, stringField)", + "query": "row nullVar = null | eval to_ip(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(stringField, stringField)", + "query": "row var = to_long(true)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(to_string(booleanField), to_string(booleanField))", + "query": "row to_long(true)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(versionField, versionField)", + "query": "row var = to_long(to_boolean(true))", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(versionField, versionField)", + "query": "row var = to_long(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = mv_append(to_version(stringField), to_version(stringField))", + "query": "row to_long(5)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(booleanField, booleanField, extraArg)", - "error": [ - "Error: [mv_append] function expects exactly 2 arguments, got 3." + "query": "row var = to_long(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], + "warning": [] + }, + { + "query": "row to_long(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_long(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_long(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row to_long(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row var = to_long(to_double(true))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_long(to_integer(true))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_long(\"a\")", + "error": [], + "warning": [] + }, + { + "query": "row to_long(\"a\")", + "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(counterIntegerField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_long(counterLongField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_long(dateField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_long(doubleField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_long(integerField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_long(keywordField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_long(longField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_long(textField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_long(unsignedLongField) > 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(*)", + "error": [ + "Using wildcards (*) in to_long is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(counterLongField)", + "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(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(to_double(booleanField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(to_integer(booleanField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(to_string(booleanField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_long(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(unsignedLongField)", + "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": "from a_index | eval to_long(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | eval to_long(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(\"2022\")", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_long(concat(\"20\", \"22\"))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_lower(\"a\")", + "error": [], + "warning": [] + }, + { + "query": "row to_lower(\"a\")", + "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 [keyword], found value [true] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_lower(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_lower(keywordField)", + "error": [], + "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 [keyword], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_lower(*)", + "error": [ + "Using wildcards (*) in to_lower is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_lower(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_lower(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_lower(keywordField, extraArg)", + "error": [ + "Error: [to_lower] function expects exactly one argument, got 2." + ], + "warning": [] + }, + { + "query": "from a_index | sort to_lower(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_lower(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | eval to_lower(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "row var = to_radians(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row to_radians(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row var = to_radians(to_double(true))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_radians(5)", + "error": [], + "warning": [] + }, + { + "query": "row to_radians(5)", + "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 [double], found value [true] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | where to_radians(doubleField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_radians(booleanField) > 0", + "error": [ + "Argument of [to_radians] must be [double], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | where to_radians(integerField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_radians(longField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where to_radians(unsignedLongField) > 0", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_radians(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_radians(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_radians(to_double(booleanField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_radians(booleanField)", + "error": [ + "Argument of [to_radians] must be [double], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_radians(*)", + "error": [ + "Using wildcards (*) in to_radians is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_radians(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_radians(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_radians(to_integer(booleanField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_radians(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_radians(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_radians(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_radians(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_radians(doubleField, extraArg)", + "error": [ + "Error: [to_radians] function expects exactly one argument, got 2." + ], + "warning": [] + }, + { + "query": "from a_index | sort to_radians(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_radians(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | eval to_radians(nullVar)", + "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(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], + "warning": [] + }, + { + "query": "row to_unsigned_long(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_ul(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_ulong(to_datetime(\"2021-01-01T00:00:00Z\"))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_unsigned_long(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_unsigned_long(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row to_unsigned_long(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row var = to_ul(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row var = to_ulong(5.5)", + "error": [], + "warning": [] + }, + { + "query": "row var = to_unsigned_long(to_double(true))", + "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(\"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": "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": [ + "Argument of [>] must be [double], found value [to_unsigned_long(booleanField)] type [unsigned_long]" + ], + "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]", + "Argument of [>] must be [double], found value [to_unsigned_long(cartesianPointField)] type [unsigned_long]" + ], + "warning": [] + }, + { + "query": "from a_index | where to_unsigned_long(dateField) > 0", + "error": [ + "Argument of [>] must be [double], found value [to_unsigned_long(dateField)] type [unsigned_long]" + ], + "warning": [] + }, + { + "query": "from a_index | where to_unsigned_long(doubleField) > 0", + "error": [ + "Argument of [>] must be [double], found value [to_unsigned_long(doubleField)] type [unsigned_long]" + ], + "warning": [] + }, + { + "query": "from a_index | where to_unsigned_long(integerField) > 0", + "error": [ + "Argument of [>] must be [double], found value [to_unsigned_long(integerField)] type [unsigned_long]" + ], + "warning": [] + }, + { + "query": "from a_index | where to_unsigned_long(keywordField) > 0", + "error": [ + "Argument of [>] must be [double], found value [to_unsigned_long(keywordField)] type [unsigned_long]" + ], + "warning": [] + }, + { + "query": "from a_index | where to_unsigned_long(longField) > 0", + "error": [ + "Argument of [>] must be [double], found value [to_unsigned_long(longField)] type [unsigned_long]" + ], + "warning": [] + }, + { + "query": "from a_index | where to_unsigned_long(textField) > 0", + "error": [ + "Argument of [>] must be [double], found value [to_unsigned_long(textField)] type [unsigned_long]" + ], + "warning": [] + }, + { + "query": "from a_index | where to_unsigned_long(unsignedLongField) > 0", + "error": [ + "Argument of [>] must be [double], found value [to_unsigned_long(unsignedLongField)] type [unsigned_long]" + ], + "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(*)", + "error": [ + "Using wildcards (*) in to_unsigned_long is not allowed" + ], + "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(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_unsigned_long(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ul(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ulong(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_unsigned_long(to_double(booleanField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_unsigned_long(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_unsigned_long(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ul(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ulong(integerField)", + "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(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_unsigned_long(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ul(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ulong(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_unsigned_long(to_string(booleanField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_unsigned_long(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_unsigned_long(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ul(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ulong(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_unsigned_long(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_unsigned_long(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ul(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ulong(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_unsigned_long(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_unsigned_long(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ul(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ulong(unsignedLongField)", + "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": "from a_index | eval to_unsigned_long(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | eval to_unsigned_long(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_unsigned_long(\"2022\")", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_unsigned_long(concat(\"20\", \"22\"))", + "error": [], + "warning": [] + }, + { + "query": "row var = to_upper(\"a\")", + "error": [], + "warning": [] + }, + { + "query": "row to_upper(\"a\")", + "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 [keyword], found value [true] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_upper(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_upper(keywordField)", + "error": [], + "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 [keyword], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_upper(*)", + "error": [ + "Using wildcards (*) in to_upper is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_upper(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_upper(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_upper(keywordField, extraArg)", + "error": [ + "Error: [to_upper] function expects exactly one argument, got 2." + ], + "warning": [] + }, + { + "query": "from a_index | sort to_upper(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_upper(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | eval to_upper(nullVar)", + "error": [], + "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": "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 [keyword], found value [true] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_version(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_version(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ver(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_version(*)", + "error": [ + "Using wildcards (*) in to_version is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = to_version(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_version(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = to_ver(textField)", + "error": [], + "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(keywordField, extraArg)", + "error": [ + "Error: [to_version] function expects exactly one argument, got 2." + ], + "warning": [] + }, + { + "query": "from a_index | sort to_version(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval to_version(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | eval to_version(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "row var = trim(\"a\")", + "error": [], + "warning": [] + }, + { + "query": "row trim(\"a\")", + "error": [], + "warning": [] + }, + { + "query": "row var = trim(to_string(true))", + "error": [], + "warning": [] + }, + { + "query": "row var = trim(true)", + "error": [ + "Argument of [trim] must be [keyword], found value [true] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = trim(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval trim(keywordField)", + "error": [], + "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 [keyword], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = trim(*)", + "error": [ + "Using wildcards (*) in trim is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = trim(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval trim(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval trim(keywordField, extraArg)", + "error": [ + "Error: [trim] function expects exactly one argument, got 2." + ], + "warning": [] + }, + { + "query": "from a_index | sort trim(keywordField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval trim(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | eval trim(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "row var = case(true, \"a\")", + "error": [], + "warning": [] + }, + { + "query": "row case(true, \"a\")", + "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": "from a_index | eval var = case(booleanField, textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval case(booleanField, textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | sort case(booleanField, textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval case(null, null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | eval case(nullVar, nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = avg(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(integerField)) + avg(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(integerField)) + avg(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(integerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(integerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(integerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(integerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(integerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = avg(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(booleanField)", + "error": [ + "Argument of [avg] must be [integer], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = avg(*)", + "error": [ + "Using wildcards (*) in avg is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = avg(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(counterIntegerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(counterIntegerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(counterIntegerField)) + avg(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(counterIntegerField)) + avg(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(counterIntegerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(counterIntegerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(counterIntegerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(counterIntegerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(counterIntegerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(counterIntegerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = avg(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(doubleField)) + avg(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(doubleField)) + avg(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(doubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(doubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(doubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(doubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = avg(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(unsignedLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(unsignedLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(unsignedLongField)) + avg(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(unsignedLongField)) + avg(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(unsignedLongField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(unsignedLongField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(unsignedLongField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(unsignedLongField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(unsignedLongField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(unsignedLongField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = avg(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(longField)) + avg(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(longField)) + avg(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(longField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(longField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(longField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(longField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(longField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = avg(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(counterLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(counterLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(counterLongField)) + avg(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(counterLongField)) + avg(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(counterLongField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(counterLongField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(counterLongField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(counterLongField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(counterLongField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(counterLongField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = avg(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(counterDoubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(counterDoubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(avg(counterDoubleField)) + avg(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(avg(counterDoubleField)) + avg(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(counterDoubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = avg(counterDoubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(counterDoubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(counterDoubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), avg(counterDoubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = avg(counterDoubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | sort avg(integerField)", + "error": [ + "SORT does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(integerField)", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(integerField) > 0", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(counterIntegerField)", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(counterIntegerField) > 0", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(doubleField)", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(doubleField) > 0", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(unsignedLongField)", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(unsignedLongField) > 0", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(longField)", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(longField) > 0", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(counterLongField)", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(counterLongField) > 0", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(counterDoubleField)", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | where avg(counterDoubleField) > 0", + "error": [ + "WHERE does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(integerField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(integerField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(integerField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(integerField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(counterIntegerField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(counterIntegerField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(counterIntegerField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(counterIntegerField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(doubleField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(doubleField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(doubleField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(doubleField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(unsignedLongField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(unsignedLongField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(unsignedLongField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(unsignedLongField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(longField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(longField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(longField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(longField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(counterLongField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(counterLongField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(counterLongField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(counterLongField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(counterDoubleField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = avg(counterDoubleField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(counterDoubleField)", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval avg(counterDoubleField) > 0", + "error": [ + "EVAL does not support function avg" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats avg(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = sum(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(integerField)) + sum(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(integerField)) + sum(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(integerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(integerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(integerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(integerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(integerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = sum(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats sum(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats sum(booleanField)", + "error": [ + "Argument of [sum] must be [integer], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = sum(*)", + "error": [ + "Using wildcards (*) in sum is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = sum(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(counterIntegerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(counterIntegerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(counterIntegerField)) + sum(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(counterIntegerField)) + sum(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(counterIntegerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(counterIntegerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(counterIntegerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(counterIntegerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(counterIntegerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(counterIntegerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = sum(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(doubleField)) + sum(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(doubleField)) + sum(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(doubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(doubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(doubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(doubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(doubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = sum(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(unsignedLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(unsignedLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(unsignedLongField)) + sum(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(unsignedLongField)) + sum(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(unsignedLongField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(unsignedLongField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(unsignedLongField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(unsignedLongField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(unsignedLongField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(unsignedLongField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = sum(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(longField)) + sum(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(longField)) + sum(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(longField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(longField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(longField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(longField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(longField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = sum(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(counterLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(counterLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(counterLongField)) + sum(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(counterLongField)) + sum(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(counterLongField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(counterLongField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(counterLongField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(counterLongField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(counterLongField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(counterLongField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = sum(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(counterDoubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(counterDoubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(sum(counterDoubleField)) + sum(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(sum(counterDoubleField)) + sum(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats sum(counterDoubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = sum(counterDoubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(counterDoubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(counterDoubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), sum(counterDoubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = sum(counterDoubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | sort sum(integerField)", + "error": [ + "SORT does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(integerField)", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(integerField) > 0", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(counterIntegerField)", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(counterIntegerField) > 0", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(doubleField)", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(doubleField) > 0", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(unsignedLongField)", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(unsignedLongField) > 0", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(longField)", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(longField) > 0", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(counterLongField)", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(counterLongField) > 0", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(counterDoubleField)", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | where sum(counterDoubleField) > 0", + "error": [ + "WHERE does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(integerField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(integerField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(integerField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(integerField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(counterIntegerField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(counterIntegerField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(counterIntegerField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(counterIntegerField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(doubleField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(doubleField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(doubleField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(doubleField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(unsignedLongField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(unsignedLongField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(unsignedLongField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(unsignedLongField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(longField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(longField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(longField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(longField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(counterLongField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(counterLongField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(counterLongField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(counterLongField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(counterDoubleField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = sum(counterDoubleField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(counterDoubleField)", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | eval sum(counterDoubleField) > 0", + "error": [ + "EVAL does not support function sum" + ], + "warning": [] + }, + { + "query": "from a_index | stats sum(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats sum(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(integerField)) + median(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(integerField)) + median(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(integerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(integerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(integerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(integerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(integerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats median(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats median(booleanField)", + "error": [ + "Argument of [median] must be [integer], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = median(*)", + "error": [ + "Using wildcards (*) in median is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = median(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(counterIntegerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(counterIntegerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(counterIntegerField)) + median(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(counterIntegerField)) + median(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(counterIntegerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(counterIntegerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(counterIntegerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(counterIntegerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(counterIntegerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(counterIntegerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(doubleField)) + median(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(doubleField)) + median(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(doubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(doubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(doubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(doubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(doubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(unsignedLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(unsignedLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(unsignedLongField)) + median(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(unsignedLongField)) + median(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(unsignedLongField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(unsignedLongField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(unsignedLongField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(unsignedLongField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(unsignedLongField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(unsignedLongField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(longField)) + median(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(longField)) + median(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(longField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(longField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(longField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(longField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(longField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(counterLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(counterLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(counterLongField)) + median(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(counterLongField)) + median(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(counterLongField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(counterLongField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(counterLongField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(counterLongField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(counterLongField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(counterLongField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(counterDoubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(counterDoubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median(counterDoubleField)) + median(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median(counterDoubleField)) + median(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median(counterDoubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median(counterDoubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(counterDoubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(counterDoubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median(counterDoubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median(counterDoubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | sort median(integerField)", + "error": [ + "SORT does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(integerField)", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(integerField) > 0", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(counterIntegerField)", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(counterIntegerField) > 0", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(doubleField)", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(doubleField) > 0", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(unsignedLongField)", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(unsignedLongField) > 0", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(longField)", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(longField) > 0", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(counterLongField)", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(counterLongField) > 0", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(counterDoubleField)", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | where median(counterDoubleField) > 0", + "error": [ + "WHERE does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(integerField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(integerField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(integerField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(integerField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(counterIntegerField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(counterIntegerField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(counterIntegerField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(counterIntegerField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(doubleField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(doubleField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(doubleField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(doubleField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(unsignedLongField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(unsignedLongField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(unsignedLongField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(unsignedLongField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(longField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(longField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(longField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(longField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(counterLongField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(counterLongField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(counterLongField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(counterLongField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(counterDoubleField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median(counterDoubleField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(counterDoubleField)", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | eval median(counterDoubleField) > 0", + "error": [ + "EVAL does not support function median" + ], + "warning": [] + }, + { + "query": "from a_index | stats median(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats median(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median_absolute_deviation(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(integerField)) + median_absolute_deviation(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(integerField)) + median_absolute_deviation(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(integerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(integerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(integerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(integerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(integerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median_absolute_deviation(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(booleanField)", + "error": [ + "Argument of [median_absolute_deviation] must be [integer], found value [booleanField] type [boolean]" + ], + "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 | stats var = median_absolute_deviation(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(counterIntegerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(counterIntegerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(counterIntegerField)) + median_absolute_deviation(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(counterIntegerField)) + median_absolute_deviation(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterIntegerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(counterIntegerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(counterIntegerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(counterIntegerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterIntegerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(counterIntegerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterIntegerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median_absolute_deviation(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(doubleField)) + median_absolute_deviation(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(doubleField)) + median_absolute_deviation(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(doubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(doubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(doubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(doubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(doubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median_absolute_deviation(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(unsignedLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(unsignedLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(unsignedLongField)) + median_absolute_deviation(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(unsignedLongField)) + median_absolute_deviation(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(unsignedLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(unsignedLongField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(unsignedLongField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(unsignedLongField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(unsignedLongField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(unsignedLongField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(unsignedLongField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median_absolute_deviation(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(longField)) + median_absolute_deviation(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(longField)) + median_absolute_deviation(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(longField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(longField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(longField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(longField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(longField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median_absolute_deviation(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(counterLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(counterLongField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(counterLongField)) + median_absolute_deviation(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(counterLongField)) + median_absolute_deviation(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterLongField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(counterLongField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(counterLongField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(counterLongField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterLongField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(counterLongField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterLongField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = median_absolute_deviation(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(counterDoubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(counterDoubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(median_absolute_deviation(counterDoubleField)) + median_absolute_deviation(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(median_absolute_deviation(counterDoubleField)) + median_absolute_deviation(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterDoubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(counterDoubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = median_absolute_deviation(counterDoubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(counterDoubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterDoubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), median_absolute_deviation(counterDoubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterDoubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | sort median_absolute_deviation(integerField)", + "error": [ + "SORT does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(integerField)", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(integerField) > 0", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(counterIntegerField)", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(counterIntegerField) > 0", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(doubleField)", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(doubleField) > 0", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(unsignedLongField)", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(unsignedLongField) > 0", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(longField)", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(longField) > 0", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(counterLongField)", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(counterLongField) > 0", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(counterDoubleField)", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | where median_absolute_deviation(counterDoubleField) > 0", + "error": [ + "WHERE does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(integerField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(integerField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(integerField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(integerField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(counterIntegerField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(counterIntegerField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(counterIntegerField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(counterIntegerField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(doubleField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(doubleField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(doubleField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(doubleField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(unsignedLongField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(unsignedLongField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(unsignedLongField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(unsignedLongField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(longField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(longField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(longField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(longField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(counterLongField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(counterLongField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(counterLongField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(counterLongField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(counterDoubleField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = median_absolute_deviation(counterDoubleField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(counterDoubleField)", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | eval median_absolute_deviation(counterDoubleField) > 0", + "error": [ + "EVAL does not support function median_absolute_deviation" + ], + "warning": [] + }, + { + "query": "from a_index | stats median_absolute_deviation(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats median_absolute_deviation(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = max(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(max(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(max(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(max(doubleField)) + max(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(max(doubleField)) + max(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = max(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = max(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(doubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = max(doubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(doubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(doubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(doubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = max(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats max(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats max(cartesianPointField)", + "error": [ + "Argument of [max] must be [double], found value [cartesianPointField] type [cartesian_point]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = max(*)", + "error": [ + "Using wildcards (*) in max is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = max(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(max(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(max(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(max(longField)) + max(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(max(longField)) + max(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = max(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(longField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = max(longField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(longField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(longField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(longField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = max(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(max(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(max(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(max(integerField)) + max(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(max(integerField)) + max(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = max(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(integerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = max(integerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(integerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(integerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), max(integerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = max(integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "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 = max(datePeriodField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(datePeriodField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = max(booleanField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(booleanField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = max(ipField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(ipField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | sort max(doubleField)", + "error": [ + "SORT does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(doubleField)", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(doubleField) > 0", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(longField)", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(longField) > 0", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(integerField)", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(integerField) > 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 | where max(datePeriodField)", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(datePeriodField) > 0", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(booleanField)", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(booleanField) > 0", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(ipField)", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(ipField) > 0", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(doubleField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(doubleField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(doubleField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(doubleField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(longField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(longField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(longField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(longField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(integerField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(integerField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(integerField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(integerField) > 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 | eval var = max(datePeriodField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(datePeriodField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(datePeriodField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(datePeriodField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(booleanField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(booleanField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(booleanField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(booleanField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(ipField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(ipField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(ipField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(ipField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | stats max(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats max(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(\"2022\")", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats max(concat(\"20\", \"22\"))", + "error": [ + "Argument of [max] must be [double], found value [concat(\"20\",\"22\")] type [keyword]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = min(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(min(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(min(doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(min(doubleField)) + min(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(min(doubleField)) + min(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = min(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = min(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(doubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = min(doubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(doubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(doubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(doubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = min(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats min(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats min(cartesianPointField)", + "error": [ + "Argument of [min] must be [double], found value [cartesianPointField] type [cartesian_point]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = min(*)", + "error": [ + "Using wildcards (*) in min is not allowed" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = min(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(min(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(min(longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(min(longField)) + min(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(min(longField)) + min(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = min(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(longField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = min(longField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(longField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(longField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(longField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = min(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(min(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(min(integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(min(integerField)) + min(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(min(integerField)) + min(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = min(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(integerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = min(integerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(integerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(integerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), min(integerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = min(integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "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 = min(datePeriodField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(datePeriodField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = min(booleanField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(booleanField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = min(ipField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(ipField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | sort min(doubleField)", + "error": [ + "SORT does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(doubleField)", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(doubleField) > 0", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(longField)", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(longField) > 0", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(integerField)", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(integerField) > 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 | where min(datePeriodField)", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(datePeriodField) > 0", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(booleanField)", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(booleanField) > 0", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(ipField)", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(ipField) > 0", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(doubleField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(doubleField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(doubleField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(doubleField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(longField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(longField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(longField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(longField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(integerField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(integerField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(integerField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(integerField) > 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 | eval var = min(datePeriodField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(datePeriodField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(datePeriodField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(datePeriodField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(booleanField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(booleanField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(booleanField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(booleanField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(ipField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(ipField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(ipField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(ipField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | stats min(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats min(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(\"2022\")", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats min(concat(\"20\", \"22\"))", + "error": [ + "Argument of [min] must be [double], found value [concat(\"20\",\"22\")] type [keyword]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = count(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats count(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(count(textField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(count(textField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(count(textField)) + count(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(count(textField)) + count(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | sort count(textField)", + "error": [ + "SORT does not support function count" + ], + "warning": [] + }, + { + "query": "from a_index | where count(textField)", + "error": [ + "WHERE does not support function count" + ], + "warning": [] + }, + { + "query": "from a_index | where count(textField) > 0", + "error": [ + "WHERE does not support function count" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = count(textField)", + "error": [ + "EVAL does not support function count" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = count(textField) > 0", + "error": [ + "EVAL does not support function count" + ], + "warning": [] + }, + { + "query": "from a_index | eval count(textField)", + "error": [ + "EVAL does not support function count" + ], + "warning": [] + }, + { + "query": "from a_index | eval count(textField) > 0", + "error": [ + "EVAL does not support function count" + ], + "warning": [] + }, + { + "query": "from a_index | stats count(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats count(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats count_distinct(null, null, null, null, null, null, null, null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats count_distinct(nullVar, nullVar, nullVar, nullVar, nullVar, nullVar, nullVar, nullVar)", + "error": [], + "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(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats st_centroid_agg(avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "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 = 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(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats st_centroid_agg(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = values(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats values(textField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | sort values(textField)", + "error": [ + "SORT does not support function values" + ], + "warning": [] + }, + { + "query": "from a_index | where values(textField)", + "error": [ + "WHERE does not support function values" + ], + "warning": [] + }, + { + "query": "from a_index | where values(textField) > 0", + "error": [ + "WHERE does not support function values" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = values(textField)", + "error": [ + "EVAL does not support function values" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = values(textField) > 0", + "error": [ + "EVAL does not support function values" + ], + "warning": [] + }, + { + "query": "from a_index | eval values(textField)", + "error": [ + "EVAL does not support function values" + ], + "warning": [] + }, + { + "query": "from a_index | eval values(textField) > 0", + "error": [ + "EVAL does not support function values" + ], + "warning": [] + }, + { + "query": "from a_index | stats values(null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats values(nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = top(textField, integerField, textField)", + "error": [ + "Argument of [=] must be a constant, received [top(textField,integerField,textField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats top(textField, integerField, textField)", + "error": [ + "Argument of [top] must be a constant, received [integerField]", + "Argument of [top] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | sort top(textField, integerField, textField)", + "error": [ + "SORT does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | where top(textField, integerField, textField)", + "error": [ + "WHERE does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | where top(textField, integerField, textField) > 0", + "error": [ + "WHERE does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = top(textField, integerField, textField)", + "error": [ + "EVAL does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = top(textField, integerField, textField) > 0", + "error": [ + "EVAL does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | eval top(textField, integerField, textField)", + "error": [ + "EVAL does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | eval top(textField, integerField, textField) > 0", + "error": [ + "EVAL does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | stats top(null, null, null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats top(nullVar, nullVar, nullVar)", + "error": [ + "Argument of [top] must be a constant, received [nullVar]", + "Argument of [top] must be a constant, received [nullVar]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = top(textField, integerField, \"asc\")", + "error": [ + "Argument of [=] must be a constant, received [top(textField,integerField,\"asc\")]" + ], + "warning": [] + }, + { + "query": "from a_index | stats top(textField, integerField, \"asc\")", + "error": [ + "Argument of [top] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | sort top(textField, integerField, \"asc\")", + "error": [ + "SORT does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | where top(textField, integerField, \"asc\")", + "error": [ + "WHERE does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | where top(textField, integerField, \"asc\") > 0", + "error": [ + "WHERE does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = top(textField, integerField, \"asc\")", + "error": [ + "EVAL does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = top(textField, integerField, \"asc\") > 0", + "error": [ + "EVAL does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | eval top(textField, integerField, \"asc\")", + "error": [ + "EVAL does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | eval top(textField, integerField, \"asc\") > 0", + "error": [ + "EVAL does not support function top" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(doubleField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(doubleField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(doubleField, doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(doubleField, doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(doubleField, doubleField)) + weighted_avg(doubleField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(doubleField, doubleField)) + weighted_avg(doubleField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(doubleField / 2, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(doubleField / 2, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField / 2, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField / 2, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(doubleField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(doubleField, doubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(doubleField, doubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField, doubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, doubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField, doubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(avg(integerField), avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(avg(integerField), avg(integerField))", + "error": [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(booleanField, booleanField)", + "error": [ + "Argument of [weighted_avg] must be [double], found value [booleanField] type [boolean]", + "Argument of [weighted_avg] must be [double], found value [booleanField] type [boolean]" + ], + "warning": [] + }, + { + "query": "from a_index | sort weighted_avg(doubleField, doubleField)", + "error": [ + "SORT does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(doubleField, doubleField)", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(doubleField, doubleField) > 0", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(doubleField, doubleField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(doubleField, doubleField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(doubleField, doubleField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(doubleField, doubleField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(null, null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats weighted_avg(nullVar, nullVar)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(doubleField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(doubleField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(doubleField, longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(doubleField, longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(doubleField, longField)) + weighted_avg(doubleField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(doubleField, longField)) + weighted_avg(doubleField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(doubleField / 2, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(doubleField / 2, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField / 2, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField / 2, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(doubleField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(doubleField, longField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(doubleField, longField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField, longField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, longField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField, longField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(doubleField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(doubleField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(doubleField, integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(doubleField, integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(doubleField, integerField)) + weighted_avg(doubleField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(doubleField, integerField)) + weighted_avg(doubleField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(doubleField / 2, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(doubleField / 2, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField / 2, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField / 2, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(doubleField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(doubleField, integerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(doubleField, integerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField, integerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, integerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(doubleField, integerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(longField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(longField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(longField, doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(longField, doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(longField, doubleField)) + weighted_avg(longField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(longField, doubleField)) + weighted_avg(longField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(longField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(longField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(longField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(longField, doubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(longField, doubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(longField, doubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(longField, doubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(longField, doubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(longField, doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(longField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(longField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(longField, longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(longField, longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(longField, longField)) + weighted_avg(longField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(longField, longField)) + weighted_avg(longField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(longField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(longField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(longField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(longField, longField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(longField, longField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(longField, longField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(longField, longField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(longField, longField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(longField, longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(longField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(longField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(longField, integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(longField, integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(longField, integerField)) + weighted_avg(longField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(longField, integerField)) + weighted_avg(longField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(longField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(longField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(longField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(longField, integerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(longField, integerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(longField, integerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(longField, integerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(longField, integerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(longField, integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(integerField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(integerField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(integerField, doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(integerField, doubleField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(integerField, doubleField)) + weighted_avg(integerField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(integerField, doubleField)) + weighted_avg(integerField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(integerField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(integerField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, doubleField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(integerField, doubleField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(integerField, doubleField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(integerField, doubleField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, doubleField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(integerField, doubleField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(integerField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(integerField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(integerField, longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(integerField, longField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(integerField, longField)) + weighted_avg(integerField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(integerField, longField)) + weighted_avg(integerField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(integerField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(integerField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, longField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(integerField, longField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(integerField, longField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(integerField, longField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, longField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(integerField, longField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = weighted_avg(integerField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(integerField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(integerField, integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(integerField, integerField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var = round(weighted_avg(integerField, integerField)) + weighted_avg(integerField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats round(weighted_avg(integerField, integerField)) + weighted_avg(integerField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(integerField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(integerField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, integerField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats weighted_avg(integerField, integerField) by round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats var0 = weighted_avg(integerField, integerField) by var1 = round(doubleField / 2)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(integerField, integerField) by round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, integerField) by var1 = round(doubleField / 2), ipField", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), weighted_avg(integerField, integerField) by round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(doubleField, longField)", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(doubleField, longField) > 0", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(doubleField, integerField)", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(doubleField, integerField) > 0", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(longField, doubleField)", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(longField, doubleField) > 0", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(longField, longField)", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(longField, longField) > 0", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(longField, integerField)", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(longField, integerField) > 0", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(integerField, doubleField)", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(integerField, doubleField) > 0", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(integerField, longField)", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(integerField, longField) > 0", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(integerField, integerField)", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | where weighted_avg(integerField, integerField) > 0", + "error": [ + "WHERE does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(doubleField, longField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(doubleField, longField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(doubleField, longField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(doubleField, longField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(doubleField, integerField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(doubleField, integerField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(doubleField, integerField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(doubleField, integerField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(longField, doubleField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(longField, doubleField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(longField, doubleField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(longField, doubleField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(longField, longField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(longField, longField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(longField, longField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(longField, longField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(longField, integerField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(longField, integerField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(longField, integerField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(longField, integerField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(integerField, doubleField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(integerField, doubleField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(integerField, doubleField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(integerField, doubleField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(integerField, longField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(integerField, longField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(integerField, longField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(integerField, longField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(integerField, integerField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = weighted_avg(integerField, integerField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(integerField, integerField)", + "error": [ + "EVAL does not support function weighted_avg" + ], + "warning": [] + }, + { + "query": "from a_index | eval weighted_avg(integerField, integerField) > 0", + "error": [ + "EVAL does not support function weighted_avg" + ], + "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(integerField, integerField)", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(integerField, integerField)", + "error": [ + "Argument of [bin] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, integerField, textField, textField)", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [textField]", + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, integerField, textField, textField)", + "error": [ + "Argument of [bin] must be a constant, received [integerField]", + "Argument of [bin] must be a constant, received [textField]", + "Argument of [bin] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, integerField, dateField, dateField)", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [dateField]", + "Argument of [bucket] must be a constant, received [dateField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, integerField, dateField, dateField)", + "error": [ + "Argument of [bin] must be a constant, received [integerField]", + "Argument of [bin] must be a constant, received [dateField]", + "Argument of [bin] must be a constant, received [dateField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, integerField, textField, dateField)", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [textField]", + "Argument of [bucket] must be a constant, received [dateField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, integerField, textField, dateField)", + "error": [ + "Argument of [bin] must be a constant, received [integerField]", + "Argument of [bin] must be a constant, received [textField]", + "Argument of [bin] must be a constant, received [dateField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, integerField, dateField, textField)", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [dateField]", + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, integerField, dateField, textField)", + "error": [ + "Argument of [bin] must be a constant, received [integerField]", + "Argument of [bin] must be a constant, received [dateField]", + "Argument of [bin] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(integerField, integerField, integerField, integerField)", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(integerField, integerField, integerField, integerField)", + "error": [ + "Argument of [bin] must be a constant, received [integerField]", + "Argument of [bin] must be a constant, received [integerField]", + "Argument of [bin] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | sort bucket(dateField, 1 year)", + "error": [ + "SORT does not support function bucket" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(null, null, null, null)", + "error": [], + "warning": [] + }, + { + "query": "row nullVar = null | stats bucket(nullVar, nullVar, nullVar, nullVar)", + "error": [ + "Argument of [bucket] must be a constant, received [nullVar]", + "Argument of [bucket] must be a constant, received [nullVar]", + "Argument of [bucket] must be a constant, received [nullVar]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(\"2022\", 1 year)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats bucket(concat(\"20\", \"22\"), 1 year)", + "error": [ + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(\"2022\", integerField, textField, textField)", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [textField]", + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(concat(\"20\", \"22\"), integerField, textField, textField)", + "error": [ + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]", + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [textField]", + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(\"2022\", integerField, \"2022\", \"2022\")", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(concat(\"20\", \"22\"), integerField, concat(\"20\", \"22\"), concat(\"20\", \"22\"))", + "error": [ + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]", + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]", + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(\"2022\", integerField, textField, \"2022\")", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(concat(\"20\", \"22\"), integerField, textField, concat(\"20\", \"22\"))", + "error": [ + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]", + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [textField]", + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(\"2022\", integerField, \"2022\", textField)", + "error": [ + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(concat(\"20\", \"22\"), integerField, concat(\"20\", \"22\"), textField)", + "error": [ + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]", + "Argument of [bucket] must be a constant, received [integerField]", + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]", + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(doubleField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(doubleField, doubleField)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(doubleField, doubleField))", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(doubleField,doubleField))]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(doubleField, doubleField))", + "error": [ + "Argument of [round] must be a constant, received [percentile(doubleField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(doubleField, doubleField)) + percentile(doubleField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(doubleField,doubleField))+percentile(doubleField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(doubleField, doubleField)) + percentile(doubleField, doubleField)", + "error": [ + "Argument of [+] must be a constant, received [round(percentile(doubleField,doubleField))]", + "Argument of [+] must be a constant, received [percentile(doubleField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(doubleField / 2, doubleField)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(doubleField / 2, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField/2,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField / 2, doubleField)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField / 2, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField/2,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(doubleField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField, doubleField)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(doubleField, doubleField) by round(doubleField / 2)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(doubleField, doubleField) by var1 = round(doubleField / 2)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField, doubleField) by round(doubleField / 2), ipField", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField, doubleField) by var1 = round(doubleField / 2), ipField", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField, doubleField) by round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField, doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(avg(integerField), avg(integerField))", + "error": [ + "Argument of [=] must be a constant, received [percentile(avg(integerField),avg(integerField))]", + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(avg(integerField), avg(integerField))", + "error": [ + "Argument of [percentile] must be a constant, received [avg(integerField)]", + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(booleanField, )", + "error": [ + "SyntaxError: no viable alternative at input 'percentile(booleanField, )'", + "SyntaxError: mismatched input ')' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", + "At least one aggregation or grouping expression required in [STATS]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(doubleField, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(doubleField, longField)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(doubleField, longField))", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(doubleField,longField))]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(doubleField, longField))", + "error": [ + "Argument of [round] must be a constant, received [percentile(doubleField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(doubleField, longField)) + percentile(doubleField, longField)", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(doubleField,longField))+percentile(doubleField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(doubleField, longField)) + percentile(doubleField, longField)", + "error": [ + "Argument of [+] must be a constant, received [round(percentile(doubleField,longField))]", + "Argument of [+] must be a constant, received [percentile(doubleField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(doubleField / 2, longField)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(doubleField / 2, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField/2,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField / 2, longField)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField / 2, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField/2,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(doubleField, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField, longField)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(doubleField, longField) by round(doubleField / 2)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(doubleField, longField) by var1 = round(doubleField / 2)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField, longField) by round(doubleField / 2), ipField", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField, longField) by var1 = round(doubleField / 2), ipField", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField, longField) by round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField, longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(doubleField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(doubleField, integerField)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(doubleField, integerField))", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(doubleField,integerField))]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(doubleField, integerField))", + "error": [ + "Argument of [round] must be a constant, received [percentile(doubleField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(doubleField, integerField)) + percentile(doubleField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(doubleField,integerField))+percentile(doubleField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(doubleField, integerField)) + percentile(doubleField, integerField)", + "error": [ + "Argument of [+] must be a constant, received [round(percentile(doubleField,integerField))]", + "Argument of [+] must be a constant, received [percentile(doubleField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(doubleField / 2, integerField)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(doubleField / 2, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField/2,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField / 2, integerField)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField / 2, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField/2,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(doubleField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField, integerField)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(doubleField, integerField) by round(doubleField / 2)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(doubleField, integerField) by var1 = round(doubleField / 2)", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField, integerField) by round(doubleField / 2), ipField", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField, integerField) by var1 = round(doubleField / 2), ipField", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(doubleField, integerField) by round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(doubleField, integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [=] must be a constant, received [percentile(doubleField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(longField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(longField, doubleField)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(longField, doubleField))", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(longField,doubleField))]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(longField, doubleField))", + "error": [ + "Argument of [round] must be a constant, received [percentile(longField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(longField, doubleField)) + percentile(longField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(longField,doubleField))+percentile(longField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(longField, doubleField)) + percentile(longField, doubleField)", + "error": [ + "Argument of [+] must be a constant, received [round(percentile(longField,doubleField))]", + "Argument of [+] must be a constant, received [percentile(longField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(longField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(longField, doubleField)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(longField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(longField, doubleField) by round(doubleField / 2)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(longField, doubleField) by var1 = round(doubleField / 2)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(longField, doubleField) by round(doubleField / 2), ipField", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(longField, doubleField) by var1 = round(doubleField / 2), ipField", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(longField, doubleField) by round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(longField, doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(longField, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(longField, longField)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(longField, longField))", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(longField,longField))]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(longField, longField))", + "error": [ + "Argument of [round] must be a constant, received [percentile(longField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(longField, longField)) + percentile(longField, longField)", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(longField,longField))+percentile(longField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(longField, longField)) + percentile(longField, longField)", + "error": [ + "Argument of [+] must be a constant, received [round(percentile(longField,longField))]", + "Argument of [+] must be a constant, received [percentile(longField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(longField, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(longField, longField)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(longField, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(longField, longField) by round(doubleField / 2)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(longField, longField) by var1 = round(doubleField / 2)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(longField, longField) by round(doubleField / 2), ipField", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(longField, longField) by var1 = round(doubleField / 2), ipField", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(longField, longField) by round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(longField, longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(longField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(longField, integerField)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(longField, integerField))", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(longField,integerField))]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(longField, integerField))", + "error": [ + "Argument of [round] must be a constant, received [percentile(longField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(longField, integerField)) + percentile(longField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(longField,integerField))+percentile(longField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(longField, integerField)) + percentile(longField, integerField)", + "error": [ + "Argument of [+] must be a constant, received [round(percentile(longField,integerField))]", + "Argument of [+] must be a constant, received [percentile(longField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(longField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(longField, integerField)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(longField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(longField, integerField) by round(doubleField / 2)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(longField, integerField) by var1 = round(doubleField / 2)", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(longField, integerField) by round(doubleField / 2), ipField", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(longField, integerField) by var1 = round(doubleField / 2), ipField", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(longField, integerField) by round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(longField, integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [=] must be a constant, received [percentile(longField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(integerField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(integerField, doubleField)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(integerField, doubleField))", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(integerField,doubleField))]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(integerField, doubleField))", + "error": [ + "Argument of [round] must be a constant, received [percentile(integerField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(integerField, doubleField)) + percentile(integerField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(integerField,doubleField))+percentile(integerField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(integerField, doubleField)) + percentile(integerField, doubleField)", + "error": [ + "Argument of [+] must be a constant, received [round(percentile(integerField,doubleField))]", + "Argument of [+] must be a constant, received [percentile(integerField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(integerField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(integerField, doubleField)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(integerField, doubleField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(integerField, doubleField) by round(doubleField / 2)", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(integerField, doubleField) by var1 = round(doubleField / 2)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(integerField, doubleField) by round(doubleField / 2), ipField", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(integerField, doubleField) by var1 = round(doubleField / 2), ipField", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(integerField, doubleField) by round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [percentile] must be a constant, received [doubleField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(integerField, doubleField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,doubleField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(integerField, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(integerField, longField)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(integerField, longField))", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(integerField,longField))]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(integerField, longField))", + "error": [ + "Argument of [round] must be a constant, received [percentile(integerField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(integerField, longField)) + percentile(integerField, longField)", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(integerField,longField))+percentile(integerField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(integerField, longField)) + percentile(integerField, longField)", + "error": [ + "Argument of [+] must be a constant, received [round(percentile(integerField,longField))]", + "Argument of [+] must be a constant, received [percentile(integerField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(integerField, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(integerField, longField)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(integerField, longField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(integerField, longField) by round(doubleField / 2)", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(integerField, longField) by var1 = round(doubleField / 2)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(integerField, longField) by round(doubleField / 2), ipField", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(integerField, longField) by var1 = round(doubleField / 2), ipField", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(integerField, longField) by round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [percentile] must be a constant, received [longField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(integerField, longField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,longField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = percentile(integerField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(integerField, integerField)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(integerField, integerField))", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(integerField,integerField))]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(integerField, integerField))", + "error": [ + "Argument of [round] must be a constant, received [percentile(integerField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var = round(percentile(integerField, integerField)) + percentile(integerField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [round(percentile(integerField,integerField))+percentile(integerField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats round(percentile(integerField, integerField)) + percentile(integerField, integerField)", + "error": [ + "Argument of [+] must be a constant, received [round(percentile(integerField,integerField))]", + "Argument of [+] must be a constant, received [percentile(integerField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(integerField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(integerField, integerField)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(integerField, integerField)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats percentile(integerField, integerField) by round(doubleField / 2)", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats var0 = percentile(integerField, integerField) by var1 = round(doubleField / 2)", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(integerField, integerField) by round(doubleField / 2), ipField", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(integerField, integerField) by var1 = round(doubleField / 2), ipField", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), percentile(integerField, integerField) by round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [percentile] must be a constant, received [integerField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats avg(doubleField), var0 = percentile(integerField, integerField) by var1 = round(doubleField / 2), doubleField / 2", + "error": [ + "Argument of [=] must be a constant, received [percentile(integerField,integerField)]" + ], + "warning": [] + }, + { + "query": "from a_index | sort percentile(doubleField, doubleField)", + "error": [ + "SORT does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(doubleField, doubleField)", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(doubleField, doubleField) > 0", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(doubleField, longField)", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(doubleField, longField) > 0", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(doubleField, integerField)", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(doubleField, integerField) > 0", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(longField, doubleField)", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(longField, doubleField) > 0", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(longField, longField)", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(longField, longField) > 0", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(longField, integerField)", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(longField, integerField) > 0", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(integerField, doubleField)", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(integerField, doubleField) > 0", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(integerField, longField)", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(integerField, longField) > 0", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(integerField, integerField)", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | where percentile(integerField, integerField) > 0", + "error": [ + "WHERE does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(doubleField, doubleField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(doubleField, doubleField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(doubleField, doubleField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(doubleField, doubleField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(doubleField, longField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(doubleField, longField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(doubleField, longField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(doubleField, longField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(doubleField, integerField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(doubleField, integerField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(doubleField, integerField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(doubleField, integerField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(longField, doubleField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(longField, doubleField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(longField, doubleField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(longField, doubleField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(longField, longField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(longField, longField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(longField, longField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(longField, longField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(longField, integerField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(longField, integerField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(longField, integerField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(longField, integerField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(integerField, doubleField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(integerField, doubleField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(integerField, doubleField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(integerField, doubleField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(integerField, longField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(integerField, longField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(integerField, longField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(integerField, longField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(integerField, integerField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = percentile(integerField, integerField) > 0", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(integerField, integerField)", + "error": [ + "EVAL does not support function percentile" + ], + "warning": [] + }, + { + "query": "from a_index | eval percentile(integerField, integerField) > 0", + "error": [ + "EVAL does not support function percentile" ], "warning": [] }, { - "query": "from a_index | sort mv_append(booleanField, booleanField)", + "query": "from a_index | stats percentile(null, null)", "error": [], "warning": [] }, { - "query": "from a_index | eval mv_append(null, null)", - "error": [], + "query": "row nullVar = null | stats percentile(nullVar, nullVar)", + "error": [ + "Argument of [percentile] must be a constant, received [nullVar]" + ], "warning": [] }, { - "query": "row nullVar = null | eval mv_append(nullVar, nullVar)", + "query": "row var = to_string(true)", "error": [], "warning": [] }, { - "query": "row var = repeat(\"a\", 5)", + "query": "row to_string(true)", "error": [], "warning": [] }, { - "query": "row repeat(\"a\", 5)", + "query": "row var = to_str(true)", "error": [], "warning": [] }, { - "query": "row var = repeat(to_string(true), to_integer(true))", + "query": "row var = to_string(to_boolean(true))", "error": [], "warning": [] }, { - "query": "row var = repeat(true, true)", + "query": "row var = to_string(cartesianPointField)", "error": [ - "Argument of [repeat] must be [string], found value [true] type [boolean]", - "Argument of [repeat] must be [number], found value [true] type [boolean]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | where length(repeat(stringField, numberField)) > 0", - "error": [], + "query": "row to_string(cartesianPointField)", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | where length(repeat(booleanField, booleanField)) > 0", + "query": "row var = to_str(cartesianPointField)", "error": [ - "Argument of [repeat] must be [string], found value [booleanField] type [boolean]", - "Argument of [repeat] must be [number], found value [booleanField] type [boolean]" + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | eval var = repeat(stringField, numberField)", - "error": [], + "query": "row var = to_string(to_cartesianpoint(cartesianPointField))", + "error": [ + "Unknown column [cartesianPointField]" + ], "warning": [] }, { - "query": "from a_index | eval repeat(stringField, numberField)", + "query": "row var = to_string(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = repeat(to_string(booleanField), to_integer(booleanField))", + "query": "row to_string(to_cartesianshape(\"POINT (30 10)\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval repeat(booleanField, booleanField)", - "error": [ - "Argument of [repeat] must be [string], found value [booleanField] type [boolean]", - "Argument of [repeat] must be [number], found value [booleanField] type [boolean]" - ], + "query": "row var = to_str(to_cartesianshape(\"POINT (30 10)\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval repeat(stringField, numberField, extraArg)", + "query": "row var = to_string(to_cartesianshape(cartesianPointField))", "error": [ - "Error: [repeat] function expects exactly 2 arguments, got 3." + "Unknown column [cartesianPointField]" ], "warning": [] }, { - "query": "from a_index | sort repeat(stringField, numberField)", + "query": "row var = to_string(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | eval repeat(null, null)", + "query": "row to_string(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval repeat(nullVar, nullVar)", + "query": "row var = to_str(to_datetime(\"2021-01-01T00:00:00Z\"))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = top(stringField, 3, \"asc\")", + "query": "row var = to_string(to_datetime(to_datetime(\"2021-01-01T00:00:00Z\")))", "error": [], "warning": [] }, { - "query": "from a_index | stats top(stringField, 1, \"desc\")", + "query": "row var = to_string(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = top(stringField, 5, \"asc\")", + "query": "row to_string(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats top(stringField, 5, \"asc\")", + "query": "row var = to_str(5.5)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = top(stringField, 3)", - "error": [ - "Error: [top] function expects exactly 3 arguments, got 2." - ], + "query": "row var = to_string(to_double(true))", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = top(stringField)", + "query": "row var = to_string(geoPointField)", "error": [ - "Error: [top] function expects exactly 3 arguments, got 1." + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | stats var = top(stringField, numberField, \"asc\")", + "query": "row to_string(geoPointField)", "error": [ - "Argument of [=] must be a constant, received [top(stringField,numberField,\"asc\")]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | stats var = top(stringField, 100 + numberField, \"asc\")", + "query": "row var = to_str(geoPointField)", "error": [ - "Argument of [=] must be a constant, received [top(stringField,100+numberField,\"asc\")]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | stats var = top(stringField, 1, stringField)", + "query": "row var = to_string(to_geopoint(geoPointField))", "error": [ - "Argument of [=] must be a constant, received [top(stringField,1,stringField)]" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | stats var = top(stringField, 1, \"asdf\")", + "query": "row var = to_string(to_geoshape(\"POINT (30 10)\"))", "error": [], - "warning": [ - "Invalid option [\"asdf\"] for top. Supported options: [\"asc\", \"desc\"]." - ] - }, - { - "query": "from a_index | sort top(stringField, numberField, \"asc\")", - "error": [ - "SORT does not support function top" - ], - "warning": [] - }, - { - "query": "from a_index | where top(stringField, numberField, \"asc\")", - "error": [ - "WHERE does not support function top" - ], "warning": [] }, { - "query": "from a_index | where top(stringField, numberField, \"asc\") > 0", - "error": [ - "WHERE does not support function top" - ], + "query": "row to_string(to_geoshape(\"POINT (30 10)\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = top(stringField, numberField, \"asc\")", - "error": [ - "EVAL does not support function top" - ], + "query": "row var = to_str(to_geoshape(\"POINT (30 10)\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = top(stringField, numberField, \"asc\") > 0", + "query": "row var = to_string(to_geoshape(geoPointField))", "error": [ - "EVAL does not support function top" + "Unknown column [geoPointField]" ], "warning": [] }, { - "query": "from a_index | eval top(stringField, numberField, \"asc\")", - "error": [ - "EVAL does not support function top" - ], + "query": "row var = to_string(5)", + "error": [], "warning": [] }, { - "query": "from a_index | eval top(stringField, numberField, \"asc\") > 0", - "error": [ - "EVAL does not support function top" - ], + "query": "row to_string(5)", + "error": [], "warning": [] }, { - "query": "from a_index | sort top(stringField, 5, \"asc\")", - "error": [ - "SORT does not support function top" - ], + "query": "row var = to_str(5)", + "error": [], "warning": [] }, { - "query": "from a_index | where top(stringField, 5, \"asc\")", - "error": [ - "WHERE does not support function top" - ], + "query": "row var = to_string(to_integer(true))", + "error": [], "warning": [] }, { - "query": "from a_index | where top(stringField, 5, \"asc\") > 0", - "error": [ - "WHERE does not support function top" - ], + "query": "row var = to_string(to_ip(\"127.0.0.1\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = top(stringField, 5, \"asc\")", - "error": [ - "EVAL does not support function top" - ], + "query": "row to_string(to_ip(\"127.0.0.1\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = top(stringField, 5, \"asc\") > 0", - "error": [ - "EVAL does not support function top" - ], + "query": "row var = to_str(to_ip(\"127.0.0.1\"))", + "error": [], "warning": [] }, { - "query": "from a_index | eval top(stringField, 5, \"asc\")", - "error": [ - "EVAL does not support function top" - ], + "query": "row var = to_string(to_ip(to_ip(\"127.0.0.1\")))", + "error": [], "warning": [] }, { - "query": "from a_index | eval top(stringField, 5, \"asc\") > 0", - "error": [ - "EVAL does not support function top" - ], + "query": "row var = to_string(\"a\")", + "error": [], "warning": [] }, { - "query": "from a_index | stats var = top(stringField, 5, \"asc\")", + "query": "row to_string(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats top(stringField, 5, \"asc\")", + "query": "row var = to_str(\"a\")", "error": [], "warning": [] }, { - "query": "from a_index | stats top(stringField, numberField, \"asc\")", - "error": [ - "Argument of [top] must be a constant, received [numberField]" - ], + "query": "row var = to_string(to_string(true))", + "error": [], "warning": [] }, { - "query": "from a_index | stats top(null, null, null)", + "query": "row var = to_string(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats top(nullVar, nullVar, nullVar)", - "error": [ - "Argument of [top] must be a constant, received [nullVar]", - "Argument of [top] must be a constant, received [nullVar]" - ], + "query": "row to_string(to_version(\"1.0.0\"))", + "error": [], "warning": [] }, { - "query": "row var = st_distance(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "row var = to_str(to_version(\"1.0.0\"))", "error": [], "warning": [] }, { - "query": "row st_distance(to_cartesianpoint(\"POINT (30 10)\"), to_cartesianpoint(\"POINT (30 10)\"))", + "query": "row var = to_string(to_version(\"a\"))", "error": [], "warning": [] }, { - "query": "row var = st_distance(to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")), to_cartesianpoint(to_cartesianpoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = to_string(booleanField)", "error": [], "warning": [] }, { - "query": "row var = st_distance(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval to_string(booleanField)", "error": [], "warning": [] }, { - "query": "row st_distance(to_geopoint(\"POINT (30 10)\"), to_geopoint(\"POINT (30 10)\"))", + "query": "from a_index | eval var = to_str(booleanField)", "error": [], "warning": [] }, { - "query": "row var = st_distance(to_geopoint(to_geopoint(\"POINT (30 10)\")), to_geopoint(to_geopoint(\"POINT (30 10)\")))", + "query": "from a_index | eval var = to_string(to_boolean(booleanField))", "error": [], "warning": [] }, { - "query": "row var = st_distance(true, true)", + "query": "from a_index | eval to_string(counterDoubleField)", "error": [ - "Argument of [st_distance] must be [cartesian_point], found value [true] type [boolean]", - "Argument of [st_distance] must be [cartesian_point], found value [true] type [boolean]" + "Argument of [to_string] must be [boolean], found value [counterDoubleField] type [counter_double]" ], "warning": [] }, { - "query": "from a_index | eval var = st_distance(cartesianPointField, cartesianPointField)", - "error": [], + "query": "from a_index | eval var = to_string(*)", + "error": [ + "Using wildcards (*) in to_string is not allowed" + ], "warning": [] }, { - "query": "from a_index | eval st_distance(cartesianPointField, cartesianPointField)", + "query": "from a_index | eval var = to_string(cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_distance(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))", + "query": "from a_index | eval to_string(cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_distance(booleanField, booleanField)", - "error": [ - "Argument of [st_distance] must be [cartesian_point], found value [booleanField] type [boolean]", - "Argument of [st_distance] must be [cartesian_point], found value [booleanField] type [boolean]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = st_distance(geoPointField, geoPointField)", + "query": "from a_index | eval var = to_str(cartesianPointField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_distance(geoPointField, geoPointField)", + "query": "from a_index | eval var = to_string(to_cartesianpoint(cartesianPointField))", "error": [], "warning": [] }, { - "query": "from a_index | eval var = st_distance(to_geopoint(geoPointField), to_geopoint(geoPointField))", + "query": "from a_index | eval var = to_string(cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_distance(cartesianPointField, cartesianPointField, extraArg)", - "error": [ - "Error: [st_distance] function expects exactly 2 arguments, got 3." - ], + "query": "from a_index | eval to_string(cartesianShapeField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort st_distance(cartesianPointField, cartesianPointField)", + "query": "from a_index | eval var = to_str(cartesianShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | eval st_distance(null, null)", + "query": "from a_index | eval var = to_string(to_cartesianshape(cartesianPointField))", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval st_distance(nullVar, nullVar)", + "query": "from a_index | eval var = to_string(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = weighted_avg(numberField, numberField)", + "query": "from a_index | eval to_string(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | stats weighted_avg(numberField, numberField)", + "query": "from a_index | eval var = to_str(dateField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(weighted_avg(numberField, numberField))", + "query": "from a_index | eval var = to_string(to_datetime(dateField))", "error": [], "warning": [] }, { - "query": "from a_index | stats round(weighted_avg(numberField, numberField))", + "query": "from a_index | eval var = to_string(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var = round(weighted_avg(numberField, numberField)) + weighted_avg(numberField, numberField)", + "query": "from a_index | eval to_string(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats round(weighted_avg(numberField, numberField)) + weighted_avg(numberField, numberField)", + "query": "from a_index | eval var = to_str(doubleField)", "error": [], "warning": [] }, { - "query": "from a_index | stats weighted_avg(numberField / 2, numberField)", + "query": "from a_index | eval var = to_string(to_double(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = weighted_avg(numberField / 2, numberField)", + "query": "from a_index | eval var = to_string(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), weighted_avg(numberField / 2, numberField)", + "query": "from a_index | eval to_string(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = weighted_avg(numberField / 2, numberField)", + "query": "from a_index | eval var = to_str(geoPointField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = weighted_avg(numberField, numberField)", + "query": "from a_index | eval var = to_string(to_geopoint(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), weighted_avg(numberField, numberField)", + "query": "from a_index | eval var = to_string(geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = weighted_avg(numberField, numberField)", + "query": "from a_index | eval to_string(geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats weighted_avg(numberField, numberField) by round(numberField / 2)", + "query": "from a_index | eval var = to_str(geoShapeField)", "error": [], "warning": [] }, { - "query": "from a_index | stats var0 = weighted_avg(numberField, numberField) by var1 = round(numberField / 2)", + "query": "from a_index | eval var = to_string(to_geoshape(geoPointField))", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), weighted_avg(numberField, numberField) by round(numberField / 2), ipField", + "query": "from a_index | eval var = to_string(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = weighted_avg(numberField, numberField) by var1 = round(numberField / 2), ipField", + "query": "from a_index | eval to_string(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), weighted_avg(numberField, numberField) by round(numberField / 2), numberField / 2", + "query": "from a_index | eval var = to_str(integerField)", "error": [], "warning": [] }, { - "query": "from a_index | stats avg(numberField), var0 = weighted_avg(numberField, numberField) by var1 = round(numberField / 2), numberField / 2", + "query": "from a_index | eval var = to_string(to_integer(booleanField))", "error": [], "warning": [] }, { - "query": "from a_index | stats var = weighted_avg(avg(numberField), avg(numberField))", - "error": [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - "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 = to_string(ipField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats weighted_avg(avg(numberField), avg(numberField))", - "error": [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - "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 to_string(ipField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats weighted_avg(booleanField, booleanField)", - "error": [ - "Argument of [weighted_avg] must be [number], found value [booleanField] type [boolean]", - "Argument of [weighted_avg] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = to_str(ipField)", + "error": [], "warning": [] }, { - "query": "from a_index | sort weighted_avg(numberField, numberField)", - "error": [ - "SORT does not support function weighted_avg" - ], + "query": "from a_index | eval var = to_string(to_ip(ipField))", + "error": [], "warning": [] }, { - "query": "from a_index | where weighted_avg(numberField, numberField)", - "error": [ - "WHERE does not support function weighted_avg" - ], + "query": "from a_index | eval var = to_string(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | where weighted_avg(numberField, numberField) > 0", - "error": [ - "WHERE does not support function weighted_avg" - ], + "query": "from a_index | eval to_string(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = weighted_avg(numberField, numberField)", - "error": [ - "EVAL does not support function weighted_avg" - ], + "query": "from a_index | eval var = to_str(keywordField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = weighted_avg(numberField, numberField) > 0", - "error": [ - "EVAL does not support function weighted_avg" - ], + "query": "from a_index | eval var = to_string(to_string(booleanField))", + "error": [], "warning": [] }, { - "query": "from a_index | eval weighted_avg(numberField, numberField)", - "error": [ - "EVAL does not support function weighted_avg" - ], + "query": "from a_index | eval var = to_string(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval weighted_avg(numberField, numberField) > 0", - "error": [ - "EVAL does not support function weighted_avg" - ], + "query": "from a_index | eval to_string(longField)", + "error": [], "warning": [] }, { - "query": "from a_index | stats weighted_avg(null, null)", + "query": "from a_index | eval var = to_str(longField)", "error": [], "warning": [] }, { - "query": "row nullVar = null | stats weighted_avg(nullVar, nullVar)", + "query": "from a_index | eval var = to_string(textField)", "error": [], "warning": [] }, { - "query": "row var = exp(5)", + "query": "from a_index | eval to_string(textField)", "error": [], "warning": [] }, { - "query": "row exp(5)", + "query": "from a_index | eval var = to_str(textField)", "error": [], "warning": [] }, { - "query": "row var = exp(to_integer(true))", + "query": "from a_index | eval var = to_string(unsignedLongField)", "error": [], "warning": [] }, { - "query": "row var = exp(true)", - "error": [ - "Argument of [exp] must be [number], found value [true] type [boolean]" - ], + "query": "from a_index | eval to_string(unsignedLongField)", + "error": [], "warning": [] }, { - "query": "from a_index | where exp(numberField) > 0", + "query": "from a_index | eval var = to_str(unsignedLongField)", "error": [], "warning": [] }, { - "query": "from a_index | where exp(booleanField) > 0", - "error": [ - "Argument of [exp] must be [number], found value [booleanField] type [boolean]" - ], + "query": "from a_index | eval var = to_string(versionField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval var = exp(numberField)", + "query": "from a_index | eval to_string(versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval exp(numberField)", + "query": "from a_index | eval var = to_str(versionField)", "error": [], "warning": [] }, { - "query": "from a_index | eval var = exp(to_integer(booleanField))", + "query": "from a_index | eval var = to_string(to_version(keywordField))", "error": [], "warning": [] }, { - "query": "from a_index | eval exp(booleanField)", + "query": "from a_index | eval to_string(booleanField, extraArg)", "error": [ - "Argument of [exp] must be [number], found value [booleanField] type [boolean]" + "Error: [to_string] function expects exactly one argument, got 2." ], "warning": [] }, { - "query": "from a_index | eval var = exp(*)", - "error": [ - "Using wildcards (*) in exp is not allowed" - ], + "query": "from a_index | sort to_string(booleanField)", + "error": [], "warning": [] }, { - "query": "from a_index | eval exp(numberField, extraArg)", - "error": [ - "Error: [exp] function expects exactly one argument, got 2." - ], + "query": "from a_index | eval to_string(null)", + "error": [], "warning": [] }, { - "query": "from a_index | sort exp(numberField)", + "query": "row nullVar = null | eval to_string(nullVar)", "error": [], "warning": [] }, { - "query": "from a_index | eval exp(null)", + "query": "from a_index | eval to_string(\"2022\")", "error": [], "warning": [] }, { - "query": "row nullVar = null | eval exp(nullVar)", + "query": "from a_index | eval to_string(concat(\"20\", \"22\"))", "error": [], "warning": [] }, 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 daeff58923f5c..f4c75ae1e63a0 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts @@ -35,26 +35,38 @@ const NESTED_DEPTHS = Array(NESTING_LEVELS) .fill(0) .map((_, i) => i + 1); +const toAvgSignature = statsAggregationFunctionDefinitions.find(({ name }) => name === 'avg')!; const toInteger = evalFunctionDefinitions.find(({ name }) => name === 'to_integer')!; +const toDoubleSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_double')!; 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 toAvgSignature = statsAggregationFunctionDefinitions.find(({ name }) => name === 'avg')!; +const toCartesianShapeSignature = evalFunctionDefinitions.find( + ({ name }) => name === 'to_cartesianshape' +)!; +const toVersionSignature = evalFunctionDefinitions.find(({ name }) => name === 'to_version')!; const nestedFunctions = { - number: prepareNestedFunction(toInteger), + double: prepareNestedFunction(toDoubleSignature), + integer: prepareNestedFunction(toInteger), string: prepareNestedFunction(toStringSignature), + text: prepareNestedFunction(toStringSignature), + keyword: 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), + datetime: prepareNestedFunction(toDateSignature), }; const literals = { @@ -152,7 +164,7 @@ function getFieldMapping( ...rest, }; } - return { name: 'stringField', type, ...rest }; + return { name: 'textField', type, ...rest }; }); } @@ -351,7 +363,7 @@ describe('validation logic', () => { for (const op of ['>', '>=', '<', '<=', '==', '!=']) { testErrorsAndWarnings(`row var = 5 ${op} 0`, []); testErrorsAndWarnings(`row var = NOT 5 ${op} 0`, []); - testErrorsAndWarnings(`row var = (numberField ${op} 0)`, ['Unknown column [numberField]']); + testErrorsAndWarnings(`row var = (doubleField ${op} 0)`, ['Unknown column [doubleField]']); testErrorsAndWarnings(`row var = (NOT (5 ${op} 0))`, []); testErrorsAndWarnings(`row var = to_ip("127.0.0.1") ${op} to_ip("127.0.0.1")`, []); testErrorsAndWarnings(`row var = now() ${op} now()`, []); @@ -360,8 +372,8 @@ describe('validation logic', () => { ['==', '!='].includes(op) ? [] : [ - `Argument of [${op}] must be [number], found value [false] type [boolean]`, - `Argument of [${op}] must be [number], found value [false] type [boolean]`, + `Argument of [${op}] must be [date], found value [false] type [boolean]`, + `Argument of [${op}] must be [date], found value [false] type [boolean]`, ] ); for (const [valueTypeA, valueTypeB] of [['now()', '"2022"']]) { @@ -375,10 +387,10 @@ describe('validation logic', () => { testErrorsAndWarnings( `row var = now() ${op} now()`, ['+', '-'].includes(op) - ? [`Argument of [${op}] must be [time_literal], found value [now()] type [date]`] + ? [`Argument of [${op}] must be [date_period], found value [now()] type [date]`] : [ - `Argument of [${op}] must be [number], found value [now()] type [date]`, - `Argument of [${op}] must be [number], found value [now()] type [date]`, + `Argument of [${op}] must be [double], found value [now()] type [date]`, + `Argument of [${op}] must be [double], found value [now()] type [date]`, ] ); } @@ -389,16 +401,16 @@ describe('validation logic', () => { testErrorsAndWarnings(`row var = NOT "a" ${op} "?a"`, []); testErrorsAndWarnings(`row var = NOT "a" NOT ${op} "?a"`, []); testErrorsAndWarnings(`row var = 5 ${op} "?a"`, [ - `Argument of [${op}] must be [string], found value [5] type [number]`, + `Argument of [${op}] must be [text], found value [5] type [integer]`, ]); testErrorsAndWarnings(`row var = 5 NOT ${op} "?a"`, [ - `Argument of [not_${op}] must be [string], found value [5] type [number]`, + `Argument of [not_${op}] must be [text], found value [5] type [integer]`, ]); testErrorsAndWarnings(`row var = NOT 5 ${op} "?a"`, [ - `Argument of [${op}] must be [string], found value [5] type [number]`, + `Argument of [${op}] must be [text], found value [5] type [integer]`, ]); testErrorsAndWarnings(`row var = NOT 5 NOT ${op} "?a"`, [ - `Argument of [not_${op}] must be [string], found value [5] type [number]`, + `Argument of [not_${op}] must be [text], found value [5] type [integer]`, ]); } @@ -438,8 +450,8 @@ describe('validation logic', () => { ]); for (const op of ['*', '/', '%']) { testErrorsAndWarnings(`row var = now() ${op} 1 ${timeLiteral.name}`, [ - `Argument of [${op}] must be [number], found value [now()] type [date]`, - `Argument of [${op}] must be [number], found value [1 ${timeLiteral.name}] type [duration]`, + `Argument of [${op}] must be [double], found value [now()] type [date]`, + `Argument of [${op}] must be [double], found value [1 ${timeLiteral.name}] type [duration]`, ]); } } @@ -449,13 +461,13 @@ describe('validation logic', () => { describe('show', () => { testErrorsAndWarnings('show', ["SyntaxError: missing 'info' at ''"]); testErrorsAndWarnings('show info', []); - testErrorsAndWarnings('show numberField', [ - "SyntaxError: token recognition error at: 'n'", + testErrorsAndWarnings('show doubleField', [ + "SyntaxError: token recognition error at: 'd'", + "SyntaxError: token recognition error at: 'o'", "SyntaxError: token recognition error at: 'u'", - "SyntaxError: token recognition error at: 'm'", "SyntaxError: token recognition error at: 'b'", + "SyntaxError: token recognition error at: 'l'", "SyntaxError: token recognition error at: 'e'", - "SyntaxError: token recognition error at: 'r'", "SyntaxError: token recognition error at: 'F'", "SyntaxError: token recognition error at: 'ie'", "SyntaxError: token recognition error at: 'l'", @@ -475,11 +487,11 @@ describe('validation logic', () => { testErrorsAndWarnings('from index | limit a', [ "SyntaxError: mismatched input 'a' expecting INTEGER_LITERAL", ]); - testErrorsAndWarnings('from index | limit numberField', [ - "SyntaxError: mismatched input 'numberField' expecting INTEGER_LITERAL", + testErrorsAndWarnings('from index | limit doubleField', [ + "SyntaxError: mismatched input 'doubleField' expecting INTEGER_LITERAL", ]); - testErrorsAndWarnings('from index | limit stringField', [ - "SyntaxError: mismatched input 'stringField' expecting INTEGER_LITERAL", + testErrorsAndWarnings('from index | limit textField', [ + "SyntaxError: mismatched input 'textField' expecting INTEGER_LITERAL", ]); testErrorsAndWarnings('from index | limit 4', []); }); @@ -490,8 +502,14 @@ describe('validation logic', () => { describe('keep', () => { testErrorsAndWarnings('from index | keep ', ["SyntaxError: missing ID_PATTERN at ''"]); - testErrorsAndWarnings('from index | keep stringField, numberField, dateField', []); - testErrorsAndWarnings('from index | keep `stringField`, `numberField`, `dateField`', []); + testErrorsAndWarnings( + 'from index | keep keywordField, doubleField, integerField, dateField', + [] + ); + testErrorsAndWarnings( + 'from index | keep `keywordField`, `doubleField`, `integerField`, `dateField`', + [] + ); testErrorsAndWarnings('from index | keep 4.5', [ "SyntaxError: token recognition error at: '4'", "SyntaxError: token recognition error at: '5'", @@ -499,27 +517,27 @@ describe('validation logic', () => { "SyntaxError: missing ID_PATTERN at ''", ]); testErrorsAndWarnings('from index | keep `4.5`', ['Unknown column [4.5]']); - testErrorsAndWarnings('from index | keep missingField, numberField, dateField', [ + testErrorsAndWarnings('from index | keep missingField, doubleField, dateField', [ 'Unknown column [missingField]', ]); testErrorsAndWarnings('from index | keep `any#Char$Field`', []); testErrorsAndWarnings('from index | project ', [ "SyntaxError: mismatched input 'project' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'lookup', 'mv_expand', 'rename', 'sort', 'stats', 'where'}", ]); - testErrorsAndWarnings('from index | project stringField, numberField, dateField', [ + testErrorsAndWarnings('from index | project textField, doubleField, dateField', [ "SyntaxError: mismatched input 'project' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'lookup', 'mv_expand', 'rename', 'sort', 'stats', 'where'}", ]); - testErrorsAndWarnings('from index | PROJECT stringField, numberField, dateField', [ + testErrorsAndWarnings('from index | PROJECT textField, doubleField, dateField', [ "SyntaxError: mismatched input 'PROJECT' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'lookup', 'mv_expand', 'rename', 'sort', 'stats', 'where'}", ]); - testErrorsAndWarnings('from index | project missingField, numberField, dateField', [ + testErrorsAndWarnings('from index | project missingField, doubleField, dateField', [ "SyntaxError: mismatched input 'project' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'lookup', 'mv_expand', 'rename', 'sort', 'stats', 'where'}", ]); - testErrorsAndWarnings('from index | keep s*', []); + testErrorsAndWarnings('from index | keep k*', []); testErrorsAndWarnings('from index | keep *Field', []); - testErrorsAndWarnings('from index | keep s*Field', []); - testErrorsAndWarnings('from index | keep string*Field', []); - testErrorsAndWarnings('from index | keep s*, n*', []); + testErrorsAndWarnings('from index | keep k*Field', []); + testErrorsAndWarnings('from index | keep key*Field', []); + testErrorsAndWarnings('from index | keep k*, i*', []); testErrorsAndWarnings('from index | keep m*', ['Unknown column [m*]']); testErrorsAndWarnings('from index | keep *m', ['Unknown column [*m]']); testErrorsAndWarnings('from index | keep d*m', ['Unknown column [d*m]']); @@ -532,41 +550,41 @@ describe('validation logic', () => { ); testErrorsAndWarnings( - `FROM index | STATS ROUND(AVG(numberField * 1.5)), COUNT(*), MIN(numberField * 10) | KEEP \`MIN(numberField * 10)\``, + `FROM index | STATS ROUND(AVG(doubleField * 1.5)), COUNT(*), MIN(doubleField * 10) | KEEP \`MIN(doubleField * 10)\``, [] ); testErrorsAndWarnings( - `FROM index | STATS COUNT(*), MIN(numberField * 10), MAX(numberField)| KEEP \`COUNT(*)\``, + `FROM index | STATS COUNT(*), MIN(doubleField * 10), MAX(doubleField)| KEEP \`COUNT(*)\``, [] ); }); describe('drop', () => { testErrorsAndWarnings('from index | drop ', ["SyntaxError: missing ID_PATTERN at ''"]); - testErrorsAndWarnings('from index | drop stringField, numberField, dateField', []); + testErrorsAndWarnings('from index | drop textField, doubleField, dateField', []); testErrorsAndWarnings('from index | drop 4.5', [ "SyntaxError: token recognition error at: '4'", "SyntaxError: token recognition error at: '5'", "SyntaxError: missing ID_PATTERN at '.'", "SyntaxError: missing ID_PATTERN at ''", ]); - testErrorsAndWarnings('from index | drop missingField, numberField, dateField', [ + testErrorsAndWarnings('from index | drop missingField, doubleField, dateField', [ 'Unknown column [missingField]', ]); testErrorsAndWarnings('from index | drop `any#Char$Field`', []); - testErrorsAndWarnings('from index | drop s*', []); - testErrorsAndWarnings('from index | drop s**Field', []); + testErrorsAndWarnings('from index | drop t*', []); + testErrorsAndWarnings('from index | drop t**Field', []); testErrorsAndWarnings('from index | drop *Field*', []); - testErrorsAndWarnings('from index | drop s*F*d', []); + testErrorsAndWarnings('from index | drop t*F*d', []); testErrorsAndWarnings('from index | drop *Field', []); - testErrorsAndWarnings('from index | drop s*Field', []); - testErrorsAndWarnings('from index | drop string*Field', []); - testErrorsAndWarnings('from index | drop s*, n*', []); + testErrorsAndWarnings('from index | drop t*Field', []); + testErrorsAndWarnings('from index | drop textField', []); + testErrorsAndWarnings('from index | drop s*, d*', ['Unknown column [s*]']); testErrorsAndWarnings('from index | drop m*', ['Unknown column [m*]']); testErrorsAndWarnings('from index | drop *m', ['Unknown column [*m]']); testErrorsAndWarnings('from index | drop d*m', ['Unknown column [d*m]']); testErrorsAndWarnings('from index | drop *', ['Removing all fields is not allowed [*]']); - testErrorsAndWarnings('from index | drop stringField, *', [ + testErrorsAndWarnings('from index | drop textField, *', [ 'Removing all fields is not allowed [*]', ]); testErrorsAndWarnings( @@ -575,16 +593,16 @@ describe('validation logic', () => { ['Drop [@timestamp] will remove all time filters to the search results'] ); testErrorsAndWarnings( - 'from index | drop stringField, @timestamp', + 'from index | drop textField, @timestamp', [], ['Drop [@timestamp] will remove all time filters to the search results'] ); testErrorsAndWarnings( - `FROM index | STATS ROUND(AVG(numberField * 1.5)), COUNT(*), MIN(numberField * 10) | DROP \`MIN(numberField * 10)\``, + `FROM index | STATS ROUND(AVG(doubleField * 1.5)), COUNT(*), MIN(doubleField * 10) | DROP \`MIN(doubleField * 10)\``, [] ); testErrorsAndWarnings( - `FROM index | STATS COUNT(*), MIN(numberField * 10), MAX(numberField)| DROP \`COUNT(*)\``, + `FROM index | STATS COUNT(*), MIN(doubleField * 10), MAX(doubleField)| DROP \`COUNT(*)\``, [] ); }); @@ -593,11 +611,11 @@ describe('validation logic', () => { testErrorsAndWarnings('from a_index | mv_expand ', [ "SyntaxError: missing {UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER} at ''", ]); - for (const type of ['string', 'number', 'date', 'boolean', 'ip']) { + for (const type of ['text', 'integer', 'date', 'boolean', 'ip']) { testErrorsAndWarnings(`from a_index | mv_expand ${type}Field`, []); } - testErrorsAndWarnings('from a_index | mv_expand numberField, b', [ + testErrorsAndWarnings('from a_index | mv_expand doubleField, b', [ "SyntaxError: token recognition error at: ','", "SyntaxError: extraneous input 'b' expecting ", ]); @@ -612,24 +630,24 @@ describe('validation logic', () => { testErrorsAndWarnings('from a_index | rename', [ "SyntaxError: mismatched input '' expecting ID_PATTERN", ]); - testErrorsAndWarnings('from a_index | rename stringField', [ + testErrorsAndWarnings('from a_index | rename textField', [ "SyntaxError: mismatched input '' expecting 'as'", ]); testErrorsAndWarnings('from a_index | rename a', [ "SyntaxError: mismatched input '' expecting 'as'", 'Unknown column [a]', ]); - testErrorsAndWarnings('from a_index | rename stringField as', [ + testErrorsAndWarnings('from a_index | rename textField as', [ "SyntaxError: missing ID_PATTERN at ''", ]); testErrorsAndWarnings('from a_index | rename missingField as', [ "SyntaxError: missing ID_PATTERN at ''", 'Unknown column [missingField]', ]); - testErrorsAndWarnings('from a_index | rename stringField as b', []); - testErrorsAndWarnings('from a_index | rename stringField AS b', []); - testErrorsAndWarnings('from a_index | rename stringField As b', []); - testErrorsAndWarnings('from a_index | rename stringField As b, b AS c', []); + testErrorsAndWarnings('from a_index | rename textField as b', []); + testErrorsAndWarnings('from a_index | rename textField AS b', []); + testErrorsAndWarnings('from a_index | rename textField As b', []); + testErrorsAndWarnings('from a_index | rename textField As b, b AS c', []); testErrorsAndWarnings('from a_index | rename fn() as a', [ "SyntaxError: token recognition error at: '('", "SyntaxError: token recognition error at: ')'", @@ -637,18 +655,22 @@ describe('validation logic', () => { 'Unknown column [a]', ]); testErrorsAndWarnings( - 'from a_index | eval numberField + 1 | rename `numberField + 1` as a', + 'from a_index | eval doubleField + 1 | rename `doubleField + 1` as a', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField) | rename `avg(numberField)` as avg0', + 'from a_index | stats avg(doubleField) | rename `avg(doubleField)` as avg0', [] ); - testErrorsAndWarnings('from a_index |eval numberField + 1 | rename `numberField + 1` as ', [ + testErrorsAndWarnings('from a_index |eval doubleField + 1 | rename `doubleField + 1` as ', [ "SyntaxError: missing ID_PATTERN at ''", ]); + testErrorsAndWarnings('from a_index | rename key* as keywords', [ + 'Using wildcards (*) in RENAME is not allowed [key*]', + 'Unknown column [keywords]', + ]); testErrorsAndWarnings('from a_index | rename s* as strings', [ - 'Using wildcards (*) in RENAME is not allowed [s*]', + 'Unknown column [s*]', 'Unknown column [strings]', ]); testErrorsAndWarnings('row a = 10 | rename a as `this``is fine`', []); @@ -661,51 +683,48 @@ describe('validation logic', () => { testErrorsAndWarnings('from a_index | dissect', [ "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); - testErrorsAndWarnings('from a_index | dissect stringField', [ + testErrorsAndWarnings('from a_index | dissect textField', [ "SyntaxError: missing QUOTED_STRING at ''", ]); - testErrorsAndWarnings('from a_index | dissect stringField 2', [ + testErrorsAndWarnings('from a_index | dissect textField 2', [ "SyntaxError: mismatched input '2' expecting QUOTED_STRING", ]); - testErrorsAndWarnings('from a_index | dissect stringField .', [ + testErrorsAndWarnings('from a_index | dissect textField .', [ "SyntaxError: mismatched input '' expecting {UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", - 'Unknown column [stringField.]', + 'Unknown column [textField.]', ]); - testErrorsAndWarnings('from a_index | dissect stringField %a', [ + testErrorsAndWarnings('from a_index | dissect textField %a', [ "SyntaxError: mismatched input '%' expecting QUOTED_STRING", "SyntaxError: mismatched input '' expecting '='", ]); // Do not try to validate the dissect pattern string - testErrorsAndWarnings('from a_index | dissect stringField "%{firstWord}"', []); - testErrorsAndWarnings('from a_index | dissect numberField "%{firstWord}"', [ - 'DISSECT only supports string type values, found [numberField] of type [number]', + testErrorsAndWarnings('from a_index | dissect textField "%{firstWord}"', []); + testErrorsAndWarnings('from a_index | dissect doubleField "%{firstWord}"', [ + 'DISSECT only supports string type values, found [doubleField] of type [double]', ]); - testErrorsAndWarnings('from a_index | dissect stringField "%{firstWord}" option ', [ + testErrorsAndWarnings('from a_index | dissect textField "%{firstWord}" option ', [ "SyntaxError: mismatched input '' expecting '='", ]); - testErrorsAndWarnings('from a_index | dissect stringField "%{firstWord}" option = ', [ + testErrorsAndWarnings('from a_index | dissect textField "%{firstWord}" option = ', [ "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET}", 'Invalid option for DISSECT: [option]', ]); - testErrorsAndWarnings('from a_index | dissect stringField "%{firstWord}" option = 1', [ + testErrorsAndWarnings('from a_index | dissect textField "%{firstWord}" option = 1', [ 'Invalid option for DISSECT: [option]', ]); testErrorsAndWarnings( - 'from a_index | dissect stringField "%{firstWord}" append_separator = "-"', + 'from a_index | dissect textField "%{firstWord}" append_separator = "-"', [] ); testErrorsAndWarnings( - 'from a_index | dissect stringField "%{firstWord}" ignore_missing = true', + 'from a_index | dissect textField "%{firstWord}" ignore_missing = true', ['Invalid option for DISSECT: [ignore_missing]'] ); testErrorsAndWarnings( - 'from a_index | dissect stringField "%{firstWord}" append_separator = true', + 'from a_index | dissect textField "%{firstWord}" append_separator = true', ['Invalid value for DISSECT append_separator: expected a string, but was [true]'] ); - testErrorsAndWarnings( - 'from a_index | dissect stringField "%{firstWord}" | keep firstWord', - [] - ); + testErrorsAndWarnings('from a_index | dissect textField "%{firstWord}" | keep firstWord', []); // testErrorsAndWarnings('from a_index | dissect s* "%{a}"', [ // 'Using wildcards (*) in dissect is not allowed [s*]', // ]); @@ -715,25 +734,26 @@ describe('validation logic', () => { testErrorsAndWarnings('from a_index | grok', [ "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); - testErrorsAndWarnings('from a_index | grok stringField', [ + testErrorsAndWarnings('from a_index | grok textField', [ "SyntaxError: missing QUOTED_STRING at ''", ]); - testErrorsAndWarnings('from a_index | grok stringField 2', [ + testErrorsAndWarnings('from a_index | grok textField 2', [ "SyntaxError: mismatched input '2' expecting QUOTED_STRING", ]); - testErrorsAndWarnings('from a_index | grok stringField .', [ + testErrorsAndWarnings('from a_index | grok textField .', [ "SyntaxError: mismatched input '' expecting {UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", - 'Unknown column [stringField.]', + 'Unknown column [textField.]', ]); - testErrorsAndWarnings('from a_index | grok stringField %a', [ + testErrorsAndWarnings('from a_index | grok textField %a', [ "SyntaxError: mismatched input '%' expecting QUOTED_STRING", ]); + // @TODO: investigate // Do not try to validate the grok pattern string - testErrorsAndWarnings('from a_index | grok stringField "%{firstWord}"', []); - testErrorsAndWarnings('from a_index | grok numberField "%{firstWord}"', [ - 'GROK only supports string type values, found [numberField] of type [number]', + testErrorsAndWarnings('from a_index | grok textField "%{firstWord}"', []); + testErrorsAndWarnings('from a_index | grok doubleField "%{firstWord}"', [ + 'GROK only supports string type values, found [doubleField] of type [double]', ]); - testErrorsAndWarnings('from a_index | grok stringField "%{firstWord}" | keep firstWord', []); + testErrorsAndWarnings('from a_index | grok textField "%{firstWord}" | keep firstWord', []); // testErrorsAndWarnings('from a_index | grok s* "%{a}"', [ // 'Using wildcards (*) in grok is not allowed [s*]', // ]); @@ -750,20 +770,20 @@ describe('validation logic', () => { testErrorsAndWarnings(`from a_index | where NOT ${nValue} > 0`, []); } for (const op of ['>', '>=', '<', '<=', '==', '!=']) { - testErrorsAndWarnings(`from a_index | where numberField ${op} 0`, []); - testErrorsAndWarnings(`from a_index | where NOT numberField ${op} 0`, []); - testErrorsAndWarnings(`from a_index | where (numberField ${op} 0)`, []); - testErrorsAndWarnings(`from a_index | where (NOT (numberField ${op} 0))`, []); + testErrorsAndWarnings(`from a_index | where doubleField ${op} 0`, []); + testErrorsAndWarnings(`from a_index | where NOT doubleField ${op} 0`, []); + testErrorsAndWarnings(`from a_index | where (doubleField ${op} 0)`, []); + testErrorsAndWarnings(`from a_index | where (NOT (doubleField ${op} 0))`, []); testErrorsAndWarnings(`from a_index | where 1 ${op} 0`, []); - for (const type of ['string', 'number', 'date', 'boolean', 'ip']) { + for (const type of ['text', 'double', 'date', 'boolean', 'ip']) { testErrorsAndWarnings( `from a_index | where ${type}Field ${op} ${type}Field`, type !== 'boolean' || ['==', '!='].includes(op) ? [] : [ - `Argument of [${op}] must be [number], found value [${type}Field] type [${type}]`, - `Argument of [${op}] must be [number], found value [${type}Field] type [${type}]`, + `Argument of [${op}] must be [date], found value [${type}Field] type [${type}]`, + `Argument of [${op}] must be [date], found value [${type}Field] type [${type}]`, ] ); } @@ -778,17 +798,17 @@ describe('validation logic', () => { .fill('- ') .map((_, i) => (i % 2 ? oddOp : evenOp)) .join(''); - testErrorsAndWarnings(`from a_index | where ${unaryCombination} numberField > 0`, []); + testErrorsAndWarnings(`from a_index | where ${unaryCombination} doubleField > 0`, []); testErrorsAndWarnings( - `from a_index | where ${unaryCombination} round(numberField) > 0`, + `from a_index | where ${unaryCombination} round(doubleField) > 0`, [] ); testErrorsAndWarnings( - `from a_index | where 1 + ${unaryCombination} numberField > 0`, + `from a_index | where 1 + ${unaryCombination} doubleField > 0`, [] ); // still valid - testErrorsAndWarnings(`from a_index | where 1 ${unaryCombination} numberField > 0`, []); + testErrorsAndWarnings(`from a_index | where 1 ${unaryCombination} doubleField > 0`, []); } } testErrorsAndWarnings( @@ -797,52 +817,52 @@ describe('validation logic', () => { ); } for (const wrongOp of ['*', '/', '%']) { - testErrorsAndWarnings(`from a_index | where ${wrongOp}+ numberField`, [ + testErrorsAndWarnings(`from a_index | where ${wrongOp}+ doubleField`, [ `SyntaxError: extraneous input '${wrongOp}' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}`, ]); } // Skip these tests until the insensitive case equality gets restored back - testErrorsAndWarnings.skip(`from a_index | where numberField =~ 0`, [ - 'Argument of [=~] must be [string], found value [numberField] type [number]', - 'Argument of [=~] must be [string], found value [0] type [number]', + testErrorsAndWarnings.skip(`from a_index | where doubleField =~ 0`, [ + 'Argument of [=~] must be [text], found value [doubleField] type [double]', + 'Argument of [=~] must be [text], found value [0] type [number]', ]); - testErrorsAndWarnings.skip(`from a_index | where NOT numberField =~ 0`, [ - 'Argument of [=~] must be [string], found value [numberField] type [number]', - 'Argument of [=~] must be [string], found value [0] type [number]', + testErrorsAndWarnings.skip(`from a_index | where NOT doubleField =~ 0`, [ + 'Argument of [=~] must be [text], found value [doubleField] type [double]', + 'Argument of [=~] must be [text], found value [0] type [number]', ]); - testErrorsAndWarnings.skip(`from a_index | where (numberField =~ 0)`, [ - 'Argument of [=~] must be [string], found value [numberField] type [number]', - 'Argument of [=~] must be [string], found value [0] type [number]', + testErrorsAndWarnings.skip(`from a_index | where (doubleField =~ 0)`, [ + 'Argument of [=~] must be [text], found value [doubleField] type [double]', + 'Argument of [=~] must be [text], found value [0] type [number]', ]); - testErrorsAndWarnings.skip(`from a_index | where (NOT (numberField =~ 0))`, [ - 'Argument of [=~] must be [string], found value [numberField] type [number]', - 'Argument of [=~] must be [string], found value [0] type [number]', + testErrorsAndWarnings.skip(`from a_index | where (NOT (doubleField =~ 0))`, [ + 'Argument of [=~] must be [text], found value [doubleField] type [double]', + 'Argument of [=~] must be [text], found value [0] type [number]', ]); testErrorsAndWarnings.skip(`from a_index | where 1 =~ 0`, [ - 'Argument of [=~] must be [string], found value [1] type [number]', - 'Argument of [=~] must be [string], found value [0] type [number]', + 'Argument of [=~] must be [text], found value [1] type [number]', + 'Argument of [=~] must be [text], found value [0] type [number]', ]); - testErrorsAndWarnings.skip(`from a_index | eval stringField =~ 0`, [ - `Argument of [=~] must be [string], found value [0] type [number]`, + testErrorsAndWarnings.skip(`from a_index | eval textField =~ 0`, [ + `Argument of [=~] must be [text], found value [0] type [number]`, ]); for (const op of ['like', 'rlike']) { - testErrorsAndWarnings(`from a_index | where stringField ${op} "?a"`, []); - testErrorsAndWarnings(`from a_index | where stringField NOT ${op} "?a"`, []); - testErrorsAndWarnings(`from a_index | where NOT stringField ${op} "?a"`, []); - testErrorsAndWarnings(`from a_index | where NOT stringField NOT ${op} "?a"`, []); - testErrorsAndWarnings(`from a_index | where numberField ${op} "?a"`, [ - `Argument of [${op}] must be [string], found value [numberField] type [number]`, + testErrorsAndWarnings(`from a_index | where textField ${op} "?a"`, []); + testErrorsAndWarnings(`from a_index | where textField NOT ${op} "?a"`, []); + testErrorsAndWarnings(`from a_index | where NOT textField ${op} "?a"`, []); + testErrorsAndWarnings(`from a_index | where NOT textField NOT ${op} "?a"`, []); + testErrorsAndWarnings(`from a_index | where doubleField ${op} "?a"`, [ + `Argument of [${op}] must be [text], found value [doubleField] type [double]`, ]); - testErrorsAndWarnings(`from a_index | where numberField NOT ${op} "?a"`, [ - `Argument of [not_${op}] must be [string], found value [numberField] type [number]`, + testErrorsAndWarnings(`from a_index | where doubleField NOT ${op} "?a"`, [ + `Argument of [not_${op}] must be [text], found value [doubleField] type [double]`, ]); - testErrorsAndWarnings(`from a_index | where NOT numberField ${op} "?a"`, [ - `Argument of [${op}] must be [string], found value [numberField] type [number]`, + testErrorsAndWarnings(`from a_index | where NOT doubleField ${op} "?a"`, [ + `Argument of [${op}] must be [text], found value [doubleField] type [double]`, ]); - testErrorsAndWarnings(`from a_index | where NOT numberField NOT ${op} "?a"`, [ - `Argument of [not_${op}] must be [string], found value [numberField] type [number]`, + testErrorsAndWarnings(`from a_index | where NOT doubleField NOT ${op} "?a"`, [ + `Argument of [not_${op}] must be [text], found value [doubleField] type [double]`, ]); } @@ -866,21 +886,21 @@ describe('validation logic', () => { } // this is a scenario that was failing because "or" didn't accept "null" - testErrorsAndWarnings('from a_index | where stringField == "a" or null', []); + testErrorsAndWarnings('from a_index | where textField == "a" or null', []); }); describe('eval', () => { testErrorsAndWarnings('from a_index | eval ', [ "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); - testErrorsAndWarnings('from a_index | eval stringField ', []); - testErrorsAndWarnings('from a_index | eval b = stringField', []); - testErrorsAndWarnings('from a_index | eval numberField + 1', []); - testErrorsAndWarnings('from a_index | eval numberField + ', [ - "SyntaxError: no viable alternative at input 'numberField + '", + testErrorsAndWarnings('from a_index | eval textField ', []); + testErrorsAndWarnings('from a_index | eval b = textField', []); + testErrorsAndWarnings('from a_index | eval doubleField + 1', []); + testErrorsAndWarnings('from a_index | eval doubleField + ', [ + "SyntaxError: no viable alternative at input 'doubleField + '", ]); - testErrorsAndWarnings('from a_index | eval stringField + 1', [ - 'Argument of [+] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval textField + 1', [ + 'Argument of [+] must be [double], found value [textField] type [text]', ]); testErrorsAndWarnings('from a_index | eval a=b', ['Unknown column [b]']); testErrorsAndWarnings('from a_index | eval a=b, ', [ @@ -891,24 +911,24 @@ describe('validation logic', () => { testErrorsAndWarnings('from a_index | eval a=round(', [ "SyntaxError: no viable alternative at input 'round('", ]); - testErrorsAndWarnings('from a_index | eval a=round(numberField) ', []); - testErrorsAndWarnings('from a_index | eval a=round(numberField), ', [ + testErrorsAndWarnings('from a_index | eval a=round(doubleField) ', []); + testErrorsAndWarnings('from a_index | eval a=round(doubleField), ', [ "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); - testErrorsAndWarnings('from a_index | eval a=round(numberField) + round(numberField) ', []); - testErrorsAndWarnings('from a_index | eval a=round(numberField) + round(stringField) ', [ - 'Argument of [round] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval a=round(doubleField) + round(doubleField) ', []); + testErrorsAndWarnings('from a_index | eval a=round(doubleField) + round(textField) ', [ + 'Argument of [round] must be [double], found value [textField] type [text]', ]); testErrorsAndWarnings( - 'from a_index | eval a=round(numberField) + round(stringField), numberField ', - ['Argument of [round] must be [number], found value [stringField] type [string]'] + 'from a_index | eval a=round(doubleField) + round(textField), doubleField ', + ['Argument of [round] must be [double], found value [textField] type [text]'] ); testErrorsAndWarnings( - 'from a_index | eval a=round(numberField) + round(numberField), numberField ', + 'from a_index | eval a=round(doubleField) + round(doubleField), doubleField ', [] ); testErrorsAndWarnings( - 'from a_index | eval a=round(numberField) + round(numberField), b = numberField ', + 'from a_index | eval a=round(doubleField) + round(doubleField), b = doubleField ', [] ); @@ -936,15 +956,15 @@ describe('validation logic', () => { .fill('- ') .map((_, i) => (i % 2 ? oddOp : evenOp)) .join(''); - testErrorsAndWarnings(`from a_index | eval ${unaryCombination} numberField`, []); - testErrorsAndWarnings(`from a_index | eval a=${unaryCombination} numberField`, []); + testErrorsAndWarnings(`from a_index | eval ${unaryCombination} doubleField`, []); + testErrorsAndWarnings(`from a_index | eval a=${unaryCombination} doubleField`, []); testErrorsAndWarnings( - `from a_index | eval a=${unaryCombination} round(numberField)`, + `from a_index | eval a=${unaryCombination} round(doubleField)`, [] ); - testErrorsAndWarnings(`from a_index | eval 1 + ${unaryCombination} numberField`, []); + testErrorsAndWarnings(`from a_index | eval 1 + ${unaryCombination} doubleField`, []); // still valid - testErrorsAndWarnings(`from a_index | eval 1 ${unaryCombination} numberField`, []); + testErrorsAndWarnings(`from a_index | eval 1 ${unaryCombination} doubleField`, []); } } @@ -955,7 +975,7 @@ describe('validation logic', () => { } for (const wrongOp of ['*', '/', '%']) { - testErrorsAndWarnings(`from a_index | eval ${wrongOp}+ numberField`, [ + testErrorsAndWarnings(`from a_index | eval ${wrongOp}+ doubleField`, [ `SyntaxError: extraneous input '${wrongOp}' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}`, ]); } @@ -991,46 +1011,58 @@ describe('validation logic', () => { ] ); for (const op of ['>', '>=', '<', '<=', '==', '!=']) { - testErrorsAndWarnings(`from a_index | eval numberField ${op} 0`, []); - testErrorsAndWarnings(`from a_index | eval NOT numberField ${op} 0`, []); - testErrorsAndWarnings(`from a_index | eval (numberField ${op} 0)`, []); - testErrorsAndWarnings(`from a_index | eval (NOT (numberField ${op} 0))`, []); + testErrorsAndWarnings(`from a_index | eval doubleField ${op} 0`, []); + testErrorsAndWarnings(`from a_index | eval NOT doubleField ${op} 0`, []); + testErrorsAndWarnings(`from a_index | eval (doubleField ${op} 0)`, []); + testErrorsAndWarnings(`from a_index | eval (NOT (doubleField ${op} 0))`, []); testErrorsAndWarnings(`from a_index | eval 1 ${op} 0`, []); - for (const type of ['string', 'number', 'date', 'boolean', 'ip']) { - testErrorsAndWarnings( - `from a_index | eval ${type}Field ${op} ${type}Field`, - type !== 'boolean' || ['==', '!='].includes(op) - ? [] - : [ - `Argument of [${op}] must be [number], found value [${type}Field] type [${type}]`, - `Argument of [${op}] must be [number], found value [${type}Field] type [${type}]`, - ] - ); + for (const type of ['text', 'double', 'date', 'boolean', 'ip']) { + if (type === 'boolean') { + testErrorsAndWarnings( + `from a_index | eval ${type}Field ${op} ${type}Field`, + type !== 'boolean' || ['==', '!='].includes(op) + ? [] + : [ + `Argument of [${op}] must be [date], found value [${type}Field] type [${type}]`, + `Argument of [${op}] must be [date], found value [${type}Field] type [${type}]`, + ] + ); + } else { + testErrorsAndWarnings( + `from a_index | eval ${type}Field ${op} ${type}Field`, + type !== 'boolean' || ['==', '!='].includes(op) + ? [] + : [ + `Argument of [${op}] must be [double], found value [${type}Field] type [${type}]`, + `Argument of [${op}] must be [double], found value [${type}Field] type [${type}]`, + ] + ); + } } // Implicit casting of literal values tests - testErrorsAndWarnings(`from a_index | eval numberField ${op} stringField`, [ - `Argument of [${op}] must be [number], found value [stringField] type [string]`, + testErrorsAndWarnings(`from a_index | eval doubleField ${op} textField`, [ + `Argument of [${op}] must be [double], found value [textField] type [text]`, ]); - testErrorsAndWarnings(`from a_index | eval stringField ${op} numberField`, [ - `Argument of [${op}] must be [number], found value [stringField] type [string]`, + testErrorsAndWarnings(`from a_index | eval keywordField ${op} doubleField`, [ + `Argument of [${op}] must be [double], found value [keywordField] type [keyword]`, ]); - testErrorsAndWarnings(`from a_index | eval numberField ${op} "2022"`, [ - `Argument of [${op}] must be [number], found value ["2022"] type [string]`, + testErrorsAndWarnings(`from a_index | eval doubleField ${op} "2022"`, [ + `Argument of [${op}] must be [date], found value [doubleField] type [double]`, ]); - testErrorsAndWarnings(`from a_index | eval dateField ${op} stringField`, [ - `Argument of [${op}] must be [string], found value [dateField] type [date]`, + testErrorsAndWarnings(`from a_index | eval dateField ${op} keywordField`, [ + `Argument of [${op}] must be [date], found value [keywordField] type [keyword]`, ]); - testErrorsAndWarnings(`from a_index | eval stringField ${op} dateField`, [ - `Argument of [${op}] must be [string], found value [dateField] type [date]`, + testErrorsAndWarnings(`from a_index | eval keywordField ${op} dateField`, [ + `Argument of [${op}] must be [date], found value [keywordField] type [keyword]`, ]); // Check that the implicit cast doesn't apply for fields - testErrorsAndWarnings(`from a_index | eval stringField ${op} 0`, [ - `Argument of [${op}] must be [number], found value [stringField] type [string]`, + testErrorsAndWarnings(`from a_index | eval textField ${op} 0`, [ + `Argument of [${op}] must be [double], found value [textField] type [text]`, ]); - testErrorsAndWarnings(`from a_index | eval stringField ${op} now()`, [ - `Argument of [${op}] must be [string], found value [now()] type [date]`, + testErrorsAndWarnings(`from a_index | eval textField ${op} now()`, [ + `Argument of [${op}] must be [date], found value [textField] type [text]`, ]); testErrorsAndWarnings(`from a_index | eval dateField ${op} "2022"`, []); @@ -1043,13 +1075,13 @@ describe('validation logic', () => { `from a_index | eval booleanField ${op} "true"`, ['==', '!='].includes(op) ? [] - : [`Argument of [${op}] must be [string], found value [booleanField] type [boolean]`] + : [`Argument of [${op}] must be [date], found value [booleanField] type [boolean]`] ); testErrorsAndWarnings( `from a_index | eval "true" ${op} booleanField`, ['==', '!='].includes(op) ? [] - : [`Argument of [${op}] must be [string], found value [booleanField] type [boolean]`] + : [`Argument of [${op}] must be [date], found value [booleanField] type [boolean]`] ); testErrorsAndWarnings(`from a_index | eval ipField ${op} "136.36.3.205"`, []); @@ -1072,25 +1104,31 @@ describe('validation logic', () => { ); for (const op of ['+', '-', '*', '/', '%']) { - testErrorsAndWarnings(`from a_index | eval numberField ${op} 1`, []); - testErrorsAndWarnings(`from a_index | eval (numberField ${op} 1)`, []); + testErrorsAndWarnings(`from a_index | eval doubleField ${op} 1`, []); + testErrorsAndWarnings(`from a_index | eval (doubleField ${op} 1)`, []); testErrorsAndWarnings(`from a_index | eval 1 ${op} 1`, []); testErrorsAndWarnings( `from a_index | eval now() ${op} now()`, ['+', '-'].includes(op) - ? [`Argument of [${op}] must be [time_literal], found value [now()] type [date]`] + ? [`Argument of [${op}] must be [date_period], found value [now()] type [date]`] : [ - `Argument of [${op}] must be [number], found value [now()] type [date]`, - `Argument of [${op}] must be [number], found value [now()] type [date]`, + `Argument of [${op}] must be [double], found value [now()] type [date]`, + `Argument of [${op}] must be [double], found value [now()] type [date]`, ] ); - testErrorsAndWarnings(`from a_index | eval 1 ${op} "1"`, [ - `Argument of [${op}] must be [number], found value [\"1\"] type [string]`, - ]); - testErrorsAndWarnings(`from a_index | eval "1" ${op} 1`, [ - `Argument of [${op}] must be [number], found value [\"1\"] type [string]`, - ]); + testErrorsAndWarnings( + `from a_index | eval 1 ${op} "1"`, + ['+', '-'].includes(op) + ? [`Argument of [${op}] must be [date_period], found value [1] type [integer]`] + : [`Argument of [${op}] must be [double], found value [\"1\"] type [string]`] + ); + testErrorsAndWarnings( + `from a_index | eval "1" ${op} 1`, + ['+', '-'].includes(op) + ? [`Argument of [${op}] must be [date_period], found value [1] type [integer]`] + : [`Argument of [${op}] must be [double], found value [\"1\"] type [string]`] + ); // TODO: enable when https://github.com/elastic/elasticsearch/issues/108432 is complete // testErrorsAndWarnings(`from a_index | eval "2022" ${op} 1 day`, []); } @@ -1109,54 +1147,51 @@ describe('validation logic', () => { ); } for (const op of ['like', 'rlike']) { - testErrorsAndWarnings(`from a_index | eval stringField ${op} "?a"`, []); - testErrorsAndWarnings(`from a_index | eval stringField NOT ${op} "?a"`, []); - testErrorsAndWarnings(`from a_index | eval NOT stringField ${op} "?a"`, []); - testErrorsAndWarnings(`from a_index | eval NOT stringField NOT ${op} "?a"`, []); - testErrorsAndWarnings(`from a_index | eval numberField ${op} "?a"`, [ - `Argument of [${op}] must be [string], found value [numberField] type [number]`, + testErrorsAndWarnings(`from a_index | eval textField ${op} "?a"`, []); + testErrorsAndWarnings(`from a_index | eval textField NOT ${op} "?a"`, []); + testErrorsAndWarnings(`from a_index | eval NOT textField ${op} "?a"`, []); + testErrorsAndWarnings(`from a_index | eval NOT textField NOT ${op} "?a"`, []); + testErrorsAndWarnings(`from a_index | eval doubleField ${op} "?a"`, [ + `Argument of [${op}] must be [text], found value [doubleField] type [double]`, ]); - testErrorsAndWarnings(`from a_index | eval numberField NOT ${op} "?a"`, [ - `Argument of [not_${op}] must be [string], found value [numberField] type [number]`, + testErrorsAndWarnings(`from a_index | eval doubleField NOT ${op} "?a"`, [ + `Argument of [not_${op}] must be [text], found value [doubleField] type [double]`, ]); - testErrorsAndWarnings(`from a_index | eval NOT numberField ${op} "?a"`, [ - `Argument of [${op}] must be [string], found value [numberField] type [number]`, + testErrorsAndWarnings(`from a_index | eval NOT doubleField ${op} "?a"`, [ + `Argument of [${op}] must be [text], found value [doubleField] type [double]`, ]); - testErrorsAndWarnings(`from a_index | eval NOT numberField NOT ${op} "?a"`, [ - `Argument of [not_${op}] must be [string], found value [numberField] type [number]`, + testErrorsAndWarnings(`from a_index | eval NOT doubleField NOT ${op} "?a"`, [ + `Argument of [not_${op}] must be [text], found value [doubleField] type [double]`, ]); } // test lists testErrorsAndWarnings('from a_index | eval 1 in (1, 2, 3)', []); - testErrorsAndWarnings('from a_index | eval numberField in (1, 2, 3)', []); - testErrorsAndWarnings('from a_index | eval numberField not in (1, 2, 3)', []); - testErrorsAndWarnings('from a_index | eval numberField not in (1, 2, 3, numberField)', []); - testErrorsAndWarnings('from a_index | eval 1 in (1, 2, 3, round(numberField))', []); + testErrorsAndWarnings('from a_index | eval doubleField in (1, 2, 3)', []); + testErrorsAndWarnings('from a_index | eval doubleField not in (1, 2, 3)', []); + testErrorsAndWarnings('from a_index | eval doubleField not in (1, 2, 3, doubleField)', []); + testErrorsAndWarnings('from a_index | eval 1 in (1, 2, 3, round(doubleField))', []); testErrorsAndWarnings('from a_index | eval "a" in ("a", "b", "c")', []); - testErrorsAndWarnings('from a_index | eval stringField in ("a", "b", "c")', []); - testErrorsAndWarnings('from a_index | eval stringField not in ("a", "b", "c")', []); - testErrorsAndWarnings( - 'from a_index | eval stringField not in ("a", "b", "c", stringField)', - [] - ); + testErrorsAndWarnings('from a_index | eval textField in ("a", "b", "c")', []); + testErrorsAndWarnings('from a_index | eval textField not in ("a", "b", "c")', []); + testErrorsAndWarnings('from a_index | eval textField not in ("a", "b", "c", textField)', []); testErrorsAndWarnings('from a_index | eval 1 in ("a", "b", "c")', [ // 'Argument of [in] must be [number[]], found value [("a", "b", "c")] type [(string, string, string)]', ]); - testErrorsAndWarnings('from a_index | eval numberField in ("a", "b", "c")', [ + testErrorsAndWarnings('from a_index | eval doubleField in ("a", "b", "c")', [ // 'Argument of [in] must be [number[]], found value [("a", "b", "c")] type [(string, string, string)]', ]); - testErrorsAndWarnings('from a_index | eval numberField not in ("a", "b", "c")', [ + testErrorsAndWarnings('from a_index | eval doubleField not in ("a", "b", "c")', [ // 'Argument of [not_in] must be [number[]], found value [("a", "b", "c")] type [(string, string, string)]', ]); - testErrorsAndWarnings('from a_index | eval numberField not in (1, 2, 3, stringField)', [ - // 'Argument of [not_in] must be [number[]], found value [(1, 2, 3, stringField)] type [(number, number, number, string)]', + testErrorsAndWarnings('from a_index | eval doubleField not in (1, 2, 3, textField)', [ + // 'Argument of [not_in] must be [number[]], found value [(1, 2, 3, textField)] type [(number, number, number, string)]', ]); - testErrorsAndWarnings('from a_index | eval avg(numberField)', [ + testErrorsAndWarnings('from a_index | eval avg(doubleField)', [ 'EVAL does not support function avg', ]); testErrorsAndWarnings( - 'from a_index | stats avg(numberField) | eval `avg(numberField)` + 1', + 'from a_index | stats avg(doubleField) | eval `avg(doubleField)` + 1', [] ); testErrorsAndWarnings('from a_index | eval not', [ @@ -1167,17 +1202,17 @@ describe('validation logic', () => { "SyntaxError: mismatched input 'in' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); - testErrorsAndWarnings('from a_index | eval stringField in stringField', [ - "SyntaxError: missing '(' at 'stringField'", + testErrorsAndWarnings('from a_index | eval textField in textField', [ + "SyntaxError: missing '(' at 'textField'", "SyntaxError: mismatched input '' expecting {',', ')'}", ]); - testErrorsAndWarnings('from a_index | eval stringField in stringField)', [ - "SyntaxError: missing '(' at 'stringField'", + testErrorsAndWarnings('from a_index | eval textField in textField)', [ + "SyntaxError: missing '(' at 'textField'", 'Error: [in] function expects exactly 2 arguments, got 1.', ]); - testErrorsAndWarnings('from a_index | eval stringField not in stringField', [ - "SyntaxError: missing '(' at 'stringField'", + testErrorsAndWarnings('from a_index | eval textField not in textField', [ + "SyntaxError: missing '(' at 'textField'", "SyntaxError: mismatched input '' expecting {',', ')'}", ]); @@ -1236,8 +1271,8 @@ describe('validation logic', () => { ]); for (const op of ['*', '/', '%']) { testErrorsAndWarnings(`from a_index | eval var = now() ${op} 1 ${unit}`, [ - `Argument of [${op}] must be [number], found value [now()] type [date]`, - `Argument of [${op}] must be [number], found value [1 ${unit}] type [duration]`, + `Argument of [${op}] must be [double], found value [now()] type [date]`, + `Argument of [${op}] must be [double], found value [1 ${unit}] type [duration]`, ]); } } @@ -1250,26 +1285,26 @@ describe('validation logic', () => { ]); testErrorsAndWarnings('from a_index | sort "field" ', []); testErrorsAndWarnings('from a_index | sort wrongField ', ['Unknown column [wrongField]']); - testErrorsAndWarnings('from a_index | sort numberField, ', [ + testErrorsAndWarnings('from a_index | sort doubleField, ', [ "SyntaxError: mismatched input '' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", ]); - testErrorsAndWarnings('from a_index | sort numberField, stringField', []); + testErrorsAndWarnings('from a_index | sort doubleField, textField', []); for (const dir of ['desc', 'asc']) { testErrorsAndWarnings(`from a_index | sort "field" ${dir} `, []); - testErrorsAndWarnings(`from a_index | sort numberField ${dir} `, []); - testErrorsAndWarnings(`from a_index | sort numberField ${dir} nulls `, [ + testErrorsAndWarnings(`from a_index | sort doubleField ${dir} `, []); + testErrorsAndWarnings(`from a_index | sort doubleField ${dir} nulls `, [ "SyntaxError: missing {'first', 'last'} at ''", ]); for (const nullDir of ['first', 'last']) { - testErrorsAndWarnings(`from a_index | sort numberField ${dir} nulls ${nullDir}`, []); - testErrorsAndWarnings(`from a_index | sort numberField ${dir} ${nullDir}`, [ + testErrorsAndWarnings(`from a_index | sort doubleField ${dir} nulls ${nullDir}`, []); + testErrorsAndWarnings(`from a_index | sort doubleField ${dir} ${nullDir}`, [ `SyntaxError: extraneous input '${nullDir}' expecting `, ]); } } for (const nullDir of ['first', 'last']) { - testErrorsAndWarnings(`from a_index | sort numberField nulls ${nullDir}`, []); - testErrorsAndWarnings(`from a_index | sort numberField ${nullDir}`, [ + testErrorsAndWarnings(`from a_index | sort doubleField nulls ${nullDir}`, []); + testErrorsAndWarnings(`from a_index | sort doubleField ${nullDir}`, [ `SyntaxError: extraneous input '${nullDir}' expecting `, ]); } @@ -1279,18 +1314,18 @@ describe('validation logic', () => { describe('sorting by expressions', () => { // SORT accepts complex expressions testErrorsAndWarnings( - 'from a_index | sort abs(numberField) - to_long(stringField) desc nulls first', + 'from a_index | sort abs(doubleField) - to_long(textField) desc nulls first', [] ); // Expression parts are also validated - testErrorsAndWarnings('from a_index | sort sin(stringField)', [ - 'Argument of [sin] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | sort sin(textField)', [ + 'Argument of [sin] must be [double], found value [textField] type [text]', ]); // Expression parts are also validated - testErrorsAndWarnings('from a_index | sort numberField + stringField', [ - 'Argument of [+] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | sort doubleField + textField', [ + 'Argument of [+] must be [double], found value [textField] type [text]', ]); }); }); @@ -1364,52 +1399,52 @@ describe('validation logic', () => { "SyntaxError: mismatched input 'is' expecting ", 'Unknown column [this]', ]); - testErrorsAndWarnings(`from a_index | enrich policy on stringField with `, [ + testErrorsAndWarnings(`from a_index | enrich policy on textField with `, [ "SyntaxError: mismatched input '' expecting ID_PATTERN", ]); - testErrorsAndWarnings(`from a_index | enrich policy on stringField with var0 `, [ + testErrorsAndWarnings(`from a_index | enrich policy on textField with var0 `, [ 'Unknown column [var0]', ]); - testErrorsAndWarnings(`from a_index |enrich policy on numberField with var0 = `, [ + testErrorsAndWarnings(`from a_index |enrich policy on doubleField with var0 = `, [ "SyntaxError: missing ID_PATTERN at ''", 'Unknown column [var0]', ]); - testErrorsAndWarnings(`from a_index | enrich policy on stringField with var0 = c `, [ + testErrorsAndWarnings(`from a_index | enrich policy on textField with var0 = c `, [ 'Unknown column [var0]', `Unknown column [c]`, ]); // need to re-enable once the fields/variables become location aware - // testErrorsAndWarnings(`from a_index | enrich policy on stringField with var0 = stringField `, [ - // `Unknown column [stringField]`, + // testErrorsAndWarnings(`from a_index | enrich policy on textField with var0 = textField `, [ + // `Unknown column [textField]`, // ]); - testErrorsAndWarnings(`from a_index |enrich policy on numberField with var0 = , `, [ + testErrorsAndWarnings(`from a_index |enrich policy on doubleField with var0 = , `, [ "SyntaxError: missing ID_PATTERN at ','", "SyntaxError: mismatched input '' expecting ID_PATTERN", 'Unknown column [var0]', ]); testErrorsAndWarnings( - `from a_index | enrich policy on stringField with var0 = otherField, var1 `, + `from a_index | enrich policy on textField with var0 = otherField, var1 `, ['Unknown column [var1]'] ); testErrorsAndWarnings( - `from a_index | enrich policy on stringField with var0 = otherField `, + `from a_index | enrich policy on textField with var0 = otherField `, [] ); testErrorsAndWarnings( - `from a_index | enrich policy on stringField with var0 = otherField, yetAnotherField `, + `from a_index | enrich policy on textField with var0 = otherField, yetAnotherField `, [] ); testErrorsAndWarnings( - `from a_index |enrich policy on numberField with var0 = otherField, var1 = `, + `from a_index |enrich policy on doubleField with var0 = otherField, var1 = `, ["SyntaxError: missing ID_PATTERN at ''", 'Unknown column [var1]'] ); testErrorsAndWarnings( - `from a_index | enrich policy on stringField with var0 = otherField, var1 = yetAnotherField`, + `from a_index | enrich policy on textField with var0 = otherField, var1 = yetAnotherField`, [] ); testErrorsAndWarnings( - 'from a_index | enrich policy on stringField with var0 = otherField, `this``is fine` = yetAnotherField', + 'from a_index | enrich policy on textField with var0 = otherField, `this``is fine` = yetAnotherField', [] ); testErrorsAndWarnings(`from a_index | enrich policy with `, [ @@ -1425,14 +1460,14 @@ describe('validation logic', () => { describe('shadowing', () => { testErrorsAndWarnings( - 'from a_index | eval stringField = 5', + 'from a_index | eval textField = 5', [], - ['Column [stringField] of type string has been overwritten as new type: number'] + ['Column [textField] of type text has been overwritten as new type: integer'] ); testErrorsAndWarnings( - 'from a_index | eval numberField = "5"', + 'from a_index | eval doubleField = "5"', [], - ['Column [numberField] of type number has been overwritten as new type: string'] + ['Column [doubleField] of type double has been overwritten as new type: string'] ); }); @@ -1469,7 +1504,7 @@ describe('validation logic', () => { for (const nesting of NESTED_DEPTHS) { // start with a quotable expression - const expr = 'round(numberField) + 1'; + const expr = 'round(doubleField) + 1'; const startingQuery = `from a_index | eval ${expr}`; // now pipe for each nesting level a new eval command that appends a +1 to the previous quoted expression const finalQuery = `${startingQuery} | ${Array(nesting) @@ -1554,7 +1589,7 @@ describe('validation logic', () => { it(`should not crash if no callbacks are available`, async () => { try { await validateQuery( - `from a_index | eval b = a | enrich policy | dissect stringField "%{firstWord}"`, + `from a_index | eval b = a | enrich policy | dissect textField "%{firstWord}"`, getAstAndSyntaxErrors, undefined, { @@ -1571,7 +1606,7 @@ describe('validation logic', () => { it(`should not crash if no callbacks are passed`, async () => { try { await validateQuery( - `from a_index | eval b = a | enrich policy | dissect stringField "%{firstWord}"`, + `from a_index | eval b = a | enrich policy | dissect textField "%{firstWord}"`, getAstAndSyntaxErrors ); } catch { @@ -1582,40 +1617,47 @@ describe('validation logic', () => { describe('inline casting', () => { // accepts casting - testErrorsAndWarnings('from a_index | eval 1::string', []); + testErrorsAndWarnings('from a_index | eval 1::keyword', []); // errors if the cast type is invalid // testErrorsAndWarnings('from a_index | eval 1::foo', ['Invalid type [foo] for casting']); // accepts casting with multiple types - testErrorsAndWarnings('from a_index | eval 1::string::long::double', []); + testErrorsAndWarnings('from a_index | eval 1::keyword::long::double', []); // takes into account casting in function arguments testErrorsAndWarnings('from a_index | eval trim("23"::double)', [ - 'Argument of [trim] must be [string], found value ["23"::double] type [double]', + 'Argument of [trim] must be [keyword], found value ["23"::double] type [double]', ]); - testErrorsAndWarnings('from a_index | eval trim(23::string)', []); + testErrorsAndWarnings('from a_index | eval trim(23::keyword)', []); testErrorsAndWarnings('from a_index | eval 1 + "2"::long', []); + testErrorsAndWarnings('from a_index | eval 1 + "2"::LONG', []); + testErrorsAndWarnings('from a_index | eval 1 + "2"::Long', []); + testErrorsAndWarnings('from a_index | eval 1 + "2"::LoNg', []); + testErrorsAndWarnings('from a_index | eval 1 + "2"', [ // just a counter-case to make sure the previous test is meaningful - 'Argument of [+] must be [number], found value ["2"] type [string]', + 'Argument of [+] must be [date_period], found value [1] type [integer]', ]); testErrorsAndWarnings( - 'from a_index | eval trim(to_double("23")::string::double::long::string::double)', + 'from a_index | eval trim(to_double("23")::keyword::double::long::keyword::double)', [ - 'Argument of [trim] must be [string], found value [to_double("23")::string::double::long::string::double] type [double]', + 'Argument of [trim] must be [keyword], found value [to_double("23")::keyword::double::long::keyword::double] type [double]', ] ); - // accepts elasticsearch subtypes and type aliases like int and keyword - // (once https://github.com/elastic/kibana/issues/174710 is done this won't be a special case anymore) testErrorsAndWarnings('from a_index | eval CEIL(23::long)', []); testErrorsAndWarnings('from a_index | eval CEIL(23::unsigned_long)', []); testErrorsAndWarnings('from a_index | eval CEIL(23::int)', []); testErrorsAndWarnings('from a_index | eval CEIL(23::integer)', []); + testErrorsAndWarnings('from a_index | eval CEIL(23::Integer)', []); testErrorsAndWarnings('from a_index | eval CEIL(23::double)', []); + testErrorsAndWarnings('from a_index | eval CEIL(23::DOUBLE)', []); + testErrorsAndWarnings('from a_index | eval CEIL(23::doubla)', [ + 'Argument of [ceil] must be [double], found value [23::doubla] type [doubla]', + ]); - testErrorsAndWarnings('from a_index | eval TRIM(23::string)', []); + testErrorsAndWarnings('from a_index | eval TRIM(23::keyword)', []); testErrorsAndWarnings('from a_index | eval TRIM(23::text)', []); testErrorsAndWarnings('from a_index | eval TRIM(23::keyword)', []); @@ -1630,439 +1672,501 @@ describe('validation logic', () => { // testErrorsAndWarnings('from a_index | eval 23::cartesian_point', ['wrong type!']); // still validates nested functions when they are casted - testErrorsAndWarnings('from a_index | eval to_lower(trim(numberField)::string)', [ - 'Argument of [trim] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | eval to_lower(trim(doubleField)::keyword)', [ + 'Argument of [trim] must be [keyword], found value [doubleField] type [double]', ]); testErrorsAndWarnings( - 'from a_index | eval to_upper(trim(numberField)::string::string::string::string)', - ['Argument of [trim] must be [string], found value [numberField] type [number]'] + 'from a_index | eval to_upper(trim(doubleField)::keyword::keyword::keyword::keyword)', + ['Argument of [trim] must be [keyword], found value [doubleField] type [double]'] ); testErrorsAndWarnings( - 'from a_index | eval to_lower(to_upper(trim(numberField)::string)::string)', - ['Argument of [trim] must be [string], found value [numberField] type [number]'] + 'from a_index | eval to_lower(to_upper(trim(doubleField)::keyword)::keyword)', + ['Argument of [trim] must be [keyword], found value [doubleField] type [double]'] ); }); describe(FUNCTION_DESCRIBE_BLOCK_NAME, () => { - describe('date_diff', () => { - testErrorsAndWarnings( - `row var = date_diff("month", "2023-12-02T11:00:00.000Z", "2023-12-02T11:00:00.000Z")`, - [] - ); - - testErrorsAndWarnings( - `row var = date_diff("mm", "2023-12-02T11:00:00.000Z", "2023-12-02T11:00:00.000Z")`, - [] - ); - - testErrorsAndWarnings( - `row var = date_diff("bogus", "2023-12-02T11:00:00.000Z", "2023-12-02T11:00:00.000Z")`, - [], - [ - 'Invalid option ["bogus"] for date_diff. Supported options: ["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"].', - ] - ); - - testErrorsAndWarnings( - `from a_index | eval date_diff(stringField, "2023-12-02T11:00:00.000Z", "2023-12-02T11:00:00.000Z")`, - [] - ); - - testErrorsAndWarnings( - `from a_index | eval date_diff("month", dateField, "2023-12-02T11:00:00.000Z")`, - [] - ); - - testErrorsAndWarnings( - `from a_index | eval date_diff("month", "2023-12-02T11:00:00.000Z", dateField)`, - [] - ); - - testErrorsAndWarnings(`from a_index | eval date_diff("month", stringField, dateField)`, [ - 'Argument of [date_diff] must be [date], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings(`from a_index | eval date_diff("month", dateField, stringField)`, [ - 'Argument of [date_diff] must be [date], found value [stringField] type [string]', - ]); - testErrorsAndWarnings( - 'from a_index | eval var = date_diff("year", dateField, dateField)', - [] - ); - testErrorsAndWarnings('from a_index | eval date_diff("year", dateField, dateField)', []); - - testErrorsAndWarnings( - 'from a_index | eval var = date_diff("year", to_datetime(stringField), to_datetime(stringField))', - [] - ); - - testErrorsAndWarnings( - 'from a_index | eval date_diff(numberField, stringField, stringField)', - [ - 'Argument of [date_diff] must be [string], found value [numberField] type [number]', - 'Argument of [date_diff] must be [date], found value [stringField] type [string]', - 'Argument of [date_diff] must be [date], found value [stringField] type [string]', - ] - ); - - testErrorsAndWarnings( - 'from a_index | eval date_diff("year", dateField, dateField, extraArg)', - ['Error: [date_diff] function expects exactly 3 arguments, got 4.'] - ); - - 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]', - ] - ); - testErrorsAndWarnings('from a_index | eval date_diff(null, null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval date_diff(nullVar, nullVar, nullVar)', []); - - testErrorsAndWarnings('from a_index | eval date_diff("year", "2022", "2022")', []); - testErrorsAndWarnings( - 'from a_index | eval date_diff("year", concat("20", "22"), concat("20", "22"))', - [ - 'Argument of [date_diff] must be [date], found value [concat("20","22")] type [string]', - 'Argument of [date_diff] must be [date], found value [concat("20","22")] type [string]', - ] - ); - }); - describe('abs', () => { + testErrorsAndWarnings('row var = abs(5.5)', []); + testErrorsAndWarnings('row abs(5.5)', []); + testErrorsAndWarnings('row var = abs(to_double(true))', []); testErrorsAndWarnings('row var = abs(5)', []); testErrorsAndWarnings('row abs(5)', []); - testErrorsAndWarnings('row var = abs(to_integer("a"))', []); + testErrorsAndWarnings('row var = abs(to_integer(true))', []); - testErrorsAndWarnings('row var = abs("a")', [ - 'Argument of [abs] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = abs(true)', [ + 'Argument of [abs] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where abs(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where abs(doubleField) > 0', []); - testErrorsAndWarnings('from a_index | where abs(stringField) > 0', [ - 'Argument of [abs] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where abs(booleanField) > 0', [ + 'Argument of [abs] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = abs(numberField)', []); - testErrorsAndWarnings('from a_index | eval abs(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = abs(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval abs(stringField)', [ - 'Argument of [abs] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings('from a_index | where abs(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where abs(longField) > 0', []); + testErrorsAndWarnings('from a_index | where abs(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = abs(doubleField)', []); + testErrorsAndWarnings('from a_index | eval abs(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = abs(to_double(booleanField))', []); - testErrorsAndWarnings('from a_index | eval abs(numberField, extraArg)', [ - 'Error: [abs] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval abs(booleanField)', [ + 'Argument of [abs] must be [double], found value [booleanField] type [boolean]', ]); testErrorsAndWarnings('from a_index | eval var = abs(*)', [ 'Using wildcards (*) in abs is not allowed', ]); - 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(integerField)', []); + testErrorsAndWarnings('from a_index | eval abs(integerField)', []); testErrorsAndWarnings('from a_index | eval var = abs(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = abs(longField)', []); + testErrorsAndWarnings('from a_index | eval abs(longField)', []); + testErrorsAndWarnings('from a_index | eval var = abs(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval abs(unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval abs(booleanField)', [ - 'Argument of [abs] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval abs(doubleField, extraArg)', [ + 'Error: [abs] function expects exactly one argument, got 2.', ]); + + testErrorsAndWarnings('from a_index | sort abs(doubleField)', []); testErrorsAndWarnings('from a_index | eval abs(null)', []); testErrorsAndWarnings('row nullVar = null | eval abs(nullVar)', []); }); describe('acos', () => { + testErrorsAndWarnings('row var = acos(5.5)', []); + testErrorsAndWarnings('row acos(5.5)', []); + testErrorsAndWarnings('row var = acos(to_double(true))', []); testErrorsAndWarnings('row var = acos(5)', []); testErrorsAndWarnings('row acos(5)', []); - testErrorsAndWarnings('row var = acos(to_integer("a"))', []); + testErrorsAndWarnings('row var = acos(to_integer(true))', []); - testErrorsAndWarnings('row var = acos("a")', [ - 'Argument of [acos] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = acos(true)', [ + 'Argument of [acos] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where acos(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where acos(doubleField) > 0', []); - testErrorsAndWarnings('from a_index | where acos(stringField) > 0', [ - 'Argument of [acos] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where acos(booleanField) > 0', [ + 'Argument of [acos] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = acos(numberField)', []); - testErrorsAndWarnings('from a_index | eval acos(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = acos(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval acos(stringField)', [ - 'Argument of [acos] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings('from a_index | where acos(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where acos(longField) > 0', []); + testErrorsAndWarnings('from a_index | where acos(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = acos(doubleField)', []); + testErrorsAndWarnings('from a_index | eval acos(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = acos(to_double(booleanField))', []); - testErrorsAndWarnings('from a_index | eval acos(numberField, extraArg)', [ - 'Error: [acos] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval acos(booleanField)', [ + 'Argument of [acos] must be [double], found value [booleanField] type [boolean]', ]); testErrorsAndWarnings('from a_index | eval var = acos(*)', [ 'Using wildcards (*) in acos is not allowed', ]); - 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(integerField)', []); + testErrorsAndWarnings('from a_index | eval acos(integerField)', []); testErrorsAndWarnings('from a_index | eval var = acos(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = acos(longField)', []); + testErrorsAndWarnings('from a_index | eval acos(longField)', []); + testErrorsAndWarnings('from a_index | eval var = acos(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval acos(unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval acos(booleanField)', [ - 'Argument of [acos] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval acos(doubleField, extraArg)', [ + 'Error: [acos] function expects exactly one argument, got 2.', ]); + + testErrorsAndWarnings('from a_index | sort acos(doubleField)', []); testErrorsAndWarnings('from a_index | eval acos(null)', []); testErrorsAndWarnings('row nullVar = null | eval acos(nullVar)', []); }); describe('asin', () => { + testErrorsAndWarnings('row var = asin(5.5)', []); + testErrorsAndWarnings('row asin(5.5)', []); + testErrorsAndWarnings('row var = asin(to_double(true))', []); testErrorsAndWarnings('row var = asin(5)', []); testErrorsAndWarnings('row asin(5)', []); - testErrorsAndWarnings('row var = asin(to_integer("a"))', []); + testErrorsAndWarnings('row var = asin(to_integer(true))', []); - testErrorsAndWarnings('row var = asin("a")', [ - 'Argument of [asin] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = asin(true)', [ + 'Argument of [asin] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where asin(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where asin(doubleField) > 0', []); - testErrorsAndWarnings('from a_index | where asin(stringField) > 0', [ - 'Argument of [asin] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where asin(booleanField) > 0', [ + 'Argument of [asin] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = asin(numberField)', []); - testErrorsAndWarnings('from a_index | eval asin(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = asin(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval asin(stringField)', [ - 'Argument of [asin] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings('from a_index | where asin(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where asin(longField) > 0', []); + testErrorsAndWarnings('from a_index | where asin(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = asin(doubleField)', []); + testErrorsAndWarnings('from a_index | eval asin(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = asin(to_double(booleanField))', []); - testErrorsAndWarnings('from a_index | eval asin(numberField, extraArg)', [ - 'Error: [asin] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval asin(booleanField)', [ + 'Argument of [asin] must be [double], found value [booleanField] type [boolean]', ]); testErrorsAndWarnings('from a_index | eval var = asin(*)', [ 'Using wildcards (*) in asin is not allowed', ]); - 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(integerField)', []); + testErrorsAndWarnings('from a_index | eval asin(integerField)', []); testErrorsAndWarnings('from a_index | eval var = asin(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = asin(longField)', []); + testErrorsAndWarnings('from a_index | eval asin(longField)', []); + testErrorsAndWarnings('from a_index | eval var = asin(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval asin(unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval asin(booleanField)', [ - 'Argument of [asin] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval asin(doubleField, extraArg)', [ + 'Error: [asin] function expects exactly one argument, got 2.', ]); + + testErrorsAndWarnings('from a_index | sort asin(doubleField)', []); testErrorsAndWarnings('from a_index | eval asin(null)', []); testErrorsAndWarnings('row nullVar = null | eval asin(nullVar)', []); }); describe('atan', () => { + testErrorsAndWarnings('row var = atan(5.5)', []); + testErrorsAndWarnings('row atan(5.5)', []); + testErrorsAndWarnings('row var = atan(to_double(true))', []); testErrorsAndWarnings('row var = atan(5)', []); testErrorsAndWarnings('row atan(5)', []); - testErrorsAndWarnings('row var = atan(to_integer("a"))', []); + testErrorsAndWarnings('row var = atan(to_integer(true))', []); - testErrorsAndWarnings('row var = atan("a")', [ - 'Argument of [atan] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = atan(true)', [ + 'Argument of [atan] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where atan(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where atan(doubleField) > 0', []); - testErrorsAndWarnings('from a_index | where atan(stringField) > 0', [ - 'Argument of [atan] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where atan(booleanField) > 0', [ + 'Argument of [atan] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = atan(numberField)', []); - testErrorsAndWarnings('from a_index | eval atan(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = atan(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval atan(stringField)', [ - 'Argument of [atan] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings('from a_index | where atan(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where atan(longField) > 0', []); + testErrorsAndWarnings('from a_index | where atan(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = atan(doubleField)', []); + testErrorsAndWarnings('from a_index | eval atan(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = atan(to_double(booleanField))', []); - testErrorsAndWarnings('from a_index | eval atan(numberField, extraArg)', [ - 'Error: [atan] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval atan(booleanField)', [ + 'Argument of [atan] must be [double], found value [booleanField] type [boolean]', ]); testErrorsAndWarnings('from a_index | eval var = atan(*)', [ 'Using wildcards (*) in atan is not allowed', ]); - 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(integerField)', []); + testErrorsAndWarnings('from a_index | eval atan(integerField)', []); testErrorsAndWarnings('from a_index | eval var = atan(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = atan(longField)', []); + testErrorsAndWarnings('from a_index | eval atan(longField)', []); + testErrorsAndWarnings('from a_index | eval var = atan(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval atan(unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval atan(booleanField)', [ - 'Argument of [atan] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval atan(doubleField, extraArg)', [ + 'Error: [atan] function expects exactly one argument, got 2.', ]); + + testErrorsAndWarnings('from a_index | sort atan(doubleField)', []); testErrorsAndWarnings('from a_index | eval atan(null)', []); testErrorsAndWarnings('row nullVar = null | eval atan(nullVar)', []); }); describe('atan2', () => { + testErrorsAndWarnings('row var = atan2(5.5, 5.5)', []); + testErrorsAndWarnings('row atan2(5.5, 5.5)', []); + testErrorsAndWarnings('row var = atan2(to_double(true), to_double(true))', []); + testErrorsAndWarnings('row var = atan2(5.5, 5)', []); + testErrorsAndWarnings('row atan2(5.5, 5)', []); + testErrorsAndWarnings('row var = atan2(to_double(true), to_integer(true))', []); + testErrorsAndWarnings('row var = atan2(to_double(true), 5)', []); + testErrorsAndWarnings('row var = atan2(5, 5.5)', []); + testErrorsAndWarnings('row atan2(5, 5.5)', []); + testErrorsAndWarnings('row var = atan2(to_integer(true), to_double(true))', []); testErrorsAndWarnings('row var = atan2(5, 5)', []); testErrorsAndWarnings('row atan2(5, 5)', []); - testErrorsAndWarnings('row var = atan2(to_integer("a"), to_integer("a"))', []); + testErrorsAndWarnings('row var = atan2(to_integer(true), to_integer(true))', []); + testErrorsAndWarnings('row var = atan2(to_integer(true), 5)', []); + testErrorsAndWarnings('row var = atan2(5, to_double(true))', []); + testErrorsAndWarnings('row var = atan2(5, to_integer(true))', []); - testErrorsAndWarnings('row var = atan2("a", "a")', [ - 'Argument of [atan2] must be [number], found value ["a"] type [string]', - 'Argument of [atan2] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = atan2(true, true)', [ + 'Argument of [atan2] must be [double], found value [true] type [boolean]', + 'Argument of [atan2] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where atan2(numberField, numberField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(doubleField, doubleField) > 0', []); - testErrorsAndWarnings('from a_index | where atan2(stringField, stringField) > 0', [ - 'Argument of [atan2] must be [number], found value [stringField] type [string]', - 'Argument of [atan2] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where atan2(booleanField, booleanField) > 0', [ + 'Argument of [atan2] must be [double], found value [booleanField] type [boolean]', + 'Argument of [atan2] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = atan2(numberField, numberField)', []); - testErrorsAndWarnings('from a_index | eval atan2(numberField, numberField)', []); - + testErrorsAndWarnings('from a_index | where atan2(doubleField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(doubleField, longField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(doubleField, unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(integerField, doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(integerField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(integerField, longField) > 0', []); testErrorsAndWarnings( - 'from a_index | eval var = atan2(to_integer(stringField), to_integer(stringField))', + 'from a_index | where atan2(integerField, unsignedLongField) > 0', [] ); + testErrorsAndWarnings('from a_index | where atan2(longField, doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(longField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(longField, longField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(longField, unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | where atan2(unsignedLongField, doubleField) > 0', []); + testErrorsAndWarnings( + 'from a_index | where atan2(unsignedLongField, integerField) > 0', + [] + ); + testErrorsAndWarnings('from a_index | where atan2(unsignedLongField, longField) > 0', []); + testErrorsAndWarnings( + 'from a_index | where atan2(unsignedLongField, unsignedLongField) > 0', + [] + ); + testErrorsAndWarnings('from a_index | eval var = atan2(doubleField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval atan2(doubleField, doubleField)', []); - testErrorsAndWarnings('from a_index | eval atan2(stringField, stringField)', [ - 'Argument of [atan2] must be [number], found value [stringField] type [string]', - 'Argument of [atan2] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval atan2(numberField, numberField, extraArg)', [ - 'Error: [atan2] function expects exactly 2 arguments, got 3.', - ]); - - testErrorsAndWarnings('from a_index | sort atan2(numberField, numberField)', []); - testErrorsAndWarnings('row var = atan2(to_integer(true), to_integer(true))', []); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(to_double(booleanField), to_double(booleanField))', + [] + ); - 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 | eval atan2(booleanField, booleanField)', [ + 'Argument of [atan2] must be [double], found value [booleanField] type [boolean]', + 'Argument of [atan2] must be [double], found value [booleanField] 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(doubleField, integerField)', []); + testErrorsAndWarnings('from a_index | eval atan2(doubleField, integerField)', []); testErrorsAndWarnings( - 'from a_index | eval var = atan2(to_integer(booleanField), to_integer(booleanField))', + 'from a_index | eval var = atan2(to_double(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]', - ]); - testErrorsAndWarnings('from a_index | eval atan2(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval atan2(nullVar, nullVar)', []); - }); + testErrorsAndWarnings('from a_index | eval var = atan2(doubleField, longField)', []); + testErrorsAndWarnings('from a_index | eval atan2(doubleField, longField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(to_double(booleanField), longField)', + [] + ); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(doubleField, unsignedLongField)', + [] + ); + testErrorsAndWarnings('from a_index | eval atan2(doubleField, unsignedLongField)', []); - describe('case', () => { - testErrorsAndWarnings('row var = case(true, "a")', []); - testErrorsAndWarnings('row case(true, "a")', []); - 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( + 'from a_index | eval var = atan2(to_double(booleanField), unsignedLongField)', + [] + ); - 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]', - ]); - testErrorsAndWarnings('from a_index | eval case(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval case(nullVar, nullVar)', []); - }); + testErrorsAndWarnings('from a_index | eval var = atan2(integerField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval atan2(integerField, doubleField)', []); - describe('ceil', () => { - testErrorsAndWarnings('row var = ceil(5)', []); - testErrorsAndWarnings('row ceil(5)', []); - testErrorsAndWarnings('row var = ceil(to_integer("a"))', []); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(to_integer(booleanField), to_double(booleanField))', + [] + ); - testErrorsAndWarnings('row var = ceil("a")', [ - 'Argument of [ceil] must be [number], found value ["a"] type [string]', - ]); + testErrorsAndWarnings('from a_index | eval var = atan2(integerField, integerField)', []); + testErrorsAndWarnings('from a_index | eval atan2(integerField, integerField)', []); - testErrorsAndWarnings('from a_index | where ceil(numberField) > 0', []); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(to_integer(booleanField), to_integer(booleanField))', + [] + ); - testErrorsAndWarnings('from a_index | where ceil(stringField) > 0', [ - 'Argument of [ceil] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings('from a_index | eval var = atan2(integerField, longField)', []); + testErrorsAndWarnings('from a_index | eval atan2(integerField, longField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(to_integer(booleanField), longField)', + [] + ); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(integerField, unsignedLongField)', + [] + ); + testErrorsAndWarnings('from a_index | eval atan2(integerField, unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval var = ceil(numberField)', []); - testErrorsAndWarnings('from a_index | eval ceil(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = ceil(to_integer(stringField))', []); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(to_integer(booleanField), unsignedLongField)', + [] + ); - testErrorsAndWarnings('from a_index | eval ceil(stringField)', [ - 'Argument of [ceil] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval var = atan2(longField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval atan2(longField, doubleField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(longField, to_double(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = atan2(longField, integerField)', []); + testErrorsAndWarnings('from a_index | eval atan2(longField, integerField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(longField, to_integer(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = atan2(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval atan2(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval var = atan2(longField, unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval atan2(longField, unsignedLongField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = atan2(unsignedLongField, doubleField)', + [] + ); + testErrorsAndWarnings('from a_index | eval atan2(unsignedLongField, doubleField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = atan2(unsignedLongField, to_double(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = atan2(unsignedLongField, integerField)', + [] + ); + testErrorsAndWarnings('from a_index | eval atan2(unsignedLongField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = atan2(unsignedLongField, to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = atan2(unsignedLongField, longField)', []); + testErrorsAndWarnings('from a_index | eval atan2(unsignedLongField, longField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = atan2(unsignedLongField, unsignedLongField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval atan2(unsignedLongField, unsignedLongField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval atan2(doubleField, doubleField, extraArg)', [ + 'Error: [atan2] function expects exactly 2 arguments, got 3.', ]); - testErrorsAndWarnings('from a_index | eval ceil(numberField, extraArg)', [ - 'Error: [ceil] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | sort atan2(doubleField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval atan2(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval atan2(nullVar, nullVar)', []); + }); + + describe('cbrt', () => { + testErrorsAndWarnings('row var = cbrt(5.5)', []); + testErrorsAndWarnings('row cbrt(5.5)', []); + testErrorsAndWarnings('row var = cbrt(to_double(true))', []); + 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 [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = ceil(*)', [ - 'Using wildcards (*) in ceil is not allowed', + testErrorsAndWarnings('from a_index | where cbrt(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where cbrt(booleanField) > 0', [ + 'Argument of [cbrt] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where cbrt(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where cbrt(longField) > 0', []); + testErrorsAndWarnings('from a_index | where cbrt(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = cbrt(doubleField)', []); + testErrorsAndWarnings('from a_index | eval cbrt(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = cbrt(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval cbrt(booleanField)', [ + 'Argument of [cbrt] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = cbrt(*)', [ + 'Using wildcards (*) in cbrt is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = cbrt(integerField)', []); + testErrorsAndWarnings('from a_index | eval cbrt(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = cbrt(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = cbrt(longField)', []); + testErrorsAndWarnings('from a_index | eval cbrt(longField)', []); + testErrorsAndWarnings('from a_index | eval var = cbrt(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval cbrt(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval cbrt(doubleField, extraArg)', [ + 'Error: [cbrt] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | sort ceil(numberField)', []); + testErrorsAndWarnings('from a_index | sort cbrt(doubleField)', []); + testErrorsAndWarnings('from a_index | eval cbrt(null)', []); + testErrorsAndWarnings('row nullVar = null | eval cbrt(nullVar)', []); + }); + + describe('ceil', () => { + testErrorsAndWarnings('row var = ceil(5.5)', []); + testErrorsAndWarnings('row ceil(5.5)', []); + testErrorsAndWarnings('row var = ceil(to_double(true))', []); + testErrorsAndWarnings('row var = ceil(5)', []); + testErrorsAndWarnings('row ceil(5)', []); testErrorsAndWarnings('row var = ceil(to_integer(true))', []); testErrorsAndWarnings('row var = ceil(true)', [ - 'Argument of [ceil] must be [number], found value [true] type [boolean]', + 'Argument of [ceil] must be [double], found value [true] type [boolean]', ]); + testErrorsAndWarnings('from a_index | where ceil(doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where ceil(booleanField) > 0', [ - 'Argument of [ceil] must be [number], found value [booleanField] type [boolean]', + 'Argument of [ceil] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = ceil(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | where ceil(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where ceil(longField) > 0', []); + testErrorsAndWarnings('from a_index | where ceil(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = ceil(doubleField)', []); + testErrorsAndWarnings('from a_index | eval ceil(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = ceil(to_double(booleanField))', []); testErrorsAndWarnings('from a_index | eval ceil(booleanField)', [ - 'Argument of [ceil] must be [number], found value [booleanField] type [boolean]', + 'Argument of [ceil] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = ceil(*)', [ + 'Using wildcards (*) in ceil is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = ceil(integerField)', []); + testErrorsAndWarnings('from a_index | eval ceil(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = ceil(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = ceil(longField)', []); + testErrorsAndWarnings('from a_index | eval ceil(longField)', []); + testErrorsAndWarnings('from a_index | eval var = ceil(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval ceil(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval ceil(doubleField, extraArg)', [ + 'Error: [ceil] function expects exactly one argument, got 2.', ]); + + testErrorsAndWarnings('from a_index | sort ceil(doubleField)', []); testErrorsAndWarnings('from a_index | eval ceil(null)', []); testErrorsAndWarnings('row nullVar = null | eval ceil(nullVar)', []); }); @@ -2070,27 +2174,6 @@ describe('validation logic', () => { describe('cidr_match', () => { testErrorsAndWarnings('row var = cidr_match(to_ip("127.0.0.1"), "a")', []); testErrorsAndWarnings('row cidr_match(to_ip("127.0.0.1"), "a")', []); - testErrorsAndWarnings('row var = cidr_match(to_ip("a"), to_string("a"))', []); - - testErrorsAndWarnings('row var = cidr_match("a", 5)', [ - 'Argument of [cidr_match] must be [ip], found value ["a"] type [string]', - 'Argument of [cidr_match] must be [string], found value [5] type [number]', - ]); - - testErrorsAndWarnings('from a_index | eval var = cidr_match(ipField, stringField)', []); - testErrorsAndWarnings('from a_index | eval cidr_match(ipField, stringField)', []); - - testErrorsAndWarnings( - 'from a_index | eval var = cidr_match(to_ip(stringField), to_string(stringField))', - [] - ); - - testErrorsAndWarnings('from a_index | eval cidr_match(stringField, numberField)', [ - 'Argument of [cidr_match] must be [ip], found value [stringField] type [string]', - 'Argument of [cidr_match] must be [string], found value [numberField] type [number]', - ]); - - 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))', [] @@ -2098,9 +2181,12 @@ describe('validation logic', () => { 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]', + 'Argument of [cidr_match] must be [keyword], found value [true] type [boolean]', ]); + testErrorsAndWarnings('from a_index | eval var = cidr_match(ipField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval cidr_match(ipField, keywordField)', []); + testErrorsAndWarnings( 'from a_index | eval var = cidr_match(to_ip(ipField), to_string(booleanField))', [] @@ -2108,181 +2194,146 @@ describe('validation logic', () => { 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]', + 'Argument of [cidr_match] must be [keyword], found value [booleanField] type [boolean]', ]); + + testErrorsAndWarnings('from a_index | eval var = cidr_match(ipField, textField)', []); + testErrorsAndWarnings('from a_index | eval cidr_match(ipField, textField)', []); + testErrorsAndWarnings('from a_index | sort cidr_match(ipField, keywordField)', []); testErrorsAndWarnings('from a_index | eval cidr_match(null, null)', []); testErrorsAndWarnings('row nullVar = null | eval cidr_match(nullVar, nullVar)', []); }); describe('coalesce', () => { - 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(now())', []); - testErrorsAndWarnings('row coalesce(now())', []); - testErrorsAndWarnings('row var = coalesce(to_datetime(now()))', []); - testErrorsAndWarnings('row var = coalesce(now(), now())', []); - testErrorsAndWarnings('row coalesce(now(), now())', []); - testErrorsAndWarnings('row var = coalesce(to_datetime(now()), to_datetime(now()))', []); - testErrorsAndWarnings('row var = coalesce("a")', []); - testErrorsAndWarnings('row coalesce("a")', []); - 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('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(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"), to_ip("127.0.0.1"))', []); - testErrorsAndWarnings('row coalesce(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []); - - testErrorsAndWarnings( - 'row var = coalesce(to_ip(to_ip("127.0.0.1")), to_ip(to_ip("127.0.0.1")))', - [] - ); - - 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)"), to_cartesianpoint("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('row var = coalesce(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row coalesce(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); testErrorsAndWarnings( - 'row coalesce(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', - [] + 'row var = coalesce(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] ); testErrorsAndWarnings( - 'row var = coalesce(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'row var = coalesce(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', [] ); - 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)")))', + 'row coalesce(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', [] ); testErrorsAndWarnings( - 'row var = coalesce(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', - [] + 'row var = coalesce(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] ); testErrorsAndWarnings( - 'row coalesce(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'row var = coalesce(to_datetime("2021-01-01T00:00:00Z"), to_datetime("2021-01-01T00:00:00Z"))', [] ); testErrorsAndWarnings( - 'row var = coalesce(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'row coalesce(to_datetime("2021-01-01T00:00:00Z"), to_datetime("2021-01-01T00:00:00Z"))', [] ); - 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)"), to_geopoint("POINT (30 10)"))', + 'row var = coalesce(to_datetime(to_datetime("2021-01-01T00:00:00Z")), to_datetime(to_datetime("2021-01-01T00:00:00Z")))', [] ); + testErrorsAndWarnings('row var = coalesce(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row coalesce(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); testErrorsAndWarnings( - 'row coalesce(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', - [] + 'row var = coalesce(to_geopoint(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] ); testErrorsAndWarnings( - 'row var = coalesce(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', + 'row var = coalesce(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', [] ); - 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)"), to_geoshape("POINT (30 10)"))', + 'row coalesce(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', [] ); testErrorsAndWarnings( - 'row coalesce(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', - [] + 'row var = coalesce(to_geoshape(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] ); + 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_ip("127.0.0.1"), to_ip("127.0.0.1"))', []); + testErrorsAndWarnings('row coalesce(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []); testErrorsAndWarnings( - 'row var = coalesce(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', + 'row var = coalesce(to_ip(to_ip("127.0.0.1")), to_ip(to_ip("127.0.0.1")))', [] ); - 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("a")', []); + testErrorsAndWarnings('row coalesce("a")', []); + 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('row var = coalesce(to_version("1.0.0"), to_version("1.0.0"))', []); testErrorsAndWarnings('row coalesce(to_version("1.0.0"), to_version("1.0.0"))', []); testErrorsAndWarnings('row var = coalesce(to_version("a"), to_version("a"))', []); - 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(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('row var = coalesce(5.5, 5.5)', []); - 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, dateField)', []); - testErrorsAndWarnings('from a_index | eval coalesce(dateField, dateField)', []); + testErrorsAndWarnings('from a_index | where coalesce(integerField) > 0', []); - testErrorsAndWarnings( - 'from a_index | eval var = coalesce(to_datetime(dateField), to_datetime(dateField))', - [] - ); + testErrorsAndWarnings('from a_index | where coalesce(counterDoubleField) > 0', [ + 'Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]', + ]); - testErrorsAndWarnings('from a_index | eval var = coalesce(stringField)', []); - testErrorsAndWarnings('from a_index | eval coalesce(stringField)', []); - 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 | where coalesce(integerField, integerField) > 0', []); testErrorsAndWarnings( - 'from a_index | eval var = coalesce(to_string(booleanField), to_string(booleanField))', - [] + 'from a_index | where coalesce(counterDoubleField, counterDoubleField) > 0', + [ + 'Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]', + 'Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]', + ] ); + testErrorsAndWarnings('from a_index | where coalesce(longField) > 0', []); + testErrorsAndWarnings('from a_index | where coalesce(longField, longField) > 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 coalesce(counterDoubleField)', [ + 'Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]', + ]); + testErrorsAndWarnings('from a_index | eval var = coalesce(booleanField, booleanField)', []); testErrorsAndWarnings('from a_index | eval coalesce(booleanField, booleanField)', []); @@ -2291,21 +2342,12 @@ describe('validation logic', () => { [] ); - 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, ipField)', []); - testErrorsAndWarnings('from a_index | eval coalesce(ipField, ipField)', []); - testErrorsAndWarnings( - 'from a_index | eval var = coalesce(to_ip(ipField), to_ip(ipField))', - [] - ); - testErrorsAndWarnings('from a_index | eval var = coalesce(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval coalesce(cartesianPointField)', []); - testErrorsAndWarnings( - 'from a_index | eval var = coalesce(to_cartesianpoint(cartesianPointField))', - [] + 'from a_index | eval coalesce(counterDoubleField, counterDoubleField)', + [ + 'Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]', + 'Argument of [coalesce] must be [boolean], found value [counterDoubleField] type [counter_double]', + ] ); testErrorsAndWarnings( @@ -2323,32 +2365,29 @@ describe('validation logic', () => { [] ); - 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))', + 'from a_index | eval var = coalesce(cartesianShapeField, cartesianShapeField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = coalesce(cartesianShapeField, cartesianShapeField)', + 'from a_index | eval coalesce(cartesianShapeField, cartesianShapeField)', [] ); testErrorsAndWarnings( - 'from a_index | eval coalesce(cartesianShapeField, cartesianShapeField)', + 'from a_index | eval var = coalesce(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', [] ); + testErrorsAndWarnings('from a_index | eval var = coalesce(dateField, dateField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(dateField, dateField)', []); + testErrorsAndWarnings( - 'from a_index | eval var = coalesce(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + 'from a_index | eval var = coalesce(to_datetime(dateField), to_datetime(dateField))', [] ); - 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, geoPointField)', [] @@ -2360,9 +2399,6 @@ describe('validation logic', () => { [] ); - 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, geoShapeField)', [] @@ -2374,71 +2410,73 @@ describe('validation logic', () => { [] ); - 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, versionField)', []); - testErrorsAndWarnings('from a_index | eval coalesce(versionField, versionField)', []); + testErrorsAndWarnings('from a_index | eval var = coalesce(integerField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = coalesce(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = coalesce(integerField, integerField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(integerField, integerField)', []); testErrorsAndWarnings( - 'from a_index | eval var = coalesce(to_version(stringField), to_version(stringField))', + 'from a_index | eval var = coalesce(to_integer(booleanField), to_integer(booleanField))', [] ); - testErrorsAndWarnings('from a_index | sort coalesce(numberField)', []); - testErrorsAndWarnings('from a_index | eval coalesce(null)', []); - testErrorsAndWarnings('row nullVar = null | eval coalesce(nullVar)', []); - testErrorsAndWarnings('from a_index | sort coalesce(booleanField)', []); - }); + testErrorsAndWarnings('from a_index | eval var = coalesce(ipField, ipField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(ipField, ipField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = coalesce(to_ip(ipField), to_ip(ipField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = coalesce(keywordField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = coalesce(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = coalesce(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(keywordField, keywordField)', []); - describe('concat', () => { - testErrorsAndWarnings('row var = concat("a", "a")', []); - testErrorsAndWarnings('row concat("a", "a")', []); - testErrorsAndWarnings('row var = concat(to_string("a"), to_string("a"))', []); + testErrorsAndWarnings( + 'from a_index | eval var = coalesce(to_string(booleanField), to_string(booleanField))', + [] + ); - 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('from a_index | eval var = coalesce(longField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(longField)', []); + testErrorsAndWarnings('from a_index | eval var = coalesce(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval var = coalesce(textField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(textField)', []); + testErrorsAndWarnings('from a_index | eval var = coalesce(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval var = coalesce(versionField, versionField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(versionField, versionField)', []); testErrorsAndWarnings( - 'from a_index | where length(concat(stringField, stringField)) > 0', + 'from a_index | eval var = coalesce(to_version(keywordField), to_version(keywordField))', [] ); - 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)', []); - testErrorsAndWarnings('from a_index | eval concat(stringField, stringField)', []); + testErrorsAndWarnings('from a_index | sort coalesce(booleanField)', []); + testErrorsAndWarnings('from a_index | eval coalesce(null)', []); + testErrorsAndWarnings('row nullVar = null | eval coalesce(nullVar)', []); + testErrorsAndWarnings('from a_index | eval coalesce("2022", "2022")', []); testErrorsAndWarnings( - 'from a_index | eval var = concat(to_string(stringField), to_string(stringField))', + 'from a_index | eval coalesce(concat("20", "22"), concat("20", "22"))', [] ); + }); - 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)', []); + describe('concat', () => { + testErrorsAndWarnings('row var = concat("a", "a")', []); + testErrorsAndWarnings('row concat("a", "a")', []); 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]', + 'Argument of [concat] must be [keyword], found value [true] type [boolean]', + 'Argument of [concat] must be [keyword], 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(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval concat(keywordField, keywordField)', []); testErrorsAndWarnings( 'from a_index | eval var = concat(to_string(booleanField), to_string(booleanField))', @@ -2446,169 +2484,245 @@ describe('validation logic', () => { ); 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]', + 'Argument of [concat] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [concat] must be [keyword], found value [booleanField] type [boolean]', ]); + + testErrorsAndWarnings('from a_index | eval var = concat(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval concat(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval var = concat(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval concat(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = concat(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval concat(textField, textField)', []); + testErrorsAndWarnings('from a_index | sort concat(keywordField, keywordField)', []); testErrorsAndWarnings('from a_index | eval concat(null, null)', []); testErrorsAndWarnings('row nullVar = null | eval concat(nullVar, nullVar)', []); }); describe('cos', () => { + testErrorsAndWarnings('row var = cos(5.5)', []); + testErrorsAndWarnings('row cos(5.5)', []); + testErrorsAndWarnings('row var = cos(to_double(true))', []); testErrorsAndWarnings('row var = cos(5)', []); testErrorsAndWarnings('row cos(5)', []); - testErrorsAndWarnings('row var = cos(to_integer("a"))', []); + testErrorsAndWarnings('row var = cos(to_integer(true))', []); - testErrorsAndWarnings('row var = cos("a")', [ - 'Argument of [cos] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = cos(true)', [ + 'Argument of [cos] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where cos(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where cos(doubleField) > 0', []); - testErrorsAndWarnings('from a_index | where cos(stringField) > 0', [ - 'Argument of [cos] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where cos(booleanField) > 0', [ + 'Argument of [cos] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = cos(numberField)', []); - testErrorsAndWarnings('from a_index | eval cos(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = cos(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval cos(stringField)', [ - 'Argument of [cos] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings('from a_index | where cos(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where cos(longField) > 0', []); + testErrorsAndWarnings('from a_index | where cos(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = cos(doubleField)', []); + testErrorsAndWarnings('from a_index | eval cos(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = cos(to_double(booleanField))', []); - testErrorsAndWarnings('from a_index | eval cos(numberField, extraArg)', [ - 'Error: [cos] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval cos(booleanField)', [ + 'Argument of [cos] must be [double], found value [booleanField] type [boolean]', ]); testErrorsAndWarnings('from a_index | eval var = cos(*)', [ 'Using wildcards (*) in cos is not allowed', ]); - 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(integerField)', []); + testErrorsAndWarnings('from a_index | eval cos(integerField)', []); testErrorsAndWarnings('from a_index | eval var = cos(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = cos(longField)', []); + testErrorsAndWarnings('from a_index | eval cos(longField)', []); + testErrorsAndWarnings('from a_index | eval var = cos(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval cos(unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval cos(booleanField)', [ - 'Argument of [cos] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval cos(doubleField, extraArg)', [ + 'Error: [cos] function expects exactly one argument, got 2.', ]); + + testErrorsAndWarnings('from a_index | sort cos(doubleField)', []); testErrorsAndWarnings('from a_index | eval cos(null)', []); testErrorsAndWarnings('row nullVar = null | eval cos(nullVar)', []); }); describe('cosh', () => { + testErrorsAndWarnings('row var = cosh(5.5)', []); + testErrorsAndWarnings('row cosh(5.5)', []); + testErrorsAndWarnings('row var = cosh(to_double(true))', []); testErrorsAndWarnings('row var = cosh(5)', []); testErrorsAndWarnings('row cosh(5)', []); - testErrorsAndWarnings('row var = cosh(to_integer("a"))', []); + testErrorsAndWarnings('row var = cosh(to_integer(true))', []); - testErrorsAndWarnings('row var = cosh("a")', [ - 'Argument of [cosh] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = cosh(true)', [ + 'Argument of [cosh] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where cosh(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where cosh(doubleField) > 0', []); - testErrorsAndWarnings('from a_index | where cosh(stringField) > 0', [ - 'Argument of [cosh] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where cosh(booleanField) > 0', [ + 'Argument of [cosh] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = cosh(numberField)', []); - testErrorsAndWarnings('from a_index | eval cosh(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = cosh(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval cosh(stringField)', [ - 'Argument of [cosh] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings('from a_index | where cosh(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where cosh(longField) > 0', []); + testErrorsAndWarnings('from a_index | where cosh(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = cosh(doubleField)', []); + testErrorsAndWarnings('from a_index | eval cosh(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = cosh(to_double(booleanField))', []); - testErrorsAndWarnings('from a_index | eval cosh(numberField, extraArg)', [ - 'Error: [cosh] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval cosh(booleanField)', [ + 'Argument of [cosh] must be [double], found value [booleanField] type [boolean]', ]); testErrorsAndWarnings('from a_index | eval var = cosh(*)', [ 'Using wildcards (*) in cosh is not allowed', ]); - 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(integerField)', []); + testErrorsAndWarnings('from a_index | eval cosh(integerField)', []); testErrorsAndWarnings('from a_index | eval var = cosh(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = cosh(longField)', []); + testErrorsAndWarnings('from a_index | eval cosh(longField)', []); + testErrorsAndWarnings('from a_index | eval var = cosh(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval cosh(unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval cosh(booleanField)', [ - 'Argument of [cosh] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval cosh(doubleField, extraArg)', [ + 'Error: [cosh] function expects exactly one argument, got 2.', ]); + + testErrorsAndWarnings('from a_index | sort cosh(doubleField)', []); testErrorsAndWarnings('from a_index | eval cosh(null)', []); testErrorsAndWarnings('row nullVar = null | eval cosh(nullVar)', []); }); - describe('date_extract', () => { - testErrorsAndWarnings('row var = date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", now())', []); - testErrorsAndWarnings('row date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", now())', []); + describe('date_diff', () => { testErrorsAndWarnings( - 'from a_index | eval date_extract("SOME_RANDOM_STRING", now())', - [], + 'from a_index | eval var = date_diff("year", dateField, dateField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval 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)', [ - 'Invalid option ["SOME_RANDOM_STRING"] for date_extract. Supported options: ["ALIGNED_DAY_OF_WEEK_IN_MONTH", "ALIGNED_DAY_OF_WEEK_IN_YEAR", "ALIGNED_WEEK_OF_MONTH", "ALIGNED_WEEK_OF_YEAR", "AMPM_OF_DAY", "CLOCK_HOUR_OF_AMPM", "CLOCK_HOUR_OF_DAY", "DAY_OF_MONTH", "DAY_OF_WEEK", "DAY_OF_YEAR", "EPOCH_DAY", "ERA", "HOUR_OF_AMPM", "HOUR_OF_DAY", "INSTANT_SECONDS", "MICRO_OF_DAY", "MICRO_OF_SECOND", "MILLI_OF_DAY", "MILLI_OF_SECOND", "MINUTE_OF_DAY", "MINUTE_OF_HOUR", "MONTH_OF_YEAR", "NANO_OF_DAY", "NANO_OF_SECOND", "OFFSET_SECONDS", "PROLEPTIC_MONTH", "SECOND_OF_DAY", "SECOND_OF_MINUTE", "YEAR", "YEAR_OF_ERA"].', + 'Argument of [date_diff] must be [keyword], 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]', ] ); testErrorsAndWarnings( - 'from a_index | eval var = date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", dateField)', + 'from a_index | eval var = date_diff(textField, dateField, dateField)', [] ); + testErrorsAndWarnings('from a_index | eval date_diff(textField, dateField, dateField)', []); + testErrorsAndWarnings( - 'from a_index | eval date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", dateField)', + 'from a_index | eval var = date_diff(to_string(booleanField), to_datetime(dateField), to_datetime(dateField))', [] ); testErrorsAndWarnings( - 'from a_index | eval var = date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", to_datetime(stringField))', - [] + 'from a_index | eval date_diff("year", dateField, dateField, extraArg)', + ['Error: [date_diff] function expects exactly 3 arguments, got 4.'] ); - testErrorsAndWarnings('from a_index | eval date_extract(stringField, stringField)', [ - 'Argument of [date_extract] must be [date], found value [stringField] type [string]', - ]); + testErrorsAndWarnings('from a_index | sort date_diff("year", dateField, dateField)', []); + + testErrorsAndWarnings('from a_index | eval date_diff(null, null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval date_diff(nullVar, nullVar, nullVar)', []); + testErrorsAndWarnings('from a_index | eval date_diff("year", "2022", "2022")', []); testErrorsAndWarnings( - 'from a_index | eval date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", dateField, extraArg)', - ['Error: [date_extract] function expects exactly 2 arguments, got 3.'] + 'from a_index | eval date_diff("year", concat("20", "22"), concat("20", "22"))', + [ + 'Argument of [date_diff] must be [date], found value [concat("20","22")] type [keyword]', + 'Argument of [date_diff] must be [date], found value [concat("20","22")] type [keyword]', + ] ); + testErrorsAndWarnings('from a_index | eval date_diff(textField, "2022", "2022")', []); + testErrorsAndWarnings( - 'from a_index | sort date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", dateField)', + 'from a_index | eval date_diff(textField, concat("20", "22"), concat("20", "22"))', + [ + 'Argument of [date_diff] must be [date], found value [concat("20","22")] type [keyword]', + 'Argument of [date_diff] must be [date], found value [concat("20","22")] type [keyword]', + ] + ); + }); + + describe('date_extract', () => { + testErrorsAndWarnings( + 'row var = date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", to_datetime("2021-01-01T00:00:00Z"))', + [] + ); + + testErrorsAndWarnings( + 'row date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", to_datetime("2021-01-01T00:00:00Z"))', + [] + ); + + testErrorsAndWarnings( + 'row var = date_extract("a", to_datetime("2021-01-01T00:00:00Z"))', [] ); + testErrorsAndWarnings('row date_extract("a", to_datetime("2021-01-01T00:00:00Z"))', []); testErrorsAndWarnings('row var = date_extract(true, true)', [ - 'Argument of [date_extract] must be [string], found value [true] type [boolean]', + 'Argument of [date_extract] must be [keyword], 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", dateField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", dateField)', + [] + ); + 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 [string], found value [booleanField] type [boolean]', + 'Argument of [date_extract] must be [keyword], found value [booleanField] type [boolean]', 'Argument of [date_extract] must be [date], found value [booleanField] type [boolean]', ]); + + testErrorsAndWarnings('from a_index | eval var = date_extract(textField, dateField)', []); + testErrorsAndWarnings('from a_index | eval date_extract(textField, dateField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = date_extract(to_string(booleanField), to_datetime(dateField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", dateField, extraArg)', + ['Error: [date_extract] function expects exactly 2 arguments, got 3.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", dateField)', + [] + ); + testErrorsAndWarnings('from a_index | eval date_extract(null, null)', []); testErrorsAndWarnings('row nullVar = null | eval date_extract(nullVar, nullVar)', []); @@ -2620,134 +2734,128 @@ describe('validation logic', () => { testErrorsAndWarnings( 'from a_index | eval date_extract("ALIGNED_DAY_OF_WEEK_IN_MONTH", concat("20", "22"))', [ - 'Argument of [date_extract] must be [date], found value [concat("20","22")] type [string]', + 'Argument of [date_extract] must be [date], found value [concat("20","22")] type [keyword]', ] ); + + testErrorsAndWarnings('from a_index | eval date_extract(textField, "2022")', []); + testErrorsAndWarnings('from a_index | eval date_extract(textField, concat("20", "22"))', [ + 'Argument of [date_extract] must be [date], found value [concat("20","22")] type [keyword]', + ]); }); describe('date_format', () => { - 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_string(stringField), to_datetime(stringField))', + 'row var = date_format("a", to_datetime("2021-01-01T00:00:00Z"))', [] ); - - testErrorsAndWarnings('from a_index | eval date_format(stringField, numberField)', [ - 'Argument of [date_format] must be [date], found value [numberField] type [number]', - ]); - - 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(stringField, dateField)', []); + testErrorsAndWarnings('row date_format("a", to_datetime("2021-01-01T00:00:00Z"))', []); 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 [keyword], 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(keywordField, dateField)', []); + testErrorsAndWarnings('from a_index | eval date_format(keywordField, dateField)', []); + 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 [keyword], found value [booleanField] type [boolean]', 'Argument of [date_format] must be [date], found value [booleanField] type [boolean]', ]); + + testErrorsAndWarnings('from a_index | eval var = date_format(textField, dateField)', []); + testErrorsAndWarnings('from a_index | eval date_format(textField, dateField)', []); + + testErrorsAndWarnings( + 'from a_index | eval date_format(keywordField, dateField, extraArg)', + ['Error: [date_format] function expects no more than 2 arguments, got 3.'] + ); + + testErrorsAndWarnings('from a_index | sort date_format(keywordField, dateField)', []); testErrorsAndWarnings('from a_index | eval date_format(null, null)', []); testErrorsAndWarnings('row nullVar = null | eval date_format(nullVar, nullVar)', []); - testErrorsAndWarnings('from a_index | eval date_format(stringField, "2022")', []); - testErrorsAndWarnings('from a_index | eval date_format(stringField, concat("20", "22"))', [ - 'Argument of [date_format] must be [date], found value [concat("20","22")] type [string]', + testErrorsAndWarnings('from a_index | eval date_format(keywordField, "2022")', []); + + testErrorsAndWarnings('from a_index | eval date_format(keywordField, concat("20", "22"))', [ + 'Argument of [date_format] must be [date], found value [concat("20","22")] type [keyword]', + ]); + + testErrorsAndWarnings('from a_index | eval date_format(textField, "2022")', []); + testErrorsAndWarnings('from a_index | eval date_format(textField, concat("20", "22"))', [ + 'Argument of [date_format] must be [date], found value [concat("20","22")] type [keyword]', ]); }); 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"))', []); + testErrorsAndWarnings('row var = date_parse(to_string(true), to_string(true))', []); - testErrorsAndWarnings('row var = date_parse(5, 5)', [ - 'Argument of [date_parse] must be [string], found value [5] type [number]', - 'Argument of [date_parse] must be [string], found value [5] type [number]', + testErrorsAndWarnings('row var = date_parse(true, true)', [ + 'Argument of [date_parse] must be [keyword], found value [true] type [boolean]', + 'Argument of [date_parse] must be [keyword], found value [true] type [boolean]', ]); - 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)', []); - testErrorsAndWarnings( - 'from a_index | eval var = date_parse(to_string(stringField), to_string(stringField))', + 'from a_index | eval var = date_parse(keywordField, keywordField)', [] ); - - testErrorsAndWarnings('from a_index | eval date_parse(numberField, numberField)', [ - 'Argument of [date_parse] must be [string], found value [numberField] type [number]', - 'Argument of [date_parse] must be [string], found value [numberField] type [number]', - ]); + testErrorsAndWarnings('from a_index | eval date_parse(keywordField, keywordField)', []); testErrorsAndWarnings( - 'from a_index | eval date_parse(stringField, stringField, extraArg)', - ['Error: [date_parse] function expects no more than 2 arguments, got 3.'] + 'from a_index | eval var = date_parse(to_string(booleanField), to_string(booleanField))', + [] ); - testErrorsAndWarnings('from a_index | sort date_parse(stringField, stringField)', []); - testErrorsAndWarnings('row var = date_parse(to_string(true), to_string(true))', []); - - 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 date_parse(booleanField, booleanField)', [ + 'Argument of [date_parse] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [date_parse] must be [keyword], found value [booleanField] type [boolean]', ]); + testErrorsAndWarnings('from a_index | eval var = date_parse(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval date_parse(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval var = date_parse(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval date_parse(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = date_parse(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval date_parse(textField, textField)', []); + testErrorsAndWarnings( - 'from a_index | eval var = date_parse(to_string(booleanField), to_string(booleanField))', - [] + 'from a_index | eval date_parse(keywordField, keywordField, extraArg)', + ['Error: [date_parse] function expects no more than 2 arguments, got 3.'] ); - 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]', - ]); + testErrorsAndWarnings('from a_index | sort date_parse(keywordField, keywordField)', []); testErrorsAndWarnings('from a_index | eval date_parse(null, null)', []); testErrorsAndWarnings('row nullVar = null | eval date_parse(nullVar, nullVar)', []); }); 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( - 'from a_index | eval var = date_trunc(1 year, to_datetime(stringField))', + 'row var = date_trunc(1 year, to_datetime("2021-01-01T00:00:00Z"))', [] ); - - testErrorsAndWarnings('from a_index | eval date_trunc(stringField, stringField)', [ - '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]', + testErrorsAndWarnings('row date_trunc(1 year, to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row var = date_trunc("a", to_datetime("2021-01-01T00:00:00Z"))', [ + 'Argument of [date_trunc] must be [time_literal], found value ["a"] type [string]', ]); - - testErrorsAndWarnings('from a_index | eval date_trunc(1 year, dateField, extraArg)', [ - 'Error: [date_trunc] function expects exactly 2 arguments, got 3.', + testErrorsAndWarnings('row date_trunc("a", to_datetime("2021-01-01T00:00:00Z"))', [ + 'Argument of [date_trunc] must be [time_literal], found value ["a"] type [string]', ]); - 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, dateField)', []); + testErrorsAndWarnings('from a_index | eval date_trunc(1 year, dateField)', []); + testErrorsAndWarnings( 'from a_index | eval var = date_trunc(1 year, to_datetime(dateField))', [] @@ -2758,28 +2866,36 @@ describe('validation logic', () => { '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(textField, dateField)', [ + 'Argument of [date_trunc] must be [time_literal], found value [textField] type [text]', + ]); + testErrorsAndWarnings('from a_index | eval date_trunc(textField, dateField)', [ + 'Argument of [date_trunc] must be [time_literal], found value [textField] type [text]', + ]); testErrorsAndWarnings( - 'from a_index | eval var = date_trunc(to_datetime(dateField), to_datetime(dateField))', - [] + 'from a_index | eval var = date_trunc(textField, to_datetime(dateField))', + ['Argument of [date_trunc] must be [time_literal], found value [textField] type [text]'] ); + + testErrorsAndWarnings('from a_index | eval date_trunc(1 year, dateField, extraArg)', [ + 'Error: [date_trunc] function expects exactly 2 arguments, got 3.', + ]); + + testErrorsAndWarnings('from a_index | sort date_trunc(1 year, dateField)', []); testErrorsAndWarnings('from a_index | eval date_trunc(null, null)', []); testErrorsAndWarnings('row nullVar = null | eval date_trunc(nullVar, nullVar)', []); testErrorsAndWarnings('from a_index | eval date_trunc(1 year, "2022")', []); testErrorsAndWarnings('from a_index | eval date_trunc(1 year, concat("20", "22"))', [ - 'Argument of [date_trunc] must be [date], found value [concat("20","22")] type [string]', + 'Argument of [date_trunc] must be [date], found value [concat("20","22")] type [keyword]', + ]); + testErrorsAndWarnings('from a_index | eval date_trunc(textField, "2022")', [ + 'Argument of [date_trunc] must be [time_literal], found value [textField] type [text]', + ]); + testErrorsAndWarnings('from a_index | eval date_trunc(textField, concat("20", "22"))', [ + 'Argument of [date_trunc] must be [time_literal], found value [textField] type [text]', + 'Argument of [date_trunc] must be [date], found value [concat("20","22")] type [keyword]', ]); - testErrorsAndWarnings('from a_index | eval date_trunc("2022", "2022")', []); - - testErrorsAndWarnings( - 'from a_index | eval date_trunc(concat("20", "22"), concat("20", "22"))', - [ - 'Argument of [date_trunc] must be [time_literal], found value [concat("20","22")] type [string]', - 'Argument of [date_trunc] must be [date], found value [concat("20","22")] type [string]', - ] - ); }); describe('e', () => { @@ -2800,37 +2916,18 @@ describe('validation logic', () => { describe('ends_with', () => { testErrorsAndWarnings('row var = ends_with("a", "a")', []); testErrorsAndWarnings('row ends_with("a", "a")', []); - testErrorsAndWarnings('row var = ends_with(to_string("a"), to_string("a"))', []); + testErrorsAndWarnings('row var = ends_with(to_string(true), to_string(true))', []); - testErrorsAndWarnings('row var = ends_with(5, 5)', [ - 'Argument of [ends_with] must be [string], found value [5] type [number]', - 'Argument of [ends_with] must be [string], found value [5] type [number]', + testErrorsAndWarnings('row var = ends_with(true, true)', [ + 'Argument of [ends_with] must be [keyword], found value [true] type [boolean]', + 'Argument of [ends_with] must be [keyword], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = ends_with(stringField, stringField)', []); - testErrorsAndWarnings('from a_index | eval ends_with(stringField, stringField)', []); - testErrorsAndWarnings( - 'from a_index | eval var = ends_with(to_string(stringField), to_string(stringField))', + 'from a_index | eval var = ends_with(keywordField, keywordField)', [] ); - - testErrorsAndWarnings('from a_index | eval ends_with(numberField, numberField)', [ - 'Argument of [ends_with] must be [string], found value [numberField] type [number]', - 'Argument of [ends_with] must be [string], found value [numberField] type [number]', - ]); - - testErrorsAndWarnings('from a_index | eval ends_with(stringField, stringField, extraArg)', [ - 'Error: [ends_with] function expects exactly 2 arguments, got 3.', - ]); - - 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 ends_with(keywordField, keywordField)', []); testErrorsAndWarnings( 'from a_index | eval var = ends_with(to_string(booleanField), to_string(booleanField))', @@ -2838,82 +2935,172 @@ describe('validation logic', () => { ); 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]', + 'Argument of [ends_with] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [ends_with] must be [keyword], found value [booleanField] type [boolean]', ]); + + testErrorsAndWarnings('from a_index | eval var = ends_with(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval ends_with(textField, textField)', []); + + testErrorsAndWarnings( + 'from a_index | eval ends_with(keywordField, keywordField, extraArg)', + ['Error: [ends_with] function expects exactly 2 arguments, got 3.'] + ); + + testErrorsAndWarnings('from a_index | sort ends_with(keywordField, keywordField)', []); testErrorsAndWarnings('from a_index | eval ends_with(null, null)', []); testErrorsAndWarnings('row nullVar = null | eval ends_with(nullVar, nullVar)', []); }); - describe('floor', () => { - testErrorsAndWarnings('row var = floor(5)', []); - testErrorsAndWarnings('row floor(5)', []); - testErrorsAndWarnings('row var = floor(to_integer("a"))', []); + describe('exp', () => { + testErrorsAndWarnings('row var = exp(5.5)', []); + testErrorsAndWarnings('row exp(5.5)', []); + testErrorsAndWarnings('row var = exp(to_double(true))', []); + testErrorsAndWarnings('row var = exp(5)', []); + testErrorsAndWarnings('row exp(5)', []); + testErrorsAndWarnings('row var = exp(to_integer(true))', []); - testErrorsAndWarnings('row var = floor("a")', [ - 'Argument of [floor] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = exp(true)', [ + 'Argument of [exp] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where floor(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where exp(doubleField) > 0', []); - testErrorsAndWarnings('from a_index | where floor(stringField) > 0', [ - 'Argument of [floor] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where exp(booleanField) > 0', [ + 'Argument of [exp] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = floor(numberField)', []); - testErrorsAndWarnings('from a_index | eval floor(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = floor(to_integer(stringField))', []); + testErrorsAndWarnings('from a_index | where exp(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where exp(longField) > 0', []); + testErrorsAndWarnings('from a_index | where exp(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = exp(doubleField)', []); + testErrorsAndWarnings('from a_index | eval exp(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = exp(to_double(booleanField))', []); - testErrorsAndWarnings('from a_index | eval floor(stringField)', [ - 'Argument of [floor] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval exp(booleanField)', [ + 'Argument of [exp] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval floor(numberField, extraArg)', [ - 'Error: [floor] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval var = exp(*)', [ + 'Using wildcards (*) in exp is not allowed', ]); - testErrorsAndWarnings('from a_index | eval var = floor(*)', [ - 'Using wildcards (*) in floor is not allowed', + testErrorsAndWarnings('from a_index | eval var = exp(integerField)', []); + testErrorsAndWarnings('from a_index | eval exp(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = exp(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = exp(longField)', []); + testErrorsAndWarnings('from a_index | eval exp(longField)', []); + testErrorsAndWarnings('from a_index | eval var = exp(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval exp(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval exp(doubleField, extraArg)', [ + 'Error: [exp] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | sort floor(numberField)', []); + testErrorsAndWarnings('from a_index | sort exp(doubleField)', []); + testErrorsAndWarnings('from a_index | eval exp(null)', []); + testErrorsAndWarnings('row nullVar = null | eval exp(nullVar)', []); + }); + + describe('floor', () => { + testErrorsAndWarnings('row var = floor(5.5)', []); + testErrorsAndWarnings('row floor(5.5)', []); + testErrorsAndWarnings('row var = floor(to_double(true))', []); + testErrorsAndWarnings('row var = floor(5)', []); + testErrorsAndWarnings('row floor(5)', []); testErrorsAndWarnings('row var = floor(to_integer(true))', []); testErrorsAndWarnings('row var = floor(true)', [ - 'Argument of [floor] must be [number], found value [true] type [boolean]', + 'Argument of [floor] must be [double], found value [true] type [boolean]', ]); + testErrorsAndWarnings('from a_index | where floor(doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where floor(booleanField) > 0', [ - 'Argument of [floor] must be [number], found value [booleanField] type [boolean]', + 'Argument of [floor] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = floor(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | where floor(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where floor(longField) > 0', []); + testErrorsAndWarnings('from a_index | where floor(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = floor(doubleField)', []); + testErrorsAndWarnings('from a_index | eval floor(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = floor(to_double(booleanField))', []); testErrorsAndWarnings('from a_index | eval floor(booleanField)', [ - 'Argument of [floor] must be [number], found value [booleanField] type [boolean]', + 'Argument of [floor] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = floor(*)', [ + 'Using wildcards (*) in floor is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = floor(integerField)', []); + testErrorsAndWarnings('from a_index | eval floor(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = floor(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = floor(longField)', []); + testErrorsAndWarnings('from a_index | eval floor(longField)', []); + testErrorsAndWarnings('from a_index | eval var = floor(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval floor(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval floor(doubleField, extraArg)', [ + 'Error: [floor] function expects exactly one argument, got 2.', ]); + + testErrorsAndWarnings('from a_index | sort floor(doubleField)', []); testErrorsAndWarnings('from a_index | eval floor(null)', []); testErrorsAndWarnings('row nullVar = null | eval floor(nullVar)', []); }); + 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 [keyword], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = from_base64(keywordField)', []); + testErrorsAndWarnings('from a_index | eval from_base64(keywordField)', []); + 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 [keyword], 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 var = from_base64(textField)', []); + testErrorsAndWarnings('from a_index | eval from_base64(textField)', []); + + testErrorsAndWarnings('from a_index | eval from_base64(keywordField, extraArg)', [ + 'Error: [from_base64] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort from_base64(keywordField)', []); + testErrorsAndWarnings('from a_index | eval from_base64(null)', []); + testErrorsAndWarnings('row nullVar = null | eval from_base64(nullVar)', []); + }); + describe('greatest', () => { - testErrorsAndWarnings('row var = greatest("a")', []); - testErrorsAndWarnings('row greatest("a")', []); - 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.5, 5.5)', []); + testErrorsAndWarnings('row greatest(5.5, 5.5)', []); + testErrorsAndWarnings('row var = greatest(to_double(true), to_double(true))', []); testErrorsAndWarnings('row var = greatest(5)', []); testErrorsAndWarnings('row greatest(5)', []); testErrorsAndWarnings('row var = greatest(to_integer(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(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"))', []); @@ -2922,6 +3109,8 @@ describe('validation logic', () => { [] ); + testErrorsAndWarnings('row var = greatest("a")', []); + testErrorsAndWarnings('row greatest("a")', []); testErrorsAndWarnings('row var = greatest(to_string(true))', []); testErrorsAndWarnings('row var = greatest("a", "a")', []); testErrorsAndWarnings('row greatest("a", "a")', []); @@ -2938,41 +3127,17 @@ describe('validation logic', () => { ] ); - testErrorsAndWarnings('from a_index | where greatest(numberField, numberField) > 0', []); + testErrorsAndWarnings('from a_index | where greatest(doubleField, doubleField) > 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(integerField) > 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 | where greatest(integerField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where greatest(longField) > 0', []); + testErrorsAndWarnings('from a_index | where greatest(longField, longField) > 0', []); 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))', []); @@ -2997,37 +3162,55 @@ describe('validation logic', () => { ] ); - testErrorsAndWarnings('from a_index | eval var = greatest(numberField, numberField)', []); - testErrorsAndWarnings('from a_index | eval greatest(numberField, numberField)', []); + testErrorsAndWarnings('from a_index | eval var = greatest(doubleField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval greatest(doubleField, doubleField)', []); testErrorsAndWarnings( - 'from a_index | eval var = greatest(to_integer(booleanField), to_integer(booleanField))', + 'from a_index | eval var = greatest(to_double(booleanField), to_double(booleanField))', [] ); - testErrorsAndWarnings('from a_index | eval var = greatest(numberField)', []); - testErrorsAndWarnings('from a_index | eval greatest(numberField)', []); + testErrorsAndWarnings('from a_index | eval var = greatest(integerField)', []); + testErrorsAndWarnings('from a_index | eval greatest(integerField)', []); testErrorsAndWarnings('from a_index | eval var = greatest(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = greatest(integerField, integerField)', []); + testErrorsAndWarnings('from a_index | eval greatest(integerField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = greatest(to_integer(booleanField), 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval greatest(keywordField)', []); 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(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval greatest(keywordField, keywordField)', []); testErrorsAndWarnings( 'from a_index | eval var = greatest(to_string(booleanField), to_string(booleanField))', [] ); + testErrorsAndWarnings('from a_index | eval var = greatest(longField)', []); + testErrorsAndWarnings('from a_index | eval greatest(longField)', []); + testErrorsAndWarnings('from a_index | eval var = greatest(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval greatest(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval var = greatest(textField)', []); + testErrorsAndWarnings('from a_index | eval greatest(textField)', []); + testErrorsAndWarnings('from a_index | eval var = greatest(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval greatest(textField, textField)', []); 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))', + 'from a_index | eval var = greatest(to_version(keywordField), to_version(keywordField))', [] ); @@ -3036,24 +3219,74 @@ describe('validation logic', () => { testErrorsAndWarnings('row nullVar = null | eval greatest(nullVar)', []); }); + describe('ip_prefix', () => { + testErrorsAndWarnings('row var = ip_prefix(to_ip("127.0.0.1"), 5, 5)', []); + testErrorsAndWarnings('row ip_prefix(to_ip("127.0.0.1"), 5, 5)', []); + + testErrorsAndWarnings( + 'row var = ip_prefix(to_ip(to_ip("127.0.0.1")), to_integer(true), to_integer(true))', + [] + ); + + testErrorsAndWarnings('row var = ip_prefix(true, true, true)', [ + 'Argument of [ip_prefix] must be [ip], found value [true] type [boolean]', + 'Argument of [ip_prefix] must be [integer], found value [true] type [boolean]', + 'Argument of [ip_prefix] must be [integer], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings( + 'from a_index | eval var = ip_prefix(ipField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval ip_prefix(ipField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = ip_prefix(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval ip_prefix(booleanField, booleanField, booleanField)', + [ + 'Argument of [ip_prefix] must be [ip], found value [booleanField] type [boolean]', + 'Argument of [ip_prefix] must be [integer], found value [booleanField] type [boolean]', + 'Argument of [ip_prefix] must be [integer], found value [booleanField] type [boolean]', + ] + ); + + testErrorsAndWarnings( + 'from a_index | eval ip_prefix(ipField, integerField, integerField, extraArg)', + ['Error: [ip_prefix] function expects exactly 3 arguments, got 4.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort ip_prefix(ipField, integerField, integerField)', + [] + ); + testErrorsAndWarnings('from a_index | eval ip_prefix(null, null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval ip_prefix(nullVar, nullVar, nullVar)', []); + }); + describe('least', () => { - testErrorsAndWarnings('row var = least("a")', []); - testErrorsAndWarnings('row least("a")', []); - 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.5, 5.5)', []); + testErrorsAndWarnings('row least(5.5, 5.5)', []); + testErrorsAndWarnings('row var = least(to_double(true), to_double(true))', []); testErrorsAndWarnings('row var = least(5)', []); testErrorsAndWarnings('row least(5)', []); testErrorsAndWarnings('row var = least(to_integer(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(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"))', []); @@ -3062,6 +3295,8 @@ describe('validation logic', () => { [] ); + testErrorsAndWarnings('row var = least("a")', []); + testErrorsAndWarnings('row least("a")', []); testErrorsAndWarnings('row var = least(to_string(true))', []); testErrorsAndWarnings('row var = least("a", "a")', []); testErrorsAndWarnings('row least("a", "a")', []); @@ -3078,7 +3313,7 @@ describe('validation logic', () => { ] ); - testErrorsAndWarnings('from a_index | where least(numberField, numberField) > 0', []); + testErrorsAndWarnings('from a_index | where least(doubleField, doubleField) > 0', []); testErrorsAndWarnings( 'from a_index | where least(cartesianPointField, cartesianPointField) > 0', @@ -3088,31 +3323,15 @@ describe('validation logic', () => { ] ); - testErrorsAndWarnings('from a_index | where least(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where least(integerField) > 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 | where least(integerField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where least(longField) > 0', []); + testErrorsAndWarnings('from a_index | where least(longField, longField) > 0', []); 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))', []); @@ -3137,37 +3356,55 @@ describe('validation logic', () => { ] ); - testErrorsAndWarnings('from a_index | eval var = least(numberField, numberField)', []); - testErrorsAndWarnings('from a_index | eval least(numberField, numberField)', []); + testErrorsAndWarnings('from a_index | eval var = least(doubleField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval least(doubleField, doubleField)', []); testErrorsAndWarnings( - 'from a_index | eval var = least(to_integer(booleanField), to_integer(booleanField))', + 'from a_index | eval var = least(to_double(booleanField), to_double(booleanField))', [] ); - testErrorsAndWarnings('from a_index | eval var = least(numberField)', []); - testErrorsAndWarnings('from a_index | eval least(numberField)', []); + testErrorsAndWarnings('from a_index | eval var = least(integerField)', []); + testErrorsAndWarnings('from a_index | eval least(integerField)', []); testErrorsAndWarnings('from a_index | eval var = least(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = least(integerField, integerField)', []); + testErrorsAndWarnings('from a_index | eval least(integerField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = least(to_integer(booleanField), 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval least(keywordField)', []); 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(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval least(keywordField, keywordField)', []); testErrorsAndWarnings( 'from a_index | eval var = least(to_string(booleanField), to_string(booleanField))', [] ); + testErrorsAndWarnings('from a_index | eval var = least(longField)', []); + testErrorsAndWarnings('from a_index | eval least(longField)', []); + testErrorsAndWarnings('from a_index | eval var = least(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval least(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval var = least(textField)', []); + testErrorsAndWarnings('from a_index | eval least(textField)', []); + testErrorsAndWarnings('from a_index | eval var = least(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval least(textField, textField)', []); 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))', + 'from a_index | eval var = least(to_version(keywordField), to_version(keywordField))', [] ); @@ -3179,52 +3416,15 @@ describe('validation logic', () => { describe('left', () => { testErrorsAndWarnings('row var = left("a", 5)', []); testErrorsAndWarnings('row left("a", 5)', []); - testErrorsAndWarnings('row var = left(to_string("a"), to_integer("a"))', []); - - testErrorsAndWarnings('row var = left(5, "a")', [ - 'Argument of [left] must be [string], found value [5] type [number]', - 'Argument of [left] must be [number], found value ["a"] type [string]', - ]); - - testErrorsAndWarnings( - 'from a_index | where length(left(stringField, numberField)) > 0', - [] - ); - - testErrorsAndWarnings('from a_index | where length(left(numberField, stringField)) > 0', [ - 'Argument of [left] must be [string], found value [numberField] type [number]', - 'Argument of [left] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval var = left(stringField, numberField)', []); - testErrorsAndWarnings('from a_index | eval left(stringField, numberField)', []); - - testErrorsAndWarnings( - 'from a_index | eval var = left(to_string(stringField), to_integer(stringField))', - [] - ); - - testErrorsAndWarnings('from a_index | eval left(numberField, stringField)', [ - 'Argument of [left] must be [string], found value [numberField] type [number]', - 'Argument of [left] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval left(stringField, numberField, extraArg)', [ - 'Error: [left] function expects exactly 2 arguments, got 3.', - ]); - - 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]', + 'Argument of [left] must be [keyword], found value [true] type [boolean]', + 'Argument of [left] must be [integer], 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(keywordField, integerField)', []); + testErrorsAndWarnings('from a_index | eval left(keywordField, integerField)', []); testErrorsAndWarnings( 'from a_index | eval var = left(to_string(booleanField), to_integer(booleanField))', @@ -3232,9 +3432,18 @@ describe('validation logic', () => { ); 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]', + 'Argument of [left] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [left] must be [integer], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = left(textField, integerField)', []); + testErrorsAndWarnings('from a_index | eval left(textField, integerField)', []); + + testErrorsAndWarnings('from a_index | eval left(keywordField, integerField, extraArg)', [ + 'Error: [left] function expects exactly 2 arguments, got 3.', ]); + + testErrorsAndWarnings('from a_index | sort left(keywordField, integerField)', []); testErrorsAndWarnings('from a_index | eval left(null, null)', []); testErrorsAndWarnings('row nullVar = null | eval left(nullVar, nullVar)', []); }); @@ -3242,7355 +3451,11003 @@ describe('validation logic', () => { describe('length', () => { testErrorsAndWarnings('row var = length("a")', []); testErrorsAndWarnings('row length("a")', []); - testErrorsAndWarnings('row var = length(to_string("a"))', []); - - testErrorsAndWarnings('row var = length(5)', [ - 'Argument of [length] must be [string], found value [5] type [number]', - ]); - - testErrorsAndWarnings('from a_index | where length(stringField) > 0', []); + testErrorsAndWarnings('row var = length(to_string(true))', []); - testErrorsAndWarnings('from a_index | where length(numberField) > 0', [ - 'Argument of [length] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('row var = length(true)', [ + 'Argument of [length] must be [keyword], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = length(stringField)', []); - testErrorsAndWarnings('from a_index | eval length(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = length(to_string(stringField))', []); - - testErrorsAndWarnings('from a_index | eval length(numberField)', [ - 'Argument of [length] must be [string], found value [numberField] type [number]', - ]); + testErrorsAndWarnings('from a_index | eval var = length(keywordField)', []); + testErrorsAndWarnings('from a_index | eval length(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = length(to_string(booleanField))', []); - testErrorsAndWarnings('from a_index | eval length(stringField, extraArg)', [ - 'Error: [length] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval length(booleanField)', [ + 'Argument of [length] must be [keyword], found value [booleanField] type [boolean]', ]); testErrorsAndWarnings('from a_index | eval var = length(*)', [ 'Using wildcards (*) in length is not allowed', ]); - 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 | eval var = length(textField)', []); + testErrorsAndWarnings('from a_index | eval length(textField)', []); - testErrorsAndWarnings('from a_index | where length(booleanField) > 0', [ - 'Argument of [length] must be [string], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval length(keywordField, extraArg)', [ + 'Error: [length] function expects exactly one argument, got 2.', ]); - 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]', - ]); + testErrorsAndWarnings('from a_index | sort length(keywordField)', []); testErrorsAndWarnings('from a_index | eval length(null)', []); testErrorsAndWarnings('row nullVar = null | eval length(nullVar)', []); }); - describe('log', () => { - testErrorsAndWarnings('row var = log(5, 5)', []); - testErrorsAndWarnings('row log(5, 5)', []); - testErrorsAndWarnings('row var = log(to_integer("a"), to_integer("a"))', []); + 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 = log("a", "a")', [ - 'Argument of [log] must be [number], found value ["a"] type [string]', - 'Argument of [log] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = locate(true, true, true)', [ + 'Argument of [locate] must be [keyword], found value [true] type [boolean]', + 'Argument of [locate] must be [keyword], found value [true] type [boolean]', + 'Argument of [locate] must be [integer], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where log(numberField, numberField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = locate(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval locate(keywordField, keywordField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = locate(to_string(booleanField), to_string(booleanField))', + [] + ); - testErrorsAndWarnings('from a_index | where log(stringField, stringField) > 0', [ - 'Argument of [log] must be [number], found value [stringField] type [string]', - 'Argument of [log] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval locate(booleanField, booleanField)', [ + 'Argument of [locate] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [locate] must be [keyword], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = log(numberField, numberField)', []); - testErrorsAndWarnings('from a_index | eval log(numberField, numberField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = locate(keywordField, keywordField, integerField)', + [] + ); testErrorsAndWarnings( - 'from a_index | eval var = log(to_integer(stringField), to_integer(stringField))', + 'from a_index | eval locate(keywordField, keywordField, integerField)', [] ); - testErrorsAndWarnings('from a_index | eval log(stringField, stringField)', [ - 'Argument of [log] must be [number], found value [stringField] type [string]', - 'Argument of [log] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = locate(to_string(booleanField), to_string(booleanField), to_integer(booleanField))', + [] + ); - testErrorsAndWarnings('from a_index | eval log(numberField, numberField, extraArg)', [ - 'Error: [log] function expects no more than 2 arguments, got 3.', - ]); + testErrorsAndWarnings( + 'from a_index | eval locate(booleanField, booleanField, booleanField)', + [ + 'Argument of [locate] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [locate] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [locate] must be [integer], found value [booleanField] type [boolean]', + ] + ); + + testErrorsAndWarnings('from a_index | eval var = locate(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval locate(keywordField, textField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = locate(keywordField, textField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval locate(keywordField, textField, integerField)', + [] + ); + testErrorsAndWarnings('from a_index | eval var = locate(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval locate(textField, keywordField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = locate(textField, keywordField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval locate(textField, keywordField, integerField)', + [] + ); + testErrorsAndWarnings('from a_index | eval var = locate(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval locate(textField, textField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = locate(textField, textField, integerField)', + [] + ); + testErrorsAndWarnings('from a_index | eval locate(textField, textField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval locate(keywordField, keywordField, integerField, extraArg)', + ['Error: [locate] function expects no more than 3 arguments, got 4.'] + ); - testErrorsAndWarnings('from a_index | sort log(numberField, numberField)', []); + testErrorsAndWarnings('from a_index | sort locate(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval locate(null, null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval locate(nullVar, nullVar, nullVar)', []); + }); + + describe('log', () => { + testErrorsAndWarnings('row var = log(5.5)', []); + testErrorsAndWarnings('row log(5.5)', []); + testErrorsAndWarnings('row var = log(to_double(true))', []); + testErrorsAndWarnings('row var = log(5.5, 5.5)', []); + testErrorsAndWarnings('row log(5.5, 5.5)', []); + testErrorsAndWarnings('row var = log(to_double(true), to_double(true))', []); + testErrorsAndWarnings('row var = log(5.5, 5)', []); + testErrorsAndWarnings('row log(5.5, 5)', []); + testErrorsAndWarnings('row var = log(to_double(true), to_integer(true))', []); + testErrorsAndWarnings('row var = log(to_double(true), 5)', []); testErrorsAndWarnings('row var = log(5)', []); testErrorsAndWarnings('row log(5)', []); testErrorsAndWarnings('row var = log(to_integer(true))', []); + testErrorsAndWarnings('row var = log(5, 5.5)', []); + testErrorsAndWarnings('row log(5, 5.5)', []); + testErrorsAndWarnings('row var = log(to_integer(true), to_double(true))', []); + testErrorsAndWarnings('row var = log(5, 5)', []); + testErrorsAndWarnings('row log(5, 5)', []); testErrorsAndWarnings('row var = log(to_integer(true), to_integer(true))', []); + testErrorsAndWarnings('row var = log(to_integer(true), 5)', []); + testErrorsAndWarnings('row var = log(5, to_double(true))', []); + testErrorsAndWarnings('row var = log(5, 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]', + 'Argument of [log] must be [double], found value [true] type [boolean]', + 'Argument of [log] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where log(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where log(doubleField) > 0', []); testErrorsAndWarnings('from a_index | where log(booleanField) > 0', [ - 'Argument of [log] must be [number], found value [booleanField] type [boolean]', + 'Argument of [log] must be [double], 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 | where log(doubleField, doubleField) > 0', []); - 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 | where log(booleanField, booleanField) > 0', [ + 'Argument of [log] must be [double], found value [booleanField] type [boolean]', + 'Argument of [log] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where log(doubleField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where log(doubleField, longField) > 0', []); + testErrorsAndWarnings('from a_index | where log(doubleField, unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | where log(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where log(integerField, doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where log(integerField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where log(integerField, longField) > 0', []); + testErrorsAndWarnings('from a_index | where log(integerField, unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | where log(longField) > 0', []); + testErrorsAndWarnings('from a_index | where log(longField, doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where log(longField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where log(longField, longField) > 0', []); + testErrorsAndWarnings('from a_index | where log(longField, unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | where log(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | where log(unsignedLongField, doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where log(unsignedLongField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where log(unsignedLongField, longField) > 0', []); + testErrorsAndWarnings( + 'from a_index | where log(unsignedLongField, unsignedLongField) > 0', + [] + ); + testErrorsAndWarnings('from a_index | eval var = log(doubleField)', []); + testErrorsAndWarnings('from a_index | eval log(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = log(to_double(booleanField))', []); testErrorsAndWarnings('from a_index | eval log(booleanField)', [ - 'Argument of [log] must be [number], found value [booleanField] type [boolean]', + 'Argument of [log] must be [double], 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(doubleField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval log(doubleField, doubleField)', []); + testErrorsAndWarnings( - 'from a_index | eval var = log(to_integer(booleanField), to_integer(booleanField))', + 'from a_index | eval var = log(to_double(booleanField), to_double(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]', + 'Argument of [log] must be [double], found value [booleanField] type [boolean]', + 'Argument of [log] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | sort log(numberField)', []); - testErrorsAndWarnings('from a_index | eval log(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval log(nullVar, nullVar)', []); - }); - - describe('log10', () => { - testErrorsAndWarnings('row var = log10(5)', []); - testErrorsAndWarnings('row log10(5)', []); - testErrorsAndWarnings('row var = log10(to_integer("a"))', []); + testErrorsAndWarnings('from a_index | eval var = log(doubleField, integerField)', []); + testErrorsAndWarnings('from a_index | eval log(doubleField, integerField)', []); - testErrorsAndWarnings('row var = log10("a")', [ - 'Argument of [log10] must be [number], found value ["a"] type [string]', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = log(to_double(booleanField), to_integer(booleanField))', + [] + ); - testErrorsAndWarnings('from a_index | where log10(numberField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = log(doubleField, longField)', []); + testErrorsAndWarnings('from a_index | eval log(doubleField, longField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = log(to_double(booleanField), longField)', + [] + ); + testErrorsAndWarnings('from a_index | eval var = log(doubleField, unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval log(doubleField, unsignedLongField)', []); - testErrorsAndWarnings('from a_index | where log10(stringField) > 0', [ - 'Argument of [log10] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = log(to_double(booleanField), unsignedLongField)', + [] + ); - testErrorsAndWarnings('from a_index | eval var = log10(numberField)', []); - testErrorsAndWarnings('from a_index | eval log10(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = log10(to_integer(stringField))', []); + testErrorsAndWarnings('from a_index | eval var = log(integerField)', []); + testErrorsAndWarnings('from a_index | eval log(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = log(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = log(integerField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval log(integerField, doubleField)', []); - testErrorsAndWarnings('from a_index | eval log10(stringField)', [ - 'Argument of [log10] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = log(to_integer(booleanField), to_double(booleanField))', + [] + ); - testErrorsAndWarnings('from a_index | eval log10(numberField, extraArg)', [ - 'Error: [log10] function expects exactly one argument, got 2.', - ]); + testErrorsAndWarnings('from a_index | eval var = log(integerField, integerField)', []); + testErrorsAndWarnings('from a_index | eval log(integerField, integerField)', []); - testErrorsAndWarnings('from a_index | eval var = log10(*)', [ - 'Using wildcards (*) in log10 is not allowed', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = log(to_integer(booleanField), to_integer(booleanField))', + [] + ); - testErrorsAndWarnings('from a_index | sort log10(numberField)', []); - testErrorsAndWarnings('row var = log10(to_integer(true))', []); + testErrorsAndWarnings('from a_index | eval var = log(integerField, longField)', []); + testErrorsAndWarnings('from a_index | eval log(integerField, longField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = log(to_integer(booleanField), longField)', + [] + ); + testErrorsAndWarnings('from a_index | eval var = log(integerField, unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval log(integerField, unsignedLongField)', []); - testErrorsAndWarnings('row var = log10(true)', [ - 'Argument of [log10] must be [number], found value [true] type [boolean]', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = log(to_integer(booleanField), unsignedLongField)', + [] + ); - 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 = log(longField)', []); + testErrorsAndWarnings('from a_index | eval log(longField)', []); + testErrorsAndWarnings('from a_index | eval var = log(longField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval log(longField, doubleField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = log(longField, to_double(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = log(longField, integerField)', []); + testErrorsAndWarnings('from a_index | eval log(longField, integerField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = log(longField, to_integer(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = log(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval log(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval var = log(longField, unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval log(longField, unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = log(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval log(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = log(unsignedLongField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval log(unsignedLongField, doubleField)', []); - testErrorsAndWarnings('from a_index | eval var = log10(to_integer(booleanField))', []); + testErrorsAndWarnings( + 'from a_index | eval var = log(unsignedLongField, to_double(booleanField))', + [] + ); - testErrorsAndWarnings('from a_index | eval log10(booleanField)', [ - 'Argument of [log10] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval var = log(unsignedLongField, integerField)', []); + testErrorsAndWarnings('from a_index | eval log(unsignedLongField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = log(unsignedLongField, to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = log(unsignedLongField, longField)', []); + testErrorsAndWarnings('from a_index | eval log(unsignedLongField, longField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = log(unsignedLongField, unsignedLongField)', + [] + ); + testErrorsAndWarnings('from a_index | eval log(unsignedLongField, unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval log(doubleField, doubleField, extraArg)', [ + 'Error: [log] function expects no more than 2 arguments, got 3.', ]); - testErrorsAndWarnings('from a_index | eval log10(null)', []); - testErrorsAndWarnings('row nullVar = null | eval log10(nullVar)', []); + + testErrorsAndWarnings('from a_index | sort log(doubleField)', []); + testErrorsAndWarnings('from a_index | eval log(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval log(nullVar, nullVar)', []); }); - describe('ltrim', () => { - testErrorsAndWarnings('row var = ltrim("a")', []); - testErrorsAndWarnings('row ltrim("a")', []); - testErrorsAndWarnings('row var = ltrim(to_string("a"))', []); + describe('log10', () => { + testErrorsAndWarnings('row var = log10(5.5)', []); + testErrorsAndWarnings('row log10(5.5)', []); + testErrorsAndWarnings('row var = log10(to_double(true))', []); + testErrorsAndWarnings('row var = log10(5)', []); + testErrorsAndWarnings('row log10(5)', []); + testErrorsAndWarnings('row var = log10(to_integer(true))', []); - testErrorsAndWarnings('row var = ltrim(5)', [ - 'Argument of [ltrim] must be [string], found value [5] type [number]', + testErrorsAndWarnings('row var = log10(true)', [ + 'Argument of [log10] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where length(ltrim(stringField)) > 0', []); + testErrorsAndWarnings('from a_index | where log10(doubleField) > 0', []); - testErrorsAndWarnings('from a_index | where length(ltrim(numberField)) > 0', [ - 'Argument of [ltrim] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | where log10(booleanField) > 0', [ + 'Argument of [log10] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = ltrim(stringField)', []); - testErrorsAndWarnings('from a_index | eval ltrim(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = ltrim(to_string(stringField))', []); + testErrorsAndWarnings('from a_index | where log10(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where log10(longField) > 0', []); + testErrorsAndWarnings('from a_index | where log10(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = log10(doubleField)', []); + testErrorsAndWarnings('from a_index | eval log10(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = log10(to_double(booleanField))', []); - testErrorsAndWarnings('from a_index | eval ltrim(numberField)', [ - 'Argument of [ltrim] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | eval log10(booleanField)', [ + 'Argument of [log10] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval ltrim(stringField, extraArg)', [ - 'Error: [ltrim] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval var = log10(*)', [ + 'Using wildcards (*) in log10 is not allowed', ]); - testErrorsAndWarnings('from a_index | eval var = ltrim(*)', [ - 'Using wildcards (*) in ltrim is not allowed', + testErrorsAndWarnings('from a_index | eval var = log10(integerField)', []); + testErrorsAndWarnings('from a_index | eval log10(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = log10(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = log10(longField)', []); + testErrorsAndWarnings('from a_index | eval log10(longField)', []); + testErrorsAndWarnings('from a_index | eval var = log10(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval log10(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval log10(doubleField, extraArg)', [ + 'Error: [log10] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | sort ltrim(stringField)', []); + testErrorsAndWarnings('from a_index | sort log10(doubleField)', []); + testErrorsAndWarnings('from a_index | eval log10(null)', []); + testErrorsAndWarnings('row nullVar = null | eval log10(nullVar)', []); + }); + + describe('ltrim', () => { + testErrorsAndWarnings('row var = ltrim("a")', []); + testErrorsAndWarnings('row ltrim("a")', []); 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]', + 'Argument of [ltrim] must be [keyword], found value [true] type [boolean]', ]); + testErrorsAndWarnings('from a_index | eval var = ltrim(keywordField)', []); + testErrorsAndWarnings('from a_index | eval ltrim(keywordField)', []); 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]', + 'Argument of [ltrim] must be [keyword], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval ltrim(null)', []); - testErrorsAndWarnings('row nullVar = null | eval ltrim(nullVar)', []); - }); - describe('mv_avg', () => { - testErrorsAndWarnings('row var = mv_avg(5)', []); - testErrorsAndWarnings('row mv_avg(5)', []); - testErrorsAndWarnings('row var = mv_avg(to_integer("a"))', []); - - testErrorsAndWarnings('row var = mv_avg("a")', [ - 'Argument of [mv_avg] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | eval var = ltrim(*)', [ + 'Using wildcards (*) in ltrim is not allowed', ]); - testErrorsAndWarnings('from a_index | where mv_avg(numberField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = ltrim(textField)', []); + testErrorsAndWarnings('from a_index | eval ltrim(textField)', []); - testErrorsAndWarnings('from a_index | where mv_avg(stringField) > 0', [ - 'Argument of [mv_avg] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval ltrim(keywordField, extraArg)', [ + 'Error: [ltrim] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | eval var = mv_avg(numberField)', []); - testErrorsAndWarnings('from a_index | eval mv_avg(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = mv_avg(to_integer(stringField))', []); + testErrorsAndWarnings('from a_index | sort ltrim(keywordField)', []); + testErrorsAndWarnings('from a_index | eval ltrim(null)', []); + testErrorsAndWarnings('row nullVar = null | eval ltrim(nullVar)', []); + }); - testErrorsAndWarnings('from a_index | eval mv_avg(stringField)', [ - 'Argument of [mv_avg] must be [number], found value [stringField] type [string]', + describe('mv_append', () => { + testErrorsAndWarnings('row var = mv_append(true, true)', []); + testErrorsAndWarnings('row mv_append(true, true)', []); + testErrorsAndWarnings('row var = mv_append(to_boolean(true), to_boolean(true))', []); + testErrorsAndWarnings('row var = mv_append(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', ]); - - testErrorsAndWarnings('from a_index | eval mv_avg(numberField, extraArg)', [ - 'Error: [mv_avg] function expects exactly one argument, got 2.', + testErrorsAndWarnings('row mv_append(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', ]); - testErrorsAndWarnings('from a_index | eval var = mv_avg(*)', [ - 'Using wildcards (*) in mv_avg is not allowed', - ]); + testErrorsAndWarnings( + 'row var = mv_append(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); - testErrorsAndWarnings('from a_index | sort mv_avg(numberField)', []); - testErrorsAndWarnings('row var = mv_avg(to_integer(true))', []); + testErrorsAndWarnings( + 'row var = mv_append(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); - testErrorsAndWarnings('row var = mv_avg(true)', [ - 'Argument of [mv_avg] must be [number], found value [true] type [boolean]', - ]); + testErrorsAndWarnings( + 'row mv_append(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); - testErrorsAndWarnings('from a_index | where mv_avg(booleanField) > 0', [ - 'Argument of [mv_avg] must be [number], found value [booleanField] type [boolean]', - ]); + testErrorsAndWarnings( + 'row var = mv_append(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); - testErrorsAndWarnings('from a_index | eval var = mv_avg(to_integer(booleanField))', []); + testErrorsAndWarnings( + 'row var = mv_append(to_datetime("2021-01-01T00:00:00Z"), to_datetime("2021-01-01T00:00:00Z"))', + [] + ); - testErrorsAndWarnings('from a_index | eval mv_avg(booleanField)', [ - 'Argument of [mv_avg] must be [number], found value [booleanField] type [boolean]', - ]); - testErrorsAndWarnings('from a_index | eval mv_avg(null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_avg(nullVar)', []); - }); + testErrorsAndWarnings( + 'row mv_append(to_datetime("2021-01-01T00:00:00Z"), to_datetime("2021-01-01T00:00:00Z"))', + [] + ); - describe('mv_concat', () => { - testErrorsAndWarnings('row var = mv_concat("a", "a")', []); - testErrorsAndWarnings('row mv_concat("a", "a")', []); - testErrorsAndWarnings('row var = mv_concat(to_string("a"), to_string("a"))', []); + testErrorsAndWarnings( + 'row var = mv_append(to_datetime(to_datetime("2021-01-01T00:00:00Z")), to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); - testErrorsAndWarnings('row var = mv_concat(5, 5)', [ - 'Argument of [mv_concat] must be [string], found value [5] type [number]', - 'Argument of [mv_concat] must be [string], found value [5] type [number]', + testErrorsAndWarnings('row var = mv_append(5.5, 5.5)', []); + + testErrorsAndWarnings('row mv_append(5.5, 5.5)', []); + testErrorsAndWarnings('row var = mv_append(to_double(true), to_double(true))', []); + testErrorsAndWarnings('row var = mv_append(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row mv_append(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', ]); + testErrorsAndWarnings( + 'row var = mv_append(to_geopoint(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); testErrorsAndWarnings( - 'from a_index | where length(mv_concat(stringField, stringField)) > 0', + 'row var = mv_append(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', [] ); testErrorsAndWarnings( - 'from a_index | where length(mv_concat(numberField, numberField)) > 0', - [ - 'Argument of [mv_concat] must be [string], found value [numberField] type [number]', - 'Argument of [mv_concat] must be [string], found value [numberField] type [number]', - ] + 'row mv_append(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + [] ); - testErrorsAndWarnings('from a_index | eval var = mv_concat(stringField, stringField)', []); - testErrorsAndWarnings('from a_index | eval mv_concat(stringField, stringField)', []); + testErrorsAndWarnings( + 'row var = mv_append(to_geoshape(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + testErrorsAndWarnings('row var = mv_append(5, 5)', []); + testErrorsAndWarnings('row mv_append(5, 5)', []); + testErrorsAndWarnings('row var = mv_append(to_integer(true), to_integer(true))', []); + testErrorsAndWarnings('row var = mv_append(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []); + testErrorsAndWarnings('row mv_append(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_concat(to_string(stringField), to_string(stringField))', + 'row var = mv_append(to_ip(to_ip("127.0.0.1")), to_ip(to_ip("127.0.0.1")))', [] ); - testErrorsAndWarnings('from a_index | eval mv_concat(numberField, numberField)', [ - 'Argument of [mv_concat] must be [string], found value [numberField] type [number]', - 'Argument of [mv_concat] must be [string], found value [numberField] type [number]', - ]); + testErrorsAndWarnings('row var = mv_append("a", "a")', []); + testErrorsAndWarnings('row mv_append("a", "a")', []); + testErrorsAndWarnings('row var = mv_append(to_string(true), to_string(true))', []); + testErrorsAndWarnings('row var = mv_append(to_version("1.0.0"), to_version("1.0.0"))', []); + testErrorsAndWarnings('row mv_append(to_version("1.0.0"), to_version("1.0.0"))', []); + testErrorsAndWarnings('row var = mv_append(to_version("a"), to_version("a"))', []); + testErrorsAndWarnings('from a_index | where mv_append(doubleField, doubleField) > 0', []); - testErrorsAndWarnings('from a_index | eval mv_concat(stringField, stringField, extraArg)', [ - 'Error: [mv_concat] function expects exactly 2 arguments, got 3.', - ]); + testErrorsAndWarnings( + 'from a_index | where mv_append(counterDoubleField, counterDoubleField) > 0', + [ + 'Argument of [mv_append] must be [boolean], found value [counterDoubleField] type [counter_double]', + 'Argument of [mv_append] must be [boolean], found value [counterDoubleField] type [counter_double]', + ] + ); - testErrorsAndWarnings('from a_index | sort mv_concat(stringField, stringField)', []); - testErrorsAndWarnings('row var = mv_concat(to_string(true), to_string(true))', []); + testErrorsAndWarnings('from a_index | where mv_append(integerField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_append(longField, longField) > 0', []); + testErrorsAndWarnings( + 'from a_index | eval var = mv_append(booleanField, booleanField)', + [] + ); + testErrorsAndWarnings('from a_index | eval mv_append(booleanField, booleanField)', []); - 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 | eval var = mv_append(to_boolean(booleanField), to_boolean(booleanField))', + [] + ); testErrorsAndWarnings( - 'from a_index | where length(mv_concat(booleanField, booleanField)) > 0', + 'from a_index | eval mv_append(counterDoubleField, counterDoubleField)', [ - 'Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]', - 'Argument of [mv_concat] must be [string], found value [booleanField] type [boolean]', + 'Argument of [mv_append] must be [boolean], found value [counterDoubleField] type [counter_double]', + 'Argument of [mv_append] must be [boolean], found value [counterDoubleField] type [counter_double]', ] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_concat(to_string(booleanField), to_string(booleanField))', + 'from a_index | eval var = mv_append(cartesianPointField, cartesianPointField)', [] ); - 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]', - ]); - testErrorsAndWarnings('from a_index | eval mv_concat(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_concat(nullVar, nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | eval mv_append(cartesianPointField, cartesianPointField)', + [] + ); - describe('mv_count', () => { - testErrorsAndWarnings('row var = mv_count("a")', []); - testErrorsAndWarnings('row mv_count("a")', []); - testErrorsAndWarnings('from a_index | eval var = mv_count(stringField)', []); - testErrorsAndWarnings('from a_index | eval mv_count(stringField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = mv_append(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + [] + ); - testErrorsAndWarnings('from a_index | eval var = mv_count(*)', [ - 'Using wildcards (*) in mv_count is not allowed', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = mv_append(cartesianShapeField, cartesianShapeField)', + [] + ); - 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)"))', []); + testErrorsAndWarnings( + 'from a_index | eval mv_append(cartesianShapeField, cartesianShapeField)', + [] + ); testErrorsAndWarnings( - 'row var = mv_count(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | eval var = mv_append(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', [] ); - testErrorsAndWarnings('row var = mv_count(to_cartesianshape("POINT (30 10)"))', []); - testErrorsAndWarnings('row mv_count(to_cartesianshape("POINT (30 10)"))', []); + testErrorsAndWarnings('from a_index | eval var = mv_append(dateField, dateField)', []); + testErrorsAndWarnings('from a_index | eval mv_append(dateField, dateField)', []); testErrorsAndWarnings( - 'row var = mv_count(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | eval var = mv_append(to_datetime(dateField), to_datetime(dateField))', [] ); - 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_append(doubleField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_append(doubleField, doubleField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_count(to_cartesianpoint(cartesianPointField))', + 'from a_index | eval var = mv_append(to_double(booleanField), to_double(booleanField))', [] ); - testErrorsAndWarnings('from a_index | eval var = mv_count(cartesianShapeField)', []); - testErrorsAndWarnings('from a_index | eval mv_count(cartesianShapeField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = mv_append(geoPointField, geoPointField)', + [] + ); + testErrorsAndWarnings('from a_index | eval mv_append(geoPointField, geoPointField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_count(to_cartesianshape(cartesianPointField))', + 'from a_index | eval var = mv_append(to_geopoint(geoPointField), to_geopoint(geoPointField))', [] ); - 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 var = mv_append(geoShapeField, geoShapeField)', + [] + ); + testErrorsAndWarnings('from a_index | eval mv_append(geoShapeField, geoShapeField)', []); - 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)', []); - testErrorsAndWarnings('from a_index | eval mv_count(null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_count(nullVar)', []); - }); - - 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( + 'from a_index | eval var = mv_append(to_geoshape(geoPointField), to_geoshape(geoPointField))', + [] + ); testErrorsAndWarnings( - 'row var = mv_dedupe(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | eval var = mv_append(integerField, integerField)', [] ); - - testErrorsAndWarnings('row var = mv_dedupe(to_cartesianshape("POINT (30 10)"))', []); - testErrorsAndWarnings('row mv_dedupe(to_cartesianshape("POINT (30 10)"))', []); + testErrorsAndWarnings('from a_index | eval mv_append(integerField, integerField)', []); testErrorsAndWarnings( - 'row var = mv_dedupe(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | eval var = mv_append(to_integer(booleanField), to_integer(booleanField))', [] ); - 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_append(ipField, ipField)', []); + testErrorsAndWarnings('from a_index | eval mv_append(ipField, ipField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_dedupe(to_cartesianpoint(cartesianPointField))', + 'from a_index | eval var = mv_append(to_ip(ipField), to_ip(ipField))', + [] + ); + testErrorsAndWarnings( + 'from a_index | eval var = mv_append(keywordField, keywordField)', [] ); + testErrorsAndWarnings('from a_index | eval mv_append(keywordField, keywordField)', []); - testErrorsAndWarnings('from a_index | eval var = mv_dedupe(cartesianShapeField)', []); - testErrorsAndWarnings('from a_index | eval mv_dedupe(cartesianShapeField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = mv_append(to_string(booleanField), to_string(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = mv_append(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval mv_append(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_append(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval mv_append(textField, textField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_dedupe(to_cartesianshape(cartesianPointField))', + 'from a_index | eval var = mv_append(versionField, versionField)', [] ); + testErrorsAndWarnings('from a_index | eval mv_append(versionField, versionField)', []); - 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))', + 'from a_index | eval var = mv_append(to_version(keywordField), to_version(keywordField))', [] ); - 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))', + 'from a_index | eval mv_append(booleanField, booleanField, extraArg)', + ['Error: [mv_append] function expects exactly 2 arguments, got 3.'] + ); + + testErrorsAndWarnings('from a_index | sort mv_append(booleanField, booleanField)', []); + testErrorsAndWarnings('from a_index | eval mv_append(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_append(nullVar, nullVar)', []); + testErrorsAndWarnings('from a_index | eval mv_append("2022", "2022")', []); + + testErrorsAndWarnings( + 'from a_index | eval mv_append(concat("20", "22"), concat("20", "22"))', [] ); + }); - testErrorsAndWarnings('from a_index | eval mv_dedupe(numberField, extraArg)', [ - 'Error: [mv_dedupe] function expects exactly one argument, got 2.', + describe('mv_avg', () => { + testErrorsAndWarnings('row var = mv_avg(5.5)', []); + testErrorsAndWarnings('row mv_avg(5.5)', []); + testErrorsAndWarnings('row var = mv_avg(to_double(true))', []); + testErrorsAndWarnings('row var = mv_avg(5)', []); + testErrorsAndWarnings('row mv_avg(5)', []); + testErrorsAndWarnings('row var = mv_avg(to_integer(true))', []); + + testErrorsAndWarnings('row var = mv_avg(true)', [ + 'Argument of [mv_avg] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | sort mv_dedupe(numberField)', []); - testErrorsAndWarnings('row var = mv_dedupe(to_cartesianpoint("POINT (30 10)"))', []); - testErrorsAndWarnings('from a_index | eval mv_dedupe(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval mv_dedupe(null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_dedupe(nullVar)', []); - }); + testErrorsAndWarnings('from a_index | where mv_avg(doubleField) > 0', []); - 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)', []); + testErrorsAndWarnings('from a_index | where mv_avg(booleanField) > 0', [ + 'Argument of [mv_avg] must be [double], found value [booleanField] type [boolean]', + ]); - testErrorsAndWarnings('from a_index | eval var = mv_first(*)', [ - 'Using wildcards (*) in mv_first is not allowed', + testErrorsAndWarnings('from a_index | where mv_avg(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_avg(longField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_avg(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = mv_avg(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_avg(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_avg(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval mv_avg(booleanField)', [ + 'Argument of [mv_avg] must be [double], found value [booleanField] type [boolean]', ]); - 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('from a_index | eval var = mv_avg(*)', [ + 'Using wildcards (*) in mv_avg is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_avg(integerField)', []); + testErrorsAndWarnings('from a_index | eval mv_avg(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_avg(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_avg(longField)', []); + testErrorsAndWarnings('from a_index | eval mv_avg(longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_avg(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval mv_avg(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval mv_avg(doubleField, extraArg)', [ + 'Error: [mv_avg] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort mv_avg(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_avg(null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_avg(nullVar)', []); + }); + + describe('mv_concat', () => { + testErrorsAndWarnings('row var = mv_concat("a", "a")', []); + testErrorsAndWarnings('row mv_concat("a", "a")', []); + testErrorsAndWarnings('row var = mv_concat(to_string(true), to_string(true))', []); + + testErrorsAndWarnings('row var = mv_concat(true, true)', [ + 'Argument of [mv_concat] must be [keyword], found value [true] type [boolean]', + 'Argument of [mv_concat] must be [keyword], found value [true] type [boolean]', + ]); testErrorsAndWarnings( - 'row var = mv_first(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | eval var = mv_concat(keywordField, keywordField)', [] ); - - testErrorsAndWarnings('row var = mv_first(to_cartesianshape("POINT (30 10)"))', []); - testErrorsAndWarnings('row mv_first(to_cartesianshape("POINT (30 10)"))', []); + testErrorsAndWarnings('from a_index | eval mv_concat(keywordField, keywordField)', []); testErrorsAndWarnings( - 'row var = mv_first(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | eval var = mv_concat(to_string(booleanField), to_string(booleanField))', [] ); - 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 mv_concat(booleanField, booleanField)', [ + 'Argument of [mv_concat] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [mv_concat] must be [keyword], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_concat(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval mv_concat(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_concat(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_concat(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_concat(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval mv_concat(textField, textField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_first(to_cartesianpoint(cartesianPointField))', - [] + 'from a_index | eval mv_concat(keywordField, keywordField, extraArg)', + ['Error: [mv_concat] function expects exactly 2 arguments, got 3.'] ); - testErrorsAndWarnings('from a_index | eval var = mv_first(cartesianShapeField)', []); - testErrorsAndWarnings('from a_index | eval mv_first(cartesianShapeField)', []); + testErrorsAndWarnings('from a_index | sort mv_concat(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_concat(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_concat(nullVar, nullVar)', []); + }); + + describe('mv_count', () => { + testErrorsAndWarnings('row var = mv_count(true)', []); + testErrorsAndWarnings('row mv_count(true)', []); + testErrorsAndWarnings('row var = mv_count(to_boolean(true))', []); + testErrorsAndWarnings('row var = mv_count(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row mv_count(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = mv_count(to_cartesianpoint(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = mv_count(to_cartesianshape("POINT (30 10)"))', []); + testErrorsAndWarnings('row mv_count(to_cartesianshape("POINT (30 10)"))', []); + testErrorsAndWarnings('row var = mv_count(to_cartesianshape(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = mv_count(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row mv_count(to_datetime("2021-01-01T00:00:00Z"))', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_first(to_cartesianshape(cartesianPointField))', + 'row var = mv_count(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', [] ); - 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('row var = mv_count(5.5)', []); - testErrorsAndWarnings('from a_index | eval mv_first(booleanField, extraArg)', [ - 'Error: [mv_first] function expects exactly one argument, got 2.', + testErrorsAndWarnings('row mv_count(5.5)', []); + testErrorsAndWarnings('row var = mv_count(to_double(true))', []); + testErrorsAndWarnings('row var = mv_count(geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row mv_count(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row var = mv_count(to_geopoint(geoPointField))', [ + 'Unknown column [geoPointField]', ]); + 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(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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_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("a")', []); + testErrorsAndWarnings('row mv_count("a")', []); + 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 | sort mv_first(booleanField)', []); - testErrorsAndWarnings('from a_index | eval mv_first(null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_first(nullVar)', []); - }); + testErrorsAndWarnings('from a_index | where mv_count(counterDoubleField) > 0', [ + 'Argument of [mv_count] must be [boolean], found value [counterDoubleField] type [counter_double]', + ]); - describe('mv_last', () => { - testErrorsAndWarnings('row var = mv_last("a")', []); - testErrorsAndWarnings('row mv_last("a")', []); - testErrorsAndWarnings('from a_index | eval var = mv_last(stringField)', []); - testErrorsAndWarnings('from a_index | eval mv_last(stringField)', []); + 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(doubleField) > 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(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_count(ipField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_count(keywordField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_count(longField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_count(textField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_count(unsignedLongField) > 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_last(*)', [ - 'Using wildcards (*) in mv_last is not allowed', + testErrorsAndWarnings('from a_index | eval mv_count(counterDoubleField)', [ + 'Argument of [mv_count] must be [boolean], found value [counterDoubleField] type [counter_double]', ]); - 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('from a_index | eval var = mv_count(*)', [ + 'Using wildcards (*) in mv_count is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_count(cartesianPointField)', []); + testErrorsAndWarnings('from a_index | eval mv_count(cartesianPointField)', []); testErrorsAndWarnings( - 'row var = mv_last(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | eval var = mv_count(to_cartesianpoint(cartesianPointField))', [] ); - testErrorsAndWarnings('row var = mv_last(to_cartesianshape("POINT (30 10)"))', []); - testErrorsAndWarnings('row mv_last(to_cartesianshape("POINT (30 10)"))', []); + testErrorsAndWarnings('from a_index | eval var = mv_count(cartesianShapeField)', []); + testErrorsAndWarnings('from a_index | eval mv_count(cartesianShapeField)', []); testErrorsAndWarnings( - 'row var = mv_last(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | eval var = mv_count(to_cartesianshape(cartesianPointField))', [] ); - 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 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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_count(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_count(to_double(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(integerField)', []); + testErrorsAndWarnings('from a_index | eval mv_count(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_count(to_integer(booleanField))', []); + 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_count(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_count(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_count(longField)', []); + testErrorsAndWarnings('from a_index | eval mv_count(longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_count(textField)', []); + testErrorsAndWarnings('from a_index | eval mv_count(textField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_count(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval mv_count(unsignedLongField)', []); + 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(keywordField))', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval mv_count(null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_count(nullVar)', []); + testErrorsAndWarnings('from a_index | eval mv_count("2022")', []); + testErrorsAndWarnings('from a_index | eval mv_count(concat("20", "22"))', []); + }); + + describe('mv_dedupe', () => { + testErrorsAndWarnings('row var = mv_dedupe(true)', []); + testErrorsAndWarnings('row mv_dedupe(true)', []); + testErrorsAndWarnings('row var = mv_dedupe(to_boolean(true))', []); + testErrorsAndWarnings('row var = mv_dedupe(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row mv_dedupe(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = mv_dedupe(to_cartesianpoint(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + 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(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = mv_dedupe(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row mv_dedupe(to_datetime("2021-01-01T00:00:00Z"))', []); + + testErrorsAndWarnings( + 'row var = mv_dedupe(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); + + testErrorsAndWarnings('row var = mv_dedupe(5.5)', []); + + testErrorsAndWarnings('row mv_dedupe(5.5)', []); + testErrorsAndWarnings('row var = mv_dedupe(to_double(true))', []); + testErrorsAndWarnings('row var = mv_dedupe(geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row mv_dedupe(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row var = mv_dedupe(to_geopoint(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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("a")', []); + testErrorsAndWarnings('row mv_dedupe("a")', []); + 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(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where mv_dedupe(counterDoubleField) > 0', [ + 'Argument of [mv_dedupe] must be [boolean], found value [counterDoubleField] type [counter_double]', + ]); + + testErrorsAndWarnings('from a_index | where mv_dedupe(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_dedupe(longField) > 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 mv_dedupe(counterDoubleField)', [ + 'Argument of [mv_dedupe] must be [boolean], found value [counterDoubleField] type [counter_double]', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_dedupe(*)', [ + 'Using wildcards (*) in mv_dedupe is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_dedupe(cartesianPointField)', []); + testErrorsAndWarnings('from a_index | eval 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(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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_dedupe(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_dedupe(to_double(booleanField))', []); + 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 var = mv_dedupe(integerField)', []); + testErrorsAndWarnings('from a_index | eval mv_dedupe(integerField)', []); + 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_dedupe(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_dedupe(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_dedupe(longField)', []); + testErrorsAndWarnings('from a_index | eval mv_dedupe(longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_dedupe(textField)', []); + testErrorsAndWarnings('from a_index | eval mv_dedupe(textField)', []); + 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(keywordField))', []); + + 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('from a_index | eval mv_dedupe(null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_dedupe(nullVar)', []); + testErrorsAndWarnings('from a_index | eval mv_dedupe("2022")', []); + testErrorsAndWarnings('from a_index | eval mv_dedupe(concat("20", "22"))', []); + }); + + describe('mv_first', () => { + testErrorsAndWarnings('row var = mv_first(true)', []); + testErrorsAndWarnings('row mv_first(true)', []); + testErrorsAndWarnings('row var = mv_first(to_boolean(true))', []); + testErrorsAndWarnings('row var = mv_first(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row mv_first(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = mv_first(to_cartesianpoint(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + 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(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = mv_first(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row mv_first(to_datetime("2021-01-01T00:00:00Z"))', []); + + testErrorsAndWarnings( + 'row var = mv_first(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); + + testErrorsAndWarnings('row var = mv_first(5.5)', []); + + testErrorsAndWarnings('row mv_first(5.5)', []); + testErrorsAndWarnings('row var = mv_first(to_double(true))', []); + testErrorsAndWarnings('row var = mv_first(geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row mv_first(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row var = mv_first(to_geopoint(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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_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("a")', []); + testErrorsAndWarnings('row mv_first("a")', []); + 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(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where mv_first(counterDoubleField) > 0', [ + 'Argument of [mv_first] must be [boolean], found value [counterDoubleField] type [counter_double]', + ]); + + testErrorsAndWarnings('from a_index | where mv_first(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_first(longField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_first(unsignedLongField) > 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 mv_first(counterDoubleField)', [ + 'Argument of [mv_first] must be [boolean], found value [counterDoubleField] type [counter_double]', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_first(*)', [ + 'Using wildcards (*) in mv_first is not allowed', + ]); + + 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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_first(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_first(to_double(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(integerField)', []); + testErrorsAndWarnings('from a_index | eval mv_first(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_first(to_integer(booleanField))', []); + 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_first(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_first(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_first(longField)', []); + testErrorsAndWarnings('from a_index | eval mv_first(longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_first(textField)', []); + testErrorsAndWarnings('from a_index | eval mv_first(textField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_first(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval mv_first(unsignedLongField)', []); + 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(keywordField))', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval mv_first(null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_first(nullVar)', []); + testErrorsAndWarnings('from a_index | eval mv_first("2022")', []); + testErrorsAndWarnings('from a_index | eval mv_first(concat("20", "22"))', []); + }); + + describe('mv_last', () => { + testErrorsAndWarnings('row var = mv_last(true)', []); + testErrorsAndWarnings('row mv_last(true)', []); + testErrorsAndWarnings('row var = mv_last(to_boolean(true))', []); + testErrorsAndWarnings('row var = mv_last(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row mv_last(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = mv_last(to_cartesianpoint(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + 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(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = mv_last(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row mv_last(to_datetime("2021-01-01T00:00:00Z"))', []); + + testErrorsAndWarnings( + 'row var = mv_last(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); + + testErrorsAndWarnings('row var = mv_last(5.5)', []); + + testErrorsAndWarnings('row mv_last(5.5)', []); + testErrorsAndWarnings('row var = mv_last(to_double(true))', []); + testErrorsAndWarnings('row var = mv_last(geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row mv_last(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row var = mv_last(to_geopoint(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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_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("a")', []); + testErrorsAndWarnings('row mv_last("a")', []); + 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(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where mv_last(counterDoubleField) > 0', [ + 'Argument of [mv_last] must be [boolean], found value [counterDoubleField] type [counter_double]', + ]); + + testErrorsAndWarnings('from a_index | where mv_last(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_last(longField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_last(unsignedLongField) > 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 mv_last(counterDoubleField)', [ + 'Argument of [mv_last] must be [boolean], found value [counterDoubleField] type [counter_double]', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_last(*)', [ + 'Using wildcards (*) in mv_last is not allowed', + ]); + 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))', + '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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_last(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_last(to_double(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(integerField)', []); + testErrorsAndWarnings('from a_index | eval mv_last(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_last(to_integer(booleanField))', []); + 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_last(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_last(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_last(longField)', []); + testErrorsAndWarnings('from a_index | eval mv_last(longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_last(textField)', []); + testErrorsAndWarnings('from a_index | eval mv_last(textField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_last(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval mv_last(unsignedLongField)', []); + 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(keywordField))', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval mv_last(null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_last(nullVar)', []); + testErrorsAndWarnings('from a_index | eval mv_last("2022")', []); + testErrorsAndWarnings('from a_index | eval mv_last(concat("20", "22"))', []); + }); + + describe('mv_max', () => { + testErrorsAndWarnings('row var = mv_max(true)', []); + testErrorsAndWarnings('row mv_max(true)', []); + testErrorsAndWarnings('row var = mv_max(to_boolean(true))', []); + testErrorsAndWarnings('row var = mv_max(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row mv_max(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings( + 'row var = mv_max(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); + testErrorsAndWarnings('row var = mv_max(5.5)', []); + testErrorsAndWarnings('row mv_max(5.5)', []); + testErrorsAndWarnings('row var = mv_max(to_double(true))', []); + 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("a")', []); + testErrorsAndWarnings('row mv_max("a")', []); + 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(doubleField) > 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 mv_max(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_max(longField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_max(unsignedLongField) > 0', []); + 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(*)', [ + 'Using wildcards (*) in mv_max is not allowed', + ]); + + 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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_max(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_max(to_double(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_max(integerField)', []); + testErrorsAndWarnings('from a_index | eval mv_max(integerField)', []); + 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_max(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_max(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_max(longField)', []); + testErrorsAndWarnings('from a_index | eval mv_max(longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_max(textField)', []); + testErrorsAndWarnings('from a_index | eval mv_max(textField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_max(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval mv_max(unsignedLongField)', []); + 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(keywordField))', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval mv_max(null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_max(nullVar)', []); + testErrorsAndWarnings('from a_index | eval mv_max("2022")', []); + testErrorsAndWarnings('from a_index | eval mv_max(concat("20", "22"))', []); + }); + + describe('mv_median', () => { + testErrorsAndWarnings('row var = mv_median(5.5)', []); + testErrorsAndWarnings('row mv_median(5.5)', []); + testErrorsAndWarnings('row var = mv_median(to_double(true))', []); + testErrorsAndWarnings('row var = mv_median(5)', []); + testErrorsAndWarnings('row mv_median(5)', []); + testErrorsAndWarnings('row var = mv_median(to_integer(true))', []); + + testErrorsAndWarnings('row var = mv_median(true)', [ + 'Argument of [mv_median] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where mv_median(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where mv_median(booleanField) > 0', [ + 'Argument of [mv_median] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where mv_median(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_median(longField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_median(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = mv_median(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_median(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_median(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval mv_median(booleanField)', [ + 'Argument of [mv_median] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_median(*)', [ + 'Using wildcards (*) in mv_median is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_median(integerField)', []); + testErrorsAndWarnings('from a_index | eval mv_median(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_median(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_median(longField)', []); + testErrorsAndWarnings('from a_index | eval mv_median(longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_median(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval mv_median(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval mv_median(doubleField, extraArg)', [ + 'Error: [mv_median] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort mv_median(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_median(null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_median(nullVar)', []); + }); + + describe('mv_min', () => { + testErrorsAndWarnings('row var = mv_min(true)', []); + testErrorsAndWarnings('row mv_min(true)', []); + testErrorsAndWarnings('row var = mv_min(to_boolean(true))', []); + testErrorsAndWarnings('row var = mv_min(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row mv_min(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings( + 'row var = mv_min(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); + testErrorsAndWarnings('row var = mv_min(5.5)', []); + testErrorsAndWarnings('row mv_min(5.5)', []); + testErrorsAndWarnings('row var = mv_min(to_double(true))', []); + 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("a")', []); + testErrorsAndWarnings('row mv_min("a")', []); + 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(doubleField) > 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 mv_min(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_min(longField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_min(unsignedLongField) > 0', []); + 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(*)', [ + 'Using wildcards (*) in mv_min is not allowed', + ]); + + 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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_min(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_min(to_double(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_min(integerField)', []); + testErrorsAndWarnings('from a_index | eval mv_min(integerField)', []); + 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_min(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_min(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_min(longField)', []); + testErrorsAndWarnings('from a_index | eval mv_min(longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_min(textField)', []); + testErrorsAndWarnings('from a_index | eval mv_min(textField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_min(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval mv_min(unsignedLongField)', []); + 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(keywordField))', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval mv_min(null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_min(nullVar)', []); + testErrorsAndWarnings('from a_index | eval mv_min("2022")', []); + testErrorsAndWarnings('from a_index | eval mv_min(concat("20", "22"))', []); + }); + + describe('mv_slice', () => { + 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(cartesianPointField, 5, 5)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row mv_slice(cartesianPointField, 5, 5)', [ + 'Unknown column [cartesianPointField]', + ]); + + testErrorsAndWarnings( + 'row var = mv_slice(to_cartesianpoint(cartesianPointField), to_integer(true), to_integer(true))', + ['Unknown column [cartesianPointField]'] + ); + + 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(cartesianPointField), to_integer(true), to_integer(true))', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings('row var = mv_slice(to_datetime("2021-01-01T00:00:00Z"), 5, 5)', []); + testErrorsAndWarnings('row mv_slice(to_datetime("2021-01-01T00:00:00Z"), 5, 5)', []); + + testErrorsAndWarnings( + 'row var = mv_slice(to_datetime(to_datetime("2021-01-01T00:00:00Z")), to_integer(true), to_integer(true))', + [] + ); + + testErrorsAndWarnings('row var = mv_slice(5.5, 5, 5)', []); + testErrorsAndWarnings('row mv_slice(5.5, 5, 5)', []); + + testErrorsAndWarnings( + 'row var = mv_slice(to_double(true), to_integer(true), to_integer(true))', + [] + ); + + testErrorsAndWarnings('row var = mv_slice(geoPointField, 5, 5)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row mv_slice(geoPointField, 5, 5)', [ + 'Unknown column [geoPointField]', + ]); + + testErrorsAndWarnings( + 'row var = mv_slice(to_geopoint(geoPointField), to_integer(true), to_integer(true))', + ['Unknown column [geoPointField]'] + ); + + 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(geoPointField), to_integer(true), to_integer(true))', + ['Unknown column [geoPointField]'] + ); + + 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_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("a", 5, 5)', []); + testErrorsAndWarnings('row mv_slice("a", 5, 5)', []); + + testErrorsAndWarnings( + 'row var = mv_slice(to_string(true), to_integer(true), to_integer(true))', + [] + ); + + testErrorsAndWarnings('row var = mv_slice(5, 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(5.5, true, true)', [ + 'Argument of [mv_slice] must be [integer], found value [true] type [boolean]', + 'Argument of [mv_slice] must be [integer], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings( + 'from a_index | where mv_slice(doubleField, integerField, integerField) > 0', + [] + ); + + testErrorsAndWarnings( + 'from a_index | where mv_slice(counterDoubleField, booleanField, booleanField) > 0', + [ + 'Argument of [mv_slice] must be [boolean], found value [counterDoubleField] type [counter_double]', + 'Argument of [mv_slice] must be [integer], found value [booleanField] type [boolean]', + 'Argument of [mv_slice] must be [integer], found value [booleanField] type [boolean]', + ] + ); + + testErrorsAndWarnings( + 'from a_index | where mv_slice(integerField, integerField, integerField) > 0', + [] + ); + + testErrorsAndWarnings( + 'from a_index | where mv_slice(longField, integerField, integerField) > 0', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(booleanField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(booleanField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_boolean(booleanField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(counterDoubleField, booleanField, booleanField)', + [ + 'Argument of [mv_slice] must be [boolean], found value [counterDoubleField] type [counter_double]', + 'Argument of [mv_slice] must be [integer], found value [booleanField] type [boolean]', + 'Argument of [mv_slice] must be [integer], found value [booleanField] type [boolean]', + ] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(cartesianPointField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(cartesianPointField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_cartesianpoint(cartesianPointField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(cartesianShapeField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(cartesianShapeField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_cartesianshape(cartesianPointField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(dateField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(dateField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_datetime(dateField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(doubleField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(doubleField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_double(booleanField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(geoPointField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(geoPointField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_geopoint(geoPointField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(geoShapeField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(geoShapeField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_geoshape(geoPointField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(integerField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(integerField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_integer(booleanField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(ipField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(ipField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(keywordField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(keywordField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(longField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(longField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(longField, to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(textField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(textField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(versionField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(versionField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_slice(to_version(keywordField), to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(booleanField, integerField, integerField, extraArg)', + ['Error: [mv_slice] function expects no more than 3 arguments, got 4.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort mv_slice(booleanField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval mv_slice(null, null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_slice(nullVar, nullVar, nullVar)', []); + testErrorsAndWarnings( + 'from a_index | eval mv_slice("2022", integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_slice(concat("20", "22"), integerField, integerField)', + [] + ); + }); + + describe('mv_sort', () => { + testErrorsAndWarnings('row var = mv_sort(true, "asc")', []); + testErrorsAndWarnings('row mv_sort(true, "asc")', []); + testErrorsAndWarnings('row var = mv_sort(to_datetime("2021-01-01T00:00:00Z"), "asc")', []); + testErrorsAndWarnings('row mv_sort(to_datetime("2021-01-01T00:00:00Z"), "asc")', []); + testErrorsAndWarnings('row var = mv_sort(5.5, "asc")', []); + testErrorsAndWarnings('row mv_sort(5.5, "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("a", "asc")', []); + testErrorsAndWarnings('row mv_sort("a", "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 [keyword], found value [true] 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(doubleField, "asc")', []); + testErrorsAndWarnings('from a_index | eval mv_sort(doubleField, "asc")', []); + testErrorsAndWarnings('from a_index | eval var = mv_sort(integerField, "asc")', []); + testErrorsAndWarnings('from a_index | eval mv_sort(integerField, "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(keywordField, "asc")', []); + testErrorsAndWarnings('from a_index | eval mv_sort(keywordField, "asc")', []); + testErrorsAndWarnings('from a_index | eval var = mv_sort(longField, "asc")', []); + testErrorsAndWarnings('from a_index | eval mv_sort(longField, "asc")', []); + testErrorsAndWarnings('from a_index | eval var = mv_sort(textField, "asc")', []); + testErrorsAndWarnings('from a_index | eval mv_sort(textField, "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")', []); + testErrorsAndWarnings('from a_index | eval mv_sort(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_sort(nullVar, nullVar)', []); + testErrorsAndWarnings('from a_index | eval mv_sort("2022", "asc")', []); + testErrorsAndWarnings('from a_index | eval mv_sort(concat("20", "22"), "asc")', []); + }); + + describe('mv_sum', () => { + testErrorsAndWarnings('row var = mv_sum(5.5)', []); + testErrorsAndWarnings('row mv_sum(5.5)', []); + testErrorsAndWarnings('row var = mv_sum(to_double(true))', []); + testErrorsAndWarnings('row var = mv_sum(5)', []); + testErrorsAndWarnings('row mv_sum(5)', []); + testErrorsAndWarnings('row var = mv_sum(to_integer(true))', []); + + testErrorsAndWarnings('row var = mv_sum(true)', [ + 'Argument of [mv_sum] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where mv_sum(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where mv_sum(booleanField) > 0', [ + 'Argument of [mv_sum] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where mv_sum(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_sum(longField) > 0', []); + testErrorsAndWarnings('from a_index | where mv_sum(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = mv_sum(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_sum(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_sum(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval mv_sum(booleanField)', [ + 'Argument of [mv_sum] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_sum(*)', [ + 'Using wildcards (*) in mv_sum is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_sum(integerField)', []); + testErrorsAndWarnings('from a_index | eval mv_sum(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_sum(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = mv_sum(longField)', []); + testErrorsAndWarnings('from a_index | eval mv_sum(longField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_sum(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval mv_sum(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval mv_sum(doubleField, extraArg)', [ + 'Error: [mv_sum] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort mv_sum(doubleField)', []); + testErrorsAndWarnings('from a_index | eval mv_sum(null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_sum(nullVar)', []); + }); + + describe('mv_zip', () => { + testErrorsAndWarnings('row var = mv_zip("a", "a")', []); + testErrorsAndWarnings('row mv_zip("a", "a")', []); + testErrorsAndWarnings('row var = mv_zip(to_string(true), to_string(true))', []); + testErrorsAndWarnings('row var = mv_zip("a", "a", "a")', []); + testErrorsAndWarnings('row mv_zip("a", "a", "a")', []); + 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 [keyword], found value [true] type [boolean]', + 'Argument of [mv_zip] must be [keyword], found value [true] type [boolean]', + 'Argument of [mv_zip] must be [keyword], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = mv_zip(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_zip(keywordField, keywordField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_zip(to_string(booleanField), to_string(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval mv_zip(booleanField, booleanField)', [ + 'Argument of [mv_zip] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [mv_zip] must be [keyword], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_zip(keywordField, keywordField, keywordField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_zip(keywordField, keywordField, keywordField)', + [] + ); + + 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 [keyword], found value [booleanField] type [boolean]', + 'Argument of [mv_zip] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [mv_zip] must be [keyword], found value [booleanField] type [boolean]', + ] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_zip(keywordField, keywordField, textField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_zip(keywordField, keywordField, textField)', + [] + ); + testErrorsAndWarnings('from a_index | eval var = mv_zip(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval mv_zip(keywordField, textField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_zip(keywordField, textField, keywordField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_zip(keywordField, textField, keywordField)', + [] + ); + testErrorsAndWarnings( + 'from a_index | eval var = mv_zip(keywordField, textField, textField)', + [] + ); + testErrorsAndWarnings('from a_index | eval mv_zip(keywordField, textField, textField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_zip(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_zip(textField, keywordField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = mv_zip(textField, keywordField, keywordField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval mv_zip(textField, keywordField, keywordField)', + [] + ); + testErrorsAndWarnings( + 'from a_index | eval var = mv_zip(textField, keywordField, textField)', + [] + ); + testErrorsAndWarnings('from a_index | eval mv_zip(textField, keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval var = mv_zip(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval mv_zip(textField, textField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = mv_zip(textField, textField, keywordField)', + [] + ); + testErrorsAndWarnings('from a_index | eval mv_zip(textField, textField, keywordField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = mv_zip(textField, textField, textField)', + [] + ); + testErrorsAndWarnings('from a_index | eval mv_zip(textField, textField, textField)', []); + + testErrorsAndWarnings( + 'from a_index | eval mv_zip(keywordField, keywordField, keywordField, extraArg)', + ['Error: [mv_zip] function expects no more than 3 arguments, got 4.'] + ); + + testErrorsAndWarnings('from a_index | sort mv_zip(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval mv_zip(null, null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval mv_zip(nullVar, nullVar, nullVar)', []); + }); + + describe('now', () => { + testErrorsAndWarnings('row var = now()', []); + testErrorsAndWarnings('row now()', []); + testErrorsAndWarnings('from a_index | eval var = now()', []); + testErrorsAndWarnings('from a_index | eval now()', []); + + testErrorsAndWarnings('from a_index | eval now(extraArg)', [ + 'Error: [now] function expects exactly 0 arguments, got 1.', + ]); + + testErrorsAndWarnings('from a_index | sort now()', []); + testErrorsAndWarnings('row nullVar = null | eval now()', []); + }); + + describe('pi', () => { + testErrorsAndWarnings('row var = pi()', []); + testErrorsAndWarnings('row pi()', []); + testErrorsAndWarnings('from a_index | where pi() > 0', []); + testErrorsAndWarnings('from a_index | eval var = pi()', []); + testErrorsAndWarnings('from a_index | eval pi()', []); + + testErrorsAndWarnings('from a_index | eval pi(extraArg)', [ + 'Error: [pi] function expects exactly 0 arguments, got 1.', + ]); + + testErrorsAndWarnings('from a_index | sort pi()', []); + testErrorsAndWarnings('row nullVar = null | eval pi()', []); + }); + + describe('pow', () => { + testErrorsAndWarnings('row var = pow(5.5, 5.5)', []); + testErrorsAndWarnings('row pow(5.5, 5.5)', []); + testErrorsAndWarnings('row var = pow(to_double(true), to_double(true))', []); + testErrorsAndWarnings('row var = pow(5.5, 5)', []); + testErrorsAndWarnings('row pow(5.5, 5)', []); + testErrorsAndWarnings('row var = pow(to_double(true), to_integer(true))', []); + testErrorsAndWarnings('row var = pow(to_double(true), 5)', []); + testErrorsAndWarnings('row var = pow(5, 5.5)', []); + testErrorsAndWarnings('row pow(5, 5.5)', []); + testErrorsAndWarnings('row var = pow(to_integer(true), to_double(true))', []); + testErrorsAndWarnings('row var = pow(5, 5)', []); + testErrorsAndWarnings('row pow(5, 5)', []); + testErrorsAndWarnings('row var = pow(to_integer(true), to_integer(true))', []); + testErrorsAndWarnings('row var = pow(to_integer(true), 5)', []); + testErrorsAndWarnings('row var = pow(5, to_double(true))', []); + testErrorsAndWarnings('row var = pow(5, to_integer(true))', []); + + testErrorsAndWarnings('row var = pow(true, true)', [ + 'Argument of [pow] must be [double], found value [true] type [boolean]', + 'Argument of [pow] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where pow(doubleField, doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where pow(booleanField, booleanField) > 0', [ + 'Argument of [pow] must be [double], found value [booleanField] type [boolean]', + 'Argument of [pow] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where pow(doubleField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(doubleField, longField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(doubleField, unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(integerField, doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(integerField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(integerField, longField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(integerField, unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(longField, doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(longField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(longField, longField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(longField, unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(unsignedLongField, doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(unsignedLongField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where pow(unsignedLongField, longField) > 0', []); + testErrorsAndWarnings( + 'from a_index | where pow(unsignedLongField, unsignedLongField) > 0', + [] + ); + testErrorsAndWarnings('from a_index | eval var = pow(doubleField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval pow(doubleField, doubleField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = pow(to_double(booleanField), to_double(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval pow(booleanField, booleanField)', [ + 'Argument of [pow] must be [double], found value [booleanField] type [boolean]', + 'Argument of [pow] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = pow(doubleField, integerField)', []); + testErrorsAndWarnings('from a_index | eval pow(doubleField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = pow(to_double(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = pow(doubleField, longField)', []); + testErrorsAndWarnings('from a_index | eval pow(doubleField, longField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = pow(to_double(booleanField), longField)', + [] + ); + testErrorsAndWarnings('from a_index | eval var = pow(doubleField, unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval pow(doubleField, unsignedLongField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = pow(to_double(booleanField), unsignedLongField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = pow(integerField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval pow(integerField, doubleField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = pow(to_integer(booleanField), to_double(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = pow(integerField, integerField)', []); + testErrorsAndWarnings('from a_index | eval pow(integerField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = pow(to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = pow(integerField, longField)', []); + testErrorsAndWarnings('from a_index | eval pow(integerField, longField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = pow(to_integer(booleanField), longField)', + [] + ); + testErrorsAndWarnings('from a_index | eval var = pow(integerField, unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval pow(integerField, unsignedLongField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = pow(to_integer(booleanField), unsignedLongField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = pow(longField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval pow(longField, doubleField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = pow(longField, to_double(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = pow(longField, integerField)', []); + testErrorsAndWarnings('from a_index | eval pow(longField, integerField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = pow(longField, to_integer(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = pow(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval pow(longField, longField)', []); + testErrorsAndWarnings('from a_index | eval var = pow(longField, unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval pow(longField, unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = pow(unsignedLongField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval pow(unsignedLongField, doubleField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = pow(unsignedLongField, to_double(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = pow(unsignedLongField, integerField)', []); + testErrorsAndWarnings('from a_index | eval pow(unsignedLongField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = pow(unsignedLongField, to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = pow(unsignedLongField, longField)', []); + testErrorsAndWarnings('from a_index | eval pow(unsignedLongField, longField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = pow(unsignedLongField, unsignedLongField)', + [] + ); + testErrorsAndWarnings('from a_index | eval pow(unsignedLongField, unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval pow(doubleField, doubleField, extraArg)', [ + 'Error: [pow] function expects exactly 2 arguments, got 3.', + ]); + + testErrorsAndWarnings('from a_index | sort pow(doubleField, doubleField)', []); + testErrorsAndWarnings('from a_index | eval pow(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval pow(nullVar, nullVar)', []); + }); + + describe('repeat', () => { + testErrorsAndWarnings('row var = repeat("a", 5)', []); + testErrorsAndWarnings('row repeat("a", 5)', []); + testErrorsAndWarnings('row var = repeat(to_string(true), to_integer(true))', []); + + testErrorsAndWarnings('row var = repeat(true, true)', [ + 'Argument of [repeat] must be [keyword], found value [true] type [boolean]', + 'Argument of [repeat] must be [integer], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = repeat(keywordField, integerField)', []); + testErrorsAndWarnings('from a_index | eval repeat(keywordField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = repeat(to_string(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval repeat(booleanField, booleanField)', [ + 'Argument of [repeat] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [repeat] must be [integer], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = repeat(textField, integerField)', []); + testErrorsAndWarnings('from a_index | eval repeat(textField, integerField)', []); + + testErrorsAndWarnings('from a_index | eval repeat(keywordField, integerField, extraArg)', [ + 'Error: [repeat] function expects exactly 2 arguments, got 3.', + ]); + + testErrorsAndWarnings('from a_index | sort repeat(keywordField, integerField)', []); + testErrorsAndWarnings('from a_index | eval repeat(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval repeat(nullVar, nullVar)', []); + }); + + describe('replace', () => { + testErrorsAndWarnings('row var = replace("a", "a", "a")', []); + testErrorsAndWarnings('row replace("a", "a", "a")', []); + 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 [keyword], found value [true] type [boolean]', + 'Argument of [replace] must be [keyword], found value [true] type [boolean]', + 'Argument of [replace] must be [keyword], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings( + 'from a_index | eval var = replace(keywordField, keywordField, keywordField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval replace(keywordField, keywordField, keywordField)', + [] + ); + + 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 [keyword], found value [booleanField] type [boolean]', + 'Argument of [replace] must be [keyword], found value [booleanField] type [boolean]', + 'Argument of [replace] must be [keyword], found value [booleanField] type [boolean]', + ] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = replace(keywordField, keywordField, textField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval replace(keywordField, keywordField, textField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = replace(keywordField, textField, keywordField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval replace(keywordField, textField, keywordField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = replace(keywordField, textField, textField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval replace(keywordField, textField, textField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = replace(textField, keywordField, keywordField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval replace(textField, keywordField, keywordField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = replace(textField, keywordField, textField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval replace(textField, keywordField, textField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = replace(textField, textField, keywordField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval replace(textField, textField, keywordField)', + [] + ); + testErrorsAndWarnings( + 'from a_index | eval var = replace(textField, textField, textField)', + [] + ); + testErrorsAndWarnings('from a_index | eval replace(textField, textField, textField)', []); + + testErrorsAndWarnings( + 'from a_index | eval replace(keywordField, keywordField, keywordField, extraArg)', + ['Error: [replace] function expects exactly 3 arguments, got 4.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort replace(keywordField, keywordField, keywordField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval replace(null, null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval replace(nullVar, nullVar, nullVar)', []); + }); + + describe('right', () => { + testErrorsAndWarnings('row var = right("a", 5)', []); + testErrorsAndWarnings('row right("a", 5)', []); + testErrorsAndWarnings('row var = right(to_string(true), to_integer(true))', []); + + testErrorsAndWarnings('row var = right(true, true)', [ + 'Argument of [right] must be [keyword], found value [true] type [boolean]', + 'Argument of [right] must be [integer], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = right(keywordField, integerField)', []); + testErrorsAndWarnings('from a_index | eval right(keywordField, integerField)', []); + + 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 [keyword], found value [booleanField] type [boolean]', + 'Argument of [right] must be [integer], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = right(textField, integerField)', []); + testErrorsAndWarnings('from a_index | eval right(textField, integerField)', []); + + testErrorsAndWarnings('from a_index | eval right(keywordField, integerField, extraArg)', [ + 'Error: [right] function expects exactly 2 arguments, got 3.', + ]); + + testErrorsAndWarnings('from a_index | sort right(keywordField, integerField)', []); + testErrorsAndWarnings('from a_index | eval right(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval right(nullVar, nullVar)', []); + }); + + describe('round', () => { + testErrorsAndWarnings('row var = round(5.5)', []); + testErrorsAndWarnings('row round(5.5)', []); + testErrorsAndWarnings('row var = round(to_double(true))', []); + testErrorsAndWarnings('row var = round(5.5, 5)', []); + testErrorsAndWarnings('row round(5.5, 5)', []); + testErrorsAndWarnings('row var = round(to_double(true), to_integer(true))', []); + testErrorsAndWarnings('row var = round(5)', []); + testErrorsAndWarnings('row round(5)', []); + testErrorsAndWarnings('row var = round(to_integer(true))', []); + testErrorsAndWarnings('row var = round(5, 5)', []); + testErrorsAndWarnings('row round(5, 5)', []); + testErrorsAndWarnings('row var = round(to_integer(true), to_integer(true))', []); + testErrorsAndWarnings('row var = round(5, to_integer(true))', []); + + testErrorsAndWarnings('row var = round(true, true)', [ + 'Argument of [round] must be [double], found value [true] type [boolean]', + 'Argument of [round] must be [integer], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where round(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where round(booleanField) > 0', [ + 'Argument of [round] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where round(doubleField, integerField) > 0', []); + + testErrorsAndWarnings('from a_index | where round(booleanField, booleanField) > 0', [ + 'Argument of [round] must be [double], found value [booleanField] type [boolean]', + 'Argument of [round] must be [integer], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where round(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where round(integerField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where round(longField) > 0', []); + testErrorsAndWarnings('from a_index | where round(longField, integerField) > 0', []); + testErrorsAndWarnings('from a_index | where round(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = round(doubleField)', []); + testErrorsAndWarnings('from a_index | eval round(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = round(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval round(booleanField)', [ + 'Argument of [round] must be [double], 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(doubleField, integerField)', []); + testErrorsAndWarnings('from a_index | eval round(doubleField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = round(to_double(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval round(booleanField, booleanField)', [ + 'Argument of [round] must be [double], found value [booleanField] type [boolean]', + 'Argument of [round] must be [integer], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = round(integerField)', []); + testErrorsAndWarnings('from a_index | eval round(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = round(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = round(integerField, integerField)', []); + testErrorsAndWarnings('from a_index | eval round(integerField, integerField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = round(to_integer(booleanField), to_integer(booleanField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval var = round(longField)', []); + testErrorsAndWarnings('from a_index | eval round(longField)', []); + testErrorsAndWarnings('from a_index | eval var = round(longField, integerField)', []); + testErrorsAndWarnings('from a_index | eval round(longField, integerField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = round(longField, to_integer(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = round(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval round(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval round(doubleField, integerField, extraArg)', [ + 'Error: [round] function expects no more than 2 arguments, got 3.', + ]); + + testErrorsAndWarnings('from a_index | sort round(doubleField)', []); + testErrorsAndWarnings('from a_index | eval round(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval round(nullVar, nullVar)', []); + }); + + describe('rtrim', () => { + testErrorsAndWarnings('row var = rtrim("a")', []); + testErrorsAndWarnings('row rtrim("a")', []); + testErrorsAndWarnings('row var = rtrim(to_string(true))', []); + + testErrorsAndWarnings('row var = rtrim(true)', [ + 'Argument of [rtrim] must be [keyword], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = rtrim(keywordField)', []); + testErrorsAndWarnings('from a_index | eval rtrim(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = rtrim(to_string(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval rtrim(booleanField)', [ + 'Argument of [rtrim] must be [keyword], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = rtrim(*)', [ + 'Using wildcards (*) in rtrim is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = rtrim(textField)', []); + testErrorsAndWarnings('from a_index | eval rtrim(textField)', []); + + testErrorsAndWarnings('from a_index | eval rtrim(keywordField, extraArg)', [ + 'Error: [rtrim] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort rtrim(keywordField)', []); + testErrorsAndWarnings('from a_index | eval rtrim(null)', []); + testErrorsAndWarnings('row nullVar = null | eval rtrim(nullVar)', []); + }); + + describe('signum', () => { + testErrorsAndWarnings('row var = signum(5.5)', []); + testErrorsAndWarnings('row signum(5.5)', []); + testErrorsAndWarnings('row var = signum(to_double(true))', []); + testErrorsAndWarnings('row var = signum(5)', []); + testErrorsAndWarnings('row signum(5)', []); + testErrorsAndWarnings('row var = signum(to_integer(true))', []); + + testErrorsAndWarnings('row var = signum(true)', [ + 'Argument of [signum] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where signum(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where signum(booleanField) > 0', [ + 'Argument of [signum] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where signum(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where signum(longField) > 0', []); + testErrorsAndWarnings('from a_index | where signum(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = signum(doubleField)', []); + testErrorsAndWarnings('from a_index | eval signum(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = signum(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval signum(booleanField)', [ + 'Argument of [signum] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = signum(*)', [ + 'Using wildcards (*) in signum is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = signum(integerField)', []); + testErrorsAndWarnings('from a_index | eval signum(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = signum(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = signum(longField)', []); + testErrorsAndWarnings('from a_index | eval signum(longField)', []); + testErrorsAndWarnings('from a_index | eval var = signum(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval signum(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval signum(doubleField, extraArg)', [ + 'Error: [signum] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort signum(doubleField)', []); + testErrorsAndWarnings('from a_index | eval signum(null)', []); + testErrorsAndWarnings('row nullVar = null | eval signum(nullVar)', []); + }); + + describe('sin', () => { + testErrorsAndWarnings('row var = sin(5.5)', []); + testErrorsAndWarnings('row sin(5.5)', []); + testErrorsAndWarnings('row var = sin(to_double(true))', []); + testErrorsAndWarnings('row var = sin(5)', []); + testErrorsAndWarnings('row sin(5)', []); + testErrorsAndWarnings('row var = sin(to_integer(true))', []); + + testErrorsAndWarnings('row var = sin(true)', [ + 'Argument of [sin] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where sin(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where sin(booleanField) > 0', [ + 'Argument of [sin] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where sin(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where sin(longField) > 0', []); + testErrorsAndWarnings('from a_index | where sin(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = sin(doubleField)', []); + testErrorsAndWarnings('from a_index | eval sin(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = sin(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval sin(booleanField)', [ + 'Argument of [sin] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = sin(*)', [ + 'Using wildcards (*) in sin is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = sin(integerField)', []); + testErrorsAndWarnings('from a_index | eval sin(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = sin(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = sin(longField)', []); + testErrorsAndWarnings('from a_index | eval sin(longField)', []); + testErrorsAndWarnings('from a_index | eval var = sin(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval sin(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval sin(doubleField, extraArg)', [ + 'Error: [sin] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort sin(doubleField)', []); + testErrorsAndWarnings('from a_index | eval sin(null)', []); + testErrorsAndWarnings('row nullVar = null | eval sin(nullVar)', []); + }); + + describe('sinh', () => { + testErrorsAndWarnings('row var = sinh(5.5)', []); + testErrorsAndWarnings('row sinh(5.5)', []); + testErrorsAndWarnings('row var = sinh(to_double(true))', []); + testErrorsAndWarnings('row var = sinh(5)', []); + testErrorsAndWarnings('row sinh(5)', []); + testErrorsAndWarnings('row var = sinh(to_integer(true))', []); + + testErrorsAndWarnings('row var = sinh(true)', [ + 'Argument of [sinh] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where sinh(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where sinh(booleanField) > 0', [ + 'Argument of [sinh] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where sinh(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where sinh(longField) > 0', []); + testErrorsAndWarnings('from a_index | where sinh(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = sinh(doubleField)', []); + testErrorsAndWarnings('from a_index | eval sinh(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = sinh(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval sinh(booleanField)', [ + 'Argument of [sinh] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = sinh(*)', [ + 'Using wildcards (*) in sinh is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = sinh(integerField)', []); + testErrorsAndWarnings('from a_index | eval sinh(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = sinh(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = sinh(longField)', []); + testErrorsAndWarnings('from a_index | eval sinh(longField)', []); + testErrorsAndWarnings('from a_index | eval var = sinh(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval sinh(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval sinh(doubleField, extraArg)', [ + 'Error: [sinh] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort sinh(doubleField)', []); + testErrorsAndWarnings('from a_index | eval sinh(null)', []); + testErrorsAndWarnings('row nullVar = null | eval sinh(nullVar)', []); + }); + + describe('split', () => { + testErrorsAndWarnings('row var = split("a", "a")', []); + testErrorsAndWarnings('row split("a", "a")', []); + testErrorsAndWarnings('row var = split(to_string(true), to_string(true))', []); + + testErrorsAndWarnings('row var = split(true, true)', [ + 'Argument of [split] must be [keyword], found value [true] type [boolean]', + 'Argument of [split] must be [keyword], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = split(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval split(keywordField, keywordField)', []); + + 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 [keyword], found value [booleanField] type [boolean]', + 'Argument of [split] must be [keyword], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = split(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval split(keywordField, textField)', []); + testErrorsAndWarnings('from a_index | eval var = split(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval split(textField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = split(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval split(textField, textField)', []); + + testErrorsAndWarnings('from a_index | eval split(keywordField, keywordField, extraArg)', [ + 'Error: [split] function expects exactly 2 arguments, got 3.', + ]); + + testErrorsAndWarnings('from a_index | sort split(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval split(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval split(nullVar, nullVar)', []); + }); + + describe('sqrt', () => { + testErrorsAndWarnings('row var = sqrt(5.5)', []); + testErrorsAndWarnings('row sqrt(5.5)', []); + testErrorsAndWarnings('row var = sqrt(to_double(true))', []); + testErrorsAndWarnings('row var = sqrt(5)', []); + testErrorsAndWarnings('row sqrt(5)', []); + testErrorsAndWarnings('row var = sqrt(to_integer(true))', []); + + testErrorsAndWarnings('row var = sqrt(true)', [ + 'Argument of [sqrt] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where sqrt(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where sqrt(booleanField) > 0', [ + 'Argument of [sqrt] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where sqrt(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where sqrt(longField) > 0', []); + testErrorsAndWarnings('from a_index | where sqrt(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = sqrt(doubleField)', []); + testErrorsAndWarnings('from a_index | eval sqrt(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = sqrt(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval sqrt(booleanField)', [ + 'Argument of [sqrt] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = sqrt(*)', [ + 'Using wildcards (*) in sqrt is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = sqrt(integerField)', []); + testErrorsAndWarnings('from a_index | eval sqrt(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = sqrt(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = sqrt(longField)', []); + testErrorsAndWarnings('from a_index | eval sqrt(longField)', []); + testErrorsAndWarnings('from a_index | eval var = sqrt(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval sqrt(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval sqrt(doubleField, extraArg)', [ + 'Error: [sqrt] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort sqrt(doubleField)', []); + testErrorsAndWarnings('from a_index | eval sqrt(null)', []); + testErrorsAndWarnings('row nullVar = null | eval sqrt(nullVar)', []); + }); + + describe('st_contains', () => { + testErrorsAndWarnings('row var = st_contains(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row st_contains(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + + testErrorsAndWarnings( + 'row var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_contains(cartesianPointField, to_cartesianshape("POINT (30 10)"))', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row st_contains(cartesianPointField, to_cartesianshape("POINT (30 10)"))', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_contains(to_cartesianshape("POINT (30 10)"), cartesianPointField)', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row st_contains(to_cartesianshape("POINT (30 10)"), cartesianPointField)', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_contains(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row st_contains(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings('row var = st_contains(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row st_contains(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_contains(to_geopoint(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + testErrorsAndWarnings( + 'row var = st_contains(geoPointField, to_geoshape("POINT (30 10)"))', + ['Unknown column [geoPointField]'] + ); + testErrorsAndWarnings('row st_contains(geoPointField, to_geoshape("POINT (30 10)"))', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_contains(to_geopoint(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + testErrorsAndWarnings( + 'row var = st_contains(to_geoshape("POINT (30 10)"), geoPointField)', + ['Unknown column [geoPointField]'] + ); + testErrorsAndWarnings('row st_contains(to_geoshape("POINT (30 10)"), geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_contains(to_geoshape(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_contains(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row st_contains(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row var = st_contains(to_geoshape(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + + 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 var = st_contains(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_contains(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + '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(cartesianPointField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_contains(cartesianPointField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + [] + ); + + 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(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(cartesianShapeField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_contains(cartesianShapeField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(geoPointField, geoPointField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_contains(geoPointField, geoPointField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geopoint(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(geoPointField, geoShapeField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_contains(geoPointField, geoShapeField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geoshape(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(geoShapeField, geoPointField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_contains(geoShapeField, geoPointField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geopoint(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(geoShapeField, geoShapeField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_contains(geoShapeField, geoShapeField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geoshape(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_contains(cartesianPointField, cartesianPointField, extraArg)', + ['Error: [st_contains] function expects exactly 2 arguments, got 3.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort st_contains(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval st_contains(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval st_contains(nullVar, nullVar)', []); + }); + + describe('st_disjoint', () => { + testErrorsAndWarnings('row var = st_disjoint(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row st_disjoint(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + + testErrorsAndWarnings( + 'row var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_disjoint(cartesianPointField, to_cartesianshape("POINT (30 10)"))', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row st_disjoint(cartesianPointField, to_cartesianshape("POINT (30 10)"))', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_disjoint(to_cartesianshape("POINT (30 10)"), cartesianPointField)', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row st_disjoint(to_cartesianshape("POINT (30 10)"), cartesianPointField)', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_disjoint(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row st_disjoint(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings('row var = st_disjoint(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row st_disjoint(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_disjoint(to_geopoint(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + testErrorsAndWarnings( + 'row var = st_disjoint(geoPointField, to_geoshape("POINT (30 10)"))', + ['Unknown column [geoPointField]'] + ); + testErrorsAndWarnings('row st_disjoint(geoPointField, to_geoshape("POINT (30 10)"))', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_disjoint(to_geopoint(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + testErrorsAndWarnings( + 'row var = st_disjoint(to_geoshape("POINT (30 10)"), geoPointField)', + ['Unknown column [geoPointField]'] + ); + testErrorsAndWarnings('row st_disjoint(to_geoshape("POINT (30 10)"), geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_disjoint(to_geoshape(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_disjoint(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row st_disjoint(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row var = st_disjoint(to_geoshape(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + + 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(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_disjoint(cartesianPointField, cartesianPointField)', + [] + ); + + 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(cartesianPointField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(cartesianShapeField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_disjoint(cartesianShapeField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(cartesianShapeField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(geoPointField, geoPointField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_disjoint(geoPointField, geoPointField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geopoint(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(geoPointField, geoShapeField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_disjoint(geoPointField, geoShapeField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geoshape(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(geoShapeField, geoPointField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_disjoint(geoShapeField, geoPointField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geopoint(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(geoShapeField, geoShapeField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_disjoint(geoShapeField, geoShapeField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geoshape(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_disjoint(cartesianPointField, cartesianPointField, extraArg)', + ['Error: [st_disjoint] function expects exactly 2 arguments, got 3.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort st_disjoint(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval st_disjoint(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval st_disjoint(nullVar, nullVar)', []); + }); + + describe('st_distance', () => { + testErrorsAndWarnings('row var = st_distance(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row st_distance(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + + testErrorsAndWarnings( + 'row var = st_distance(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings('row var = st_distance(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row st_distance(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_distance(to_geopoint(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + + testErrorsAndWarnings('row var = st_distance(true, true)', [ + 'Argument of [st_distance] must be [cartesian_point], found value [true] type [boolean]', + 'Argument of [st_distance] must be [cartesian_point], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings( + 'from a_index | eval var = st_distance(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_distance(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_distance(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + [] + ); + + testErrorsAndWarnings('from a_index | eval st_distance(booleanField, booleanField)', [ + 'Argument of [st_distance] must be [cartesian_point], found value [booleanField] type [boolean]', + 'Argument of [st_distance] must be [cartesian_point], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings( + 'from a_index | eval var = st_distance(geoPointField, geoPointField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_distance(geoPointField, geoPointField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_distance(to_geopoint(geoPointField), to_geopoint(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_distance(cartesianPointField, cartesianPointField, extraArg)', + ['Error: [st_distance] function expects exactly 2 arguments, got 3.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort st_distance(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval st_distance(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval st_distance(nullVar, nullVar)', []); + }); + + describe('st_intersects', () => { + testErrorsAndWarnings('row var = st_intersects(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row st_intersects(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + + testErrorsAndWarnings( + 'row var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_intersects(cartesianPointField, to_cartesianshape("POINT (30 10)"))', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row st_intersects(cartesianPointField, to_cartesianshape("POINT (30 10)"))', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_intersects(to_cartesianshape("POINT (30 10)"), cartesianPointField)', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row st_intersects(to_cartesianshape("POINT (30 10)"), cartesianPointField)', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_intersects(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row st_intersects(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings('row var = st_intersects(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row st_intersects(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_intersects(to_geopoint(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + testErrorsAndWarnings( + 'row var = st_intersects(geoPointField, to_geoshape("POINT (30 10)"))', + ['Unknown column [geoPointField]'] + ); + testErrorsAndWarnings('row st_intersects(geoPointField, to_geoshape("POINT (30 10)"))', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_intersects(to_geopoint(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + testErrorsAndWarnings( + 'row var = st_intersects(to_geoshape("POINT (30 10)"), geoPointField)', + ['Unknown column [geoPointField]'] + ); + testErrorsAndWarnings('row st_intersects(to_geoshape("POINT (30 10)"), geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_intersects(to_geoshape(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_intersects(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row st_intersects(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row var = st_intersects(to_geoshape(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + + 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(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_intersects(cartesianPointField, cartesianPointField)', + [] + ); + + 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(cartesianPointField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_intersects(cartesianPointField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(cartesianShapeField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_intersects(cartesianShapeField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(cartesianShapeField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(geoPointField, geoPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_intersects(geoPointField, geoPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geopoint(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(geoPointField, geoShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_intersects(geoPointField, geoShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geoshape(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(geoShapeField, geoPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_intersects(geoShapeField, geoPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geopoint(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(geoShapeField, geoShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_intersects(geoShapeField, geoShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geoshape(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_intersects(cartesianPointField, cartesianPointField, extraArg)', + ['Error: [st_intersects] function expects exactly 2 arguments, got 3.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort st_intersects(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval st_intersects(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval st_intersects(nullVar, nullVar)', []); + }); + + describe('st_within', () => { + testErrorsAndWarnings('row var = st_within(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row st_within(cartesianPointField, cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + 'Unknown column [cartesianPointField]', + ]); + + testErrorsAndWarnings( + 'row var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_within(cartesianPointField, to_cartesianshape("POINT (30 10)"))', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row st_within(cartesianPointField, to_cartesianshape("POINT (30 10)"))', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_within(to_cartesianshape("POINT (30 10)"), cartesianPointField)', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row st_within(to_cartesianshape("POINT (30 10)"), cartesianPointField)', + ['Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_within(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_within(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row st_within(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row var = st_within(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + ['Unknown column [cartesianPointField]', 'Unknown column [cartesianPointField]'] + ); + + testErrorsAndWarnings('row var = st_within(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row st_within(geoPointField, geoPointField)', [ + 'Unknown column [geoPointField]', + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_within(to_geopoint(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + testErrorsAndWarnings('row var = st_within(geoPointField, to_geoshape("POINT (30 10)"))', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row st_within(geoPointField, to_geoshape("POINT (30 10)"))', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_within(to_geopoint(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + testErrorsAndWarnings('row var = st_within(to_geoshape("POINT (30 10)"), geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row st_within(to_geoshape("POINT (30 10)"), geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings( + 'row var = st_within(to_geoshape(geoPointField), to_geopoint(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + + testErrorsAndWarnings( + 'row var = st_within(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row st_within(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + [] + ); + + testErrorsAndWarnings( + 'row var = st_within(to_geoshape(geoPointField), to_geoshape(geoPointField))', + ['Unknown column [geoPointField]', 'Unknown column [geoPointField]'] + ); + + 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(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_within(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + '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 var = st_within(cartesianPointField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_within(cartesianPointField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_within(cartesianShapeField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_within(cartesianShapeField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_within(cartesianShapeField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_within(cartesianShapeField, cartesianShapeField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_within(geoPointField, geoPointField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_within(geoPointField, geoPointField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_within(to_geopoint(geoPointField), to_geopoint(geoPointField))', + [] + ); + + 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(geoPointField), to_geoshape(geoPointField))', + [] + ); + + 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(to_geoshape(geoPointField), to_geopoint(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = st_within(geoShapeField, geoShapeField)', + [] + ); + testErrorsAndWarnings('from a_index | eval st_within(geoShapeField, geoShapeField)', []); + + testErrorsAndWarnings( + 'from a_index | eval var = st_within(to_geoshape(geoPointField), to_geoshape(geoPointField))', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval st_within(cartesianPointField, cartesianPointField, extraArg)', + ['Error: [st_within] function expects exactly 2 arguments, got 3.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort st_within(cartesianPointField, cartesianPointField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval st_within(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval st_within(nullVar, nullVar)', []); + }); + + describe('st_x', () => { + testErrorsAndWarnings('row var = st_x(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row st_x(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = st_x(to_cartesianpoint(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = st_x(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row st_x(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row var = st_x(to_geopoint(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + + 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(cartesianPointField)', []); + testErrorsAndWarnings('from a_index | eval st_x(cartesianPointField)', []); + + 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(*)', [ + 'Using wildcards (*) in st_x is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = st_x(geoPointField)', []); + testErrorsAndWarnings('from a_index | eval st_x(geoPointField)', []); + testErrorsAndWarnings('from a_index | eval var = st_x(to_geopoint(geoPointField))', []); + + testErrorsAndWarnings('from a_index | eval st_x(cartesianPointField, extraArg)', [ + 'Error: [st_x] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort st_x(cartesianPointField)', []); + testErrorsAndWarnings('from a_index | eval st_x(null)', []); + testErrorsAndWarnings('row nullVar = null | eval st_x(nullVar)', []); + }); + + describe('st_y', () => { + testErrorsAndWarnings('row var = st_y(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row st_y(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = st_y(to_cartesianpoint(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = st_y(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row st_y(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row var = st_y(to_geopoint(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + + 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(cartesianPointField)', []); + testErrorsAndWarnings('from a_index | eval st_y(cartesianPointField)', []); + + 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(*)', [ + 'Using wildcards (*) in st_y is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = st_y(geoPointField)', []); + testErrorsAndWarnings('from a_index | eval st_y(geoPointField)', []); + testErrorsAndWarnings('from a_index | eval var = st_y(to_geopoint(geoPointField))', []); + + testErrorsAndWarnings('from a_index | eval st_y(cartesianPointField, extraArg)', [ + 'Error: [st_y] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort st_y(cartesianPointField)', []); + testErrorsAndWarnings('from a_index | eval st_y(null)', []); + testErrorsAndWarnings('row nullVar = null | eval st_y(nullVar)', []); + }); + + describe('starts_with', () => { + testErrorsAndWarnings('row var = starts_with("a", "a")', []); + testErrorsAndWarnings('row starts_with("a", "a")', []); + testErrorsAndWarnings('row var = starts_with(to_string(true), to_string(true))', []); + + testErrorsAndWarnings('row var = starts_with(true, true)', [ + 'Argument of [starts_with] must be [keyword], found value [true] type [boolean]', + 'Argument of [starts_with] must be [keyword], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings( + 'from a_index | eval var = starts_with(keywordField, keywordField)', + [] + ); + testErrorsAndWarnings('from a_index | eval starts_with(keywordField, keywordField)', []); + + 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 [keyword], found value [booleanField] type [boolean]', + 'Argument of [starts_with] must be [keyword], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = starts_with(textField, textField)', []); + testErrorsAndWarnings('from a_index | eval starts_with(textField, textField)', []); + + testErrorsAndWarnings( + 'from a_index | eval starts_with(keywordField, keywordField, extraArg)', + ['Error: [starts_with] function expects exactly 2 arguments, got 3.'] + ); + + testErrorsAndWarnings('from a_index | sort starts_with(keywordField, keywordField)', []); + testErrorsAndWarnings('from a_index | eval starts_with(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval starts_with(nullVar, nullVar)', []); + }); + + describe('substring', () => { + testErrorsAndWarnings('row var = substring("a", 5, 5)', []); + testErrorsAndWarnings('row substring("a", 5, 5)', []); + + 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 [keyword], found value [true] type [boolean]', + 'Argument of [substring] must be [integer], found value [true] type [boolean]', + 'Argument of [substring] must be [integer], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings( + 'from a_index | eval var = substring(keywordField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval substring(keywordField, integerField, integerField)', + [] + ); + + 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 [keyword], found value [booleanField] type [boolean]', + 'Argument of [substring] must be [integer], found value [booleanField] type [boolean]', + 'Argument of [substring] must be [integer], found value [booleanField] type [boolean]', + ] + ); + + testErrorsAndWarnings( + 'from a_index | eval var = substring(textField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval substring(textField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings( + 'from a_index | eval substring(keywordField, integerField, integerField, extraArg)', + ['Error: [substring] function expects no more than 3 arguments, got 4.'] + ); + + testErrorsAndWarnings( + 'from a_index | sort substring(keywordField, integerField, integerField)', + [] + ); + + testErrorsAndWarnings('from a_index | eval substring(null, null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval substring(nullVar, nullVar, nullVar)', []); + }); + + describe('tan', () => { + testErrorsAndWarnings('row var = tan(5.5)', []); + testErrorsAndWarnings('row tan(5.5)', []); + testErrorsAndWarnings('row var = tan(to_double(true))', []); + testErrorsAndWarnings('row var = tan(5)', []); + testErrorsAndWarnings('row tan(5)', []); + testErrorsAndWarnings('row var = tan(to_integer(true))', []); + + testErrorsAndWarnings('row var = tan(true)', [ + 'Argument of [tan] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where tan(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where tan(booleanField) > 0', [ + 'Argument of [tan] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where tan(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where tan(longField) > 0', []); + testErrorsAndWarnings('from a_index | where tan(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = tan(doubleField)', []); + testErrorsAndWarnings('from a_index | eval tan(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = tan(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval tan(booleanField)', [ + 'Argument of [tan] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = tan(*)', [ + 'Using wildcards (*) in tan is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = tan(integerField)', []); + testErrorsAndWarnings('from a_index | eval tan(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = tan(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = tan(longField)', []); + testErrorsAndWarnings('from a_index | eval tan(longField)', []); + testErrorsAndWarnings('from a_index | eval var = tan(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval tan(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval tan(doubleField, extraArg)', [ + 'Error: [tan] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort tan(doubleField)', []); + testErrorsAndWarnings('from a_index | eval tan(null)', []); + testErrorsAndWarnings('row nullVar = null | eval tan(nullVar)', []); + }); + + describe('tanh', () => { + testErrorsAndWarnings('row var = tanh(5.5)', []); + testErrorsAndWarnings('row tanh(5.5)', []); + testErrorsAndWarnings('row var = tanh(to_double(true))', []); + testErrorsAndWarnings('row var = tanh(5)', []); + testErrorsAndWarnings('row tanh(5)', []); + testErrorsAndWarnings('row var = tanh(to_integer(true))', []); + + testErrorsAndWarnings('row var = tanh(true)', [ + 'Argument of [tanh] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where tanh(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where tanh(booleanField) > 0', [ + 'Argument of [tanh] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where tanh(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where tanh(longField) > 0', []); + testErrorsAndWarnings('from a_index | where tanh(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = tanh(doubleField)', []); + testErrorsAndWarnings('from a_index | eval tanh(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = tanh(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval tanh(booleanField)', [ + 'Argument of [tanh] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = tanh(*)', [ + 'Using wildcards (*) in tanh is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = tanh(integerField)', []); + testErrorsAndWarnings('from a_index | eval tanh(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = tanh(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = tanh(longField)', []); + testErrorsAndWarnings('from a_index | eval tanh(longField)', []); + testErrorsAndWarnings('from a_index | eval var = tanh(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval tanh(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval tanh(doubleField, extraArg)', [ + 'Error: [tanh] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort tanh(doubleField)', []); + testErrorsAndWarnings('from a_index | eval tanh(null)', []); + testErrorsAndWarnings('row nullVar = null | eval tanh(nullVar)', []); + }); + + describe('tau', () => { + testErrorsAndWarnings('row var = tau()', []); + testErrorsAndWarnings('row tau()', []); + testErrorsAndWarnings('from a_index | where tau() > 0', []); + testErrorsAndWarnings('from a_index | eval var = tau()', []); + testErrorsAndWarnings('from a_index | eval tau()', []); + + testErrorsAndWarnings('from a_index | eval tau(extraArg)', [ + 'Error: [tau] function expects exactly 0 arguments, got 1.', + ]); + + testErrorsAndWarnings('from a_index | sort tau()', []); + testErrorsAndWarnings('row nullVar = null | eval tau()', []); + }); + + 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 [keyword], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_base64(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_base64(keywordField)', []); + 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 [keyword], 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 var = to_base64(textField)', []); + testErrorsAndWarnings('from a_index | eval to_base64(textField)', []); + + testErrorsAndWarnings('from a_index | eval to_base64(keywordField, extraArg)', [ + 'Error: [to_base64] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort to_base64(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_base64(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_base64(nullVar)', []); + }); + + describe('to_boolean', () => { + 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.5)', []); + testErrorsAndWarnings('row to_boolean(5.5)', []); + testErrorsAndWarnings('row var = to_bool(5.5)', []); + testErrorsAndWarnings('row var = to_boolean(to_double(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("a")', []); + testErrorsAndWarnings('row to_boolean("a")', []); + testErrorsAndWarnings('row var = to_bool("a")', []); + 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(*)', [ + 'Using wildcards (*) in to_boolean is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_boolean(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_boolean(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_bool(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_boolean(to_double(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_boolean(integerField)', []); + testErrorsAndWarnings('from a_index | eval to_boolean(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_bool(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_boolean(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_boolean(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_boolean(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_bool(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_boolean(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_boolean(longField)', []); + testErrorsAndWarnings('from a_index | eval to_boolean(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_bool(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_boolean(textField)', []); + testErrorsAndWarnings('from a_index | eval to_boolean(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_bool(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_boolean(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval to_boolean(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = to_bool(unsignedLongField)', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval to_boolean(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_boolean(nullVar)', []); + }); + + describe('to_cartesianpoint', () => { + testErrorsAndWarnings('row var = to_cartesianpoint(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row to_cartesianpoint(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings( + 'row var = to_cartesianpoint(to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]'] + ); + testErrorsAndWarnings('row var = to_cartesianpoint("a")', []); + testErrorsAndWarnings('row to_cartesianpoint("a")', []); + 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(*)', [ + 'Using wildcards (*) in to_cartesianpoint is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_cartesianpoint(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_cartesianpoint(keywordField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = to_cartesianpoint(to_string(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = to_cartesianpoint(textField)', []); + testErrorsAndWarnings('from a_index | eval to_cartesianpoint(textField)', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval to_cartesianpoint(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_cartesianpoint(nullVar)', []); + }); + + describe('to_cartesianshape', () => { + testErrorsAndWarnings('row var = to_cartesianshape(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row to_cartesianshape(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings( + 'row var = to_cartesianshape(to_cartesianpoint(cartesianPointField))', + ['Unknown column [cartesianPointField]'] + ); + 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(cartesianPointField))', + ['Unknown column [cartesianPointField]'] + ); + testErrorsAndWarnings('row var = to_cartesianshape("a")', []); + testErrorsAndWarnings('row to_cartesianshape("a")', []); + 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(*)', [ + 'Using wildcards (*) in to_cartesianshape is not allowed', + ]); + + 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_cartesianshape(keywordField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = to_cartesianshape(to_string(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = to_cartesianshape(textField)', []); + testErrorsAndWarnings('from a_index | eval to_cartesianshape(textField)', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval to_cartesianshape(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_cartesianshape(nullVar)', []); + }); + + describe('to_datetime', () => { + testErrorsAndWarnings('row var = to_datetime(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row to_datetime(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row var = to_dt(to_datetime("2021-01-01T00:00:00Z"))', []); + + testErrorsAndWarnings( + 'row var = to_datetime(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); + + testErrorsAndWarnings('row var = to_datetime(5.5)', []); + testErrorsAndWarnings('row to_datetime(5.5)', []); + testErrorsAndWarnings('row var = to_dt(5.5)', []); + testErrorsAndWarnings('row var = to_datetime(to_double(true))', []); + 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("a")', []); + testErrorsAndWarnings('row to_datetime("a")', []); + testErrorsAndWarnings('row var = to_dt("a")', []); + 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(*)', [ + 'Using wildcards (*) in to_datetime is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_datetime(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_datetime(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dt(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_datetime(to_double(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_datetime(integerField)', []); + testErrorsAndWarnings('from a_index | eval to_datetime(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dt(integerField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = to_datetime(to_integer(booleanField))', + [] + ); + testErrorsAndWarnings('from a_index | eval var = to_datetime(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_datetime(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dt(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_datetime(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_datetime(longField)', []); + testErrorsAndWarnings('from a_index | eval to_datetime(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dt(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_datetime(textField)', []); + testErrorsAndWarnings('from a_index | eval to_datetime(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dt(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_datetime(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval to_datetime(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dt(unsignedLongField)', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval to_datetime(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_datetime(nullVar)', []); + testErrorsAndWarnings('from a_index | eval to_datetime("2022")', []); + testErrorsAndWarnings('from a_index | eval to_datetime(concat("20", "22"))', []); + }); + + describe('to_degrees', () => { + testErrorsAndWarnings('row var = to_degrees(5.5)', []); + testErrorsAndWarnings('row to_degrees(5.5)', []); + testErrorsAndWarnings('row var = to_degrees(to_double(true))', []); + testErrorsAndWarnings('row var = to_degrees(5)', []); + testErrorsAndWarnings('row to_degrees(5)', []); + testErrorsAndWarnings('row var = to_degrees(to_integer(true))', []); + + testErrorsAndWarnings('row var = to_degrees(true)', [ + 'Argument of [to_degrees] must be [double], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where to_degrees(doubleField) > 0', []); + + testErrorsAndWarnings('from a_index | where to_degrees(booleanField) > 0', [ + 'Argument of [to_degrees] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | where to_degrees(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where to_degrees(longField) > 0', []); + testErrorsAndWarnings('from a_index | where to_degrees(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = to_degrees(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_degrees(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_degrees(to_double(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval to_degrees(booleanField)', [ + 'Argument of [to_degrees] must be [double], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_degrees(*)', [ + 'Using wildcards (*) in to_degrees is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_degrees(integerField)', []); + testErrorsAndWarnings('from a_index | eval to_degrees(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_degrees(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_degrees(longField)', []); + testErrorsAndWarnings('from a_index | eval to_degrees(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_degrees(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval to_degrees(unsignedLongField)', []); + + testErrorsAndWarnings('from a_index | eval to_degrees(doubleField, extraArg)', [ + 'Error: [to_degrees] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort to_degrees(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_degrees(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_degrees(nullVar)', []); + }); + + describe('to_double', () => { + 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.5)', []); + testErrorsAndWarnings('row to_double(5.5)', []); + testErrorsAndWarnings('row var = to_dbl(5.5)', []); + testErrorsAndWarnings('row var = to_double(5)', []); + testErrorsAndWarnings('row to_double(5)', []); + testErrorsAndWarnings('row var = to_dbl(5)', []); + testErrorsAndWarnings('row var = to_double(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row to_double(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row var = to_dbl(to_datetime("2021-01-01T00:00:00Z"))', []); + + testErrorsAndWarnings( + 'row var = to_double(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); + + testErrorsAndWarnings('row var = to_double(to_double(true))', []); + testErrorsAndWarnings('row var = to_double(to_integer(true))', []); + testErrorsAndWarnings('row var = to_double("a")', []); + testErrorsAndWarnings('row to_double("a")', []); + testErrorsAndWarnings('row var = to_dbl("a")', []); + 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(counterDoubleField) > 0', []); + testErrorsAndWarnings('from a_index | where to_double(counterIntegerField) > 0', []); + testErrorsAndWarnings('from a_index | where to_double(counterLongField) > 0', []); + testErrorsAndWarnings('from a_index | where to_double(dateField) > 0', []); + testErrorsAndWarnings('from a_index | where to_double(doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where to_double(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where to_double(keywordField) > 0', []); + testErrorsAndWarnings('from a_index | where to_double(longField) > 0', []); + testErrorsAndWarnings('from a_index | where to_double(textField) > 0', []); + testErrorsAndWarnings('from a_index | where to_double(unsignedLongField) > 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(*)', [ + 'Using wildcards (*) in to_double is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_double(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | eval to_double(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dbl(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_double(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | eval to_double(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dbl(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_double(counterLongField)', []); + testErrorsAndWarnings('from a_index | eval to_double(counterLongField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dbl(counterLongField)', []); + 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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_double(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dbl(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_double(to_double(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_double(integerField)', []); + testErrorsAndWarnings('from a_index | eval to_double(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dbl(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_double(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_double(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_double(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dbl(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_double(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_double(longField)', []); + testErrorsAndWarnings('from a_index | eval to_double(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dbl(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_double(textField)', []); + testErrorsAndWarnings('from a_index | eval to_double(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dbl(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_double(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval to_double(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = to_dbl(unsignedLongField)', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval to_double(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_double(nullVar)', []); + testErrorsAndWarnings('from a_index | eval to_double("2022")', []); + testErrorsAndWarnings('from a_index | eval to_double(concat("20", "22"))', []); + }); + + describe('to_geopoint', () => { + testErrorsAndWarnings('row var = to_geopoint(geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row to_geopoint(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row var = to_geopoint(to_geopoint(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row var = to_geopoint("a")', []); + testErrorsAndWarnings('row to_geopoint("a")', []); + 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(*)', [ + 'Using wildcards (*) in to_geopoint is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_geopoint(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_geopoint(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_geopoint(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_geopoint(textField)', []); + testErrorsAndWarnings('from a_index | eval to_geopoint(textField)', []); + + 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)', []); + testErrorsAndWarnings('from a_index | eval to_geopoint(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_geopoint(nullVar)', []); + }); + + describe('to_geoshape', () => { + testErrorsAndWarnings('row var = to_geoshape(geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row to_geoshape(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row var = to_geoshape(to_geopoint(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row var = to_geoshape("a")', []); + testErrorsAndWarnings('row to_geoshape("a")', []); + 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 var = mv_last(cartesianShapeField)', []); - testErrorsAndWarnings('from a_index | eval mv_last(cartesianShapeField)', []); + 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(*)', [ + 'Using wildcards (*) in to_geoshape is not allowed', + ]); + testErrorsAndWarnings('from a_index | eval var = to_geoshape(geoShapeField)', []); + testErrorsAndWarnings('from a_index | eval to_geoshape(geoShapeField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_last(to_cartesianshape(cartesianPointField))', + 'from a_index | eval var = to_geoshape(to_geoshape(geoPointField))', [] ); + testErrorsAndWarnings('from a_index | eval var = to_geoshape(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_geoshape(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_geoshape(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_geoshape(textField)', []); + testErrorsAndWarnings('from a_index | eval to_geoshape(textField)', []); - 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 | eval to_geoshape(geoPointField, extraArg)', [ + 'Error: [to_geoshape] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | sort mv_last(booleanField)', []); - testErrorsAndWarnings('from a_index | eval mv_last(null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_last(nullVar)', []); + testErrorsAndWarnings('from a_index | sort to_geoshape(geoPointField)', []); + testErrorsAndWarnings('from a_index | eval to_geoshape(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_geoshape(nullVar)', []); }); - describe('mv_max', () => { - testErrorsAndWarnings('row var = mv_max("a")', []); - testErrorsAndWarnings('row mv_max("a")', []); - testErrorsAndWarnings('from a_index | eval var = mv_max(stringField)', []); - testErrorsAndWarnings('from a_index | eval mv_max(stringField)', []); + describe('to_integer', () => { + 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_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row to_integer(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row var = to_int(to_datetime("2021-01-01T00:00:00Z"))', []); - testErrorsAndWarnings('from a_index | eval var = mv_max(*)', [ - 'Using wildcards (*) in mv_max is not allowed', - ]); + testErrorsAndWarnings( + 'row var = to_integer(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); - 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 = to_integer(5.5)', []); + testErrorsAndWarnings('row to_integer(5.5)', []); + testErrorsAndWarnings('row var = to_int(5.5)', []); + testErrorsAndWarnings('row var = to_integer(to_double(true))', []); + testErrorsAndWarnings('row var = to_integer(to_integer(true))', []); + testErrorsAndWarnings('row var = to_integer("a")', []); + testErrorsAndWarnings('row to_integer("a")', []); + testErrorsAndWarnings('row var = to_int("a")', []); + testErrorsAndWarnings('row var = to_integer(to_string(true))', []); - 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('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 mv_max(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where to_integer(booleanField) > 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 to_integer(cartesianPointField) > 0', [ + 'Argument of [to_integer] must be [boolean], found value [cartesianPointField] type [cartesian_point]', ]); - testErrorsAndWarnings('from a_index | where length(mv_max(stringField)) > 0', []); + testErrorsAndWarnings('from a_index | where to_integer(counterIntegerField) > 0', []); + testErrorsAndWarnings('from a_index | where to_integer(dateField) > 0', []); + testErrorsAndWarnings('from a_index | where to_integer(doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where to_integer(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where to_integer(keywordField) > 0', []); + testErrorsAndWarnings('from a_index | where to_integer(longField) > 0', []); + testErrorsAndWarnings('from a_index | where to_integer(textField) > 0', []); + testErrorsAndWarnings('from a_index | where to_integer(unsignedLongField) > 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 | where length(mv_max(cartesianPointField)) > 0', [ - 'Argument of [mv_max] must be [boolean], found value [cartesianPointField] type [cartesian_point]', + 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 = 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 = to_integer(*)', [ + 'Using wildcards (*) in to_integer is not allowed', ]); - 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 var = to_integer(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | eval to_integer(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_int(counterIntegerField)', []); + 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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_integer(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_int(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_integer(to_double(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_integer(integerField)', []); + testErrorsAndWarnings('from a_index | eval to_integer(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_int(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_integer(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_integer(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_integer(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_int(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_integer(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_integer(longField)', []); + testErrorsAndWarnings('from a_index | eval to_integer(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_int(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_integer(textField)', []); + testErrorsAndWarnings('from a_index | eval to_integer(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_int(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_integer(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval to_integer(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = to_int(unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval mv_max(booleanField, extraArg)', [ - 'Error: [mv_max] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval to_integer(booleanField, extraArg)', [ + 'Error: [to_integer] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | sort mv_max(booleanField)', []); - testErrorsAndWarnings('from a_index | eval mv_max(null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_max(nullVar)', []); + testErrorsAndWarnings('from a_index | sort to_integer(booleanField)', []); + testErrorsAndWarnings('from a_index | eval to_integer(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_integer(nullVar)', []); + testErrorsAndWarnings('from a_index | eval to_integer("2022")', []); + testErrorsAndWarnings('from a_index | eval to_integer(concat("20", "22"))', []); }); - describe('mv_median', () => { - testErrorsAndWarnings('row var = mv_median(5)', []); - testErrorsAndWarnings('row mv_median(5)', []); - testErrorsAndWarnings('row var = mv_median(to_integer("a"))', []); + describe('to_ip', () => { + 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("a")', []); + testErrorsAndWarnings('row to_ip("a")', []); + testErrorsAndWarnings('row var = to_ip(to_string(true))', []); - testErrorsAndWarnings('row var = mv_median("a")', [ - 'Argument of [mv_median] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('row var = to_ip(true)', [ + 'Argument of [to_ip] must be [ip], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where mv_median(numberField) > 0', []); + 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 | where mv_median(stringField) > 0', [ - 'Argument of [mv_median] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval var = to_ip(*)', [ + 'Using wildcards (*) in to_ip is not allowed', ]); - testErrorsAndWarnings('from a_index | eval var = mv_median(numberField)', []); - testErrorsAndWarnings('from a_index | eval mv_median(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = mv_median(to_integer(stringField))', []); + testErrorsAndWarnings('from a_index | eval var = to_ip(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_ip(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ip(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_ip(textField)', []); + testErrorsAndWarnings('from a_index | eval to_ip(textField)', []); - testErrorsAndWarnings('from a_index | eval mv_median(stringField)', [ - 'Argument of [mv_median] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval to_ip(ipField, extraArg)', [ + 'Error: [to_ip] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | eval mv_median(numberField, extraArg)', [ - 'Error: [mv_median] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | sort to_ip(ipField)', []); + testErrorsAndWarnings('from a_index | eval to_ip(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_ip(nullVar)', []); + }); + + describe('to_long', () => { + 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_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row to_long(to_datetime("2021-01-01T00:00:00Z"))', []); + + testErrorsAndWarnings( + 'row var = to_long(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); + + testErrorsAndWarnings('row var = to_long(5.5)', []); + testErrorsAndWarnings('row to_long(5.5)', []); + testErrorsAndWarnings('row var = to_long(to_double(true))', []); + testErrorsAndWarnings('row var = to_long(to_integer(true))', []); + testErrorsAndWarnings('row var = to_long("a")', []); + testErrorsAndWarnings('row to_long("a")', []); + 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 | eval var = mv_median(*)', [ - 'Using wildcards (*) in mv_median is not allowed', + 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 | sort mv_median(numberField)', []); - testErrorsAndWarnings('row var = mv_median(to_integer(true))', []); + testErrorsAndWarnings('from a_index | where to_long(counterIntegerField) > 0', []); + testErrorsAndWarnings('from a_index | where to_long(counterLongField) > 0', []); + testErrorsAndWarnings('from a_index | where to_long(dateField) > 0', []); + testErrorsAndWarnings('from a_index | where to_long(doubleField) > 0', []); + testErrorsAndWarnings('from a_index | where to_long(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where to_long(keywordField) > 0', []); + testErrorsAndWarnings('from a_index | where to_long(longField) > 0', []); + testErrorsAndWarnings('from a_index | where to_long(textField) > 0', []); + testErrorsAndWarnings('from a_index | where to_long(unsignedLongField) > 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('row var = mv_median(true)', [ - 'Argument of [mv_median] must be [number], found value [true] type [boolean]', + 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 | where mv_median(booleanField) > 0', [ - 'Argument of [mv_median] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval var = to_long(*)', [ + 'Using wildcards (*) in to_long is not allowed', ]); - testErrorsAndWarnings('from a_index | eval var = mv_median(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_long(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | eval to_long(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_long(counterLongField)', []); + testErrorsAndWarnings('from a_index | eval to_long(counterLongField)', []); + 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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_long(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_long(to_double(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_long(integerField)', []); + testErrorsAndWarnings('from a_index | eval to_long(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_long(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_long(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_long(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_long(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_long(longField)', []); + testErrorsAndWarnings('from a_index | eval to_long(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_long(textField)', []); + testErrorsAndWarnings('from a_index | eval to_long(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_long(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval to_long(unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval mv_median(booleanField)', [ - 'Argument of [mv_median] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval to_long(booleanField, extraArg)', [ + 'Error: [to_long] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | eval mv_median(null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_median(nullVar)', []); + + testErrorsAndWarnings('from a_index | sort to_long(booleanField)', []); + testErrorsAndWarnings('from a_index | eval to_long(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_long(nullVar)', []); + testErrorsAndWarnings('from a_index | eval to_long("2022")', []); + testErrorsAndWarnings('from a_index | eval to_long(concat("20", "22"))', []); }); - describe('mv_min', () => { - testErrorsAndWarnings('row var = mv_min("a")', []); - testErrorsAndWarnings('row mv_min("a")', []); - testErrorsAndWarnings('from a_index | eval var = mv_min(stringField)', []); - testErrorsAndWarnings('from a_index | eval mv_min(stringField)', []); + describe('to_lower', () => { + testErrorsAndWarnings('row var = to_lower("a")', []); + testErrorsAndWarnings('row to_lower("a")', []); + testErrorsAndWarnings('row var = to_lower(to_string(true))', []); - testErrorsAndWarnings('from a_index | eval var = mv_min(*)', [ - 'Using wildcards (*) in mv_min is not allowed', + testErrorsAndWarnings('row var = to_lower(true)', [ + 'Argument of [to_lower] must be [keyword], found value [true] type [boolean]', ]); - 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('from a_index | eval var = to_lower(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_lower(keywordField)', []); + 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 [keyword], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_lower(*)', [ + 'Using wildcards (*) in to_lower is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = to_lower(textField)', []); + testErrorsAndWarnings('from a_index | eval to_lower(textField)', []); + + testErrorsAndWarnings('from a_index | eval to_lower(keywordField, extraArg)', [ + 'Error: [to_lower] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort to_lower(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_lower(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_lower(nullVar)', []); + }); + + describe('to_radians', () => { + testErrorsAndWarnings('row var = to_radians(5.5)', []); + testErrorsAndWarnings('row to_radians(5.5)', []); + testErrorsAndWarnings('row var = to_radians(to_double(true))', []); + testErrorsAndWarnings('row var = to_radians(5)', []); + testErrorsAndWarnings('row to_radians(5)', []); + testErrorsAndWarnings('row var = to_radians(to_integer(true))', []); - 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('row var = to_radians(true)', [ + 'Argument of [to_radians] must be [double], found value [true] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where mv_min(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where to_radians(doubleField) > 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 to_radians(booleanField) > 0', [ + 'Argument of [to_radians] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | where length(mv_min(stringField)) > 0', []); + testErrorsAndWarnings('from a_index | where to_radians(integerField) > 0', []); + testErrorsAndWarnings('from a_index | where to_radians(longField) > 0', []); + testErrorsAndWarnings('from a_index | where to_radians(unsignedLongField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = to_radians(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_radians(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_radians(to_double(booleanField))', []); - 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 to_radians(booleanField)', [ + 'Argument of [to_radians] must be [double], found value [booleanField] type [boolean]', ]); - 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 = to_radians(*)', [ + 'Using wildcards (*) in to_radians is not allowed', ]); - 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 var = to_radians(integerField)', []); + testErrorsAndWarnings('from a_index | eval to_radians(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_radians(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_radians(longField)', []); + testErrorsAndWarnings('from a_index | eval to_radians(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_radians(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval to_radians(unsignedLongField)', []); - testErrorsAndWarnings('from a_index | eval mv_min(booleanField, extraArg)', [ - 'Error: [mv_min] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval to_radians(doubleField, extraArg)', [ + 'Error: [to_radians] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | sort mv_min(booleanField)', []); - testErrorsAndWarnings('from a_index | eval mv_min(null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_min(nullVar)', []); + testErrorsAndWarnings('from a_index | sort to_radians(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_radians(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_radians(nullVar)', []); }); - describe('mv_slice', () => { - testErrorsAndWarnings('row var = mv_slice("a", 5, 5)', []); - testErrorsAndWarnings('row mv_slice("a", 5, 5)', []); - + describe('to_unsigned_long', () => { + 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( - 'from a_index | eval var = mv_slice(stringField, numberField, numberField)', + 'row var = to_unsigned_long(to_datetime("2021-01-01T00:00:00Z"))', [] ); + testErrorsAndWarnings('row to_unsigned_long(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row var = to_ul(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row var = to_ulong(to_datetime("2021-01-01T00:00:00Z"))', []); testErrorsAndWarnings( - 'from a_index | eval mv_slice(stringField, numberField, numberField)', - [] - ); - testErrorsAndWarnings( - 'from a_index | sort mv_slice(stringField, numberField, numberField)', + 'row var = to_unsigned_long(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', [] ); - 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 = to_unsigned_long(5.5)', []); + testErrorsAndWarnings('row to_unsigned_long(5.5)', []); + testErrorsAndWarnings('row var = to_ul(5.5)', []); + testErrorsAndWarnings('row var = to_ulong(5.5)', []); + testErrorsAndWarnings('row var = to_unsigned_long(to_double(true))', []); + 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("a")', []); + testErrorsAndWarnings('row to_unsigned_long("a")', []); + testErrorsAndWarnings('row var = to_ul("a")', []); + testErrorsAndWarnings('row var = to_ulong("a")', []); + testErrorsAndWarnings('row var = to_unsigned_long(to_string(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 = 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( - 'row var = mv_slice(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_integer(true), to_integer(true))', - [] - ); + testErrorsAndWarnings('from a_index | where to_unsigned_long(booleanField) > 0', [ + 'Argument of [>] must be [double], found value [to_unsigned_long(booleanField)] type [unsigned_long]', + ]); - testErrorsAndWarnings('row var = mv_slice(to_cartesianshape("POINT (30 10)"), 5, 5)', []); - testErrorsAndWarnings('row mv_slice(to_cartesianshape("POINT (30 10)"), 5, 5)', []); + testErrorsAndWarnings('from a_index | where to_unsigned_long(cartesianPointField) > 0', [ + 'Argument of [to_unsigned_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]', + 'Argument of [>] must be [double], found value [to_unsigned_long(cartesianPointField)] type [unsigned_long]', + ]); + testErrorsAndWarnings('from a_index | where to_unsigned_long(dateField) > 0', [ + 'Argument of [>] must be [double], found value [to_unsigned_long(dateField)] type [unsigned_long]', + ]); + testErrorsAndWarnings('from a_index | where to_unsigned_long(doubleField) > 0', [ + 'Argument of [>] must be [double], found value [to_unsigned_long(doubleField)] type [unsigned_long]', + ]); + testErrorsAndWarnings('from a_index | where to_unsigned_long(integerField) > 0', [ + 'Argument of [>] must be [double], found value [to_unsigned_long(integerField)] type [unsigned_long]', + ]); + testErrorsAndWarnings('from a_index | where to_unsigned_long(keywordField) > 0', [ + 'Argument of [>] must be [double], found value [to_unsigned_long(keywordField)] type [unsigned_long]', + ]); + testErrorsAndWarnings('from a_index | where to_unsigned_long(longField) > 0', [ + 'Argument of [>] must be [double], found value [to_unsigned_long(longField)] type [unsigned_long]', + ]); + testErrorsAndWarnings('from a_index | where to_unsigned_long(textField) > 0', [ + 'Argument of [>] must be [double], found value [to_unsigned_long(textField)] type [unsigned_long]', + ]); + testErrorsAndWarnings('from a_index | where to_unsigned_long(unsignedLongField) > 0', [ + 'Argument of [>] must be [double], found value [to_unsigned_long(unsignedLongField)] type [unsigned_long]', + ]); + 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( - 'row var = mv_slice(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_integer(true), to_integer(true))', + 'from a_index | eval var = to_unsigned_long(to_boolean(booleanField))', [] ); - testErrorsAndWarnings('row var = mv_slice(now(), 5, 5)', []); - testErrorsAndWarnings('row mv_slice(now(), 5, 5)', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(cartesianPointField)', [ + 'Argument of [to_unsigned_long] must be [boolean], found value [cartesianPointField] type [cartesian_point]', + ]); - testErrorsAndWarnings( - 'row var = mv_slice(to_datetime(now()), to_integer(true), to_integer(true))', - [] - ); + testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(*)', [ + 'Using wildcards (*) in to_unsigned_long is not allowed', + ]); - testErrorsAndWarnings('row var = mv_slice(5, 5, 5)', []); - testErrorsAndWarnings('row mv_slice(5, 5, 5)', []); + 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( - 'row var = mv_slice(to_integer(true), to_integer(true), to_integer(true))', + 'from a_index | eval var = to_unsigned_long(to_datetime(dateField))', [] ); - testErrorsAndWarnings('row var = mv_slice(to_geopoint("POINT (30 10)"), 5, 5)', []); - testErrorsAndWarnings('row mv_slice(to_geopoint("POINT (30 10)"), 5, 5)', []); - + testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ul(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ulong(doubleField)', []); testErrorsAndWarnings( - 'row var = mv_slice(to_geopoint(to_geopoint("POINT (30 10)")), to_integer(true), to_integer(true))', + 'from a_index | eval var = to_unsigned_long(to_double(booleanField))', [] ); - - testErrorsAndWarnings('row var = mv_slice(to_geoshape("POINT (30 10)"), 5, 5)', []); - testErrorsAndWarnings('row mv_slice(to_geoshape("POINT (30 10)"), 5, 5)', []); - + testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(integerField)', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ul(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ulong(integerField)', []); testErrorsAndWarnings( - 'row var = mv_slice(to_geoshape(to_geopoint("POINT (30 10)")), to_integer(true), to_integer(true))', + 'from a_index | eval var = to_unsigned_long(to_integer(booleanField))', [] ); - - 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('from a_index | eval var = to_unsigned_long(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ul(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ulong(keywordField)', []); testErrorsAndWarnings( - 'row var = mv_slice(to_ip(to_ip("127.0.0.1")), to_integer(true), to_integer(true))', + 'from a_index | eval var = to_unsigned_long(to_string(booleanField))', [] ); + testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(longField)', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ul(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ulong(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(textField)', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ul(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ulong(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ul(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ulong(unsignedLongField)', []); - testErrorsAndWarnings( - 'row var = mv_slice(to_string(true), to_integer(true), to_integer(true))', - [] - ); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(booleanField, extraArg)', [ + 'Error: [to_unsigned_long] function expects exactly one argument, got 2.', + ]); - testErrorsAndWarnings('row var = mv_slice(to_version("1.0.0"), 5, 5)', []); - testErrorsAndWarnings('row mv_slice(to_version("1.0.0"), 5, 5)', []); + testErrorsAndWarnings('from a_index | sort to_unsigned_long(booleanField)', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_unsigned_long(nullVar)', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long("2022")', []); + testErrorsAndWarnings('from a_index | eval to_unsigned_long(concat("20", "22"))', []); + }); - testErrorsAndWarnings( - 'row var = mv_slice(to_version("a"), to_integer(true), to_integer(true))', - [] - ); + describe('to_upper', () => { + testErrorsAndWarnings('row var = to_upper("a")', []); + testErrorsAndWarnings('row to_upper("a")', []); + testErrorsAndWarnings('row var = to_upper(to_string(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('row var = to_upper(true)', [ + 'Argument of [to_upper] must be [keyword], found value [true] type [boolean]', ]); - testErrorsAndWarnings( - 'from a_index | where mv_slice(numberField, numberField, numberField) > 0', - [] - ); + testErrorsAndWarnings('from a_index | eval var = to_upper(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_upper(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_upper(to_string(booleanField))', []); - 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 | eval to_upper(booleanField)', [ + 'Argument of [to_upper] must be [keyword], found value [booleanField] type [boolean]', + ]); - testErrorsAndWarnings( - 'from a_index | where length(mv_slice(stringField, numberField, numberField)) > 0', - [] - ); + testErrorsAndWarnings('from a_index | eval var = to_upper(*)', [ + 'Using wildcards (*) in to_upper is not allowed', + ]); - 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 = to_upper(textField)', []); + testErrorsAndWarnings('from a_index | eval to_upper(textField)', []); - testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(booleanField, numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval to_upper(keywordField, extraArg)', [ + 'Error: [to_upper] function expects exactly one argument, got 2.', + ]); - testErrorsAndWarnings( - 'from a_index | eval mv_slice(booleanField, numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | sort to_upper(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_upper(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_upper(nullVar)', []); + }); - testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(to_boolean(booleanField), to_integer(booleanField), to_integer(booleanField))', - [] - ); + describe('to_version', () => { + testErrorsAndWarnings('row var = to_version("a")', []); + testErrorsAndWarnings('row to_version("a")', []); + testErrorsAndWarnings('row var = to_ver("a")', []); + 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( - '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('row var = to_version(true)', [ + 'Argument of [to_version] must be [keyword], found value [true] type [boolean]', + ]); - testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(cartesianPointField, numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval var = to_version(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_version(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ver(keywordField)', []); - testErrorsAndWarnings( - 'from a_index | eval mv_slice(cartesianPointField, numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval var = to_version(*)', [ + 'Using wildcards (*) in to_version is not allowed', + ]); - testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(to_cartesianpoint(cartesianPointField), to_integer(booleanField), to_integer(booleanField))', - [] - ); + testErrorsAndWarnings('from a_index | eval var = to_version(textField)', []); + testErrorsAndWarnings('from a_index | eval to_version(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_ver(textField)', []); + 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 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 to_version(keywordField, extraArg)', [ + 'Error: [to_version] function expects exactly one argument, got 2.', + ]); - testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(cartesianShapeField, numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | sort to_version(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_version(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_version(nullVar)', []); + }); - testErrorsAndWarnings( - 'from a_index | eval mv_slice(cartesianShapeField, numberField, numberField)', - [] - ); + describe('trim', () => { + testErrorsAndWarnings('row var = trim("a")', []); + testErrorsAndWarnings('row trim("a")', []); + testErrorsAndWarnings('row var = trim(to_string(true))', []); - testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(to_cartesianshape(cartesianPointField), to_integer(booleanField), to_integer(booleanField))', - [] - ); + testErrorsAndWarnings('row var = trim(true)', [ + 'Argument of [trim] must be [keyword], found value [true] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = trim(keywordField)', []); + testErrorsAndWarnings('from a_index | eval trim(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = trim(to_string(booleanField))', []); + + testErrorsAndWarnings('from a_index | eval trim(booleanField)', [ + 'Argument of [trim] must be [keyword], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | eval var = trim(*)', [ + 'Using wildcards (*) in trim is not allowed', + ]); + + testErrorsAndWarnings('from a_index | eval var = trim(textField)', []); + testErrorsAndWarnings('from a_index | eval trim(textField)', []); + + testErrorsAndWarnings('from a_index | eval trim(keywordField, extraArg)', [ + 'Error: [trim] function expects exactly one argument, got 2.', + ]); + + testErrorsAndWarnings('from a_index | sort trim(keywordField)', []); + testErrorsAndWarnings('from a_index | eval trim(null)', []); + testErrorsAndWarnings('row nullVar = null | eval trim(nullVar)', []); + }); + + describe('case', () => { + testErrorsAndWarnings('row var = case(true, "a")', []); + testErrorsAndWarnings('row case(true, "a")', []); + + 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]', + ]); + + testErrorsAndWarnings('from a_index | eval var = case(booleanField, textField)', []); + testErrorsAndWarnings('from a_index | eval case(booleanField, textField)', []); + testErrorsAndWarnings('from a_index | sort case(booleanField, textField)', []); + testErrorsAndWarnings('from a_index | eval case(null, null)', []); + testErrorsAndWarnings('row nullVar = null | eval case(nullVar, nullVar)', []); + }); - 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]', - ] - ); + describe('avg', () => { + testErrorsAndWarnings('from a_index | stats var = avg(integerField)', []); + testErrorsAndWarnings('from a_index | stats avg(integerField)', []); + testErrorsAndWarnings('from a_index | stats var = round(avg(integerField))', []); + testErrorsAndWarnings('from a_index | stats round(avg(integerField))', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(dateField, numberField, numberField)', + 'from a_index | stats var = round(avg(integerField)) + avg(integerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval mv_slice(dateField, numberField, numberField)', + 'from a_index | stats round(avg(integerField)) + avg(integerField)', [] ); - + testErrorsAndWarnings('from a_index | stats avg(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats var0 = avg(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), avg(doubleField / 2)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(to_datetime(dateField), to_integer(booleanField), to_integer(booleanField))', + 'from a_index | stats avg(doubleField), var0 = avg(doubleField / 2)', [] ); - - 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 | stats var0 = avg(integerField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), avg(integerField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(numberField, numberField, numberField)', + 'from a_index | stats avg(doubleField), var0 = avg(integerField)', [] ); - testErrorsAndWarnings( - 'from a_index | eval mv_slice(numberField, numberField, numberField)', + 'from a_index | stats avg(integerField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(to_integer(booleanField), to_integer(booleanField), to_integer(booleanField))', + 'from a_index | stats var0 = avg(integerField) by var1 = round(doubleField / 2)', [] ); 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]', - ] + 'from a_index | stats avg(doubleField), avg(integerField) by round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(geoPointField, numberField, numberField)', + 'from a_index | stats avg(doubleField), var0 = avg(integerField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval mv_slice(geoPointField, numberField, numberField)', + 'from a_index | stats avg(doubleField), avg(integerField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(to_geopoint(geoPointField), to_integer(booleanField), to_integer(booleanField))', + 'from a_index | stats avg(doubleField), var0 = avg(integerField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - 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 | stats var = avg(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); - testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(geoShapeField, numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | stats avg(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); - testErrorsAndWarnings( - 'from a_index | eval mv_slice(geoShapeField, numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | stats avg(booleanField)', [ + 'Argument of [avg] must be [integer], found value [booleanField] type [boolean]', + ]); - testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(to_geoshape(geoPointField), to_integer(booleanField), to_integer(booleanField))', - [] - ); + testErrorsAndWarnings('from a_index | stats var = avg(*)', [ + 'Using wildcards (*) in avg is not allowed', + ]); - 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 | stats var = avg(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | stats avg(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | stats var = round(avg(counterIntegerField))', []); + testErrorsAndWarnings('from a_index | stats round(avg(counterIntegerField))', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(ipField, numberField, numberField)', + 'from a_index | stats var = round(avg(counterIntegerField)) + avg(counterIntegerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval mv_slice(ipField, numberField, numberField)', + 'from a_index | stats round(avg(counterIntegerField)) + avg(counterIntegerField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = avg(counterIntegerField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))', + 'from a_index | stats avg(doubleField), avg(counterIntegerField)', [] ); - 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))', + 'from a_index | stats avg(doubleField), var0 = avg(counterIntegerField)', [] ); 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)', + 'from a_index | stats avg(counterIntegerField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval mv_slice(versionField, numberField, numberField)', + 'from a_index | stats var0 = avg(counterIntegerField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_slice(to_version(stringField), to_integer(booleanField), to_integer(booleanField))', + 'from a_index | stats avg(doubleField), avg(counterIntegerField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - '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]', - ] + 'from a_index | stats avg(doubleField), var0 = avg(counterIntegerField) by var1 = round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval mv_slice(booleanField, numberField, numberField, extraArg)', - ['Error: [mv_slice] function expects no more than 3 arguments, got 4.'] + 'from a_index | stats avg(doubleField), avg(counterIntegerField) by round(doubleField / 2), doubleField / 2', + [] ); testErrorsAndWarnings( - 'from a_index | sort mv_slice(booleanField, numberField, numberField)', + 'from a_index | stats avg(doubleField), var0 = avg(counterIntegerField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval mv_slice(null, null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_slice(nullVar, nullVar, nullVar)', []); - }); - - describe('mv_sort', () => { - testErrorsAndWarnings('row var = mv_sort("a", "asc")', []); - testErrorsAndWarnings('row mv_sort("a", "asc")', []); - 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 | stats var = avg(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField)', []); + testErrorsAndWarnings('from a_index | stats var = round(avg(doubleField))', []); + testErrorsAndWarnings('from a_index | stats round(avg(doubleField))', []); 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]', - ] + 'from a_index | stats var = round(avg(doubleField)) + avg(doubleField)', + [] ); - 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]', - ] + 'from a_index | stats round(avg(doubleField)) + avg(doubleField)', + [] ); - - 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")', []); - testErrorsAndWarnings('from a_index | eval mv_sort(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_sort(nullVar, nullVar)', []); - }); - - describe('mv_sum', () => { - testErrorsAndWarnings('row var = mv_sum(5)', []); - testErrorsAndWarnings('row mv_sum(5)', []); - testErrorsAndWarnings('row var = mv_sum(to_integer("a"))', []); - - testErrorsAndWarnings('row var = mv_sum("a")', [ - 'Argument of [mv_sum] must be [number], found value ["a"] type [string]', - ]); - - testErrorsAndWarnings('from a_index | where mv_sum(numberField) > 0', []); - - testErrorsAndWarnings('from a_index | where mv_sum(stringField) > 0', [ - 'Argument of [mv_sum] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval var = mv_sum(numberField)', []); - testErrorsAndWarnings('from a_index | eval mv_sum(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = mv_sum(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval mv_sum(stringField)', [ - 'Argument of [mv_sum] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval mv_sum(numberField, extraArg)', [ - 'Error: [mv_sum] function expects exactly one argument, got 2.', - ]); - - testErrorsAndWarnings('from a_index | eval var = mv_sum(*)', [ - 'Using wildcards (*) in mv_sum is not allowed', - ]); - - 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]', - ]); - testErrorsAndWarnings('from a_index | eval mv_sum(null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_sum(nullVar)', []); - }); - - 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('from a_index | stats var0 = avg(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), avg(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), var0 = avg(doubleField)', []); testErrorsAndWarnings( - 'row var = mv_zip(to_string("a"), to_string("a"), to_string("a"))', + 'from a_index | stats avg(doubleField) by round(doubleField / 2)', [] ); - testErrorsAndWarnings('row var = mv_zip(5, 5, 5)', [ - '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]', - ]); - testErrorsAndWarnings( - 'from a_index | where length(mv_zip(stringField, stringField, stringField)) > 0', + 'from a_index | stats var0 = avg(doubleField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | where length(mv_zip(numberField, numberField, numberField)) > 0', - [ - '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]', - ] + 'from a_index | stats avg(doubleField), avg(doubleField) by round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_zip(stringField, stringField, stringField)', + 'from a_index | stats avg(doubleField), var0 = avg(doubleField) by var1 = round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('from a_index | eval mv_zip(stringField, stringField)', []); - testErrorsAndWarnings( - 'from a_index | eval mv_zip(stringField, stringField, stringField)', + 'from a_index | stats avg(doubleField), avg(doubleField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_zip(to_string(stringField), to_string(stringField), to_string(stringField))', + 'from a_index | stats avg(doubleField), var0 = avg(doubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval mv_zip(numberField, numberField, numberField)', [ - '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]', - ]); + testErrorsAndWarnings('from a_index | stats var = avg(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | stats avg(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | stats var = round(avg(unsignedLongField))', []); + testErrorsAndWarnings('from a_index | stats round(avg(unsignedLongField))', []); testErrorsAndWarnings( - 'from a_index | eval mv_zip(stringField, stringField, stringField, extraArg)', - ['Error: [mv_zip] function expects no more than 3 arguments, got 4.'] + 'from a_index | stats var = round(avg(unsignedLongField)) + avg(unsignedLongField)', + [] ); testErrorsAndWarnings( - 'from a_index | sort mv_zip(stringField, stringField, stringField)', + 'from a_index | stats round(avg(unsignedLongField)) + avg(unsignedLongField)', [] ); + + testErrorsAndWarnings('from a_index | stats var0 = avg(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), avg(unsignedLongField)', []); testErrorsAndWarnings( - 'row var = mv_zip(to_string(true), to_string(true), to_string(true))', + 'from a_index | stats avg(doubleField), var0 = avg(unsignedLongField)', [] ); - 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]', - ] + 'from a_index | stats avg(unsignedLongField) by round(doubleField / 2)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_zip(to_string(booleanField), to_string(booleanField), to_string(booleanField))', + 'from a_index | stats var0 = avg(unsignedLongField) by var1 = round(doubleField / 2)', [] ); 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]', - ] + 'from a_index | stats avg(doubleField), avg(unsignedLongField) by round(doubleField / 2), ipField', + [] ); - testErrorsAndWarnings('from a_index | eval mv_zip(null, null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_zip(nullVar, nullVar, nullVar)', []); - testErrorsAndWarnings('row var = mv_zip(to_string(true), to_string(true))', []); + testErrorsAndWarnings( - 'from a_index | where length(mv_zip(stringField, stringField)) > 0', + 'from a_index | stats avg(doubleField), var0 = avg(unsignedLongField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | where length(mv_zip(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]', - ] + 'from a_index | stats avg(doubleField), avg(unsignedLongField) by round(doubleField / 2), doubleField / 2', + [] ); - testErrorsAndWarnings('from a_index | eval var = mv_zip(stringField, stringField)', []); - testErrorsAndWarnings( - 'from a_index | eval var = mv_zip(to_string(booleanField), to_string(booleanField))', + 'from a_index | stats avg(doubleField), var0 = avg(unsignedLongField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval mv_zip(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]', - ]); - - testErrorsAndWarnings('from a_index | sort mv_zip(stringField, stringField)', []); - }); - - describe('now', () => { - testErrorsAndWarnings('row var = now()', []); - testErrorsAndWarnings('row now()', []); - testErrorsAndWarnings('from a_index | eval var = now()', []); - testErrorsAndWarnings('from a_index | eval now()', []); - - testErrorsAndWarnings('from a_index | eval now(extraArg)', [ - 'Error: [now] function expects exactly 0 arguments, got 1.', - ]); - - testErrorsAndWarnings('from a_index | sort now()', []); - testErrorsAndWarnings('row nullVar = null | eval now()', []); - }); - - describe('pi', () => { - testErrorsAndWarnings('row var = pi()', []); - testErrorsAndWarnings('row pi()', []); - testErrorsAndWarnings('from a_index | where pi() > 0', []); - testErrorsAndWarnings('from a_index | eval var = pi()', []); - testErrorsAndWarnings('from a_index | eval pi()', []); - - testErrorsAndWarnings('from a_index | eval pi(extraArg)', [ - 'Error: [pi] function expects exactly 0 arguments, got 1.', - ]); - - testErrorsAndWarnings('from a_index | sort pi()', []); - testErrorsAndWarnings('row nullVar = null | eval pi()', []); - }); - - describe('pow', () => { - testErrorsAndWarnings('row var = pow(5, 5)', []); - testErrorsAndWarnings('row pow(5, 5)', []); - testErrorsAndWarnings('row var = pow(to_integer("a"), to_integer("a"))', []); - - testErrorsAndWarnings('row var = pow("a", "a")', [ - 'Argument of [pow] must be [number], found value ["a"] type [string]', - 'Argument of [pow] must be [number], found value ["a"] type [string]', - ]); - - testErrorsAndWarnings('from a_index | where pow(numberField, numberField) > 0', []); - - testErrorsAndWarnings('from a_index | where pow(stringField, stringField) > 0', [ - 'Argument of [pow] must be [number], found value [stringField] type [string]', - 'Argument of [pow] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval var = pow(numberField, numberField)', []); - testErrorsAndWarnings('from a_index | eval pow(numberField, numberField)', []); - + testErrorsAndWarnings('from a_index | stats var = avg(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(longField)', []); + testErrorsAndWarnings('from a_index | stats var = round(avg(longField))', []); + testErrorsAndWarnings('from a_index | stats round(avg(longField))', []); testErrorsAndWarnings( - 'from a_index | eval var = pow(to_integer(stringField), to_integer(stringField))', + 'from a_index | stats var = round(avg(longField)) + avg(longField)', [] ); - - testErrorsAndWarnings('from a_index | eval pow(stringField, stringField)', [ - 'Argument of [pow] must be [number], found value [stringField] type [string]', - 'Argument of [pow] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval pow(numberField, numberField, extraArg)', [ - 'Error: [pow] function expects exactly 2 arguments, got 3.', - ]); - - 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 | stats round(avg(longField)) + avg(longField)', []); + testErrorsAndWarnings('from a_index | stats var0 = avg(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), avg(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), var0 = avg(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(longField) by round(doubleField / 2)', []); testErrorsAndWarnings( - 'from a_index | eval var = pow(to_integer(booleanField), to_integer(booleanField))', + 'from a_index | stats var0 = avg(longField) by var1 = round(doubleField / 2)', [] ); - 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]', - ]); - testErrorsAndWarnings('from a_index | eval pow(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval pow(nullVar, nullVar)', []); - }); - - describe('replace', () => { - testErrorsAndWarnings('row var = replace("a", "a", "a")', []); - testErrorsAndWarnings('row replace("a", "a", "a")', []); - testErrorsAndWarnings( - 'row var = replace(to_string("a"), to_string("a"), to_string("a"))', + 'from a_index | stats avg(doubleField), avg(longField) by round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('row var = replace(5, 5, 5)', [ - '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]', - ]); - testErrorsAndWarnings( - 'from a_index | where length(replace(stringField, stringField, stringField)) > 0', + 'from a_index | stats avg(doubleField), var0 = avg(longField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | where length(replace(numberField, numberField, numberField)) > 0', - [ - '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]', - ] + 'from a_index | stats avg(doubleField), avg(longField) by round(doubleField / 2), doubleField / 2', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = replace(stringField, stringField, stringField)', + 'from a_index | stats avg(doubleField), var0 = avg(longField) by var1 = round(doubleField / 2), doubleField / 2', [] ); + testErrorsAndWarnings('from a_index | stats var = avg(counterLongField)', []); + testErrorsAndWarnings('from a_index | stats avg(counterLongField)', []); + testErrorsAndWarnings('from a_index | stats var = round(avg(counterLongField))', []); + testErrorsAndWarnings('from a_index | stats round(avg(counterLongField))', []); + testErrorsAndWarnings( - 'from a_index | eval replace(stringField, stringField, stringField)', + 'from a_index | stats var = round(avg(counterLongField)) + avg(counterLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = replace(to_string(stringField), to_string(stringField), to_string(stringField))', + 'from a_index | stats round(avg(counterLongField)) + avg(counterLongField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = avg(counterLongField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), avg(counterLongField)', []); testErrorsAndWarnings( - 'from a_index | eval replace(numberField, numberField, numberField)', - [ - '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]', - ] + 'from a_index | stats avg(doubleField), var0 = avg(counterLongField)', + [] ); - testErrorsAndWarnings( - 'from a_index | eval replace(stringField, stringField, stringField, extraArg)', - ['Error: [replace] function expects exactly 3 arguments, got 4.'] + 'from a_index | stats avg(counterLongField) by round(doubleField / 2)', + [] ); testErrorsAndWarnings( - 'from a_index | sort replace(stringField, stringField, stringField)', + 'from a_index | stats var0 = avg(counterLongField) by var1 = round(doubleField / 2)', [] ); + testErrorsAndWarnings( - 'row var = replace(to_string(true), to_string(true), to_string(true))', + 'from a_index | stats avg(doubleField), avg(counterLongField) by round(doubleField / 2), ipField', [] ); - 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]', - ] + 'from a_index | stats avg(doubleField), var0 = avg(counterLongField) by var1 = round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = replace(to_string(booleanField), to_string(booleanField), to_string(booleanField))', + 'from a_index | stats avg(doubleField), avg(counterLongField) by round(doubleField / 2), doubleField / 2', [] ); 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]', - ] + 'from a_index | stats avg(doubleField), var0 = avg(counterLongField) by var1 = round(doubleField / 2), doubleField / 2', + [] ); - testErrorsAndWarnings('from a_index | eval replace(null, null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval replace(nullVar, nullVar, nullVar)', []); - }); - describe('right', () => { - testErrorsAndWarnings('row var = right("a", 5)', []); - testErrorsAndWarnings('row right("a", 5)', []); - testErrorsAndWarnings('row var = right(to_string("a"), to_integer("a"))', []); - - testErrorsAndWarnings('row var = right(5, "a")', [ - 'Argument of [right] must be [string], found value [5] type [number]', - 'Argument of [right] must be [number], found value ["a"] type [string]', - ]); + testErrorsAndWarnings('from a_index | stats var = avg(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | stats var = round(avg(counterDoubleField))', []); + testErrorsAndWarnings('from a_index | stats round(avg(counterDoubleField))', []); testErrorsAndWarnings( - 'from a_index | where length(right(stringField, numberField)) > 0', + 'from a_index | stats var = round(avg(counterDoubleField)) + avg(counterDoubleField)', [] ); - testErrorsAndWarnings('from a_index | where length(right(numberField, stringField)) > 0', [ - 'Argument of [right] must be [string], found value [numberField] type [number]', - 'Argument of [right] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval var = right(stringField, numberField)', []); - testErrorsAndWarnings('from a_index | eval right(stringField, numberField)', []); - testErrorsAndWarnings( - 'from a_index | eval var = right(to_string(stringField), to_integer(stringField))', + 'from a_index | stats round(avg(counterDoubleField)) + avg(counterDoubleField)', [] ); - testErrorsAndWarnings('from a_index | eval right(numberField, stringField)', [ - 'Argument of [right] must be [string], found value [numberField] type [number]', - 'Argument of [right] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval right(stringField, numberField, extraArg)', [ - 'Error: [right] function expects exactly 2 arguments, got 3.', - ]); - - 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 | stats var0 = avg(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), avg(counterDoubleField)', []); 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]', - ] + 'from a_index | stats avg(doubleField), var0 = avg(counterDoubleField)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = right(to_string(booleanField), to_integer(booleanField))', + 'from a_index | stats avg(counterDoubleField) by round(doubleField / 2)', [] ); - 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]', - ]); - testErrorsAndWarnings('from a_index | eval right(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval right(nullVar, nullVar)', []); - }); - - describe('round', () => { - testErrorsAndWarnings('row var = round(5, 5)', []); - testErrorsAndWarnings('row round(5, 5)', []); - testErrorsAndWarnings('row var = round(to_integer("a"), to_integer("a"))', []); - - testErrorsAndWarnings('row var = round("a", "a")', [ - 'Argument of [round] must be [number], found value ["a"] type [string]', - 'Argument of [round] must be [number], found value ["a"] type [string]', - ]); - - testErrorsAndWarnings('from a_index | where round(numberField, numberField) > 0', []); - - testErrorsAndWarnings('from a_index | where round(stringField, stringField) > 0', [ - 'Argument of [round] must be [number], found value [stringField] type [string]', - 'Argument of [round] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval var = round(numberField, numberField)', []); - testErrorsAndWarnings('from a_index | eval round(numberField, numberField)', []); - testErrorsAndWarnings( - 'from a_index | eval var = round(to_integer(stringField), to_integer(stringField))', + 'from a_index | stats var0 = avg(counterDoubleField) by var1 = round(doubleField / 2)', [] ); - testErrorsAndWarnings('from a_index | eval round(stringField, stringField)', [ - 'Argument of [round] must be [number], found value [stringField] type [string]', - 'Argument of [round] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval round(numberField, numberField, extraArg)', [ - 'Error: [round] function expects no more than 2 arguments, got 3.', - ]); - - 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))', + 'from a_index | stats avg(doubleField), avg(counterDoubleField) by round(doubleField / 2), ipField', [] ); - 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)', []); - testErrorsAndWarnings('from a_index | eval round(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval round(nullVar, nullVar)', []); - }); - - describe('rtrim', () => { - testErrorsAndWarnings('row var = rtrim("a")', []); - testErrorsAndWarnings('row rtrim("a")', []); - testErrorsAndWarnings('row var = rtrim(to_string("a"))', []); - - testErrorsAndWarnings('row var = rtrim(5)', [ - 'Argument of [rtrim] must be [string], found value [5] type [number]', - ]); - - testErrorsAndWarnings('from a_index | where length(rtrim(stringField)) > 0', []); - - testErrorsAndWarnings('from a_index | where length(rtrim(numberField)) > 0', [ - 'Argument of [rtrim] must be [string], found value [numberField] type [number]', - ]); - - testErrorsAndWarnings('from a_index | eval var = rtrim(stringField)', []); - testErrorsAndWarnings('from a_index | eval rtrim(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = rtrim(to_string(stringField))', []); - - testErrorsAndWarnings('from a_index | eval rtrim(numberField)', [ - 'Argument of [rtrim] must be [string], found value [numberField] type [number]', - ]); - - testErrorsAndWarnings('from a_index | eval rtrim(stringField, extraArg)', [ - 'Error: [rtrim] function expects exactly one argument, got 2.', - ]); - - testErrorsAndWarnings('from a_index | eval var = rtrim(*)', [ - 'Using wildcards (*) in rtrim is not allowed', - ]); - - 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]', - ]); - testErrorsAndWarnings('from a_index | eval rtrim(null)', []); - testErrorsAndWarnings('row nullVar = null | eval rtrim(nullVar)', []); - }); - - describe('signum', () => { - testErrorsAndWarnings('row var = signum(5)', []); - testErrorsAndWarnings('row signum(5)', []); - testErrorsAndWarnings('row var = signum(to_integer("a"))', []); - - testErrorsAndWarnings('row var = signum("a")', [ - 'Argument of [signum] must be [number], found value ["a"] type [string]', - ]); - - testErrorsAndWarnings('from a_index | where signum(numberField) > 0', []); - - testErrorsAndWarnings('from a_index | where signum(stringField) > 0', [ - 'Argument of [signum] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | eval var = signum(numberField)', []); - testErrorsAndWarnings('from a_index | eval signum(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = signum(to_integer(stringField))', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = avg(counterDoubleField) by var1 = round(doubleField / 2), ipField', + [] + ); - testErrorsAndWarnings('from a_index | eval signum(stringField)', [ - 'Argument of [signum] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), avg(counterDoubleField) by round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('from a_index | eval signum(numberField, extraArg)', [ - 'Error: [signum] function expects exactly one argument, got 2.', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = avg(counterDoubleField) by var1 = round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('from a_index | eval var = signum(*)', [ - 'Using wildcards (*) in signum is not allowed', + testErrorsAndWarnings('from a_index | sort avg(integerField)', [ + 'SORT does not support function avg', ]); - 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 avg(integerField)', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | where signum(booleanField) > 0', [ - 'Argument of [signum] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | where avg(integerField) > 0', [ + 'WHERE does not support function avg', ]); - 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]', + testErrorsAndWarnings('from a_index | where avg(counterIntegerField)', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval signum(null)', []); - testErrorsAndWarnings('row nullVar = null | eval signum(nullVar)', []); - }); - - describe('sin', () => { - testErrorsAndWarnings('row var = sin(5)', []); - testErrorsAndWarnings('row sin(5)', []); - testErrorsAndWarnings('row var = sin(to_integer("a"))', []); - testErrorsAndWarnings('row var = sin("a")', [ - 'Argument of [sin] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | where avg(counterIntegerField) > 0', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | where sin(numberField) > 0', []); - - testErrorsAndWarnings('from a_index | where sin(stringField) > 0', [ - 'Argument of [sin] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where avg(doubleField)', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval var = sin(numberField)', []); - testErrorsAndWarnings('from a_index | eval sin(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = sin(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval sin(stringField)', [ - 'Argument of [sin] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where avg(doubleField) > 0', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval sin(numberField, extraArg)', [ - 'Error: [sin] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | where avg(unsignedLongField)', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval var = sin(*)', [ - 'Using wildcards (*) in sin is not allowed', + testErrorsAndWarnings('from a_index | where avg(unsignedLongField) > 0', [ + 'WHERE does not support function avg', ]); - 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 avg(longField)', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | where sin(booleanField) > 0', [ - 'Argument of [sin] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | where avg(longField) > 0', [ + 'WHERE does not support function avg', ]); - 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]', + testErrorsAndWarnings('from a_index | where avg(counterLongField)', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval sin(null)', []); - testErrorsAndWarnings('row nullVar = null | eval sin(nullVar)', []); - }); - - describe('sinh', () => { - testErrorsAndWarnings('row var = sinh(5)', []); - testErrorsAndWarnings('row sinh(5)', []); - testErrorsAndWarnings('row var = sinh(to_integer("a"))', []); - testErrorsAndWarnings('row var = sinh("a")', [ - 'Argument of [sinh] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | where avg(counterLongField) > 0', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | where sinh(numberField) > 0', []); - - testErrorsAndWarnings('from a_index | where sinh(stringField) > 0', [ - 'Argument of [sinh] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where avg(counterDoubleField)', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval var = sinh(numberField)', []); - testErrorsAndWarnings('from a_index | eval sinh(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = sinh(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval sinh(stringField)', [ - 'Argument of [sinh] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where avg(counterDoubleField) > 0', [ + 'WHERE does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval sinh(numberField, extraArg)', [ - 'Error: [sinh] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval var = avg(integerField)', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval var = sinh(*)', [ - 'Using wildcards (*) in sinh is not allowed', + testErrorsAndWarnings('from a_index | eval var = avg(integerField) > 0', [ + 'EVAL does not support function avg', ]); - 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 | eval avg(integerField)', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | where sinh(booleanField) > 0', [ - 'Argument of [sinh] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval avg(integerField) > 0', [ + 'EVAL does not support function avg', ]); - 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]', + testErrorsAndWarnings('from a_index | eval var = avg(counterIntegerField)', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval sinh(null)', []); - testErrorsAndWarnings('row nullVar = null | eval sinh(nullVar)', []); - }); - - describe('split', () => { - testErrorsAndWarnings('row var = split("a", "a")', []); - testErrorsAndWarnings('row split("a", "a")', []); - testErrorsAndWarnings('row var = split(to_string("a"), to_string("a"))', []); - testErrorsAndWarnings('row var = split(5, 5)', [ - 'Argument of [split] must be [string], found value [5] type [number]', - 'Argument of [split] must be [string], found value [5] type [number]', + testErrorsAndWarnings('from a_index | eval var = avg(counterIntegerField) > 0', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings( - 'from a_index | where length(split(stringField, stringField)) > 0', - [] - ); - - testErrorsAndWarnings('from a_index | where length(split(numberField, numberField)) > 0', [ - 'Argument of [split] must be [string], found value [numberField] type [number]', - 'Argument of [split] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | eval avg(counterIntegerField)', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval var = split(stringField, stringField)', []); - testErrorsAndWarnings('from a_index | eval split(stringField, stringField)', []); - - testErrorsAndWarnings( - 'from a_index | eval var = split(to_string(stringField), to_string(stringField))', - [] - ); - - testErrorsAndWarnings('from a_index | eval split(numberField, numberField)', [ - 'Argument of [split] must be [string], found value [numberField] type [number]', - 'Argument of [split] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | eval avg(counterIntegerField) > 0', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval split(stringField, stringField, extraArg)', [ - 'Error: [split] function expects exactly 2 arguments, got 3.', + testErrorsAndWarnings('from a_index | eval var = avg(doubleField)', [ + 'EVAL does not support function avg', ]); - 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 | eval var = avg(doubleField) > 0', [ + 'EVAL does not support function avg', ]); - 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]', + testErrorsAndWarnings('from a_index | eval avg(doubleField)', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval split(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval split(nullVar, nullVar)', []); - }); - describe('sqrt', () => { - testErrorsAndWarnings('row var = sqrt(5)', []); - testErrorsAndWarnings('row sqrt(5)', []); - testErrorsAndWarnings('row var = sqrt(to_integer("a"))', []); + testErrorsAndWarnings('from a_index | eval avg(doubleField) > 0', [ + 'EVAL does not support function avg', + ]); - testErrorsAndWarnings('row var = sqrt("a")', [ - 'Argument of [sqrt] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | eval var = avg(unsignedLongField)', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | where sqrt(numberField) > 0', []); + testErrorsAndWarnings('from a_index | eval var = avg(unsignedLongField) > 0', [ + 'EVAL does not support function avg', + ]); - testErrorsAndWarnings('from a_index | where sqrt(stringField) > 0', [ - 'Argument of [sqrt] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval avg(unsignedLongField)', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval var = sqrt(numberField)', []); - testErrorsAndWarnings('from a_index | eval sqrt(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = sqrt(to_integer(stringField))', []); + testErrorsAndWarnings('from a_index | eval avg(unsignedLongField) > 0', [ + 'EVAL does not support function avg', + ]); - testErrorsAndWarnings('from a_index | eval sqrt(stringField)', [ - 'Argument of [sqrt] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval var = avg(longField)', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval sqrt(numberField, extraArg)', [ - 'Error: [sqrt] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval var = avg(longField) > 0', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval var = sqrt(*)', [ - 'Using wildcards (*) in sqrt is not allowed', + testErrorsAndWarnings('from a_index | eval avg(longField)', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | sort sqrt(numberField)', []); - testErrorsAndWarnings('row var = sqrt(to_integer(true))', []); + testErrorsAndWarnings('from a_index | eval avg(longField) > 0', [ + 'EVAL does not support function avg', + ]); - testErrorsAndWarnings('row var = sqrt(true)', [ - 'Argument of [sqrt] must be [number], found value [true] type [boolean]', + testErrorsAndWarnings('from a_index | eval var = avg(counterLongField)', [ + 'EVAL does not support function avg', ]); - 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 = avg(counterLongField) > 0', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval var = sqrt(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval avg(counterLongField)', [ + 'EVAL does not support function avg', + ]); - testErrorsAndWarnings('from a_index | eval sqrt(booleanField)', [ - 'Argument of [sqrt] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval avg(counterLongField) > 0', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings('from a_index | eval sqrt(null)', []); - testErrorsAndWarnings('row nullVar = null | eval sqrt(nullVar)', []); - }); - describe('st_contains', () => { - testErrorsAndWarnings( - 'row var = st_contains(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('from a_index | eval var = avg(counterDoubleField)', [ + 'EVAL does not support function avg', + ]); - testErrorsAndWarnings( - 'row st_contains(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('from a_index | eval var = avg(counterDoubleField) > 0', [ + 'EVAL does not support function avg', + ]); - testErrorsAndWarnings('row var = st_contains(to_geopoint("a"), to_geopoint("a"))', []); + testErrorsAndWarnings('from a_index | eval avg(counterDoubleField)', [ + 'EVAL does not support function avg', + ]); - testErrorsAndWarnings('row var = st_contains("a", "a")', [ - '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('from a_index | eval avg(counterDoubleField) > 0', [ + 'EVAL does not support function avg', ]); - testErrorsAndWarnings( - 'row var = st_contains(to_geopoint("POINT (30 10)"), to_geoshape("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('from a_index | stats avg(null)', []); + testErrorsAndWarnings('row nullVar = null | stats avg(nullVar)', []); + }); + + describe('sum', () => { + testErrorsAndWarnings('from a_index | stats var = sum(integerField)', []); + testErrorsAndWarnings('from a_index | stats sum(integerField)', []); + testErrorsAndWarnings('from a_index | stats var = round(sum(integerField))', []); + testErrorsAndWarnings('from a_index | stats round(sum(integerField))', []); testErrorsAndWarnings( - 'row st_contains(to_geopoint("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats var = round(sum(integerField)) + sum(integerField)', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_geopoint("a"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats round(sum(integerField)) + sum(integerField)', [] ); - + testErrorsAndWarnings('from a_index | stats sum(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats var0 = sum(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), sum(doubleField / 2)', []); testErrorsAndWarnings( - 'row var = st_contains(to_geoshape("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = sum(doubleField / 2)', [] ); - + testErrorsAndWarnings('from a_index | stats var0 = sum(integerField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), sum(integerField)', []); testErrorsAndWarnings( - 'row st_contains(to_geoshape("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = sum(integerField)', [] ); - testErrorsAndWarnings( - 'row var = st_contains(to_geoshape("POINT (30 10)"), to_geopoint("a"))', + 'from a_index | stats sum(integerField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats var0 = sum(integerField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row st_contains(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), sum(integerField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = sum(integerField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row st_contains(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), sum(integerField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianpoint("a"), to_cartesianpoint("a"))', + 'from a_index | stats avg(doubleField), var0 = sum(integerField) by var1 = round(doubleField / 2), doubleField / 2', [] ); + testErrorsAndWarnings('from a_index | stats var = sum(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); + + testErrorsAndWarnings('from a_index | stats sum(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); + + testErrorsAndWarnings('from a_index | stats sum(booleanField)', [ + 'Argument of [sum] must be [integer], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | stats var = sum(*)', [ + 'Using wildcards (*) in sum is not allowed', + ]); + + testErrorsAndWarnings('from a_index | stats var = sum(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | stats sum(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | stats var = round(sum(counterIntegerField))', []); + testErrorsAndWarnings('from a_index | stats round(sum(counterIntegerField))', []); + testErrorsAndWarnings( - 'row var = st_contains(to_cartesianpoint("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats var = round(sum(counterIntegerField)) + sum(counterIntegerField)', [] ); testErrorsAndWarnings( - 'row st_contains(to_cartesianpoint("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats round(sum(counterIntegerField)) + sum(counterIntegerField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = sum(counterIntegerField)', []); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianpoint("a"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), sum(counterIntegerField)', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = sum(counterIntegerField)', [] ); testErrorsAndWarnings( - 'row st_contains(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats sum(counterIntegerField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("a"))', + 'from a_index | stats var0 = sum(counterIntegerField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), sum(counterIntegerField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row st_contains(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = sum(counterIntegerField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(geoPointField, geoPointField)', + 'from a_index | stats avg(doubleField), sum(counterIntegerField) by round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval st_contains(geoPointField, geoPointField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_geopoint(stringField), to_geopoint(stringField))', + 'from a_index | stats avg(doubleField), var0 = sum(counterIntegerField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval st_contains(stringField, stringField)', [ - '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('from a_index | stats var = sum(doubleField)', []); + testErrorsAndWarnings('from a_index | stats sum(doubleField)', []); + testErrorsAndWarnings('from a_index | stats var = round(sum(doubleField))', []); + testErrorsAndWarnings('from a_index | stats round(sum(doubleField))', []); testErrorsAndWarnings( - 'from a_index | eval st_contains(geoPointField, geoPointField, extraArg)', - ['Error: [st_contains] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats var = round(sum(doubleField)) + sum(doubleField)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(geoPointField, geoShapeField)', + 'from a_index | stats round(sum(doubleField)) + sum(doubleField)', [] ); - testErrorsAndWarnings('from a_index | eval st_contains(geoPointField, geoShapeField)', []); - + testErrorsAndWarnings('from a_index | stats var0 = sum(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), sum(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), var0 = sum(doubleField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_geopoint(stringField), geoShapeField)', + 'from a_index | stats sum(doubleField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_contains(geoPointField, geoShapeField, extraArg)', - ['Error: [st_contains] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats var0 = sum(doubleField) by var1 = round(doubleField / 2)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(geoShapeField, geoPointField)', + 'from a_index | stats avg(doubleField), sum(doubleField) by round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('from a_index | eval st_contains(geoShapeField, geoPointField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(geoShapeField, to_geopoint(stringField))', + 'from a_index | stats avg(doubleField), var0 = sum(doubleField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval st_contains(geoShapeField, geoPointField, extraArg)', - ['Error: [st_contains] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), sum(doubleField) by round(doubleField / 2), doubleField / 2', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(geoShapeField, geoShapeField)', + 'from a_index | stats avg(doubleField), var0 = sum(doubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval st_contains(geoShapeField, geoShapeField)', []); - testErrorsAndWarnings( - 'from a_index | eval st_contains(geoShapeField, geoShapeField, extraArg)', - ['Error: [st_contains] function expects exactly 2 arguments, got 3.'] - ); + testErrorsAndWarnings('from a_index | stats var = sum(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | stats sum(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | stats var = round(sum(unsignedLongField))', []); + testErrorsAndWarnings('from a_index | stats round(sum(unsignedLongField))', []); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(cartesianPointField, cartesianPointField)', + 'from a_index | stats var = round(sum(unsignedLongField)) + sum(unsignedLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_contains(cartesianPointField, cartesianPointField)', + 'from a_index | stats round(sum(unsignedLongField)) + sum(unsignedLongField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = sum(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), sum(unsignedLongField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_cartesianpoint(stringField), to_cartesianpoint(stringField))', + 'from a_index | stats avg(doubleField), var0 = sum(unsignedLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_contains(cartesianPointField, cartesianPointField, extraArg)', - ['Error: [st_contains] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats sum(unsignedLongField) by round(doubleField / 2)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(cartesianPointField, cartesianShapeField)', + 'from a_index | stats var0 = sum(unsignedLongField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_contains(cartesianPointField, cartesianShapeField)', + 'from a_index | stats avg(doubleField), sum(unsignedLongField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_cartesianpoint(stringField), cartesianShapeField)', + 'from a_index | stats avg(doubleField), var0 = sum(unsignedLongField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval st_contains(cartesianPointField, cartesianShapeField, extraArg)', - ['Error: [st_contains] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), sum(unsignedLongField) by round(doubleField / 2), doubleField / 2', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(cartesianShapeField, cartesianPointField)', + 'from a_index | stats avg(doubleField), var0 = sum(unsignedLongField) by var1 = round(doubleField / 2), doubleField / 2', [] ); + testErrorsAndWarnings('from a_index | stats var = sum(longField)', []); + testErrorsAndWarnings('from a_index | stats sum(longField)', []); + testErrorsAndWarnings('from a_index | stats var = round(sum(longField))', []); + testErrorsAndWarnings('from a_index | stats round(sum(longField))', []); testErrorsAndWarnings( - 'from a_index | eval st_contains(cartesianShapeField, cartesianPointField)', + 'from a_index | stats var = round(sum(longField)) + sum(longField)', [] ); + testErrorsAndWarnings('from a_index | stats round(sum(longField)) + sum(longField)', []); + testErrorsAndWarnings('from a_index | stats var0 = sum(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), sum(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), var0 = sum(longField)', []); + testErrorsAndWarnings('from a_index | stats sum(longField) by round(doubleField / 2)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(cartesianShapeField, to_cartesianpoint(stringField))', + 'from a_index | stats var0 = sum(longField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_contains(cartesianShapeField, cartesianPointField, extraArg)', - ['Error: [st_contains] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), sum(longField) by round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(cartesianShapeField, cartesianShapeField)', + 'from a_index | stats avg(doubleField), var0 = sum(longField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval st_contains(cartesianShapeField, cartesianShapeField)', + 'from a_index | stats avg(doubleField), sum(longField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval st_contains(cartesianShapeField, cartesianShapeField, extraArg)', - ['Error: [st_contains] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), var0 = sum(longField) by var1 = round(doubleField / 2), doubleField / 2', + [] ); - testErrorsAndWarnings('from a_index | sort st_contains(geoPointField, geoPointField)', []); + testErrorsAndWarnings('from a_index | stats var = sum(counterLongField)', []); + testErrorsAndWarnings('from a_index | stats sum(counterLongField)', []); + testErrorsAndWarnings('from a_index | stats var = round(sum(counterLongField))', []); + testErrorsAndWarnings('from a_index | stats round(sum(counterLongField))', []); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var = round(sum(counterLongField)) + sum(counterLongField)', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats round(sum(counterLongField)) + sum(counterLongField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = sum(counterLongField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), sum(counterLongField)', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = sum(counterLongField)', + [] + ); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats sum(counterLongField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var0 = sum(counterLongField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), sum(counterLongField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_geopoint(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), var0 = sum(counterLongField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_geoshape(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), sum(counterLongField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'row var = st_contains(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), var0 = sum(counterLongField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - 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 | stats var = sum(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | stats sum(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | stats var = round(sum(counterDoubleField))', []); + testErrorsAndWarnings('from a_index | stats round(sum(counterDoubleField))', []); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', + 'from a_index | stats var = round(sum(counterDoubleField)) + sum(counterDoubleField)', [] ); - 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(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + 'from a_index | stats round(sum(counterDoubleField)) + sum(counterDoubleField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = sum(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), sum(counterDoubleField)', []); + testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + 'from a_index | stats avg(doubleField), var0 = sum(counterDoubleField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + 'from a_index | stats sum(counterDoubleField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geopoint(geoPointField))', + 'from a_index | stats var0 = sum(counterDoubleField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_geopoint(geoPointField), to_geoshape(geoPointField))', + 'from a_index | stats avg(doubleField), sum(counterDoubleField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geopoint(geoPointField))', + 'from a_index | stats avg(doubleField), var0 = sum(counterDoubleField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_contains(to_geoshape(geoPointField), to_geoshape(geoPointField))', + 'from a_index | stats avg(doubleField), sum(counterDoubleField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | sort st_contains(cartesianPointField, cartesianPointField)', + 'from a_index | stats avg(doubleField), var0 = sum(counterDoubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval st_contains(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval st_contains(nullVar, nullVar)', []); + + testErrorsAndWarnings('from a_index | sort sum(integerField)', [ + 'SORT does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(integerField)', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(integerField) > 0', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(counterIntegerField)', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(counterIntegerField) > 0', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(doubleField)', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(doubleField) > 0', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(unsignedLongField)', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(unsignedLongField) > 0', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(longField)', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(longField) > 0', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(counterLongField)', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(counterLongField) > 0', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(counterDoubleField)', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | where sum(counterDoubleField) > 0', [ + 'WHERE does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(integerField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(integerField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(integerField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(integerField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(counterIntegerField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(counterIntegerField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(counterIntegerField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(counterIntegerField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(doubleField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(doubleField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(doubleField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(doubleField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(unsignedLongField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(unsignedLongField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(unsignedLongField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(unsignedLongField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(longField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(longField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(longField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(longField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(counterLongField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(counterLongField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(counterLongField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(counterLongField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(counterDoubleField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval var = sum(counterDoubleField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(counterDoubleField)', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | eval sum(counterDoubleField) > 0', [ + 'EVAL does not support function sum', + ]); + + testErrorsAndWarnings('from a_index | stats sum(null)', []); + testErrorsAndWarnings('row nullVar = null | stats sum(nullVar)', []); }); - describe('st_disjoint', () => { + describe('median', () => { + testErrorsAndWarnings('from a_index | stats var = median(integerField)', []); + testErrorsAndWarnings('from a_index | stats median(integerField)', []); + testErrorsAndWarnings('from a_index | stats var = round(median(integerField))', []); + testErrorsAndWarnings('from a_index | stats round(median(integerField))', []); + testErrorsAndWarnings( - 'row var = st_disjoint(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats var = round(median(integerField)) + median(integerField)', [] ); testErrorsAndWarnings( - 'row st_disjoint(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats round(median(integerField)) + median(integerField)', [] ); - testErrorsAndWarnings('row var = st_disjoint(to_geopoint("a"), to_geopoint("a"))', []); - - testErrorsAndWarnings('row var = st_disjoint("a", "a")', [ - '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('from a_index | stats median(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats var0 = median(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), median(doubleField / 2)', []); testErrorsAndWarnings( - 'row var = st_disjoint(to_geopoint("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median(doubleField / 2)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = median(integerField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), median(integerField)', []); testErrorsAndWarnings( - 'row st_disjoint(to_geopoint("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median(integerField)', [] ); - testErrorsAndWarnings( - 'row var = st_disjoint(to_geopoint("a"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats median(integerField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_geoshape("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats var0 = median(integerField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row st_disjoint(to_geoshape("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median(integerField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_geoshape("POINT (30 10)"), to_geopoint("a"))', + 'from a_index | stats avg(doubleField), var0 = median(integerField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median(integerField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'row st_disjoint(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median(integerField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('from a_index | stats var = median(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); - testErrorsAndWarnings( - 'row st_disjoint(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('from a_index | stats median(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); - testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianpoint("a"), to_cartesianpoint("a"))', - [] - ); + testErrorsAndWarnings('from a_index | stats median(booleanField)', [ + 'Argument of [median] must be [integer], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | stats var = median(*)', [ + 'Using wildcards (*) in median is not allowed', + ]); + + testErrorsAndWarnings('from a_index | stats var = median(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | stats median(counterIntegerField)', []); + testErrorsAndWarnings('from a_index | stats var = round(median(counterIntegerField))', []); + testErrorsAndWarnings('from a_index | stats round(median(counterIntegerField))', []); testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianpoint("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats var = round(median(counterIntegerField)) + median(counterIntegerField)', [] ); testErrorsAndWarnings( - 'row st_disjoint(to_cartesianpoint("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats round(median(counterIntegerField)) + median(counterIntegerField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = median(counterIntegerField)', []); testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianpoint("a"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median(counterIntegerField)', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median(counterIntegerField)', [] ); testErrorsAndWarnings( - 'row st_disjoint(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats median(counterIntegerField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("a"))', + 'from a_index | stats var0 = median(counterIntegerField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median(counterIntegerField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row st_disjoint(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median(counterIntegerField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(geoPointField, geoPointField)', + 'from a_index | stats avg(doubleField), median(counterIntegerField) by round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval st_disjoint(geoPointField, geoPointField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_geopoint(stringField), to_geopoint(stringField))', + 'from a_index | stats avg(doubleField), var0 = median(counterIntegerField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval st_disjoint(stringField, stringField)', [ - '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( - 'from a_index | eval st_disjoint(geoPointField, geoPointField, extraArg)', - ['Error: [st_disjoint] function expects exactly 2 arguments, got 3.'] - ); + testErrorsAndWarnings('from a_index | stats var = median(doubleField)', []); + testErrorsAndWarnings('from a_index | stats median(doubleField)', []); + testErrorsAndWarnings('from a_index | stats var = round(median(doubleField))', []); + testErrorsAndWarnings('from a_index | stats round(median(doubleField))', []); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(geoPointField, geoShapeField)', + 'from a_index | stats var = round(median(doubleField)) + median(doubleField)', [] ); - testErrorsAndWarnings('from a_index | eval st_disjoint(geoPointField, geoShapeField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_geopoint(stringField), geoShapeField)', + 'from a_index | stats round(median(doubleField)) + median(doubleField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = median(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), median(doubleField)', []); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(geoPointField, geoShapeField, extraArg)', - ['Error: [st_disjoint] function expects exactly 2 arguments, got 3.'] - ); - - testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(geoShapeField, geoPointField)', + 'from a_index | stats avg(doubleField), var0 = median(doubleField)', [] ); - testErrorsAndWarnings('from a_index | eval st_disjoint(geoShapeField, geoPointField)', []); - testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(geoShapeField, to_geopoint(stringField))', + 'from a_index | stats median(doubleField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(geoShapeField, geoPointField, extraArg)', - ['Error: [st_disjoint] function expects exactly 2 arguments, got 3.'] - ); - - testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(geoShapeField, geoShapeField)', + 'from a_index | stats var0 = median(doubleField) by var1 = round(doubleField / 2)', [] ); - testErrorsAndWarnings('from a_index | eval st_disjoint(geoShapeField, geoShapeField)', []); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(geoShapeField, geoShapeField, extraArg)', - ['Error: [st_disjoint] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), median(doubleField) by round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(cartesianPointField, cartesianPointField)', + 'from a_index | stats avg(doubleField), var0 = median(doubleField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(cartesianPointField, cartesianPointField)', + 'from a_index | stats avg(doubleField), median(doubleField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_cartesianpoint(stringField), to_cartesianpoint(stringField))', + 'from a_index | stats avg(doubleField), var0 = median(doubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings( - 'from a_index | eval st_disjoint(cartesianPointField, cartesianPointField, extraArg)', - ['Error: [st_disjoint] function expects exactly 2 arguments, got 3.'] - ); + testErrorsAndWarnings('from a_index | stats var = median(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | stats median(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | stats var = round(median(unsignedLongField))', []); + testErrorsAndWarnings('from a_index | stats round(median(unsignedLongField))', []); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(cartesianPointField, cartesianShapeField)', + 'from a_index | stats var = round(median(unsignedLongField)) + median(unsignedLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField)', + 'from a_index | stats round(median(unsignedLongField)) + median(unsignedLongField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = median(unsignedLongField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_cartesianpoint(stringField), cartesianShapeField)', + 'from a_index | stats avg(doubleField), median(unsignedLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(cartesianPointField, cartesianShapeField, extraArg)', - ['Error: [st_disjoint] function expects exactly 2 arguments, got 3.'] - ); - - testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(cartesianShapeField, cartesianPointField)', + 'from a_index | stats avg(doubleField), var0 = median(unsignedLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(cartesianShapeField, cartesianPointField)', + 'from a_index | stats median(unsignedLongField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(cartesianShapeField, to_cartesianpoint(stringField))', + 'from a_index | stats var0 = median(unsignedLongField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(cartesianShapeField, cartesianPointField, extraArg)', - ['Error: [st_disjoint] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), median(unsignedLongField) by round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(cartesianShapeField, cartesianShapeField)', + 'from a_index | stats avg(doubleField), var0 = median(unsignedLongField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField)', + 'from a_index | stats avg(doubleField), median(unsignedLongField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval st_disjoint(cartesianShapeField, cartesianShapeField, extraArg)', - ['Error: [st_disjoint] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), var0 = median(unsignedLongField) by var1 = round(doubleField / 2), doubleField / 2', + [] ); - testErrorsAndWarnings('from a_index | sort st_disjoint(geoPointField, geoPointField)', []); + testErrorsAndWarnings('from a_index | stats var = median(longField)', []); + testErrorsAndWarnings('from a_index | stats median(longField)', []); + testErrorsAndWarnings('from a_index | stats var = round(median(longField))', []); + testErrorsAndWarnings('from a_index | stats round(median(longField))', []); testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var = round(median(longField)) + median(longField)', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats round(median(longField)) + median(longField)', [] ); - + testErrorsAndWarnings('from a_index | stats var0 = median(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), median(longField)', []); testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), var0 = median(longField)', [] ); - testErrorsAndWarnings( - 'row var = st_disjoint(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats median(longField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', + 'from a_index | stats var0 = median(longField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_geopoint(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), median(longField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_geoshape(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), var0 = median(longField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_disjoint(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), median(longField) by round(doubleField / 2), doubleField / 2', [] ); - 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))', + 'from a_index | stats avg(doubleField), var0 = median(longField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - 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 | stats var = median(counterLongField)', []); + testErrorsAndWarnings('from a_index | stats median(counterLongField)', []); + testErrorsAndWarnings('from a_index | stats var = round(median(counterLongField))', []); + testErrorsAndWarnings('from a_index | stats round(median(counterLongField))', []); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', + 'from a_index | stats var = round(median(counterLongField)) + median(counterLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + 'from a_index | stats round(median(counterLongField)) + median(counterLongField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = median(counterLongField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + 'from a_index | stats avg(doubleField), median(counterLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geopoint(geoPointField))', + 'from a_index | stats avg(doubleField), var0 = median(counterLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_geopoint(geoPointField), to_geoshape(geoPointField))', + 'from a_index | stats median(counterLongField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geopoint(geoPointField))', + 'from a_index | stats var0 = median(counterLongField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_disjoint(to_geoshape(geoPointField), to_geoshape(geoPointField))', + 'from a_index | stats avg(doubleField), median(counterLongField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | sort st_disjoint(cartesianPointField, cartesianPointField)', + 'from a_index | stats avg(doubleField), var0 = median(counterLongField) by var1 = round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('from a_index | eval st_disjoint(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval st_disjoint(nullVar, nullVar)', []); - }); - describe('st_intersects', () => { testErrorsAndWarnings( - 'row var = st_intersects(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median(counterLongField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'row st_intersects(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median(counterLongField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('row var = st_intersects(to_geopoint("a"), to_geopoint("a"))', []); - - testErrorsAndWarnings('row var = st_intersects("a", "a")', [ - '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('from a_index | stats var = median(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | stats median(counterDoubleField)', []); + testErrorsAndWarnings('from a_index | stats var = round(median(counterDoubleField))', []); + testErrorsAndWarnings('from a_index | stats round(median(counterDoubleField))', []); testErrorsAndWarnings( - 'row var = st_intersects(to_geopoint("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats var = round(median(counterDoubleField)) + median(counterDoubleField)', [] ); testErrorsAndWarnings( - 'row st_intersects(to_geopoint("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats round(median(counterDoubleField)) + median(counterDoubleField)', [] ); + testErrorsAndWarnings('from a_index | stats var0 = median(counterDoubleField)', []); testErrorsAndWarnings( - 'row var = st_intersects(to_geopoint("a"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median(counterDoubleField)', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_geoshape("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median(counterDoubleField)', [] ); testErrorsAndWarnings( - 'row st_intersects(to_geoshape("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats median(counterDoubleField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_geoshape("POINT (30 10)"), to_geopoint("a"))', + 'from a_index | stats var0 = median(counterDoubleField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median(counterDoubleField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row st_intersects(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median(counterDoubleField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median(counterDoubleField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'row st_intersects(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median(counterDoubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianpoint("a"), to_cartesianpoint("a"))', - [] - ); + testErrorsAndWarnings('from a_index | sort median(integerField)', [ + 'SORT does not support function median', + ]); - testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianpoint("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('from a_index | where median(integerField)', [ + 'WHERE does not support function median', + ]); - testErrorsAndWarnings( - 'row st_intersects(to_cartesianpoint("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('from a_index | where median(integerField) > 0', [ + 'WHERE does not support function median', + ]); - testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianpoint("a"), to_cartesianshape("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('from a_index | where median(counterIntegerField)', [ + 'WHERE does not support function median', + ]); - testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', - [] - ); + testErrorsAndWarnings('from a_index | where median(counterIntegerField) > 0', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(doubleField)', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(doubleField) > 0', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(unsignedLongField)', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(unsignedLongField) > 0', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(longField)', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(longField) > 0', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(counterLongField)', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(counterLongField) > 0', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(counterDoubleField)', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | where median(counterDoubleField) > 0', [ + 'WHERE does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(integerField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(integerField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(integerField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(integerField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(counterIntegerField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(counterIntegerField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(counterIntegerField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(counterIntegerField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(doubleField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(doubleField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(doubleField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(doubleField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(unsignedLongField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(unsignedLongField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(unsignedLongField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(unsignedLongField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(longField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(longField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(longField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(longField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(counterLongField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(counterLongField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(counterLongField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(counterLongField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(counterDoubleField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval var = median(counterDoubleField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(counterDoubleField)', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | eval median(counterDoubleField) > 0', [ + 'EVAL does not support function median', + ]); + + testErrorsAndWarnings('from a_index | stats median(null)', []); + testErrorsAndWarnings('row nullVar = null | stats median(nullVar)', []); + }); + describe('median_absolute_deviation', () => { testErrorsAndWarnings( - 'row st_intersects(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats var = median_absolute_deviation(integerField)', [] ); + testErrorsAndWarnings('from a_index | stats median_absolute_deviation(integerField)', []); testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("a"))', + 'from a_index | stats var = round(median_absolute_deviation(integerField))', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats round(median_absolute_deviation(integerField))', [] ); testErrorsAndWarnings( - 'row st_intersects(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats var = round(median_absolute_deviation(integerField)) + median_absolute_deviation(integerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(geoPointField, geoPointField)', + 'from a_index | stats round(median_absolute_deviation(integerField)) + median_absolute_deviation(integerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(geoPointField, geoPointField)', + 'from a_index | stats median_absolute_deviation(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_geopoint(stringField), to_geopoint(stringField))', + 'from a_index | stats var0 = median_absolute_deviation(doubleField / 2)', [] ); - testErrorsAndWarnings('from a_index | eval st_intersects(stringField, stringField)', [ - '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( - 'from a_index | eval st_intersects(geoPointField, geoPointField, extraArg)', - ['Error: [st_intersects] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), median_absolute_deviation(doubleField / 2)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(geoPointField, geoShapeField)', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(geoPointField, geoShapeField)', + 'from a_index | stats var0 = median_absolute_deviation(integerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_geopoint(stringField), geoShapeField)', + 'from a_index | stats avg(doubleField), median_absolute_deviation(integerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(geoPointField, geoShapeField, extraArg)', - ['Error: [st_intersects] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(integerField)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(geoShapeField, geoPointField)', + 'from a_index | stats median_absolute_deviation(integerField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(geoShapeField, geoPointField)', + 'from a_index | stats var0 = median_absolute_deviation(integerField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(geoShapeField, to_geopoint(stringField))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(integerField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(geoShapeField, geoPointField, extraArg)', - ['Error: [st_intersects] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(integerField) by var1 = round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(geoShapeField, geoShapeField)', + 'from a_index | stats avg(doubleField), median_absolute_deviation(integerField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(geoShapeField, geoShapeField)', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(integerField) by var1 = round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(geoShapeField, geoShapeField, extraArg)', - ['Error: [st_intersects] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats var = median_absolute_deviation(avg(integerField))', + [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ] ); + testErrorsAndWarnings('from a_index | stats median_absolute_deviation(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); + + testErrorsAndWarnings('from a_index | stats median_absolute_deviation(booleanField)', [ + 'Argument of [median_absolute_deviation] must be [integer], found value [booleanField] type [boolean]', + ]); + + testErrorsAndWarnings('from a_index | stats var = median_absolute_deviation(*)', [ + 'Using wildcards (*) in median_absolute_deviation is not allowed', + ]); + testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(cartesianPointField, cartesianPointField)', + 'from a_index | stats var = median_absolute_deviation(counterIntegerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(cartesianPointField, cartesianPointField)', + 'from a_index | stats median_absolute_deviation(counterIntegerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_cartesianpoint(stringField), to_cartesianpoint(stringField))', + 'from a_index | stats var = round(median_absolute_deviation(counterIntegerField))', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(cartesianPointField, cartesianPointField, extraArg)', - ['Error: [st_intersects] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats round(median_absolute_deviation(counterIntegerField))', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(cartesianPointField, cartesianShapeField)', + 'from a_index | stats var = round(median_absolute_deviation(counterIntegerField)) + median_absolute_deviation(counterIntegerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(cartesianPointField, cartesianShapeField)', + 'from a_index | stats round(median_absolute_deviation(counterIntegerField)) + median_absolute_deviation(counterIntegerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_cartesianpoint(stringField), cartesianShapeField)', + 'from a_index | stats var0 = median_absolute_deviation(counterIntegerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(cartesianPointField, cartesianShapeField, extraArg)', - ['Error: [st_intersects] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), median_absolute_deviation(counterIntegerField)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(cartesianShapeField, cartesianPointField)', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterIntegerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(cartesianShapeField, cartesianPointField)', + 'from a_index | stats median_absolute_deviation(counterIntegerField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(cartesianShapeField, to_cartesianpoint(stringField))', + 'from a_index | stats var0 = median_absolute_deviation(counterIntegerField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(cartesianShapeField, cartesianPointField, extraArg)', - ['Error: [st_intersects] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), median_absolute_deviation(counterIntegerField) by round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(cartesianShapeField, cartesianShapeField)', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterIntegerField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField)', + 'from a_index | stats avg(doubleField), median_absolute_deviation(counterIntegerField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval st_intersects(cartesianShapeField, cartesianShapeField, extraArg)', - ['Error: [st_intersects] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterIntegerField) by var1 = round(doubleField / 2), doubleField / 2', + [] ); testErrorsAndWarnings( - 'from a_index | sort st_intersects(geoPointField, geoPointField)', + 'from a_index | stats var = median_absolute_deviation(doubleField)', [] ); + testErrorsAndWarnings('from a_index | stats median_absolute_deviation(doubleField)', []); testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var = round(median_absolute_deviation(doubleField))', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats round(median_absolute_deviation(doubleField))', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var = round(median_absolute_deviation(doubleField)) + median_absolute_deviation(doubleField)', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats round(median_absolute_deviation(doubleField)) + median_absolute_deviation(doubleField)', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', + 'from a_index | stats var0 = median_absolute_deviation(doubleField)', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_geopoint(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(doubleField)', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_geoshape(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(doubleField)', [] ); testErrorsAndWarnings( - 'row var = st_intersects(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', + 'from a_index | stats median_absolute_deviation(doubleField) by round(doubleField / 2)', [] ); - 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))', + 'from a_index | stats var0 = median_absolute_deviation(doubleField) by var1 = round(doubleField / 2)', [] ); - 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))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(doubleField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(doubleField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(doubleField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geopoint(geoPointField))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(doubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_geopoint(geoPointField), to_geoshape(geoPointField))', + 'from a_index | stats var = median_absolute_deviation(unsignedLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geopoint(geoPointField))', + 'from a_index | stats median_absolute_deviation(unsignedLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_intersects(to_geoshape(geoPointField), to_geoshape(geoPointField))', + 'from a_index | stats var = round(median_absolute_deviation(unsignedLongField))', [] ); testErrorsAndWarnings( - 'from a_index | sort st_intersects(cartesianPointField, cartesianPointField)', + 'from a_index | stats round(median_absolute_deviation(unsignedLongField))', [] ); - testErrorsAndWarnings('from a_index | eval st_intersects(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval st_intersects(nullVar, nullVar)', []); - }); - describe('st_within', () => { testErrorsAndWarnings( - 'row var = st_within(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats var = round(median_absolute_deviation(unsignedLongField)) + median_absolute_deviation(unsignedLongField)', [] ); testErrorsAndWarnings( - 'row st_within(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats round(median_absolute_deviation(unsignedLongField)) + median_absolute_deviation(unsignedLongField)', [] ); - testErrorsAndWarnings('row var = st_within(to_geopoint("a"), to_geopoint("a"))', []); - - testErrorsAndWarnings('row var = st_within("a", "a")', [ - '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( - 'row var = st_within(to_geopoint("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats var0 = median_absolute_deviation(unsignedLongField)', [] ); testErrorsAndWarnings( - 'row st_within(to_geopoint("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(unsignedLongField)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_geopoint("a"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(unsignedLongField)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_geoshape("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats median_absolute_deviation(unsignedLongField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row st_within(to_geoshape("POINT (30 10)"), to_geopoint("POINT (30 10)"))', + 'from a_index | stats var0 = median_absolute_deviation(unsignedLongField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_geoshape("POINT (30 10)"), to_geopoint("a"))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(unsignedLongField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_within(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(unsignedLongField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row st_within(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(unsignedLongField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'row var = st_within(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(unsignedLongField) by var1 = round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'row st_within(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats var = median_absolute_deviation(longField)', [] ); + testErrorsAndWarnings('from a_index | stats median_absolute_deviation(longField)', []); testErrorsAndWarnings( - 'row var = st_within(to_cartesianpoint("a"), to_cartesianpoint("a"))', + 'from a_index | stats var = round(median_absolute_deviation(longField))', [] ); testErrorsAndWarnings( - 'row var = st_within(to_cartesianpoint("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats round(median_absolute_deviation(longField))', [] ); testErrorsAndWarnings( - 'row st_within(to_cartesianpoint("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats var = round(median_absolute_deviation(longField)) + median_absolute_deviation(longField)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_cartesianpoint("a"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats round(median_absolute_deviation(longField)) + median_absolute_deviation(longField)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats var0 = median_absolute_deviation(longField)', [] ); testErrorsAndWarnings( - 'row st_within(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(longField)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_cartesianshape("POINT (30 10)"), to_cartesianpoint("a"))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(longField)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats median_absolute_deviation(longField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row st_within(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats var0 = median_absolute_deviation(longField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(geoPointField, geoPointField)', + 'from a_index | stats avg(doubleField), median_absolute_deviation(longField) by round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('from a_index | eval st_within(geoPointField, geoPointField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_geopoint(stringField), to_geopoint(stringField))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(longField) by var1 = round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('from a_index | eval st_within(stringField, stringField)', [ - '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)', - ['Error: [st_within] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), median_absolute_deviation(longField) by round(doubleField / 2), doubleField / 2', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(geoPointField, geoShapeField)', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(longField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval st_within(geoPointField, geoShapeField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_geopoint(stringField), geoShapeField)', + 'from a_index | stats var = median_absolute_deviation(counterLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(geoPointField, geoShapeField, extraArg)', - ['Error: [st_within] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats median_absolute_deviation(counterLongField)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(geoShapeField, geoPointField)', + 'from a_index | stats var = round(median_absolute_deviation(counterLongField))', [] ); - testErrorsAndWarnings('from a_index | eval st_within(geoShapeField, geoPointField)', []); testErrorsAndWarnings( - 'from a_index | eval var = st_within(geoShapeField, to_geopoint(stringField))', + 'from a_index | stats round(median_absolute_deviation(counterLongField))', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(geoShapeField, geoPointField, extraArg)', - ['Error: [st_within] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats var = round(median_absolute_deviation(counterLongField)) + median_absolute_deviation(counterLongField)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(geoShapeField, geoShapeField)', + 'from a_index | stats round(median_absolute_deviation(counterLongField)) + median_absolute_deviation(counterLongField)', [] ); - 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.'] + 'from a_index | stats var0 = median_absolute_deviation(counterLongField)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(cartesianPointField, cartesianPointField)', + 'from a_index | stats avg(doubleField), median_absolute_deviation(counterLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(cartesianPointField, cartesianPointField)', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterLongField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_cartesianpoint(stringField), to_cartesianpoint(stringField))', + 'from a_index | stats median_absolute_deviation(counterLongField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(cartesianPointField, cartesianPointField, extraArg)', - ['Error: [st_within] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats var0 = median_absolute_deviation(counterLongField) by var1 = round(doubleField / 2)', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(cartesianPointField, cartesianShapeField)', + 'from a_index | stats avg(doubleField), median_absolute_deviation(counterLongField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(cartesianPointField, cartesianShapeField)', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterLongField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_cartesianpoint(stringField), cartesianShapeField)', + 'from a_index | stats avg(doubleField), median_absolute_deviation(counterLongField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(cartesianPointField, cartesianShapeField, extraArg)', - ['Error: [st_within] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterLongField) by var1 = round(doubleField / 2), doubleField / 2', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(cartesianShapeField, cartesianPointField)', + 'from a_index | stats var = median_absolute_deviation(counterDoubleField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(cartesianShapeField, cartesianPointField)', + 'from a_index | stats median_absolute_deviation(counterDoubleField)', [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(cartesianShapeField, to_cartesianpoint(stringField))', + 'from a_index | stats var = round(median_absolute_deviation(counterDoubleField))', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(cartesianShapeField, cartesianPointField, extraArg)', - ['Error: [st_within] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats round(median_absolute_deviation(counterDoubleField))', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(cartesianShapeField, cartesianShapeField)', + 'from a_index | stats var = round(median_absolute_deviation(counterDoubleField)) + median_absolute_deviation(counterDoubleField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(cartesianShapeField, cartesianShapeField)', + 'from a_index | stats round(median_absolute_deviation(counterDoubleField)) + median_absolute_deviation(counterDoubleField)', [] ); testErrorsAndWarnings( - 'from a_index | eval st_within(cartesianShapeField, cartesianShapeField, extraArg)', - ['Error: [st_within] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats var0 = median_absolute_deviation(counterDoubleField)', + [] ); - testErrorsAndWarnings('from a_index | sort st_within(geoPointField, geoPointField)', []); - testErrorsAndWarnings( - 'row var = st_within(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(counterDoubleField)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterDoubleField)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats median_absolute_deviation(counterDoubleField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var0 = median_absolute_deviation(counterDoubleField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = st_within(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(counterDoubleField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_within(to_geopoint(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterDoubleField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'row var = st_within(to_geoshape(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), median_absolute_deviation(counterDoubleField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'row var = st_within(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), var0 = median_absolute_deviation(counterDoubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - 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 | sort median_absolute_deviation(integerField)', [ + 'SORT does not support function median_absolute_deviation', + ]); + + testErrorsAndWarnings('from a_index | where median_absolute_deviation(integerField)', [ + 'WHERE does not support function median_absolute_deviation', + ]); + + testErrorsAndWarnings('from a_index | where median_absolute_deviation(integerField) > 0', [ + 'WHERE does not support function median_absolute_deviation', ]); testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', - [] + 'from a_index | where median_absolute_deviation(counterIntegerField)', + ['WHERE does not support function median_absolute_deviation'] ); - 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 | where median_absolute_deviation(counterIntegerField) > 0', + ['WHERE does not support function median_absolute_deviation'] + ); + + testErrorsAndWarnings('from a_index | where median_absolute_deviation(doubleField)', [ + 'WHERE does not support function median_absolute_deviation', + ]); + + testErrorsAndWarnings('from a_index | where median_absolute_deviation(doubleField) > 0', [ + 'WHERE does not support function median_absolute_deviation', + ]); + + testErrorsAndWarnings('from a_index | where median_absolute_deviation(unsignedLongField)', [ + 'WHERE does not support function median_absolute_deviation', ]); testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_cartesianpoint(cartesianPointField), to_cartesianshape(cartesianPointField))', - [] + 'from a_index | where median_absolute_deviation(unsignedLongField) > 0', + ['WHERE does not support function median_absolute_deviation'] ); + testErrorsAndWarnings('from a_index | where median_absolute_deviation(longField)', [ + 'WHERE does not support function median_absolute_deviation', + ]); + + testErrorsAndWarnings('from a_index | where median_absolute_deviation(longField) > 0', [ + 'WHERE does not support function median_absolute_deviation', + ]); + + testErrorsAndWarnings('from a_index | where median_absolute_deviation(counterLongField)', [ + 'WHERE does not support function median_absolute_deviation', + ]); + testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianpoint(cartesianPointField))', - [] + 'from a_index | where median_absolute_deviation(counterLongField) > 0', + ['WHERE does not support function median_absolute_deviation'] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', - [] + 'from a_index | where median_absolute_deviation(counterDoubleField)', + ['WHERE does not support function median_absolute_deviation'] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_geopoint(geoPointField), to_geopoint(geoPointField))', - [] + 'from a_index | where median_absolute_deviation(counterDoubleField) > 0', + ['WHERE does not support function median_absolute_deviation'] ); + testErrorsAndWarnings('from a_index | eval var = median_absolute_deviation(integerField)', [ + 'EVAL does not support function median_absolute_deviation', + ]); + testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_geopoint(geoPointField), to_geoshape(geoPointField))', - [] + 'from a_index | eval var = median_absolute_deviation(integerField) > 0', + ['EVAL does not support function median_absolute_deviation'] ); + testErrorsAndWarnings('from a_index | eval median_absolute_deviation(integerField)', [ + 'EVAL does not support function median_absolute_deviation', + ]); + + testErrorsAndWarnings('from a_index | eval median_absolute_deviation(integerField) > 0', [ + 'EVAL does not support function median_absolute_deviation', + ]); + testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_geoshape(geoPointField), to_geopoint(geoPointField))', - [] + 'from a_index | eval var = median_absolute_deviation(counterIntegerField)', + ['EVAL does not support function median_absolute_deviation'] ); testErrorsAndWarnings( - 'from a_index | eval var = st_within(to_geoshape(geoPointField), to_geoshape(geoPointField))', - [] + 'from a_index | eval var = median_absolute_deviation(counterIntegerField) > 0', + ['EVAL does not support function median_absolute_deviation'] ); testErrorsAndWarnings( - 'from a_index | sort st_within(cartesianPointField, cartesianPointField)', - [] + 'from a_index | eval median_absolute_deviation(counterIntegerField)', + ['EVAL does not support function median_absolute_deviation'] ); - testErrorsAndWarnings('from a_index | eval st_within(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval st_within(nullVar, nullVar)', []); - }); - describe('st_x', () => { - testErrorsAndWarnings('row var = st_x(to_geopoint("POINT (30 10)"))', []); - testErrorsAndWarnings('row st_x(to_geopoint("POINT (30 10)"))', []); - testErrorsAndWarnings('row var = st_x(to_geopoint("a"))', []); + testErrorsAndWarnings( + 'from a_index | eval median_absolute_deviation(counterIntegerField) > 0', + ['EVAL does not support function median_absolute_deviation'] + ); - testErrorsAndWarnings('row var = st_x("a")', [ - 'Argument of [st_x] must be [cartesian_point], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | eval var = median_absolute_deviation(doubleField)', [ + 'EVAL does not support function median_absolute_deviation', ]); - testErrorsAndWarnings('row var = st_x(to_cartesianpoint("POINT (30 10)"))', []); - testErrorsAndWarnings('row st_x(to_cartesianpoint("POINT (30 10)"))', []); - testErrorsAndWarnings('row var = st_x(to_cartesianpoint("a"))', []); - testErrorsAndWarnings('from a_index | eval var = st_x(geoPointField)', []); - testErrorsAndWarnings('from a_index | eval st_x(geoPointField)', []); - testErrorsAndWarnings('from a_index | eval var = st_x(to_geopoint(stringField))', []); + testErrorsAndWarnings( + 'from a_index | eval var = median_absolute_deviation(doubleField) > 0', + ['EVAL does not support function median_absolute_deviation'] + ); - testErrorsAndWarnings('from a_index | eval st_x(stringField)', [ - 'Argument of [st_x] must be [cartesian_point], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval median_absolute_deviation(doubleField)', [ + 'EVAL does not support function median_absolute_deviation', ]); - testErrorsAndWarnings('from a_index | eval st_x(geoPointField, extraArg)', [ - 'Error: [st_x] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval median_absolute_deviation(doubleField) > 0', [ + 'EVAL does not support function median_absolute_deviation', ]); - testErrorsAndWarnings('from a_index | eval var = st_x(*)', [ - 'Using wildcards (*) in st_x is not allowed', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = median_absolute_deviation(unsignedLongField)', + ['EVAL does not support function median_absolute_deviation'] + ); - testErrorsAndWarnings('from a_index | eval var = st_x(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval st_x(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval var = st_x(to_cartesianpoint(stringField))', []); + testErrorsAndWarnings( + 'from a_index | eval var = median_absolute_deviation(unsignedLongField) > 0', + ['EVAL does not support function median_absolute_deviation'] + ); - testErrorsAndWarnings('from a_index | eval st_x(cartesianPointField, extraArg)', [ - 'Error: [st_x] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval median_absolute_deviation(unsignedLongField)', [ + 'EVAL does not support function median_absolute_deviation', ]); - testErrorsAndWarnings('from a_index | sort st_x(geoPointField)', []); - testErrorsAndWarnings( - 'row var = st_x(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', - [] + 'from a_index | eval median_absolute_deviation(unsignedLongField) > 0', + ['EVAL does not support function median_absolute_deviation'] ); - 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 = median_absolute_deviation(longField)', [ + 'EVAL does not support function median_absolute_deviation', ]); testErrorsAndWarnings( - 'from a_index | eval var = st_x(to_cartesianpoint(cartesianPointField))', - [] + 'from a_index | eval var = median_absolute_deviation(longField) > 0', + ['EVAL does not support function median_absolute_deviation'] ); - 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 median_absolute_deviation(longField)', [ + 'EVAL does not support function median_absolute_deviation', ]); - testErrorsAndWarnings('from a_index | eval var = st_x(to_geopoint(geoPointField))', []); - testErrorsAndWarnings('from a_index | sort st_x(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval st_x(null)', []); - testErrorsAndWarnings('row nullVar = null | eval st_x(nullVar)', []); - }); - - describe('st_y', () => { - testErrorsAndWarnings('row var = st_y(to_geopoint("POINT (30 10)"))', []); - testErrorsAndWarnings('row st_y(to_geopoint("POINT (30 10)"))', []); - testErrorsAndWarnings('row var = st_y(to_geopoint("a"))', []); - - testErrorsAndWarnings('row var = st_y("a")', [ - 'Argument of [st_y] must be [cartesian_point], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | eval median_absolute_deviation(longField) > 0', [ + 'EVAL does not support function median_absolute_deviation', ]); - testErrorsAndWarnings('row var = st_y(to_cartesianpoint("POINT (30 10)"))', []); - testErrorsAndWarnings('row st_y(to_cartesianpoint("POINT (30 10)"))', []); - testErrorsAndWarnings('row var = st_y(to_cartesianpoint("a"))', []); - testErrorsAndWarnings('from a_index | eval var = st_y(geoPointField)', []); - testErrorsAndWarnings('from a_index | eval st_y(geoPointField)', []); - testErrorsAndWarnings('from a_index | eval var = st_y(to_geopoint(stringField))', []); + testErrorsAndWarnings( + 'from a_index | eval var = median_absolute_deviation(counterLongField)', + ['EVAL does not support function median_absolute_deviation'] + ); - testErrorsAndWarnings('from a_index | eval st_y(stringField)', [ - 'Argument of [st_y] must be [cartesian_point], found value [stringField] type [string]', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = median_absolute_deviation(counterLongField) > 0', + ['EVAL does not support function median_absolute_deviation'] + ); - testErrorsAndWarnings('from a_index | eval st_y(geoPointField, extraArg)', [ - 'Error: [st_y] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval median_absolute_deviation(counterLongField)', [ + 'EVAL does not support function median_absolute_deviation', ]); - testErrorsAndWarnings('from a_index | eval var = st_y(*)', [ - 'Using wildcards (*) in st_y is not allowed', - ]); + testErrorsAndWarnings( + 'from a_index | eval median_absolute_deviation(counterLongField) > 0', + ['EVAL does not support function median_absolute_deviation'] + ); - testErrorsAndWarnings('from a_index | eval var = st_y(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval st_y(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval var = st_y(to_cartesianpoint(stringField))', []); + testErrorsAndWarnings( + 'from a_index | eval var = median_absolute_deviation(counterDoubleField)', + ['EVAL does not support function median_absolute_deviation'] + ); - testErrorsAndWarnings('from a_index | eval st_y(cartesianPointField, extraArg)', [ - 'Error: [st_y] function expects exactly one argument, got 2.', + testErrorsAndWarnings( + 'from a_index | eval var = median_absolute_deviation(counterDoubleField) > 0', + ['EVAL does not support function median_absolute_deviation'] + ); + + testErrorsAndWarnings('from a_index | eval median_absolute_deviation(counterDoubleField)', [ + 'EVAL does not support function median_absolute_deviation', ]); - testErrorsAndWarnings('from a_index | sort st_y(geoPointField)', []); + testErrorsAndWarnings( + 'from a_index | eval median_absolute_deviation(counterDoubleField) > 0', + ['EVAL does not support function median_absolute_deviation'] + ); + + testErrorsAndWarnings('from a_index | stats median_absolute_deviation(null)', []); + testErrorsAndWarnings('row nullVar = null | stats median_absolute_deviation(nullVar)', []); + }); + describe('max', () => { + testErrorsAndWarnings('from a_index | stats var = max(doubleField)', []); + testErrorsAndWarnings('from a_index | stats max(doubleField)', []); + testErrorsAndWarnings('from a_index | stats var = round(max(doubleField))', []); + testErrorsAndWarnings('from a_index | stats round(max(doubleField))', []); testErrorsAndWarnings( - 'row var = st_y(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var = round(max(doubleField)) + max(doubleField)', [] ); - 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))', + 'from a_index | stats round(max(doubleField)) + max(doubleField)', + [] + ); + testErrorsAndWarnings('from a_index | stats max(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats var0 = max(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), max(doubleField / 2)', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = max(doubleField / 2)', + [] + ); + testErrorsAndWarnings('from a_index | stats var0 = max(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), max(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), var0 = max(doubleField)', []); + testErrorsAndWarnings( + 'from a_index | stats max(doubleField) by round(doubleField / 2)', [] ); - 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)', []); - testErrorsAndWarnings('from a_index | eval st_y(null)', []); - testErrorsAndWarnings('row nullVar = null | eval st_y(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats var0 = max(doubleField) by var1 = round(doubleField / 2)', + [] + ); - describe('starts_with', () => { - testErrorsAndWarnings('row var = starts_with("a", "a")', []); - testErrorsAndWarnings('row starts_with("a", "a")', []); - testErrorsAndWarnings('row var = starts_with(to_string("a"), to_string("a"))', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), max(doubleField) by round(doubleField / 2), ipField', + [] + ); - testErrorsAndWarnings('row var = starts_with(5, 5)', [ - 'Argument of [starts_with] must be [string], found value [5] type [number]', - 'Argument of [starts_with] must be [string], found value [5] type [number]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = max(doubleField) by var1 = round(doubleField / 2), ipField', + [] + ); testErrorsAndWarnings( - 'from a_index | eval var = starts_with(stringField, stringField)', + 'from a_index | stats avg(doubleField), max(doubleField) by round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval starts_with(stringField, stringField)', []); testErrorsAndWarnings( - 'from a_index | eval var = starts_with(to_string(stringField), to_string(stringField))', + 'from a_index | stats avg(doubleField), var0 = max(doubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | eval starts_with(numberField, numberField)', [ - 'Argument of [starts_with] must be [string], found value [numberField] type [number]', - 'Argument of [starts_with] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | stats var = max(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", ]); - testErrorsAndWarnings( - 'from a_index | eval starts_with(stringField, stringField, extraArg)', - ['Error: [starts_with] function expects exactly 2 arguments, got 3.'] - ); + testErrorsAndWarnings('from a_index | stats max(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); - testErrorsAndWarnings('from a_index | sort starts_with(stringField, stringField)', []); - testErrorsAndWarnings('row var = starts_with(to_string(true), to_string(true))', []); + testErrorsAndWarnings('from a_index | stats max(cartesianPointField)', [ + 'Argument of [max] must be [double], found value [cartesianPointField] type [cartesian_point]', + ]); - 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 | stats var = max(*)', [ + 'Using wildcards (*) in max is not allowed', ]); + testErrorsAndWarnings('from a_index | stats var = max(longField)', []); + testErrorsAndWarnings('from a_index | stats max(longField)', []); + testErrorsAndWarnings('from a_index | stats var = round(max(longField))', []); + testErrorsAndWarnings('from a_index | stats round(max(longField))', []); testErrorsAndWarnings( - 'from a_index | eval var = starts_with(to_string(booleanField), to_string(booleanField))', + 'from a_index | stats var = round(max(longField)) + max(longField)', [] ); - - 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]', - ]); - testErrorsAndWarnings('from a_index | eval starts_with(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval starts_with(nullVar, nullVar)', []); - }); - - 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('from a_index | stats round(max(longField)) + max(longField)', []); + testErrorsAndWarnings('from a_index | stats var0 = max(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), max(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), var0 = max(longField)', []); + testErrorsAndWarnings('from a_index | stats max(longField) by round(doubleField / 2)', []); testErrorsAndWarnings( - 'row var = substring(to_string("a"), to_integer("a"), to_integer("a"))', + 'from a_index | stats var0 = max(longField) by var1 = round(doubleField / 2)', [] ); - testErrorsAndWarnings('row var = substring(5, "a", "a")', [ - '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]', - ]); - testErrorsAndWarnings( - 'from a_index | where length(substring(stringField, numberField, numberField)) > 0', + 'from a_index | stats avg(doubleField), max(longField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | where length(substring(numberField, stringField, stringField)) > 0', - [ - '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]', - ] + 'from a_index | stats avg(doubleField), var0 = max(longField) by var1 = round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = substring(stringField, numberField, numberField)', + 'from a_index | stats avg(doubleField), max(longField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval substring(stringField, numberField, numberField)', + 'from a_index | stats avg(doubleField), var0 = max(longField) by var1 = round(doubleField / 2), doubleField / 2', [] ); + testErrorsAndWarnings('from a_index | stats var = max(integerField)', []); + testErrorsAndWarnings('from a_index | stats max(integerField)', []); + testErrorsAndWarnings('from a_index | stats var = round(max(integerField))', []); + testErrorsAndWarnings('from a_index | stats round(max(integerField))', []); + testErrorsAndWarnings( - 'from a_index | eval var = substring(to_string(stringField), to_integer(stringField), to_integer(stringField))', + 'from a_index | stats var = round(max(integerField)) + max(integerField)', [] ); testErrorsAndWarnings( - 'from a_index | eval substring(numberField, stringField, stringField)', - [ - '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]', - ] + 'from a_index | stats round(max(integerField)) + max(integerField)', + [] ); - + testErrorsAndWarnings('from a_index | stats var0 = max(integerField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), max(integerField)', []); testErrorsAndWarnings( - 'from a_index | eval substring(stringField, numberField, numberField, extraArg)', - ['Error: [substring] function expects no more than 3 arguments, got 4.'] + 'from a_index | stats avg(doubleField), var0 = max(integerField)', + [] ); - testErrorsAndWarnings( - 'from a_index | sort substring(stringField, numberField, numberField)', + 'from a_index | stats max(integerField) by round(doubleField / 2)', [] ); - testErrorsAndWarnings('from a_index | sort substring(stringField, numberField)', []); testErrorsAndWarnings( - 'row var = substring(to_string(true), to_integer(true), to_integer(true))', + 'from a_index | stats var0 = max(integerField) by var1 = round(doubleField / 2)', [] ); - 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 | stats avg(doubleField), max(integerField) by round(doubleField / 2), ipField', + [] + ); 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]', - ] + 'from a_index | stats avg(doubleField), var0 = max(integerField) by var1 = round(doubleField / 2), ipField', + [] ); testErrorsAndWarnings( - 'from a_index | eval var = substring(to_string(booleanField), to_integer(booleanField), to_integer(booleanField))', + 'from a_index | stats avg(doubleField), max(integerField) by round(doubleField / 2), doubleField / 2', [] ); 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]', - ] + 'from a_index | stats avg(doubleField), var0 = max(integerField) by var1 = round(doubleField / 2), doubleField / 2', + [] ); - testErrorsAndWarnings('from a_index | eval substring(null, null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval substring(nullVar, nullVar, nullVar)', []); - }); - describe('tan', () => { - testErrorsAndWarnings('row var = tan(5)', []); - testErrorsAndWarnings('row tan(5)', []); - testErrorsAndWarnings('row var = tan(to_integer("a"))', []); + testErrorsAndWarnings('from a_index | stats var = max(dateField)', []); + testErrorsAndWarnings('from a_index | stats max(dateField)', []); + testErrorsAndWarnings('from a_index | stats var = max(datePeriodField)', []); + testErrorsAndWarnings('from a_index | stats max(datePeriodField)', []); + testErrorsAndWarnings('from a_index | stats var = max(booleanField)', []); + testErrorsAndWarnings('from a_index | stats max(booleanField)', []); + testErrorsAndWarnings('from a_index | stats var = max(ipField)', []); + testErrorsAndWarnings('from a_index | stats max(ipField)', []); - testErrorsAndWarnings('row var = tan("a")', [ - 'Argument of [tan] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | sort max(doubleField)', [ + 'SORT does not support function max', ]); - testErrorsAndWarnings('from a_index | where tan(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where max(doubleField)', [ + 'WHERE does not support function max', + ]); - testErrorsAndWarnings('from a_index | where tan(stringField) > 0', [ - 'Argument of [tan] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where max(doubleField) > 0', [ + 'WHERE does not support function max', ]); - testErrorsAndWarnings('from a_index | eval var = tan(numberField)', []); - testErrorsAndWarnings('from a_index | eval tan(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = tan(to_integer(stringField))', []); + testErrorsAndWarnings('from a_index | where max(longField)', [ + 'WHERE does not support function max', + ]); - testErrorsAndWarnings('from a_index | eval tan(stringField)', [ - 'Argument of [tan] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where max(longField) > 0', [ + 'WHERE does not support function max', ]); - testErrorsAndWarnings('from a_index | eval tan(numberField, extraArg)', [ - 'Error: [tan] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | where max(integerField)', [ + 'WHERE does not support function max', ]); - testErrorsAndWarnings('from a_index | eval var = tan(*)', [ - 'Using wildcards (*) in tan is not allowed', + testErrorsAndWarnings('from a_index | where max(integerField) > 0', [ + 'WHERE does not support function max', ]); - testErrorsAndWarnings('from a_index | sort tan(numberField)', []); - testErrorsAndWarnings('row var = tan(to_integer(true))', []); + testErrorsAndWarnings('from a_index | where max(dateField)', [ + 'WHERE does not support function max', + ]); - testErrorsAndWarnings('row var = tan(true)', [ - 'Argument of [tan] must be [number], found value [true] type [boolean]', + testErrorsAndWarnings('from a_index | where max(dateField) > 0', [ + 'WHERE does not support function max', ]); - testErrorsAndWarnings('from a_index | where tan(booleanField) > 0', [ - 'Argument of [tan] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | where max(datePeriodField)', [ + 'WHERE does not support function max', ]); - testErrorsAndWarnings('from a_index | eval var = tan(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | where max(datePeriodField) > 0', [ + 'WHERE does not support function max', + ]); - testErrorsAndWarnings('from a_index | eval tan(booleanField)', [ - 'Argument of [tan] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | where max(booleanField)', [ + 'WHERE does not support function max', ]); - testErrorsAndWarnings('from a_index | eval tan(null)', []); - testErrorsAndWarnings('row nullVar = null | eval tan(nullVar)', []); - }); - describe('tanh', () => { - testErrorsAndWarnings('row var = tanh(5)', []); - testErrorsAndWarnings('row tanh(5)', []); - testErrorsAndWarnings('row var = tanh(to_integer("a"))', []); + testErrorsAndWarnings('from a_index | where max(booleanField) > 0', [ + 'WHERE does not support function max', + ]); - testErrorsAndWarnings('row var = tanh("a")', [ - 'Argument of [tanh] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | where max(ipField)', [ + 'WHERE does not support function max', ]); - testErrorsAndWarnings('from a_index | where tanh(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where max(ipField) > 0', [ + 'WHERE does not support function max', + ]); - testErrorsAndWarnings('from a_index | where tanh(stringField) > 0', [ - 'Argument of [tanh] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval var = max(doubleField)', [ + 'EVAL does not support function max', ]); - testErrorsAndWarnings('from a_index | eval var = tanh(numberField)', []); - testErrorsAndWarnings('from a_index | eval tanh(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = tanh(to_integer(stringField))', []); + testErrorsAndWarnings('from a_index | eval var = max(doubleField) > 0', [ + 'EVAL does not support function max', + ]); - testErrorsAndWarnings('from a_index | eval tanh(stringField)', [ - 'Argument of [tanh] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval max(doubleField)', [ + 'EVAL does not support function max', ]); - testErrorsAndWarnings('from a_index | eval tanh(numberField, extraArg)', [ - 'Error: [tanh] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval max(doubleField) > 0', [ + 'EVAL does not support function max', ]); - testErrorsAndWarnings('from a_index | eval var = tanh(*)', [ - 'Using wildcards (*) in tanh is not allowed', + testErrorsAndWarnings('from a_index | eval var = max(longField)', [ + 'EVAL does not support function max', ]); - testErrorsAndWarnings('from a_index | sort tanh(numberField)', []); - testErrorsAndWarnings('row var = tanh(to_integer(true))', []); + testErrorsAndWarnings('from a_index | eval var = max(longField) > 0', [ + 'EVAL does not support function max', + ]); - testErrorsAndWarnings('row var = tanh(true)', [ - 'Argument of [tanh] must be [number], found value [true] type [boolean]', + testErrorsAndWarnings('from a_index | eval max(longField)', [ + 'EVAL does not support function max', ]); - testErrorsAndWarnings('from a_index | where tanh(booleanField) > 0', [ - 'Argument of [tanh] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval max(longField) > 0', [ + 'EVAL does not support function max', ]); - testErrorsAndWarnings('from a_index | eval var = tanh(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = max(integerField)', [ + 'EVAL does not support function max', + ]); - testErrorsAndWarnings('from a_index | eval tanh(booleanField)', [ - 'Argument of [tanh] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval var = max(integerField) > 0', [ + 'EVAL does not support function max', ]); - testErrorsAndWarnings('from a_index | eval tanh(null)', []); - testErrorsAndWarnings('row nullVar = null | eval tanh(nullVar)', []); - }); - describe('tau', () => { - testErrorsAndWarnings('row var = tau()', []); - testErrorsAndWarnings('row tau()', []); - testErrorsAndWarnings('from a_index | where tau() > 0', []); - testErrorsAndWarnings('from a_index | eval var = tau()', []); - testErrorsAndWarnings('from a_index | eval tau()', []); + testErrorsAndWarnings('from a_index | eval max(integerField)', [ + 'EVAL does not support function max', + ]); - testErrorsAndWarnings('from a_index | eval tau(extraArg)', [ - 'Error: [tau] function expects exactly 0 arguments, got 1.', + testErrorsAndWarnings('from a_index | eval max(integerField) > 0', [ + 'EVAL does not support function max', ]); - testErrorsAndWarnings('from a_index | sort tau()', []); - testErrorsAndWarnings('row nullVar = null | eval tau()', []); - }); + testErrorsAndWarnings('from a_index | eval var = max(dateField)', [ + 'EVAL does not support function max', + ]); - describe('to_boolean', () => { - testErrorsAndWarnings('row var = to_boolean("a")', []); - testErrorsAndWarnings('row to_boolean("a")', []); - testErrorsAndWarnings('row var = to_bool("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_boolean(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_boolean(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_bool(stringField)', []); + testErrorsAndWarnings('from a_index | eval var = max(dateField) > 0', [ + 'EVAL does not support function max', + ]); - testErrorsAndWarnings('from a_index | eval var = to_boolean(*)', [ - 'Using wildcards (*) in to_boolean is not allowed', + testErrorsAndWarnings('from a_index | eval max(dateField)', [ + 'EVAL does not support function max', ]); - 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('from a_index | eval max(dateField) > 0', [ + 'EVAL does not support function max', + ]); - 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 = max(datePeriodField)', [ + 'EVAL does not support function max', ]); - 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 var = max(datePeriodField) > 0', [ + 'EVAL does not support function max', + ]); - 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 max(datePeriodField)', [ + 'EVAL does not support function max', ]); - 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 max(datePeriodField) > 0', [ + 'EVAL does not support function max', + ]); - testErrorsAndWarnings('from a_index | eval to_boolean(booleanField, extraArg)', [ - 'Error: [to_boolean] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval var = max(booleanField)', [ + 'EVAL does not support function max', ]); - testErrorsAndWarnings('from a_index | sort to_boolean(booleanField)', []); - testErrorsAndWarnings('from a_index | eval to_boolean(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_boolean(nullVar)', []); - }); + testErrorsAndWarnings('from a_index | eval var = max(booleanField) > 0', [ + 'EVAL does not support function max', + ]); - describe('to_cartesianpoint', () => { - testErrorsAndWarnings('row var = to_cartesianpoint("a")', []); - testErrorsAndWarnings('row to_cartesianpoint("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_cartesianpoint(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_cartesianpoint(stringField)', []); + testErrorsAndWarnings('from a_index | eval max(booleanField)', [ + 'EVAL does not support function max', + ]); - testErrorsAndWarnings('from a_index | eval var = to_cartesianpoint(*)', [ - 'Using wildcards (*) in to_cartesianpoint is not allowed', + testErrorsAndWarnings('from a_index | eval max(booleanField) > 0', [ + 'EVAL does not support function max', + ]); + + testErrorsAndWarnings('from a_index | eval var = max(ipField)', [ + 'EVAL does not support function max', + ]); + + testErrorsAndWarnings('from a_index | eval var = max(ipField) > 0', [ + 'EVAL does not support function max', + ]); + + testErrorsAndWarnings('from a_index | eval max(ipField)', [ + 'EVAL does not support function max', + ]); + + testErrorsAndWarnings('from a_index | eval max(ipField) > 0', [ + 'EVAL does not support function max', + ]); + + testErrorsAndWarnings('from a_index | stats max(null)', []); + testErrorsAndWarnings('row nullVar = null | stats max(nullVar)', []); + testErrorsAndWarnings('from a_index | stats max("2022")', []); + testErrorsAndWarnings('from a_index | stats max(concat("20", "22"))', [ + 'Argument of [max] must be [double], found value [concat("20","22")] type [keyword]', ]); + }); + + describe('min', () => { + testErrorsAndWarnings('from a_index | stats var = min(doubleField)', []); + testErrorsAndWarnings('from a_index | stats min(doubleField)', []); + testErrorsAndWarnings('from a_index | stats var = round(min(doubleField))', []); + testErrorsAndWarnings('from a_index | stats round(min(doubleField))', []); - testErrorsAndWarnings('from a_index | sort to_cartesianpoint(stringField)', []); testErrorsAndWarnings( - 'row var = to_cartesianpoint(to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats var = round(min(doubleField)) + min(doubleField)', [] ); - testErrorsAndWarnings('row to_cartesianpoint(to_cartesianpoint("POINT (30 10)"))', []); testErrorsAndWarnings( - 'row var = to_cartesianpoint(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats round(min(doubleField)) + min(doubleField)', + [] + ); + testErrorsAndWarnings('from a_index | stats min(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats var0 = min(doubleField / 2)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), min(doubleField / 2)', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = min(doubleField / 2)', + [] + ); + testErrorsAndWarnings('from a_index | stats var0 = min(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), min(doubleField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), var0 = min(doubleField)', []); + testErrorsAndWarnings( + 'from a_index | stats min(doubleField) by round(doubleField / 2)', [] ); - - 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)', + 'from a_index | stats var0 = min(doubleField) by var1 = round(doubleField / 2)', [] ); - testErrorsAndWarnings('from a_index | eval to_cartesianpoint(cartesianPointField)', []); testErrorsAndWarnings( - 'from a_index | eval var = to_cartesianpoint(to_cartesianpoint(cartesianPointField))', + 'from a_index | stats avg(doubleField), min(doubleField) by round(doubleField / 2), ipField', [] ); - 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 | stats avg(doubleField), var0 = min(doubleField) by var1 = round(doubleField / 2), ipField', + [] + ); testErrorsAndWarnings( - 'from a_index | eval var = to_cartesianpoint(to_string(booleanField))', + 'from a_index | stats avg(doubleField), min(doubleField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval to_cartesianpoint(cartesianPointField, extraArg)', - ['Error: [to_cartesianpoint] function expects exactly one argument, got 2.'] + 'from a_index | stats avg(doubleField), var0 = min(doubleField) by var1 = round(doubleField / 2), doubleField / 2', + [] ); - testErrorsAndWarnings('from a_index | sort to_cartesianpoint(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval to_cartesianpoint(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_cartesianpoint(nullVar)', []); - }); + testErrorsAndWarnings('from a_index | stats var = min(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); - describe('to_cartesianshape', () => { - testErrorsAndWarnings('row var = to_cartesianshape("a")', []); - testErrorsAndWarnings('row to_cartesianshape("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_cartesianshape(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_cartesianshape(stringField)', []); + testErrorsAndWarnings('from a_index | stats min(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ]); - testErrorsAndWarnings('from a_index | eval var = to_cartesianshape(*)', [ - 'Using wildcards (*) in to_cartesianshape is not allowed', + testErrorsAndWarnings('from a_index | stats min(cartesianPointField)', [ + 'Argument of [min] must be [double], found value [cartesianPointField] type [cartesian_point]', + ]); + + testErrorsAndWarnings('from a_index | stats var = min(*)', [ + 'Using wildcards (*) in min is not allowed', ]); - testErrorsAndWarnings('from a_index | sort to_cartesianshape(stringField)', []); + testErrorsAndWarnings('from a_index | stats var = min(longField)', []); + testErrorsAndWarnings('from a_index | stats min(longField)', []); + testErrorsAndWarnings('from a_index | stats var = round(min(longField))', []); + testErrorsAndWarnings('from a_index | stats round(min(longField))', []); testErrorsAndWarnings( - 'row var = to_cartesianshape(to_cartesianpoint("POINT (30 10)"))', + 'from a_index | stats var = round(min(longField)) + min(longField)', [] ); - testErrorsAndWarnings('row to_cartesianshape(to_cartesianpoint("POINT (30 10)"))', []); + testErrorsAndWarnings('from a_index | stats round(min(longField)) + min(longField)', []); + testErrorsAndWarnings('from a_index | stats var0 = min(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), min(longField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), var0 = min(longField)', []); + testErrorsAndWarnings('from a_index | stats min(longField) by round(doubleField / 2)', []); testErrorsAndWarnings( - 'row var = to_cartesianshape(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var0 = min(longField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'row var = to_cartesianshape(to_cartesianshape("POINT (30 10)"))', + 'from a_index | stats avg(doubleField), min(longField) by round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('row to_cartesianshape(to_cartesianshape("POINT (30 10)"))', []); testErrorsAndWarnings( - 'row var = to_cartesianshape(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats avg(doubleField), var0 = min(longField) by var1 = round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('row var = to_cartesianshape(to_string(true))', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), min(longField) by round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('row var = to_cartesianshape(true)', [ - 'Argument of [to_cartesianshape] must be [cartesian_point], found value [true] type [boolean]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = min(longField) by var1 = round(doubleField / 2), doubleField / 2', + [] + ); + + testErrorsAndWarnings('from a_index | stats var = min(integerField)', []); + testErrorsAndWarnings('from a_index | stats min(integerField)', []); + testErrorsAndWarnings('from a_index | stats var = round(min(integerField))', []); + testErrorsAndWarnings('from a_index | stats round(min(integerField))', []); testErrorsAndWarnings( - 'from a_index | eval var = to_cartesianshape(cartesianPointField)', + 'from a_index | stats var = round(min(integerField)) + min(integerField)', [] ); - testErrorsAndWarnings('from a_index | eval to_cartesianshape(cartesianPointField)', []); testErrorsAndWarnings( - 'from a_index | eval var = to_cartesianshape(to_cartesianpoint(cartesianPointField))', + 'from a_index | stats round(min(integerField)) + min(integerField)', + [] + ); + testErrorsAndWarnings('from a_index | stats var0 = min(integerField)', []); + testErrorsAndWarnings('from a_index | stats avg(doubleField), min(integerField)', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = min(integerField)', + [] + ); + testErrorsAndWarnings( + 'from a_index | stats min(integerField) by round(doubleField / 2)', [] ); - 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 | stats var0 = min(integerField) by var1 = round(doubleField / 2)', + [] + ); testErrorsAndWarnings( - 'from a_index | eval var = to_cartesianshape(cartesianShapeField)', + 'from a_index | stats avg(doubleField), min(integerField) by round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('from a_index | eval to_cartesianshape(cartesianShapeField)', []); testErrorsAndWarnings( - 'from a_index | eval var = to_cartesianshape(to_cartesianshape(cartesianPointField))', + 'from a_index | stats avg(doubleField), var0 = min(integerField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | eval var = to_cartesianshape(to_string(booleanField))', + 'from a_index | stats avg(doubleField), min(integerField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | eval to_cartesianshape(cartesianPointField, extraArg)', - ['Error: [to_cartesianshape] function expects exactly one argument, got 2.'] + 'from a_index | stats avg(doubleField), var0 = min(integerField) by var1 = round(doubleField / 2), doubleField / 2', + [] ); - testErrorsAndWarnings('from a_index | sort to_cartesianshape(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval to_cartesianshape(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_cartesianshape(nullVar)', []); - }); + testErrorsAndWarnings('from a_index | stats var = min(dateField)', []); + testErrorsAndWarnings('from a_index | stats min(dateField)', []); + testErrorsAndWarnings('from a_index | stats var = min(datePeriodField)', []); + testErrorsAndWarnings('from a_index | stats min(datePeriodField)', []); + testErrorsAndWarnings('from a_index | stats var = min(booleanField)', []); + testErrorsAndWarnings('from a_index | stats min(booleanField)', []); + testErrorsAndWarnings('from a_index | stats var = min(ipField)', []); + testErrorsAndWarnings('from a_index | stats min(ipField)', []); - describe('to_datetime', () => { - testErrorsAndWarnings('row var = to_datetime("a")', []); - testErrorsAndWarnings('row to_datetime("a")', []); - testErrorsAndWarnings('row var = to_dt("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_datetime(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_datetime(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_dt(stringField)', []); + testErrorsAndWarnings('from a_index | sort min(doubleField)', [ + 'SORT does not support function min', + ]); - testErrorsAndWarnings('from a_index | eval var = to_datetime(*)', [ - 'Using wildcards (*) in to_datetime is not allowed', + testErrorsAndWarnings('from a_index | where min(doubleField)', [ + 'WHERE does not support function min', ]); - 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('from a_index | where min(doubleField) > 0', [ + 'WHERE does not support function min', + ]); - testErrorsAndWarnings('row var = to_datetime(true)', [ - 'Argument of [to_datetime] must be [date], found value [true] type [boolean]', + testErrorsAndWarnings('from a_index | where min(longField)', [ + 'WHERE does not support function min', ]); - 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 | where min(longField) > 0', [ + 'WHERE does not support function min', + ]); - testErrorsAndWarnings('from a_index | eval to_datetime(booleanField)', [ - 'Argument of [to_datetime] must be [date], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | where min(integerField)', [ + 'WHERE does not support function min', ]); - 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 | where min(integerField) > 0', [ + 'WHERE does not support function min', + ]); - testErrorsAndWarnings('from a_index | eval to_datetime(dateField, extraArg)', [ - 'Error: [to_datetime] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | where min(dateField)', [ + 'WHERE does not support function min', ]); - testErrorsAndWarnings('from a_index | sort to_datetime(dateField)', []); - testErrorsAndWarnings('from a_index | eval to_datetime(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_datetime(nullVar)', []); - }); + testErrorsAndWarnings('from a_index | where min(dateField) > 0', [ + 'WHERE does not support function min', + ]); - describe('to_degrees', () => { - testErrorsAndWarnings('row var = to_degrees(5)', []); - testErrorsAndWarnings('row to_degrees(5)', []); - testErrorsAndWarnings('row var = to_degrees(to_integer("a"))', []); + testErrorsAndWarnings('from a_index | where min(datePeriodField)', [ + 'WHERE does not support function min', + ]); - testErrorsAndWarnings('row var = to_degrees("a")', [ - 'Argument of [to_degrees] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | where min(datePeriodField) > 0', [ + 'WHERE does not support function min', ]); - testErrorsAndWarnings('from a_index | where to_degrees(numberField) > 0', []); + testErrorsAndWarnings('from a_index | where min(booleanField)', [ + 'WHERE does not support function min', + ]); - testErrorsAndWarnings('from a_index | where to_degrees(stringField) > 0', [ - 'Argument of [to_degrees] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where min(booleanField) > 0', [ + 'WHERE does not support function min', ]); - testErrorsAndWarnings('from a_index | eval var = to_degrees(numberField)', []); - testErrorsAndWarnings('from a_index | eval to_degrees(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = to_degrees(to_integer(stringField))', []); + testErrorsAndWarnings('from a_index | where min(ipField)', [ + 'WHERE does not support function min', + ]); - testErrorsAndWarnings('from a_index | eval to_degrees(stringField)', [ - 'Argument of [to_degrees] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | where min(ipField) > 0', [ + 'WHERE does not support function min', ]); - testErrorsAndWarnings('from a_index | eval to_degrees(numberField, extraArg)', [ - 'Error: [to_degrees] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval var = min(doubleField)', [ + 'EVAL does not support function min', ]); - testErrorsAndWarnings('from a_index | eval var = to_degrees(*)', [ - 'Using wildcards (*) in to_degrees is not allowed', + testErrorsAndWarnings('from a_index | eval var = min(doubleField) > 0', [ + 'EVAL does not support function min', ]); - testErrorsAndWarnings('from a_index | sort to_degrees(numberField)', []); - testErrorsAndWarnings('row var = to_degrees(to_integer(true))', []); + testErrorsAndWarnings('from a_index | eval min(doubleField)', [ + 'EVAL does not support function min', + ]); - testErrorsAndWarnings('row var = to_degrees(true)', [ - 'Argument of [to_degrees] must be [number], found value [true] type [boolean]', + testErrorsAndWarnings('from a_index | eval min(doubleField) > 0', [ + 'EVAL does not support function min', ]); - 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 = min(longField)', [ + 'EVAL does not support function min', ]); - testErrorsAndWarnings('from a_index | eval var = to_degrees(to_integer(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = min(longField) > 0', [ + 'EVAL does not support function min', + ]); - testErrorsAndWarnings('from a_index | eval to_degrees(booleanField)', [ - 'Argument of [to_degrees] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval min(longField)', [ + 'EVAL does not support function min', ]); - testErrorsAndWarnings('from a_index | eval to_degrees(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_degrees(nullVar)', []); - }); - describe('to_double', () => { - testErrorsAndWarnings('row var = to_double("a")', []); - testErrorsAndWarnings('row to_double("a")', []); - testErrorsAndWarnings('row var = to_dbl("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_double(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_double(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_dbl(stringField)', []); + testErrorsAndWarnings('from a_index | eval min(longField) > 0', [ + 'EVAL does not support function min', + ]); - testErrorsAndWarnings('from a_index | eval var = to_double(*)', [ - 'Using wildcards (*) in to_double is not allowed', + testErrorsAndWarnings('from a_index | eval var = min(integerField)', [ + 'EVAL does not support function min', ]); - 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('from a_index | eval var = min(integerField) > 0', [ + 'EVAL does not support function min', + ]); - 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 | eval min(integerField)', [ + 'EVAL does not support function min', ]); - testErrorsAndWarnings('from a_index | where to_double(booleanField) > 0', []); + testErrorsAndWarnings('from a_index | eval min(integerField) > 0', [ + 'EVAL does not support function min', + ]); - 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 | eval var = min(dateField)', [ + 'EVAL does not support function min', ]); - 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 var = min(dateField) > 0', [ + 'EVAL does not support function min', + ]); - 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 min(dateField)', [ + 'EVAL does not support function min', ]); - 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 min(dateField) > 0', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval var = min(datePeriodField)', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval var = min(datePeriodField) > 0', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval min(datePeriodField)', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval min(datePeriodField) > 0', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval var = min(booleanField)', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval var = min(booleanField) > 0', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval min(booleanField)', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval min(booleanField) > 0', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval var = min(ipField)', [ + 'EVAL does not support function min', + ]); - testErrorsAndWarnings('from a_index | eval to_double(booleanField, extraArg)', [ - 'Error: [to_double] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval var = min(ipField) > 0', [ + 'EVAL does not support function min', ]); - testErrorsAndWarnings('from a_index | sort to_double(booleanField)', []); - testErrorsAndWarnings('from a_index | eval to_double(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_double(nullVar)', []); - }); + testErrorsAndWarnings('from a_index | eval min(ipField)', [ + 'EVAL does not support function min', + ]); - describe('to_geopoint', () => { - testErrorsAndWarnings('row var = to_geopoint("a")', []); - testErrorsAndWarnings('row to_geopoint("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_geopoint(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_geopoint(stringField)', []); + testErrorsAndWarnings('from a_index | eval min(ipField) > 0', [ + 'EVAL does not support function min', + ]); - testErrorsAndWarnings('from a_index | eval var = to_geopoint(*)', [ - 'Using wildcards (*) in to_geopoint is not allowed', + testErrorsAndWarnings('from a_index | stats min(null)', []); + testErrorsAndWarnings('row nullVar = null | stats min(nullVar)', []); + testErrorsAndWarnings('from a_index | stats min("2022")', []); + testErrorsAndWarnings('from a_index | stats min(concat("20", "22"))', [ + 'Argument of [min] must be [double], found value [concat("20","22")] type [keyword]', ]); + }); + + describe('count', () => { + testErrorsAndWarnings('from a_index | stats var = count(textField)', []); + testErrorsAndWarnings('from a_index | stats count(textField)', []); + testErrorsAndWarnings('from a_index | stats var = round(count(textField))', []); + testErrorsAndWarnings('from a_index | stats round(count(textField))', []); - 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)")))', + 'from a_index | stats var = round(count(textField)) + count(textField)', [] ); - 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))', + 'from a_index | stats round(count(textField)) + count(textField)', [] ); - 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 | sort count(textField)', [ + 'SORT does not support function count', ]); - testErrorsAndWarnings('from a_index | eval var = to_geopoint(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | where count(textField)', [ + 'WHERE does not support function count', + ]); - testErrorsAndWarnings('from a_index | eval to_geopoint(geoPointField, extraArg)', [ - 'Error: [to_geopoint] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | where count(textField) > 0', [ + 'WHERE does not support function count', ]); - testErrorsAndWarnings('from a_index | sort to_geopoint(geoPointField)', []); - testErrorsAndWarnings('from a_index | eval to_geopoint(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_geopoint(nullVar)', []); - }); + testErrorsAndWarnings('from a_index | eval var = count(textField)', [ + 'EVAL does not support function count', + ]); - describe('to_geoshape', () => { - testErrorsAndWarnings('row var = to_geoshape("a")', []); - testErrorsAndWarnings('row to_geoshape("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_geoshape(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_geoshape(stringField)', []); + testErrorsAndWarnings('from a_index | eval var = count(textField) > 0', [ + 'EVAL does not support function count', + ]); - testErrorsAndWarnings('from a_index | eval var = to_geoshape(*)', [ - 'Using wildcards (*) in to_geoshape is not allowed', + testErrorsAndWarnings('from a_index | eval count(textField)', [ + 'EVAL does not support function count', ]); - 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('from a_index | eval count(textField) > 0', [ + 'EVAL does not support function count', + ]); + + testErrorsAndWarnings('from a_index | stats count(null)', []); + testErrorsAndWarnings('row nullVar = null | stats count(nullVar)', []); + }); + + describe('count_distinct', () => { testErrorsAndWarnings( - 'row var = to_geoshape(to_geoshape(to_geopoint("POINT (30 10)")))', + 'from a_index | stats count_distinct(null, null, null, null, null, null, null, null)', [] ); - 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))', + 'row nullVar = null | stats count_distinct(nullVar, nullVar, nullVar, nullVar, nullVar, nullVar, nullVar, nullVar)', [] ); + }); - 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)', []); + describe('st_centroid_agg', () => { testErrorsAndWarnings( - 'from a_index | eval var = to_geoshape(to_geoshape(geoPointField))', + 'from a_index | stats var = st_centroid_agg(cartesianPointField)', [] ); - testErrorsAndWarnings('from a_index | eval var = to_geoshape(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | stats st_centroid_agg(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | eval to_geoshape(geoPointField, extraArg)', [ - 'Error: [to_geoshape] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | stats var = st_centroid_agg(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", ]); - testErrorsAndWarnings('from a_index | sort to_geoshape(geoPointField)', []); - testErrorsAndWarnings('from a_index | eval to_geoshape(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_geoshape(nullVar)', []); - }); - - describe('to_integer', () => { - testErrorsAndWarnings('row var = to_integer("a")', []); - testErrorsAndWarnings('row to_integer("a")', []); - testErrorsAndWarnings('row var = to_int("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_integer(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_integer(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_int(stringField)', []); - - testErrorsAndWarnings('from a_index | eval var = to_integer(*)', [ - 'Using wildcards (*) in to_integer is not allowed', + testErrorsAndWarnings('from a_index | stats st_centroid_agg(avg(integerField))', [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", ]); - 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('from a_index | stats st_centroid_agg(booleanField)', [ + 'Argument of [st_centroid_agg] must be [cartesian_point], found value [booleanField] type [boolean]', + ]); - 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 | stats var = st_centroid_agg(*)', [ + 'Using wildcards (*) in st_centroid_agg is not allowed', ]); - testErrorsAndWarnings('from a_index | where to_integer(booleanField) > 0', []); + testErrorsAndWarnings('from a_index | stats var = st_centroid_agg(geoPointField)', []); + testErrorsAndWarnings('from a_index | stats st_centroid_agg(geoPointField)', []); - 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 | sort st_centroid_agg(cartesianPointField)', [ + 'SORT does not support function st_centroid_agg', ]); - 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 | where st_centroid_agg(cartesianPointField)', [ + 'WHERE does not support function st_centroid_agg', + ]); - 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 | where st_centroid_agg(cartesianPointField) > 0', [ + 'WHERE does not support function st_centroid_agg', ]); - 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 | where st_centroid_agg(geoPointField)', [ + 'WHERE does not support function st_centroid_agg', + ]); - testErrorsAndWarnings('from a_index | eval to_integer(booleanField, extraArg)', [ - 'Error: [to_integer] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | where st_centroid_agg(geoPointField) > 0', [ + 'WHERE does not support function st_centroid_agg', ]); - testErrorsAndWarnings('from a_index | sort to_integer(booleanField)', []); - testErrorsAndWarnings('from a_index | eval to_integer(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_integer(nullVar)', []); - }); + testErrorsAndWarnings('from a_index | eval var = st_centroid_agg(cartesianPointField)', [ + 'EVAL does not support function st_centroid_agg', + ]); - describe('to_ip', () => { - testErrorsAndWarnings('row var = to_ip("a")', []); - testErrorsAndWarnings('row to_ip("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_ip(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_ip(stringField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = st_centroid_agg(cartesianPointField) > 0', + ['EVAL does not support function st_centroid_agg'] + ); - testErrorsAndWarnings('from a_index | eval var = to_ip(*)', [ - 'Using wildcards (*) in to_ip is not allowed', + testErrorsAndWarnings('from a_index | eval st_centroid_agg(cartesianPointField)', [ + 'EVAL does not support function st_centroid_agg', ]); - 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 st_centroid_agg(cartesianPointField) > 0', [ + 'EVAL does not support function st_centroid_agg', ]); - 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 var = st_centroid_agg(geoPointField)', [ + 'EVAL does not support function st_centroid_agg', + ]); - 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 = st_centroid_agg(geoPointField) > 0', [ + 'EVAL does not support function st_centroid_agg', ]); - testErrorsAndWarnings('from a_index | eval var = to_ip(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval st_centroid_agg(geoPointField)', [ + 'EVAL does not support function st_centroid_agg', + ]); - testErrorsAndWarnings('from a_index | eval to_ip(ipField, extraArg)', [ - 'Error: [to_ip] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval st_centroid_agg(geoPointField) > 0', [ + 'EVAL does not support function st_centroid_agg', ]); - testErrorsAndWarnings('from a_index | sort to_ip(ipField)', []); - testErrorsAndWarnings('from a_index | eval to_ip(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_ip(nullVar)', []); + testErrorsAndWarnings('from a_index | stats st_centroid_agg(null)', []); + testErrorsAndWarnings('row nullVar = null | stats st_centroid_agg(nullVar)', []); }); - describe('to_long', () => { - testErrorsAndWarnings('row var = to_long("a")', []); - testErrorsAndWarnings('row to_long("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_long(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_long(stringField)', []); + describe('values', () => { + testErrorsAndWarnings('from a_index | stats var = values(textField)', []); + testErrorsAndWarnings('from a_index | stats values(textField)', []); - testErrorsAndWarnings('from a_index | eval var = to_long(*)', [ - 'Using wildcards (*) in to_long is not allowed', + testErrorsAndWarnings('from a_index | sort values(textField)', [ + 'SORT does not support function values', ]); - 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 values(textField)', [ + 'WHERE does not support function values', ]); - 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 values(textField) > 0', [ + 'WHERE does not support function values', ]); - 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 var = values(textField)', [ + 'EVAL does not support function values', + ]); - 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 = values(textField) > 0', [ + 'EVAL does not support function values', ]); - 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 values(textField)', [ + 'EVAL does not support function values', + ]); - testErrorsAndWarnings('from a_index | eval to_long(booleanField, extraArg)', [ - 'Error: [to_long] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | eval values(textField) > 0', [ + 'EVAL does not support function values', ]); - testErrorsAndWarnings('from a_index | sort to_long(booleanField)', []); - testErrorsAndWarnings('from a_index | eval to_long(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_long(nullVar)', []); + testErrorsAndWarnings('from a_index | stats values(null)', []); + testErrorsAndWarnings('row nullVar = null | stats values(nullVar)', []); }); - describe('to_lower', () => { - testErrorsAndWarnings('row var = to_lower("a")', []); - testErrorsAndWarnings('row to_lower("a")', []); - testErrorsAndWarnings('row var = to_lower(to_string("a"))', []); + describe('top', () => { + testErrorsAndWarnings( + 'from a_index | stats var = top(textField, integerField, textField)', + ['Argument of [=] must be a constant, received [top(textField,integerField,textField)]'] + ); - testErrorsAndWarnings('row var = to_lower(5)', [ - 'Argument of [to_lower] must be [string], found value [5] type [number]', + testErrorsAndWarnings('from a_index | stats top(textField, integerField, textField)', [ + 'Argument of [top] must be a constant, received [integerField]', + 'Argument of [top] must be a constant, received [textField]', ]); - testErrorsAndWarnings('from a_index | where length(to_lower(stringField)) > 0', []); - - testErrorsAndWarnings('from a_index | where length(to_lower(numberField)) > 0', [ - 'Argument of [to_lower] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | sort top(textField, integerField, textField)', [ + 'SORT does not support function top', ]); - testErrorsAndWarnings('from a_index | eval var = to_lower(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_lower(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_lower(to_string(stringField))', []); - - testErrorsAndWarnings('from a_index | eval to_lower(numberField)', [ - 'Argument of [to_lower] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | where top(textField, integerField, textField)', [ + 'WHERE does not support function top', ]); - testErrorsAndWarnings('from a_index | eval to_lower(stringField, extraArg)', [ - 'Error: [to_lower] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | where top(textField, integerField, textField) > 0', [ + 'WHERE does not support function top', ]); - testErrorsAndWarnings('from a_index | eval var = to_lower(*)', [ - 'Using wildcards (*) in to_lower is not allowed', + testErrorsAndWarnings('from a_index | eval var = top(textField, integerField, textField)', [ + 'EVAL does not support function top', ]); - testErrorsAndWarnings('from a_index | sort to_lower(stringField)', []); - testErrorsAndWarnings('row var = to_lower(to_string(true))', []); + testErrorsAndWarnings( + 'from a_index | eval var = top(textField, integerField, textField) > 0', + ['EVAL does not support function top'] + ); - testErrorsAndWarnings('row var = to_lower(true)', [ - 'Argument of [to_lower] must be [string], found value [true] type [boolean]', + testErrorsAndWarnings('from a_index | eval top(textField, integerField, textField)', [ + 'EVAL does not support function top', ]); - 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 top(textField, integerField, textField) > 0', [ + 'EVAL does not support function top', ]); - 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]', + testErrorsAndWarnings('from a_index | stats top(null, null, null)', []); + testErrorsAndWarnings('row nullVar = null | stats top(nullVar, nullVar, nullVar)', [ + 'Argument of [top] must be a constant, received [nullVar]', + 'Argument of [top] must be a constant, received [nullVar]', ]); - testErrorsAndWarnings('from a_index | eval to_lower(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_lower(nullVar)', []); - }); - - describe('to_radians', () => { - testErrorsAndWarnings('row var = to_radians(5)', []); - testErrorsAndWarnings('row to_radians(5)', []); - testErrorsAndWarnings('row var = to_radians(to_integer("a"))', []); - - testErrorsAndWarnings('row var = to_radians("a")', [ - 'Argument of [to_radians] must be [number], found value ["a"] type [string]', + testErrorsAndWarnings('from a_index | stats var = top(textField, integerField, "asc")', [ + 'Argument of [=] must be a constant, received [top(textField,integerField,"asc")]', ]); - testErrorsAndWarnings('from a_index | where to_radians(numberField) > 0', []); - - testErrorsAndWarnings('from a_index | where to_radians(stringField) > 0', [ - 'Argument of [to_radians] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | stats top(textField, integerField, "asc")', [ + 'Argument of [top] must be a constant, received [integerField]', ]); - testErrorsAndWarnings('from a_index | eval var = to_radians(numberField)', []); - testErrorsAndWarnings('from a_index | eval to_radians(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = to_radians(to_integer(stringField))', []); - - testErrorsAndWarnings('from a_index | eval to_radians(stringField)', [ - 'Argument of [to_radians] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | sort top(textField, integerField, "asc")', [ + 'SORT does not support function top', ]); - testErrorsAndWarnings('from a_index | eval to_radians(numberField, extraArg)', [ - 'Error: [to_radians] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | where top(textField, integerField, "asc")', [ + 'WHERE does not support function top', ]); - testErrorsAndWarnings('from a_index | eval var = to_radians(*)', [ - 'Using wildcards (*) in to_radians is not allowed', + testErrorsAndWarnings('from a_index | where top(textField, integerField, "asc") > 0', [ + 'WHERE does not support function top', ]); - 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 | eval var = top(textField, integerField, "asc")', [ + 'EVAL does not support function top', ]); - 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 = top(textField, integerField, "asc") > 0', [ + 'EVAL does not support function top', ]); - 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]', + testErrorsAndWarnings('from a_index | eval top(textField, integerField, "asc")', [ + 'EVAL does not support function top', ]); - testErrorsAndWarnings('from a_index | eval to_radians(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_radians(nullVar)', []); - }); - - describe('to_string', () => { - testErrorsAndWarnings('row var = to_string("a")', []); - testErrorsAndWarnings('row to_string("a")', []); - testErrorsAndWarnings('row var = to_str("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_string(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_string(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_str(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_string(*)', [ - 'Using wildcards (*) in to_string is not allowed', + testErrorsAndWarnings('from a_index | eval top(textField, integerField, "asc") > 0', [ + 'EVAL does not support function top', ]); + }); - 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)"))', []); - + describe('weighted_avg', () => { testErrorsAndWarnings( - 'row var = to_string(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var = weighted_avg(doubleField, doubleField)', [] ); - - 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('from a_index | stats weighted_avg(doubleField, doubleField)', []); testErrorsAndWarnings( - 'row var = to_string(to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', + 'from a_index | stats var = round(weighted_avg(doubleField, doubleField))', [] ); - 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', + 'from a_index | stats round(weighted_avg(doubleField, doubleField))', [] ); + testErrorsAndWarnings( - 'from a_index | where length(to_string(cartesianShapeField)) > 0', + 'from a_index | stats var = round(weighted_avg(doubleField, doubleField)) + weighted_avg(doubleField, doubleField)', [] ); - 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))', + 'from a_index | stats round(weighted_avg(doubleField, doubleField)) + weighted_avg(doubleField, doubleField)', [] ); - 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))', + 'from a_index | stats weighted_avg(doubleField / 2, doubleField)', [] ); - 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))', + 'from a_index | stats var0 = weighted_avg(doubleField / 2, doubleField)', [] ); - 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))', + 'from a_index | stats avg(doubleField), weighted_avg(doubleField / 2, doubleField)', [] ); - 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)', []); - testErrorsAndWarnings('from a_index | eval to_string(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_string(nullVar)', []); - }); - - describe('to_unsigned_long', () => { - testErrorsAndWarnings('row var = to_unsigned_long("a")', []); - testErrorsAndWarnings('row to_unsigned_long("a")', []); - testErrorsAndWarnings('row var = to_ul("a")', []); - testErrorsAndWarnings('row var = to_ulong("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_unsigned_long(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_ul(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_ulong(stringField)', []); - - testErrorsAndWarnings('from a_index | eval var = to_unsigned_long(*)', [ - 'Using wildcards (*) in to_unsigned_long is not allowed', - ]); - - 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))', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField / 2, doubleField)', [] ); - 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))', + 'from a_index | stats var0 = weighted_avg(doubleField, doubleField)', [] ); - 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))', + 'from a_index | stats avg(doubleField), weighted_avg(doubleField, doubleField)', [] ); + testErrorsAndWarnings( - 'from a_index | eval var = to_unsigned_long(to_string(booleanField))', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, doubleField)', [] ); - 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)', []); - testErrorsAndWarnings('from a_index | eval to_unsigned_long(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_unsigned_long(nullVar)', []); - }); - - describe('to_upper', () => { - testErrorsAndWarnings('row var = to_upper("a")', []); - testErrorsAndWarnings('row to_upper("a")', []); - testErrorsAndWarnings('row var = to_upper(to_string("a"))', []); - - testErrorsAndWarnings('row var = to_upper(5)', [ - 'Argument of [to_upper] must be [string], found value [5] type [number]', - ]); - - testErrorsAndWarnings('from a_index | where length(to_upper(stringField)) > 0', []); - - testErrorsAndWarnings('from a_index | where length(to_upper(numberField)) > 0', [ - 'Argument of [to_upper] must be [string], found value [numberField] type [number]', - ]); - - testErrorsAndWarnings('from a_index | eval var = to_upper(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_upper(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_upper(to_string(stringField))', []); - - testErrorsAndWarnings('from a_index | eval to_upper(numberField)', [ - 'Argument of [to_upper] must be [string], found value [numberField] type [number]', - ]); - - testErrorsAndWarnings('from a_index | eval to_upper(stringField, extraArg)', [ - 'Error: [to_upper] function expects exactly one argument, got 2.', - ]); - - testErrorsAndWarnings('from a_index | eval var = to_upper(*)', [ - 'Using wildcards (*) in to_upper is not allowed', - ]); - - 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]', - ]); - testErrorsAndWarnings('from a_index | eval to_upper(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_upper(nullVar)', []); - }); - - describe('to_version', () => { - testErrorsAndWarnings('row var = to_version("a")', []); - testErrorsAndWarnings('row to_version("a")', []); - testErrorsAndWarnings('row var = to_ver("a")', []); - testErrorsAndWarnings('from a_index | eval var = to_version(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_version(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = to_ver(stringField)', []); - - testErrorsAndWarnings('from a_index | eval var = to_version(*)', [ - 'Using wildcards (*) in to_version is not allowed', - ]); - - 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( + 'from a_index | stats weighted_avg(doubleField, doubleField) by round(doubleField / 2)', + [] + ); - testErrorsAndWarnings('row var = to_version(true)', [ - 'Argument of [to_version] must be [string], found value [true] type [boolean]', - ]); + testErrorsAndWarnings( + 'from a_index | stats var0 = weighted_avg(doubleField, doubleField) by var1 = round(doubleField / 2)', + [] + ); - 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 | stats avg(doubleField), weighted_avg(doubleField, doubleField) by round(doubleField / 2), ipField', + [] + ); - testErrorsAndWarnings('from a_index | eval to_version(stringField, extraArg)', [ - 'Error: [to_version] function expects exactly one argument, got 2.', - ]); - testErrorsAndWarnings('from a_index | eval to_version(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_version(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, doubleField) by var1 = round(doubleField / 2), ipField', + [] + ); - describe('trim', () => { - testErrorsAndWarnings('row var = trim("a")', []); - testErrorsAndWarnings('row trim("a")', []); - testErrorsAndWarnings('row var = trim(to_string("a"))', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(doubleField, doubleField) by round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('row var = trim(5)', [ - 'Argument of [trim] must be [string], found value [5] type [number]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, doubleField) by var1 = round(doubleField / 2), doubleField / 2', + [] + ); + + testErrorsAndWarnings( + 'from a_index | stats var = weighted_avg(avg(integerField), avg(integerField))', + [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ] + ); - testErrorsAndWarnings('from a_index | where length(trim(stringField)) > 0', []); + testErrorsAndWarnings( + 'from a_index | stats weighted_avg(avg(integerField), avg(integerField))', + [ + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", + ] + ); - testErrorsAndWarnings('from a_index | where length(trim(numberField)) > 0', [ - 'Argument of [trim] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | stats weighted_avg(booleanField, booleanField)', [ + 'Argument of [weighted_avg] must be [double], found value [booleanField] type [boolean]', + 'Argument of [weighted_avg] must be [double], found value [booleanField] type [boolean]', ]); - testErrorsAndWarnings('from a_index | eval var = trim(stringField)', []); - testErrorsAndWarnings('from a_index | eval trim(stringField)', []); - testErrorsAndWarnings('from a_index | eval var = trim(to_string(stringField))', []); + testErrorsAndWarnings('from a_index | sort weighted_avg(doubleField, doubleField)', [ + 'SORT does not support function weighted_avg', + ]); - testErrorsAndWarnings('from a_index | eval trim(numberField)', [ - 'Argument of [trim] must be [string], found value [numberField] type [number]', + testErrorsAndWarnings('from a_index | where weighted_avg(doubleField, doubleField)', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval trim(stringField, extraArg)', [ - 'Error: [trim] function expects exactly one argument, got 2.', + testErrorsAndWarnings('from a_index | where weighted_avg(doubleField, doubleField) > 0', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = trim(*)', [ - 'Using wildcards (*) in trim is not allowed', + testErrorsAndWarnings('from a_index | eval var = weighted_avg(doubleField, doubleField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | sort trim(stringField)', []); - testErrorsAndWarnings('row var = trim(to_string(true))', []); + testErrorsAndWarnings( + 'from a_index | eval var = weighted_avg(doubleField, doubleField) > 0', + ['EVAL does not support function weighted_avg'] + ); - testErrorsAndWarnings('row var = trim(true)', [ - 'Argument of [trim] must be [string], found value [true] type [boolean]', + testErrorsAndWarnings('from a_index | eval weighted_avg(doubleField, doubleField)', [ + 'EVAL does not support function weighted_avg', ]); - 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 weighted_avg(doubleField, doubleField) > 0', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = trim(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | stats weighted_avg(null, null)', []); + testErrorsAndWarnings('row nullVar = null | stats weighted_avg(nullVar, nullVar)', []); + testErrorsAndWarnings( + 'from a_index | stats var = weighted_avg(doubleField, longField)', + [] + ); + testErrorsAndWarnings('from a_index | stats weighted_avg(doubleField, longField)', []); - testErrorsAndWarnings('from a_index | eval trim(booleanField)', [ - 'Argument of [trim] must be [string], found value [booleanField] type [boolean]', - ]); - testErrorsAndWarnings('from a_index | eval trim(null)', []); - testErrorsAndWarnings('row nullVar = null | eval trim(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats var = round(weighted_avg(doubleField, longField))', + [] + ); - describe('avg', () => { - testErrorsAndWarnings('from a_index | stats var = avg(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField)', []); - testErrorsAndWarnings('from a_index | stats var = round(avg(numberField))', []); - testErrorsAndWarnings('from a_index | stats round(avg(numberField))', []); + testErrorsAndWarnings( + 'from a_index | stats round(weighted_avg(doubleField, longField))', + [] + ); testErrorsAndWarnings( - 'from a_index | stats var = round(avg(numberField)) + avg(numberField)', + 'from a_index | stats var = round(weighted_avg(doubleField, longField)) + weighted_avg(doubleField, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats round(avg(numberField)) + avg(numberField)', + 'from a_index | stats round(weighted_avg(doubleField, longField)) + weighted_avg(doubleField, longField)', [] ); - testErrorsAndWarnings('from a_index | stats avg(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats var0 = avg(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), avg(numberField / 2)', []); + + testErrorsAndWarnings('from a_index | stats weighted_avg(doubleField / 2, longField)', []); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = avg(numberField / 2)', + 'from a_index | stats var0 = weighted_avg(doubleField / 2, longField)', [] ); - testErrorsAndWarnings('from a_index | stats var0 = avg(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), avg(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), var0 = avg(numberField)', []); + testErrorsAndWarnings( - 'from a_index | stats avg(numberField) by round(numberField / 2)', + 'from a_index | stats avg(doubleField), weighted_avg(doubleField / 2, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats var0 = avg(numberField) by var1 = round(numberField / 2)', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField / 2, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), avg(numberField) by round(numberField / 2), ipField', + 'from a_index | stats var0 = weighted_avg(doubleField, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = avg(numberField) by var1 = round(numberField / 2), ipField', + 'from a_index | stats avg(doubleField), weighted_avg(doubleField, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), avg(numberField) by round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = avg(numberField) by var1 = round(numberField / 2), numberField / 2', + 'from a_index | stats weighted_avg(doubleField, longField) by round(doubleField / 2)', [] ); - testErrorsAndWarnings('from a_index | stats var = avg(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); + testErrorsAndWarnings( + 'from a_index | stats var0 = weighted_avg(doubleField, longField) by var1 = round(doubleField / 2)', + [] + ); - testErrorsAndWarnings('from a_index | stats avg(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(doubleField, longField) by round(doubleField / 2), ipField', + [] + ); - testErrorsAndWarnings('from a_index | stats avg(stringField)', [ - 'Argument of [avg] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, longField) by var1 = round(doubleField / 2), ipField', + [] + ); - testErrorsAndWarnings('from a_index | stats var = avg(*)', [ - 'Using wildcards (*) in avg is not allowed', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(doubleField, longField) by round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('from a_index | sort avg(numberField)', [ - 'SORT does not support function avg', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, longField) by var1 = round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('from a_index | where avg(numberField)', [ - 'WHERE does not support function avg', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = weighted_avg(doubleField, integerField)', + [] + ); + testErrorsAndWarnings('from a_index | stats weighted_avg(doubleField, integerField)', []); - testErrorsAndWarnings('from a_index | where avg(numberField) > 0', [ - 'WHERE does not support function avg', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = round(weighted_avg(doubleField, integerField))', + [] + ); - testErrorsAndWarnings('from a_index | eval var = avg(numberField)', [ - 'EVAL does not support function avg', - ]); + testErrorsAndWarnings( + 'from a_index | stats round(weighted_avg(doubleField, integerField))', + [] + ); - testErrorsAndWarnings('from a_index | eval var = avg(numberField) > 0', [ - 'EVAL does not support function avg', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = round(weighted_avg(doubleField, integerField)) + weighted_avg(doubleField, integerField)', + [] + ); - testErrorsAndWarnings('from a_index | eval avg(numberField)', [ - 'EVAL does not support function avg', - ]); + testErrorsAndWarnings( + 'from a_index | stats round(weighted_avg(doubleField, integerField)) + weighted_avg(doubleField, integerField)', + [] + ); - testErrorsAndWarnings('from a_index | eval avg(numberField) > 0', [ - 'EVAL does not support function avg', - ]); + testErrorsAndWarnings( + 'from a_index | stats weighted_avg(doubleField / 2, integerField)', + [] + ); - testErrorsAndWarnings('from a_index | stats avg(booleanField)', [ - 'Argument of [avg] must be [number], found value [booleanField] type [boolean]', - ]); - testErrorsAndWarnings('from a_index | stats avg(null)', []); - testErrorsAndWarnings('row nullVar = null | stats avg(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats var0 = weighted_avg(doubleField / 2, integerField)', + [] + ); - describe('sum', () => { - testErrorsAndWarnings('from a_index | stats var = sum(numberField)', []); - testErrorsAndWarnings('from a_index | stats sum(numberField)', []); - testErrorsAndWarnings('from a_index | stats var = round(sum(numberField))', []); - testErrorsAndWarnings('from a_index | stats round(sum(numberField))', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(doubleField / 2, integerField)', + [] + ); testErrorsAndWarnings( - 'from a_index | stats var = round(sum(numberField)) + sum(numberField)', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField / 2, integerField)', [] ); testErrorsAndWarnings( - 'from a_index | stats round(sum(numberField)) + sum(numberField)', + 'from a_index | stats var0 = weighted_avg(doubleField, integerField)', [] ); - testErrorsAndWarnings('from a_index | stats sum(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats var0 = sum(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), sum(numberField / 2)', []); + testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = sum(numberField / 2)', + 'from a_index | stats avg(doubleField), weighted_avg(doubleField, integerField)', [] ); - testErrorsAndWarnings('from a_index | stats var0 = sum(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), sum(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), var0 = sum(numberField)', []); + testErrorsAndWarnings( - 'from a_index | stats sum(numberField) by round(numberField / 2)', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, integerField)', [] ); testErrorsAndWarnings( - 'from a_index | stats var0 = sum(numberField) by var1 = round(numberField / 2)', + 'from a_index | stats weighted_avg(doubleField, integerField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), sum(numberField) by round(numberField / 2), ipField', + 'from a_index | stats var0 = weighted_avg(doubleField, integerField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = sum(numberField) by var1 = round(numberField / 2), ipField', + 'from a_index | stats avg(doubleField), weighted_avg(doubleField, integerField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), sum(numberField) by round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, integerField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = sum(numberField) by var1 = round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), weighted_avg(doubleField, integerField) by round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | stats var = sum(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(doubleField, integerField) by var1 = round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('from a_index | stats sum(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); + testErrorsAndWarnings( + 'from a_index | stats var = weighted_avg(longField, doubleField)', + [] + ); + testErrorsAndWarnings('from a_index | stats weighted_avg(longField, doubleField)', []); - testErrorsAndWarnings('from a_index | stats sum(stringField)', [ - 'Argument of [sum] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = round(weighted_avg(longField, doubleField))', + [] + ); - testErrorsAndWarnings('from a_index | stats var = sum(*)', [ - 'Using wildcards (*) in sum is not allowed', - ]); + testErrorsAndWarnings( + 'from a_index | stats round(weighted_avg(longField, doubleField))', + [] + ); - testErrorsAndWarnings('from a_index | sort sum(numberField)', [ - 'SORT does not support function sum', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = round(weighted_avg(longField, doubleField)) + weighted_avg(longField, doubleField)', + [] + ); - testErrorsAndWarnings('from a_index | where sum(numberField)', [ - 'WHERE does not support function sum', - ]); + testErrorsAndWarnings( + 'from a_index | stats round(weighted_avg(longField, doubleField)) + weighted_avg(longField, doubleField)', + [] + ); - testErrorsAndWarnings('from a_index | where sum(numberField) > 0', [ - 'WHERE does not support function sum', - ]); + testErrorsAndWarnings( + 'from a_index | stats var0 = weighted_avg(longField, doubleField)', + [] + ); - testErrorsAndWarnings('from a_index | eval var = sum(numberField)', [ - 'EVAL does not support function sum', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(longField, doubleField)', + [] + ); - testErrorsAndWarnings('from a_index | eval var = sum(numberField) > 0', [ - 'EVAL does not support function sum', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(longField, doubleField)', + [] + ); - testErrorsAndWarnings('from a_index | eval sum(numberField)', [ - 'EVAL does not support function sum', - ]); + testErrorsAndWarnings( + 'from a_index | stats weighted_avg(longField, doubleField) by round(doubleField / 2)', + [] + ); - testErrorsAndWarnings('from a_index | eval sum(numberField) > 0', [ - 'EVAL does not support function sum', - ]); + testErrorsAndWarnings( + 'from a_index | stats var0 = weighted_avg(longField, doubleField) by var1 = round(doubleField / 2)', + [] + ); - testErrorsAndWarnings('from a_index | stats sum(booleanField)', [ - 'Argument of [sum] must be [number], found value [booleanField] type [boolean]', - ]); - testErrorsAndWarnings('from a_index | stats sum(null)', []); - testErrorsAndWarnings('row nullVar = null | stats sum(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(longField, doubleField) by round(doubleField / 2), ipField', + [] + ); - describe('median', () => { - testErrorsAndWarnings('from a_index | stats var = median(numberField)', []); - testErrorsAndWarnings('from a_index | stats median(numberField)', []); - testErrorsAndWarnings('from a_index | stats var = round(median(numberField))', []); - testErrorsAndWarnings('from a_index | stats round(median(numberField))', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(longField, doubleField) by var1 = round(doubleField / 2), ipField', + [] + ); testErrorsAndWarnings( - 'from a_index | stats var = round(median(numberField)) + median(numberField)', + 'from a_index | stats avg(doubleField), weighted_avg(longField, doubleField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | stats round(median(numberField)) + median(numberField)', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(longField, doubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | stats median(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats var0 = median(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), median(numberField / 2)', []); + testErrorsAndWarnings('from a_index | stats var = weighted_avg(longField, longField)', []); + testErrorsAndWarnings('from a_index | stats weighted_avg(longField, longField)', []); + testErrorsAndWarnings( + 'from a_index | stats var = round(weighted_avg(longField, longField))', + [] + ); + testErrorsAndWarnings('from a_index | stats round(weighted_avg(longField, longField))', []); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = median(numberField / 2)', + 'from a_index | stats var = round(weighted_avg(longField, longField)) + weighted_avg(longField, longField)', [] ); - testErrorsAndWarnings('from a_index | stats var0 = median(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), median(numberField)', []); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = median(numberField)', + 'from a_index | stats round(weighted_avg(longField, longField)) + weighted_avg(longField, longField)', [] ); + + testErrorsAndWarnings('from a_index | stats var0 = weighted_avg(longField, longField)', []); + testErrorsAndWarnings( - 'from a_index | stats median(numberField) by round(numberField / 2)', + 'from a_index | stats avg(doubleField), weighted_avg(longField, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats var0 = median(numberField) by var1 = round(numberField / 2)', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(longField, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), median(numberField) by round(numberField / 2), ipField', + 'from a_index | stats weighted_avg(longField, longField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = median(numberField) by var1 = round(numberField / 2), ipField', + 'from a_index | stats var0 = weighted_avg(longField, longField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), median(numberField) by round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), weighted_avg(longField, longField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = median(numberField) by var1 = round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(longField, longField) by var1 = round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('from a_index | stats var = median(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(longField, longField) by round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('from a_index | stats median(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(longField, longField) by var1 = round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('from a_index | stats median(stringField)', [ - 'Argument of [median] must be [number], found value [stringField] type [string]', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = weighted_avg(longField, integerField)', + [] + ); + testErrorsAndWarnings('from a_index | stats weighted_avg(longField, integerField)', []); - testErrorsAndWarnings('from a_index | stats var = median(*)', [ - 'Using wildcards (*) in median is not allowed', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = round(weighted_avg(longField, integerField))', + [] + ); - testErrorsAndWarnings('from a_index | sort median(numberField)', [ - 'SORT does not support function median', - ]); + testErrorsAndWarnings( + 'from a_index | stats round(weighted_avg(longField, integerField))', + [] + ); - testErrorsAndWarnings('from a_index | where median(numberField)', [ - 'WHERE does not support function median', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = round(weighted_avg(longField, integerField)) + weighted_avg(longField, integerField)', + [] + ); - testErrorsAndWarnings('from a_index | where median(numberField) > 0', [ - 'WHERE does not support function median', - ]); + testErrorsAndWarnings( + 'from a_index | stats round(weighted_avg(longField, integerField)) + weighted_avg(longField, integerField)', + [] + ); - testErrorsAndWarnings('from a_index | eval var = median(numberField)', [ - 'EVAL does not support function median', - ]); + testErrorsAndWarnings( + 'from a_index | stats var0 = weighted_avg(longField, integerField)', + [] + ); - testErrorsAndWarnings('from a_index | eval var = median(numberField) > 0', [ - 'EVAL does not support function median', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(longField, integerField)', + [] + ); - testErrorsAndWarnings('from a_index | eval median(numberField)', [ - 'EVAL does not support function median', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(longField, integerField)', + [] + ); - testErrorsAndWarnings('from a_index | eval median(numberField) > 0', [ - 'EVAL does not support function median', - ]); + testErrorsAndWarnings( + 'from a_index | stats weighted_avg(longField, integerField) by round(doubleField / 2)', + [] + ); - testErrorsAndWarnings('from a_index | stats median(booleanField)', [ - 'Argument of [median] must be [number], found value [booleanField] type [boolean]', - ]); - testErrorsAndWarnings('from a_index | stats median(null)', []); - testErrorsAndWarnings('row nullVar = null | stats median(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats var0 = weighted_avg(longField, integerField) by var1 = round(doubleField / 2)', + [] + ); - describe('median_absolute_deviation', () => { testErrorsAndWarnings( - 'from a_index | stats var = median_absolute_deviation(numberField)', + 'from a_index | stats avg(doubleField), weighted_avg(longField, integerField) by round(doubleField / 2), ipField', [] ); - testErrorsAndWarnings('from a_index | stats median_absolute_deviation(numberField)', []); testErrorsAndWarnings( - 'from a_index | stats var = round(median_absolute_deviation(numberField))', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(longField, integerField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | stats round(median_absolute_deviation(numberField))', + 'from a_index | stats avg(doubleField), weighted_avg(longField, integerField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | stats var = round(median_absolute_deviation(numberField)) + median_absolute_deviation(numberField)', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(longField, integerField) by var1 = round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | stats round(median_absolute_deviation(numberField)) + median_absolute_deviation(numberField)', + 'from a_index | stats var = weighted_avg(integerField, doubleField)', [] ); + testErrorsAndWarnings('from a_index | stats weighted_avg(integerField, doubleField)', []); testErrorsAndWarnings( - 'from a_index | stats median_absolute_deviation(numberField / 2)', + 'from a_index | stats var = round(weighted_avg(integerField, doubleField))', [] ); testErrorsAndWarnings( - 'from a_index | stats var0 = median_absolute_deviation(numberField / 2)', + 'from a_index | stats round(weighted_avg(integerField, doubleField))', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), median_absolute_deviation(numberField / 2)', + 'from a_index | stats var = round(weighted_avg(integerField, doubleField)) + weighted_avg(integerField, doubleField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField / 2)', + 'from a_index | stats round(weighted_avg(integerField, doubleField)) + weighted_avg(integerField, doubleField)', [] ); testErrorsAndWarnings( - 'from a_index | stats var0 = median_absolute_deviation(numberField)', + 'from a_index | stats var0 = weighted_avg(integerField, doubleField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), median_absolute_deviation(numberField)', + 'from a_index | stats avg(doubleField), weighted_avg(integerField, doubleField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField)', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, doubleField)', [] ); testErrorsAndWarnings( - 'from a_index | stats median_absolute_deviation(numberField) by round(numberField / 2)', + 'from a_index | stats weighted_avg(integerField, doubleField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | stats var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2)', + 'from a_index | stats var0 = weighted_avg(integerField, doubleField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), median_absolute_deviation(numberField) by round(numberField / 2), ipField', + 'from a_index | stats avg(doubleField), weighted_avg(integerField, doubleField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2), ipField', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, doubleField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), median_absolute_deviation(numberField) by round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), weighted_avg(integerField, doubleField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = median_absolute_deviation(numberField) by var1 = round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, doubleField) by var1 = round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | stats var = median_absolute_deviation(avg(numberField))', - [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ] + 'from a_index | stats var = weighted_avg(integerField, longField)', + [] ); - - testErrorsAndWarnings('from a_index | stats median_absolute_deviation(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); - - testErrorsAndWarnings('from a_index | stats median_absolute_deviation(stringField)', [ - 'Argument of [median_absolute_deviation] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | stats var = median_absolute_deviation(*)', [ - 'Using wildcards (*) in median_absolute_deviation is not allowed', - ]); - - testErrorsAndWarnings('from a_index | sort median_absolute_deviation(numberField)', [ - 'SORT does not support function median_absolute_deviation', - ]); - - testErrorsAndWarnings('from a_index | where median_absolute_deviation(numberField)', [ - 'WHERE does not support function median_absolute_deviation', - ]); - - testErrorsAndWarnings('from a_index | where median_absolute_deviation(numberField) > 0', [ - 'WHERE does not support function median_absolute_deviation', - ]); - - testErrorsAndWarnings('from a_index | eval var = median_absolute_deviation(numberField)', [ - 'EVAL does not support function median_absolute_deviation', - ]); + testErrorsAndWarnings('from a_index | stats weighted_avg(integerField, longField)', []); testErrorsAndWarnings( - 'from a_index | eval var = median_absolute_deviation(numberField) > 0', - ['EVAL does not support function median_absolute_deviation'] + 'from a_index | stats var = round(weighted_avg(integerField, longField))', + [] ); - testErrorsAndWarnings('from a_index | eval median_absolute_deviation(numberField)', [ - 'EVAL does not support function median_absolute_deviation', - ]); - - 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]', - ]); - testErrorsAndWarnings('from a_index | stats median_absolute_deviation(null)', []); - testErrorsAndWarnings('row nullVar = null | stats median_absolute_deviation(nullVar)', []); - }); - - describe('percentile', () => { - testErrorsAndWarnings('from a_index | stats var = percentile(numberField, 5)', []); - testErrorsAndWarnings('from a_index | stats percentile(numberField, 5)', []); - testErrorsAndWarnings('from a_index | stats var = round(percentile(numberField, 5))', []); - testErrorsAndWarnings('from a_index | stats round(percentile(numberField, 5))', []); - testErrorsAndWarnings( - 'from a_index | stats var = round(percentile(numberField, 5)) + percentile(numberField, 5)', + 'from a_index | stats round(weighted_avg(integerField, longField))', [] ); testErrorsAndWarnings( - 'from a_index | stats round(percentile(numberField, 5)) + percentile(numberField, 5)', + 'from a_index | stats var = round(weighted_avg(integerField, longField)) + weighted_avg(integerField, longField)', [] ); - testErrorsAndWarnings('from a_index | stats percentile(numberField, numberField)', [ - 'Argument of [percentile] must be a constant, received [numberField]', - ]); - - testErrorsAndWarnings('from a_index | stats percentile(numberField / 2, 5)', []); - testErrorsAndWarnings('from a_index | stats var0 = percentile(numberField / 2, 5)', []); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), percentile(numberField / 2, 5)', + 'from a_index | stats round(weighted_avg(integerField, longField)) + weighted_avg(integerField, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = percentile(numberField / 2, 5)', + 'from a_index | stats var0 = weighted_avg(integerField, longField)', [] ); - testErrorsAndWarnings('from a_index | stats var0 = percentile(numberField, 5)', []); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), percentile(numberField, 5)', + 'from a_index | stats avg(doubleField), weighted_avg(integerField, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = percentile(numberField, 5)', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, longField)', [] ); testErrorsAndWarnings( - 'from a_index | stats percentile(numberField, 5) by round(numberField / 2)', + 'from a_index | stats weighted_avg(integerField, longField) by round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | stats var0 = percentile(numberField, 5) by var1 = round(numberField / 2)', + 'from a_index | stats var0 = weighted_avg(integerField, longField) by var1 = round(doubleField / 2)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), percentile(numberField, 5) by round(numberField / 2), ipField', + 'from a_index | stats avg(doubleField), weighted_avg(integerField, longField) by round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = percentile(numberField, 5) by var1 = round(numberField / 2), ipField', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, longField) by var1 = round(doubleField / 2), ipField', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), percentile(numberField, 5) by round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), weighted_avg(integerField, longField) by round(doubleField / 2), doubleField / 2', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = percentile(numberField, 5) by var1 = round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, longField) by var1 = round(doubleField / 2), doubleField / 2', [] ); - testErrorsAndWarnings('from a_index | stats var = percentile(avg(numberField), 5)', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); - - testErrorsAndWarnings('from a_index | stats percentile(avg(numberField), 5)', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); - - testErrorsAndWarnings('from a_index | stats percentile(stringField, 5)', [ - 'Argument of [percentile] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | sort percentile(numberField, 5)', [ - 'SORT does not support function percentile', - ]); - - testErrorsAndWarnings('from a_index | where percentile(numberField, 5)', [ - 'WHERE does not support function percentile', - ]); - - testErrorsAndWarnings('from a_index | where percentile(numberField, 5) > 0', [ - 'WHERE does not support function percentile', - ]); - - testErrorsAndWarnings('from a_index | eval var = percentile(numberField, 5)', [ - 'EVAL does not support function percentile', - ]); - - testErrorsAndWarnings('from a_index | eval var = percentile(numberField, 5) > 0', [ - 'EVAL does not support function percentile', - ]); - - testErrorsAndWarnings('from a_index | eval percentile(numberField, 5)', [ - 'EVAL does not support function percentile', - ]); - - 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]', - ]); - testErrorsAndWarnings('from a_index | stats percentile(null, null)', []); - testErrorsAndWarnings('row nullVar = null | stats percentile(nullVar, nullVar)', [ - 'Argument of [percentile] must be a constant, received [nullVar]', - ]); - }); - - describe('max', () => { - testErrorsAndWarnings('from a_index | stats var = max(numberField)', []); - testErrorsAndWarnings('from a_index | stats max(numberField)', []); - testErrorsAndWarnings('from a_index | stats var = round(max(numberField))', []); - testErrorsAndWarnings('from a_index | stats round(max(numberField))', []); - testErrorsAndWarnings( - 'from a_index | stats var = round(max(numberField)) + max(numberField)', + 'from a_index | stats var = weighted_avg(integerField, integerField)', [] ); + testErrorsAndWarnings('from a_index | stats weighted_avg(integerField, integerField)', []); testErrorsAndWarnings( - 'from a_index | stats round(max(numberField)) + max(numberField)', + 'from a_index | stats var = round(weighted_avg(integerField, integerField))', [] ); - testErrorsAndWarnings('from a_index | stats max(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats var0 = max(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), max(numberField / 2)', []); + testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = max(numberField / 2)', + 'from a_index | stats round(weighted_avg(integerField, integerField))', [] ); - testErrorsAndWarnings('from a_index | stats var0 = max(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), max(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), var0 = max(numberField)', []); + testErrorsAndWarnings( - 'from a_index | stats max(numberField) by round(numberField / 2)', + 'from a_index | stats var = round(weighted_avg(integerField, integerField)) + weighted_avg(integerField, integerField)', [] ); testErrorsAndWarnings( - 'from a_index | stats var0 = max(numberField) by var1 = round(numberField / 2)', + 'from a_index | stats round(weighted_avg(integerField, integerField)) + weighted_avg(integerField, integerField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), max(numberField) by round(numberField / 2), ipField', + 'from a_index | stats var0 = weighted_avg(integerField, integerField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = max(numberField) by var1 = round(numberField / 2), ipField', + 'from a_index | stats avg(doubleField), weighted_avg(integerField, integerField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), max(numberField) by round(numberField / 2), numberField / 2', + 'from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, integerField)', [] ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = max(numberField) by var1 = round(numberField / 2), numberField / 2', + 'from a_index | stats weighted_avg(integerField, integerField) by round(doubleField / 2)', [] ); - testErrorsAndWarnings('from a_index | stats var = max(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); - - testErrorsAndWarnings('from a_index | stats max(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); - - testErrorsAndWarnings('from a_index | stats max(stringField)', [ - 'Argument of [max] must be [number], found value [stringField] type [string]', - ]); - - testErrorsAndWarnings('from a_index | stats var = max(*)', [ - 'Using wildcards (*) in max is not allowed', - ]); - - testErrorsAndWarnings('from a_index | stats var = max(dateField)', []); - testErrorsAndWarnings('from a_index | stats max(dateField)', []); - testErrorsAndWarnings('from a_index | stats var = round(max(dateField))', []); - testErrorsAndWarnings('from a_index | stats round(max(dateField))', []); testErrorsAndWarnings( - 'from a_index | stats var = round(max(dateField)) + max(dateField)', + 'from a_index | stats var0 = weighted_avg(integerField, integerField) by var1 = round(doubleField / 2)', [] ); - testErrorsAndWarnings('from a_index | stats round(max(dateField)) + max(dateField)', []); - - testErrorsAndWarnings('from a_index | sort max(numberField)', [ - 'SORT does not support function max', - ]); - testErrorsAndWarnings('from a_index | where max(numberField)', [ - 'WHERE does not support function max', - ]); - - testErrorsAndWarnings('from a_index | where max(numberField) > 0', [ - 'WHERE does not support function max', - ]); - - testErrorsAndWarnings('from a_index | where max(dateField)', [ - 'WHERE does not support function max', - ]); - - testErrorsAndWarnings('from a_index | where max(dateField) > 0', [ - 'WHERE does not support function max', - ]); - - testErrorsAndWarnings('from a_index | eval var = max(numberField)', [ - 'EVAL does not support function max', - ]); - - testErrorsAndWarnings('from a_index | eval var = max(numberField) > 0', [ - 'EVAL does not support function max', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(integerField, integerField) by round(doubleField / 2), ipField', + [] + ); - testErrorsAndWarnings('from a_index | eval max(numberField)', [ - 'EVAL does not support function max', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, integerField) by var1 = round(doubleField / 2), ipField', + [] + ); - testErrorsAndWarnings('from a_index | eval max(numberField) > 0', [ - 'EVAL does not support function max', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), weighted_avg(integerField, integerField) by round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('from a_index | eval var = max(dateField)', [ - 'EVAL does not support function max', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = weighted_avg(integerField, integerField) by var1 = round(doubleField / 2), doubleField / 2', + [] + ); - testErrorsAndWarnings('from a_index | eval var = max(dateField) > 0', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(doubleField, longField)', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval max(dateField)', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(doubleField, longField) > 0', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval max(dateField) > 0', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(doubleField, integerField)', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats max(booleanField)', []); - testErrorsAndWarnings('from a_index | stats max(null)', []); - testErrorsAndWarnings('row nullVar = null | stats max(nullVar)', []); - testErrorsAndWarnings('from a_index | stats max("2022")', []); - testErrorsAndWarnings('from a_index | stats max(concat("20", "22"))', [ - 'Argument of [max] must be [number], found value [concat("20","22")] type [string]', + testErrorsAndWarnings('from a_index | where weighted_avg(doubleField, integerField) > 0', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats max(cartesianPointField)', [ - 'Argument of [max] must be [number], found value [cartesianPointField] type [cartesian_point]', + testErrorsAndWarnings('from a_index | where weighted_avg(longField, doubleField)', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats var = max(booleanField)', []); - - testErrorsAndWarnings('from a_index | where max(booleanField)', [ - 'WHERE does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(longField, doubleField) > 0', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | where max(booleanField) > 0', [ - 'WHERE does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(longField, longField)', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = max(booleanField)', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(longField, longField) > 0', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = max(booleanField) > 0', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(longField, integerField)', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval max(booleanField)', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(longField, integerField) > 0', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval max(booleanField) > 0', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(integerField, doubleField)', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats var = max(ipField)', []); - testErrorsAndWarnings('from a_index | stats max(ipField)', []); - testErrorsAndWarnings('from a_index | where max(ipField)', [ - 'WHERE does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(integerField, doubleField) > 0', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | where max(ipField) > 0', [ - 'WHERE does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(integerField, longField)', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = max(ipField)', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(integerField, longField) > 0', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = max(ipField) > 0', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(integerField, integerField)', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval max(ipField)', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | where weighted_avg(integerField, integerField) > 0', [ + 'WHERE does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval max(ipField) > 0', [ - 'EVAL does not support function max', + testErrorsAndWarnings('from a_index | eval var = weighted_avg(doubleField, longField)', [ + 'EVAL does not support function weighted_avg', ]); - }); - - describe('min', () => { - testErrorsAndWarnings('from a_index | stats var = min(numberField)', []); - testErrorsAndWarnings('from a_index | stats min(numberField)', []); - testErrorsAndWarnings('from a_index | stats var = round(min(numberField))', []); - testErrorsAndWarnings('from a_index | stats round(min(numberField))', []); - - testErrorsAndWarnings( - 'from a_index | stats var = round(min(numberField)) + min(numberField)', - [] - ); - - testErrorsAndWarnings( - 'from a_index | stats round(min(numberField)) + min(numberField)', - [] - ); - testErrorsAndWarnings('from a_index | stats min(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats var0 = min(numberField / 2)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), min(numberField / 2)', []); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = min(numberField / 2)', - [] - ); - testErrorsAndWarnings('from a_index | stats var0 = min(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), min(numberField)', []); - testErrorsAndWarnings('from a_index | stats avg(numberField), var0 = min(numberField)', []); - testErrorsAndWarnings( - 'from a_index | stats min(numberField) by round(numberField / 2)', - [] - ); - - testErrorsAndWarnings( - 'from a_index | stats var0 = min(numberField) by var1 = round(numberField / 2)', - [] - ); - - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), min(numberField) by round(numberField / 2), ipField', - [] - ); - - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = min(numberField) by var1 = round(numberField / 2), ipField', - [] - ); - - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), min(numberField) by round(numberField / 2), numberField / 2', - [] - ); testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = min(numberField) by var1 = round(numberField / 2), numberField / 2', - [] + 'from a_index | eval var = weighted_avg(doubleField, longField) > 0', + ['EVAL does not support function weighted_avg'] ); - testErrorsAndWarnings('from a_index | stats var = min(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); - - testErrorsAndWarnings('from a_index | stats min(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", + testErrorsAndWarnings('from a_index | eval weighted_avg(doubleField, longField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats min(stringField)', [ - 'Argument of [min] must be [number], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | eval weighted_avg(doubleField, longField) > 0', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats var = min(*)', [ - 'Using wildcards (*) in min is not allowed', + testErrorsAndWarnings('from a_index | eval var = weighted_avg(doubleField, integerField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats var = min(dateField)', []); - testErrorsAndWarnings('from a_index | stats min(dateField)', []); - testErrorsAndWarnings('from a_index | stats var = round(min(dateField))', []); - testErrorsAndWarnings('from a_index | stats round(min(dateField))', []); testErrorsAndWarnings( - 'from a_index | stats var = round(min(dateField)) + min(dateField)', - [] + 'from a_index | eval var = weighted_avg(doubleField, integerField) > 0', + ['EVAL does not support function weighted_avg'] ); - testErrorsAndWarnings('from a_index | stats round(min(dateField)) + min(dateField)', []); - - testErrorsAndWarnings('from a_index | sort min(numberField)', [ - 'SORT does not support function min', - ]); - testErrorsAndWarnings('from a_index | where min(numberField)', [ - 'WHERE does not support function min', - ]); - - testErrorsAndWarnings('from a_index | where min(numberField) > 0', [ - 'WHERE does not support function min', - ]); - - testErrorsAndWarnings('from a_index | where min(dateField)', [ - 'WHERE does not support function min', - ]); - - testErrorsAndWarnings('from a_index | where min(dateField) > 0', [ - 'WHERE does not support function min', - ]); - - testErrorsAndWarnings('from a_index | eval var = min(numberField)', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(doubleField, integerField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = min(numberField) > 0', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(doubleField, integerField) > 0', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval min(numberField)', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval var = weighted_avg(longField, doubleField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval min(numberField) > 0', [ - 'EVAL does not support function min', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = weighted_avg(longField, doubleField) > 0', + ['EVAL does not support function weighted_avg'] + ); - testErrorsAndWarnings('from a_index | eval var = min(dateField)', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(longField, doubleField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = min(dateField) > 0', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(longField, doubleField) > 0', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval min(dateField)', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval var = weighted_avg(longField, longField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval min(dateField) > 0', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval var = weighted_avg(longField, longField) > 0', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats min(booleanField)', []); - testErrorsAndWarnings('from a_index | stats min(null)', []); - testErrorsAndWarnings('row nullVar = null | stats min(nullVar)', []); - testErrorsAndWarnings('from a_index | stats min("2022")', []); - testErrorsAndWarnings('from a_index | stats min(concat("20", "22"))', [ - 'Argument of [min] must be [number], found value [concat("20","22")] type [string]', + testErrorsAndWarnings('from a_index | eval weighted_avg(longField, longField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats min(cartesianPointField)', [ - 'Argument of [min] must be [number], found value [cartesianPointField] type [cartesian_point]', + testErrorsAndWarnings('from a_index | eval weighted_avg(longField, longField) > 0', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | stats var = min(booleanField)', []); - - testErrorsAndWarnings('from a_index | where min(booleanField)', [ - 'WHERE does not support function min', + testErrorsAndWarnings('from a_index | eval var = weighted_avg(longField, integerField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | where min(booleanField) > 0', [ - 'WHERE does not support function min', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = weighted_avg(longField, integerField) > 0', + ['EVAL does not support function weighted_avg'] + ); - testErrorsAndWarnings('from a_index | eval var = min(booleanField)', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(longField, integerField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = min(booleanField) > 0', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(longField, integerField) > 0', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval min(booleanField)', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval var = weighted_avg(integerField, doubleField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval min(booleanField) > 0', [ - 'EVAL does not support function min', - ]); - testErrorsAndWarnings('from a_index | stats var = min(ipField)', []); - testErrorsAndWarnings('from a_index | stats min(ipField)', []); + testErrorsAndWarnings( + 'from a_index | eval var = weighted_avg(integerField, doubleField) > 0', + ['EVAL does not support function weighted_avg'] + ); - testErrorsAndWarnings('from a_index | where min(ipField)', [ - 'WHERE does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(integerField, doubleField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | where min(ipField) > 0', [ - 'WHERE does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(integerField, doubleField) > 0', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = min(ipField)', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval var = weighted_avg(integerField, longField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = min(ipField) > 0', [ - 'EVAL does not support function min', - ]); + testErrorsAndWarnings( + 'from a_index | eval var = weighted_avg(integerField, longField) > 0', + ['EVAL does not support function weighted_avg'] + ); - testErrorsAndWarnings('from a_index | eval min(ipField)', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(integerField, longField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval min(ipField) > 0', [ - 'EVAL does not support function min', + testErrorsAndWarnings('from a_index | eval weighted_avg(integerField, longField) > 0', [ + 'EVAL does not support function weighted_avg', ]); - }); - - describe('count', () => { - testErrorsAndWarnings('from a_index | stats var = count(stringField)', []); - testErrorsAndWarnings('from a_index | stats count(stringField)', []); - testErrorsAndWarnings('from a_index | stats var = round(count(stringField))', []); - testErrorsAndWarnings('from a_index | stats round(count(stringField))', []); testErrorsAndWarnings( - 'from a_index | stats var = round(count(stringField)) + count(stringField)', - [] + 'from a_index | eval var = weighted_avg(integerField, integerField)', + ['EVAL does not support function weighted_avg'] ); testErrorsAndWarnings( - 'from a_index | stats round(count(stringField)) + count(stringField)', - [] + 'from a_index | eval var = weighted_avg(integerField, integerField) > 0', + ['EVAL does not support function weighted_avg'] ); - testErrorsAndWarnings('from a_index | sort count(stringField)', [ - 'SORT does not support function count', - ]); - - testErrorsAndWarnings('from a_index | where count(stringField)', [ - 'WHERE does not support function count', - ]); - - testErrorsAndWarnings('from a_index | where count(stringField) > 0', [ - 'WHERE does not support function count', + testErrorsAndWarnings('from a_index | eval weighted_avg(integerField, integerField)', [ + 'EVAL does not support function weighted_avg', ]); - testErrorsAndWarnings('from a_index | eval var = count(stringField)', [ - 'EVAL does not support function count', + testErrorsAndWarnings('from a_index | eval weighted_avg(integerField, integerField) > 0', [ + 'EVAL does not support function weighted_avg', ]); + }); - testErrorsAndWarnings('from a_index | eval var = count(stringField) > 0', [ - 'EVAL does not support function count', - ]); + describe('bucket', () => { + testErrorsAndWarnings('from a_index | stats by bucket(dateField, 1 year)', []); + testErrorsAndWarnings('from a_index | stats by bin(dateField, 1 year)', []); - testErrorsAndWarnings('from a_index | eval count(stringField)', [ - 'EVAL does not support function count', + testErrorsAndWarnings('from a_index | stats by bucket(integerField, integerField)', [ + 'Argument of [bucket] must be a constant, received [integerField]', ]); - testErrorsAndWarnings('from a_index | eval count(stringField) > 0', [ - 'EVAL does not support function count', + testErrorsAndWarnings('from a_index | stats by bin(integerField, integerField)', [ + 'Argument of [bin] must be a constant, received [integerField]', ]); - testErrorsAndWarnings('from a_index | stats count(null)', []); - testErrorsAndWarnings('row nullVar = null | stats count(nullVar)', []); - }); - describe('count_distinct', () => { testErrorsAndWarnings( - 'from a_index | stats var = count_distinct(stringField, numberField)', - [] + 'from a_index | stats by bucket(dateField, integerField, textField, textField)', + [ + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [textField]', + 'Argument of [bucket] must be a constant, received [textField]', + ] ); - testErrorsAndWarnings('from a_index | stats count_distinct(stringField, numberField)', []); testErrorsAndWarnings( - 'from a_index | stats var = round(count_distinct(stringField, numberField))', - [] + 'from a_index | stats by bin(dateField, integerField, textField, textField)', + [ + 'Argument of [bin] must be a constant, received [integerField]', + 'Argument of [bin] must be a constant, received [textField]', + 'Argument of [bin] must be a constant, received [textField]', + ] ); testErrorsAndWarnings( - 'from a_index | stats round(count_distinct(stringField, numberField))', - [] + 'from a_index | stats by bucket(dateField, integerField, dateField, dateField)', + [ + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [dateField]', + 'Argument of [bucket] must be a constant, received [dateField]', + ] ); testErrorsAndWarnings( - 'from a_index | stats var = round(count_distinct(stringField, numberField)) + count_distinct(stringField, numberField)', - [] + 'from a_index | stats by bin(dateField, integerField, dateField, dateField)', + [ + 'Argument of [bin] must be a constant, received [integerField]', + 'Argument of [bin] must be a constant, received [dateField]', + 'Argument of [bin] must be a constant, received [dateField]', + ] ); testErrorsAndWarnings( - 'from a_index | stats round(count_distinct(stringField, numberField)) + count_distinct(stringField, numberField)', - [] + 'from a_index | stats by bucket(dateField, integerField, textField, dateField)', + [ + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [textField]', + 'Argument of [bucket] must be a constant, received [dateField]', + ] ); - testErrorsAndWarnings('from a_index | sort count_distinct(stringField, numberField)', [ - 'SORT does not support function count_distinct', - ]); - - testErrorsAndWarnings('from a_index | where count_distinct(stringField, numberField)', [ - 'WHERE does not support function count_distinct', - ]); - - testErrorsAndWarnings('from a_index | where count_distinct(stringField, numberField) > 0', [ - 'WHERE does not support function count_distinct', - ]); - testErrorsAndWarnings( - 'from a_index | eval var = count_distinct(stringField, numberField)', - ['EVAL does not support function count_distinct'] + 'from a_index | stats by bin(dateField, integerField, textField, dateField)', + [ + 'Argument of [bin] must be a constant, received [integerField]', + 'Argument of [bin] must be a constant, received [textField]', + 'Argument of [bin] must be a constant, received [dateField]', + ] ); testErrorsAndWarnings( - 'from a_index | eval var = count_distinct(stringField, numberField) > 0', - ['EVAL does not support function count_distinct'] + 'from a_index | stats by bucket(dateField, integerField, dateField, textField)', + [ + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [dateField]', + 'Argument of [bucket] must be a constant, received [textField]', + ] ); - testErrorsAndWarnings('from a_index | eval count_distinct(stringField, numberField)', [ - 'EVAL does not support function count_distinct', - ]); - - testErrorsAndWarnings('from a_index | eval count_distinct(stringField, numberField) > 0', [ - 'EVAL does not support function count_distinct', - ]); - testErrorsAndWarnings('from a_index | stats count_distinct(null, null)', []); - testErrorsAndWarnings('row nullVar = null | stats count_distinct(nullVar, nullVar)', []); - }); - - describe('st_centroid_agg', () => { testErrorsAndWarnings( - 'from a_index | stats var = st_centroid_agg(cartesianPointField)', - [] + 'from a_index | stats by bin(dateField, integerField, dateField, textField)', + [ + 'Argument of [bin] must be a constant, received [integerField]', + 'Argument of [bin] must be a constant, received [dateField]', + 'Argument of [bin] must be a constant, received [textField]', + ] ); - testErrorsAndWarnings('from a_index | stats st_centroid_agg(cartesianPointField)', []); - testErrorsAndWarnings('from a_index | stats var = st_centroid_agg(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); + testErrorsAndWarnings( + 'from a_index | stats by bucket(integerField, integerField, integerField, integerField)', + [ + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [integerField]', + ] + ); - testErrorsAndWarnings('from a_index | stats st_centroid_agg(avg(numberField))', [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ]); + testErrorsAndWarnings( + 'from a_index | stats by bin(integerField, integerField, integerField, integerField)', + [ + 'Argument of [bin] must be a constant, received [integerField]', + 'Argument of [bin] must be a constant, received [integerField]', + 'Argument of [bin] must be a constant, received [integerField]', + ] + ); - testErrorsAndWarnings('from a_index | stats st_centroid_agg(stringField)', [ - 'Argument of [st_centroid_agg] must be [cartesian_point], found value [stringField] type [string]', + testErrorsAndWarnings('from a_index | sort bucket(dateField, 1 year)', [ + 'SORT does not support function bucket', ]); - testErrorsAndWarnings('from a_index | stats var = st_centroid_agg(*)', [ - 'Using wildcards (*) in st_centroid_agg is not allowed', - ]); + testErrorsAndWarnings('from a_index | stats bucket(null, null, null, null)', []); - testErrorsAndWarnings('from a_index | stats var = st_centroid_agg(geoPointField)', []); - testErrorsAndWarnings('from a_index | stats st_centroid_agg(geoPointField)', []); + testErrorsAndWarnings( + 'row nullVar = null | stats bucket(nullVar, nullVar, nullVar, nullVar)', + [ + 'Argument of [bucket] must be a constant, received [nullVar]', + 'Argument of [bucket] must be a constant, received [nullVar]', + 'Argument of [bucket] must be a constant, received [nullVar]', + ] + ); - testErrorsAndWarnings('from a_index | sort st_centroid_agg(cartesianPointField)', [ - 'SORT does not support function st_centroid_agg', + testErrorsAndWarnings('from a_index | stats bucket("2022", 1 year)', []); + testErrorsAndWarnings('from a_index | stats bucket(concat("20", "22"), 1 year)', [ + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', ]); - testErrorsAndWarnings('from a_index | where st_centroid_agg(cartesianPointField)', [ - 'WHERE does not support function st_centroid_agg', - ]); + testErrorsAndWarnings( + 'from a_index | stats bucket("2022", integerField, textField, textField)', + [ + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [textField]', + 'Argument of [bucket] must be a constant, received [textField]', + ] + ); - testErrorsAndWarnings('from a_index | where st_centroid_agg(cartesianPointField) > 0', [ - 'WHERE does not support function st_centroid_agg', - ]); + testErrorsAndWarnings( + 'from a_index | stats bucket(concat("20", "22"), integerField, textField, textField)', + [ + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [textField]', + 'Argument of [bucket] must be a constant, received [textField]', + ] + ); - testErrorsAndWarnings('from a_index | where st_centroid_agg(geoPointField)', [ - 'WHERE does not support function st_centroid_agg', + testErrorsAndWarnings('from a_index | stats bucket("2022", integerField, "2022", "2022")', [ + 'Argument of [bucket] must be a constant, received [integerField]', ]); - testErrorsAndWarnings('from a_index | where st_centroid_agg(geoPointField) > 0', [ - 'WHERE does not support function st_centroid_agg', - ]); + testErrorsAndWarnings( + 'from a_index | stats bucket(concat("20", "22"), integerField, concat("20", "22"), concat("20", "22"))', + [ + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', + ] + ); - testErrorsAndWarnings('from a_index | eval var = st_centroid_agg(cartesianPointField)', [ - 'EVAL does not support function st_centroid_agg', - ]); + testErrorsAndWarnings( + 'from a_index | stats bucket("2022", integerField, textField, "2022")', + [ + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [textField]', + ] + ); testErrorsAndWarnings( - 'from a_index | eval var = st_centroid_agg(cartesianPointField) > 0', - ['EVAL does not support function st_centroid_agg'] + 'from a_index | stats bucket(concat("20", "22"), integerField, textField, concat("20", "22"))', + [ + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [textField]', + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', + ] ); - testErrorsAndWarnings('from a_index | eval st_centroid_agg(cartesianPointField)', [ - 'EVAL does not support function st_centroid_agg', - ]); + testErrorsAndWarnings( + 'from a_index | stats bucket("2022", integerField, "2022", textField)', + [ + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be a constant, received [textField]', + ] + ); - testErrorsAndWarnings('from a_index | eval st_centroid_agg(cartesianPointField) > 0', [ - 'EVAL does not support function st_centroid_agg', - ]); + testErrorsAndWarnings( + 'from a_index | stats bucket(concat("20", "22"), integerField, concat("20", "22"), textField)', + [ + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', + 'Argument of [bucket] must be a constant, received [integerField]', + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', + 'Argument of [bucket] must be a constant, received [textField]', + ] + ); + }); - testErrorsAndWarnings('from a_index | eval var = st_centroid_agg(geoPointField)', [ - 'EVAL does not support function st_centroid_agg', + describe('percentile', () => { + testErrorsAndWarnings('from a_index | stats var = percentile(doubleField, doubleField)', [ + 'Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]', ]); - - testErrorsAndWarnings('from a_index | eval var = st_centroid_agg(geoPointField) > 0', [ - 'EVAL does not support function st_centroid_agg', + testErrorsAndWarnings('from a_index | stats percentile(doubleField, doubleField)', [ + 'Argument of [percentile] must be a constant, received [doubleField]', ]); - testErrorsAndWarnings('from a_index | eval st_centroid_agg(geoPointField)', [ - 'EVAL does not support function st_centroid_agg', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = round(percentile(doubleField, doubleField))', + [ + 'Argument of [=] must be a constant, received [round(percentile(doubleField,doubleField))]', + ] + ); - testErrorsAndWarnings('from a_index | eval st_centroid_agg(geoPointField) > 0', [ - 'EVAL does not support function st_centroid_agg', + testErrorsAndWarnings('from a_index | stats round(percentile(doubleField, doubleField))', [ + 'Argument of [round] must be a constant, received [percentile(doubleField,doubleField)]', ]); - testErrorsAndWarnings('from a_index | stats st_centroid_agg(booleanField)', [ - 'Argument of [st_centroid_agg] must be [cartesian_point], found value [booleanField] type [boolean]', - ]); - testErrorsAndWarnings('from a_index | stats st_centroid_agg(null)', []); - testErrorsAndWarnings('row nullVar = null | stats st_centroid_agg(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats var = round(percentile(doubleField, doubleField)) + percentile(doubleField, doubleField)', + [ + 'Argument of [=] must be a constant, received [round(percentile(doubleField,doubleField))+percentile(doubleField,doubleField)]', + ] + ); - describe('values', () => { - testErrorsAndWarnings('from a_index | stats var = values(stringField)', []); - testErrorsAndWarnings('from a_index | stats values(stringField)', []); + testErrorsAndWarnings( + 'from a_index | stats round(percentile(doubleField, doubleField)) + percentile(doubleField, doubleField)', + [ + 'Argument of [+] must be a constant, received [round(percentile(doubleField,doubleField))]', + 'Argument of [+] must be a constant, received [percentile(doubleField,doubleField)]', + ] + ); - testErrorsAndWarnings('from a_index | sort values(stringField)', [ - 'SORT does not support function values', + testErrorsAndWarnings('from a_index | stats percentile(doubleField / 2, doubleField)', [ + 'Argument of [percentile] must be a constant, received [doubleField]', ]); + testErrorsAndWarnings( + 'from a_index | stats var0 = percentile(doubleField / 2, doubleField)', + ['Argument of [=] must be a constant, received [percentile(doubleField/2,doubleField)]'] + ); - testErrorsAndWarnings('from a_index | where values(stringField)', [ - 'WHERE does not support function values', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), percentile(doubleField / 2, doubleField)', + ['Argument of [percentile] must be a constant, received [doubleField]'] + ); - testErrorsAndWarnings('from a_index | where values(stringField) > 0', [ - 'WHERE does not support function values', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField / 2, doubleField)', + ['Argument of [=] must be a constant, received [percentile(doubleField/2,doubleField)]'] + ); - testErrorsAndWarnings('from a_index | eval var = values(stringField)', [ - 'EVAL does not support function values', + testErrorsAndWarnings('from a_index | stats var0 = percentile(doubleField, doubleField)', [ + 'Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]', ]); - testErrorsAndWarnings('from a_index | eval var = values(stringField) > 0', [ - 'EVAL does not support function values', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), percentile(doubleField, doubleField)', + ['Argument of [percentile] must be a constant, received [doubleField]'] + ); - testErrorsAndWarnings('from a_index | eval values(stringField)', [ - 'EVAL does not support function values', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField, doubleField)', + ['Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]'] + ); - testErrorsAndWarnings('from a_index | eval values(stringField) > 0', [ - 'EVAL does not support function values', - ]); - testErrorsAndWarnings('from a_index | stats values(null)', []); - testErrorsAndWarnings('row nullVar = null | stats values(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats percentile(doubleField, doubleField) by round(doubleField / 2)', + ['Argument of [percentile] must be a constant, received [doubleField]'] + ); - describe('bucket', () => { - testErrorsAndWarnings('from a_index | stats by bucket(dateField, 1 year)', []); - testErrorsAndWarnings('from a_index | stats by bin(dateField, 1 year)', []); - testErrorsAndWarnings('from a_index | stats by bucket(numberField, 5)', []); + testErrorsAndWarnings( + 'from a_index | stats var0 = percentile(doubleField, doubleField) by var1 = round(doubleField / 2)', + ['Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]'] + ); - testErrorsAndWarnings('from a_index | stats by bucket(numberField, numberField)', [ - 'Argument of [bucket] must be a constant, received [numberField]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), percentile(doubleField, doubleField) by round(doubleField / 2), ipField', + ['Argument of [percentile] must be a constant, received [doubleField]'] + ); - testErrorsAndWarnings('from a_index | stats by bin(numberField, 5)', []); - testErrorsAndWarnings('from a_index | stats by bucket(dateField, 5, "a", "a")', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField, doubleField) by var1 = round(doubleField / 2), ipField', + ['Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]'] + ); testErrorsAndWarnings( - 'from a_index | stats by bucket(dateField, numberField, stringField, stringField)', - [ - '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]', - ] + 'from a_index | stats avg(doubleField), percentile(doubleField, doubleField) by round(doubleField / 2), doubleField / 2', + ['Argument of [percentile] must be a constant, received [doubleField]'] ); - testErrorsAndWarnings('from a_index | stats by bin(dateField, 5, "a", "a")', []); - testErrorsAndWarnings('from a_index | stats by bucket(dateField, 5, now(), now())', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField, doubleField) by var1 = round(doubleField / 2), doubleField / 2', + ['Argument of [=] must be a constant, received [percentile(doubleField,doubleField)]'] + ); testErrorsAndWarnings( - 'from a_index | stats by bucket(dateField, numberField, dateField, dateField)', + 'from a_index | stats var = percentile(avg(integerField), avg(integerField))', [ - '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]', + 'Argument of [=] must be a constant, received [percentile(avg(integerField),avg(integerField))]', + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", ] ); - testErrorsAndWarnings('from a_index | stats by bin(dateField, 5, now(), now())', []); - testErrorsAndWarnings('from a_index | stats by bucket(dateField, 5, "a", now())', []); - testErrorsAndWarnings( - 'from a_index | stats by bucket(dateField, numberField, stringField, dateField)', + 'from a_index | stats percentile(avg(integerField), avg(integerField))', [ - '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 [percentile] must be a constant, received [avg(integerField)]', + "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(integerField)] of type [double]", ] ); - testErrorsAndWarnings('from a_index | stats by bin(dateField, 5, "a", now())', []); - testErrorsAndWarnings('from a_index | stats by bucket(dateField, 5, now(), "a")', []); + testErrorsAndWarnings('from a_index | stats percentile(booleanField, )', [ + "SyntaxError: no viable alternative at input 'percentile(booleanField, )'", + "SyntaxError: mismatched input ')' expecting {QUOTED_STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', NAMED_OR_POSITIONAL_PARAM, OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}", + 'At least one aggregation or grouping expression required in [STATS]', + ]); + testErrorsAndWarnings('from a_index | stats var = percentile(doubleField, longField)', [ + 'Argument of [=] must be a constant, received [percentile(doubleField,longField)]', + ]); + testErrorsAndWarnings('from a_index | stats percentile(doubleField, longField)', [ + 'Argument of [percentile] must be a constant, received [longField]', + ]); testErrorsAndWarnings( - 'from a_index | stats by bucket(dateField, numberField, dateField, stringField)', + 'from a_index | stats var = round(percentile(doubleField, longField))', [ - '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]', + 'Argument of [=] must be a constant, received [round(percentile(doubleField,longField))]', ] ); - - testErrorsAndWarnings('from a_index | stats by bin(dateField, 5, now(), "a")', []); - testErrorsAndWarnings('from a_index | stats by bucket(numberField, 5, 5, 5)', []); + testErrorsAndWarnings('from a_index | stats round(percentile(doubleField, longField))', [ + 'Argument of [round] must be a constant, received [percentile(doubleField,longField)]', + ]); testErrorsAndWarnings( - 'from a_index | stats by bucket(numberField, numberField, numberField, numberField)', + 'from a_index | stats var = round(percentile(doubleField, longField)) + percentile(doubleField, longField)', [ - '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 [=] must be a constant, received [round(percentile(doubleField,longField))+percentile(doubleField,longField)]', ] ); - testErrorsAndWarnings('from a_index | stats by bin(numberField, 5, 5, 5)', []); - - testErrorsAndWarnings('from a_index | sort bucket(dateField, 1 year)', [ - 'SORT does not support function bucket', - ]); - testErrorsAndWarnings('from a_index | stats bucket(null, null, null, null)', []); - testErrorsAndWarnings( - 'row nullVar = null | stats bucket(nullVar, nullVar, nullVar, nullVar)', + 'from a_index | stats round(percentile(doubleField, longField)) + percentile(doubleField, longField)', [ - 'Argument of [bucket] must be a constant, received [nullVar]', - 'Argument of [bucket] must be a constant, received [nullVar]', - 'Argument of [bucket] must be a constant, received [nullVar]', + 'Argument of [+] must be a constant, received [round(percentile(doubleField,longField))]', + 'Argument of [+] must be a constant, received [percentile(doubleField,longField)]', ] ); - testErrorsAndWarnings('from a_index | stats bucket("2022", 1 year)', []); - testErrorsAndWarnings('from a_index | stats bucket(concat("20", "22"), 1 year)', [ - 'Argument of [bucket] must be [date], found value [concat("20","22")] type [string]', - ]); - testErrorsAndWarnings('from a_index | stats by bucket(concat("20", "22"), 1 year)', [ - 'Argument of [bucket] must be [date], found value [concat("20","22")] type [string]', - ]); - testErrorsAndWarnings('from a_index | stats bucket("2022", 5, "a", "a")', []); - testErrorsAndWarnings('from a_index | stats bucket(concat("20", "22"), 5, "a", "a")', [ - 'Argument of [bucket] must be [date], found value [concat("20","22")] type [string]', + + testErrorsAndWarnings('from a_index | stats percentile(doubleField / 2, longField)', [ + 'Argument of [percentile] must be a constant, received [longField]', ]); - testErrorsAndWarnings('from a_index | stats bucket("2022", 5, "2022", "2022")', []); + testErrorsAndWarnings( + 'from a_index | stats var0 = percentile(doubleField / 2, longField)', + ['Argument of [=] must be a constant, received [percentile(doubleField/2,longField)]'] + ); testErrorsAndWarnings( - 'from a_index | stats bucket(concat("20", "22"), 5, concat("20", "22"), concat("20", "22"))', - ['Argument of [bucket] must be [date], found value [concat("20","22")] type [string]'] + 'from a_index | stats avg(doubleField), percentile(doubleField / 2, longField)', + ['Argument of [percentile] must be a constant, received [longField]'] ); - testErrorsAndWarnings('from a_index | stats bucket("2022", 5, "a", "2022")', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField / 2, longField)', + ['Argument of [=] must be a constant, received [percentile(doubleField/2,longField)]'] + ); + + testErrorsAndWarnings('from a_index | stats var0 = percentile(doubleField, longField)', [ + 'Argument of [=] must be a constant, received [percentile(doubleField,longField)]', + ]); testErrorsAndWarnings( - 'from a_index | stats bucket(concat("20", "22"), 5, "a", concat("20", "22"))', - ['Argument of [bucket] must be [date], found value [concat("20","22")] type [string]'] + 'from a_index | stats avg(doubleField), percentile(doubleField, longField)', + ['Argument of [percentile] must be a constant, received [longField]'] ); - testErrorsAndWarnings('from a_index | stats bucket("2022", 5, "2022", "a")', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField, longField)', + ['Argument of [=] must be a constant, received [percentile(doubleField,longField)]'] + ); testErrorsAndWarnings( - 'from a_index | stats bucket(concat("20", "22"), 5, concat("20", "22"), "a")', - ['Argument of [bucket] must be [date], found value [concat("20","22")] type [string]'] + 'from a_index | stats percentile(doubleField, longField) by round(doubleField / 2)', + ['Argument of [percentile] must be a constant, received [longField]'] ); - }); - describe('cbrt', () => { - testErrorsAndWarnings('row var = cbrt(5)', []); - testErrorsAndWarnings('row cbrt(5)', []); - testErrorsAndWarnings('row var = cbrt(to_integer(true))', []); + testErrorsAndWarnings( + 'from a_index | stats var0 = percentile(doubleField, longField) by var1 = round(doubleField / 2)', + ['Argument of [=] must be a constant, received [percentile(doubleField,longField)]'] + ); - testErrorsAndWarnings('row var = cbrt(true)', [ - 'Argument of [cbrt] must be [number], found value [true] type [boolean]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), percentile(doubleField, longField) by round(doubleField / 2), ipField', + ['Argument of [percentile] must be a constant, received [longField]'] + ); - testErrorsAndWarnings('from a_index | where cbrt(numberField) > 0', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField, longField) by var1 = round(doubleField / 2), ipField', + ['Argument of [=] must be a constant, received [percentile(doubleField,longField)]'] + ); - testErrorsAndWarnings('from a_index | where cbrt(booleanField) > 0', [ - 'Argument of [cbrt] must be [number], found value [booleanField] type [boolean]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), percentile(doubleField, longField) by round(doubleField / 2), doubleField / 2', + ['Argument of [percentile] must be a constant, received [longField]'] + ); - 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 | stats avg(doubleField), var0 = percentile(doubleField, longField) by var1 = round(doubleField / 2), doubleField / 2', + ['Argument of [=] must be a constant, received [percentile(doubleField,longField)]'] + ); - testErrorsAndWarnings('from a_index | eval cbrt(booleanField)', [ - 'Argument of [cbrt] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | stats var = percentile(doubleField, integerField)', [ + 'Argument of [=] must be a constant, received [percentile(doubleField,integerField)]', ]); - - testErrorsAndWarnings('from a_index | eval var = cbrt(*)', [ - 'Using wildcards (*) in cbrt is not allowed', + testErrorsAndWarnings('from a_index | stats percentile(doubleField, integerField)', [ + 'Argument of [percentile] must be a constant, received [integerField]', ]); - testErrorsAndWarnings('from a_index | eval cbrt(numberField, extraArg)', [ - 'Error: [cbrt] function expects exactly one argument, got 2.', + testErrorsAndWarnings( + 'from a_index | stats var = round(percentile(doubleField, integerField))', + [ + 'Argument of [=] must be a constant, received [round(percentile(doubleField,integerField))]', + ] + ); + + testErrorsAndWarnings('from a_index | stats round(percentile(doubleField, integerField))', [ + 'Argument of [round] must be a constant, received [percentile(doubleField,integerField)]', ]); - testErrorsAndWarnings('from a_index | sort cbrt(numberField)', []); - testErrorsAndWarnings('from a_index | eval cbrt(null)', []); - testErrorsAndWarnings('row nullVar = null | eval cbrt(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats var = round(percentile(doubleField, integerField)) + percentile(doubleField, integerField)', + [ + 'Argument of [=] must be a constant, received [round(percentile(doubleField,integerField))+percentile(doubleField,integerField)]', + ] + ); - describe('from_base64', () => { - testErrorsAndWarnings('row var = from_base64("a")', []); - testErrorsAndWarnings('row from_base64("a")', []); - testErrorsAndWarnings('row var = from_base64(to_string(true))', []); + testErrorsAndWarnings( + 'from a_index | stats round(percentile(doubleField, integerField)) + percentile(doubleField, integerField)', + [ + 'Argument of [+] must be a constant, received [round(percentile(doubleField,integerField))]', + 'Argument of [+] must be a constant, received [percentile(doubleField,integerField)]', + ] + ); - testErrorsAndWarnings('row var = from_base64(true)', [ - 'Argument of [from_base64] must be [string], found value [true] type [boolean]', + testErrorsAndWarnings('from a_index | stats percentile(doubleField / 2, integerField)', [ + 'Argument of [percentile] must be a constant, received [integerField]', ]); - testErrorsAndWarnings('from a_index | where length(from_base64(stringField)) > 0', []); + testErrorsAndWarnings( + 'from a_index | stats var0 = percentile(doubleField / 2, integerField)', + ['Argument of [=] must be a constant, received [percentile(doubleField/2,integerField)]'] + ); - 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 | stats avg(doubleField), percentile(doubleField / 2, integerField)', + ['Argument of [percentile] must be a constant, received [integerField]'] + ); - 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 | stats avg(doubleField), var0 = percentile(doubleField / 2, integerField)', + ['Argument of [=] must be a constant, received [percentile(doubleField/2,integerField)]'] + ); - testErrorsAndWarnings('from a_index | eval from_base64(booleanField)', [ - 'Argument of [from_base64] must be [string], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | stats var0 = percentile(doubleField, integerField)', [ + 'Argument of [=] must be a constant, received [percentile(doubleField,integerField)]', ]); - testErrorsAndWarnings('from a_index | eval var = from_base64(*)', [ - 'Using wildcards (*) in from_base64 is not allowed', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), percentile(doubleField, integerField)', + ['Argument of [percentile] must be a constant, received [integerField]'] + ); - testErrorsAndWarnings('from a_index | eval from_base64(stringField, extraArg)', [ - 'Error: [from_base64] function expects exactly one argument, got 2.', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField, integerField)', + ['Argument of [=] must be a constant, received [percentile(doubleField,integerField)]'] + ); - testErrorsAndWarnings('from a_index | sort from_base64(stringField)', []); - testErrorsAndWarnings('from a_index | eval from_base64(null)', []); - testErrorsAndWarnings('row nullVar = null | eval from_base64(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats percentile(doubleField, integerField) by round(doubleField / 2)', + ['Argument of [percentile] must be a constant, received [integerField]'] + ); - 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))', - [] + 'from a_index | stats var0 = percentile(doubleField, integerField) by var1 = round(doubleField / 2)', + ['Argument of [=] must be a constant, received [percentile(doubleField,integerField)]'] ); - 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 | stats avg(doubleField), percentile(doubleField, integerField) by round(doubleField / 2), ipField', + ['Argument of [percentile] must be a constant, received [integerField]'] + ); - testErrorsAndWarnings('from a_index | where locate(stringField, stringField) > 0', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField, integerField) by var1 = round(doubleField / 2), ipField', + ['Argument of [=] must be a constant, received [percentile(doubleField,integerField)]'] + ); - 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 | stats avg(doubleField), percentile(doubleField, integerField) by round(doubleField / 2), doubleField / 2', + ['Argument of [percentile] must be a constant, received [integerField]'] + ); testErrorsAndWarnings( - 'from a_index | where locate(stringField, stringField, numberField) > 0', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(doubleField, integerField) by var1 = round(doubleField / 2), doubleField / 2', + ['Argument of [=] must be a constant, received [percentile(doubleField,integerField)]'] ); + testErrorsAndWarnings('from a_index | stats var = percentile(longField, doubleField)', [ + 'Argument of [=] must be a constant, received [percentile(longField,doubleField)]', + ]); + testErrorsAndWarnings('from a_index | stats percentile(longField, doubleField)', [ + 'Argument of [percentile] must be a constant, received [doubleField]', + ]); testErrorsAndWarnings( - 'from a_index | where locate(booleanField, booleanField, booleanField) > 0', + 'from a_index | stats var = round(percentile(longField, doubleField))', [ - '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]', + 'Argument of [=] must be a constant, received [round(percentile(longField,doubleField))]', ] ); + testErrorsAndWarnings('from a_index | stats round(percentile(longField, doubleField))', [ + 'Argument of [round] must be a constant, received [percentile(longField,doubleField)]', + ]); - testErrorsAndWarnings('from a_index | eval var = locate(stringField, stringField)', []); - testErrorsAndWarnings('from a_index | eval locate(stringField, stringField)', []); + testErrorsAndWarnings( + 'from a_index | stats var = round(percentile(longField, doubleField)) + percentile(longField, doubleField)', + [ + 'Argument of [=] must be a constant, received [round(percentile(longField,doubleField))+percentile(longField,doubleField)]', + ] + ); testErrorsAndWarnings( - 'from a_index | eval var = locate(to_string(booleanField), to_string(booleanField))', - [] + 'from a_index | stats round(percentile(longField, doubleField)) + percentile(longField, doubleField)', + [ + 'Argument of [+] must be a constant, received [round(percentile(longField,doubleField))]', + 'Argument of [+] must be a constant, received [percentile(longField,doubleField)]', + ] ); - 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 | stats var0 = percentile(longField, doubleField)', [ + 'Argument of [=] must be a constant, received [percentile(longField,doubleField)]', ]); testErrorsAndWarnings( - 'from a_index | eval var = locate(stringField, stringField, numberField)', - [] + 'from a_index | stats avg(doubleField), percentile(longField, doubleField)', + ['Argument of [percentile] must be a constant, received [doubleField]'] ); testErrorsAndWarnings( - 'from a_index | eval locate(stringField, stringField, numberField)', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(longField, doubleField)', + ['Argument of [=] must be a constant, received [percentile(longField,doubleField)]'] ); testErrorsAndWarnings( - 'from a_index | eval var = locate(to_string(booleanField), to_string(booleanField), to_integer(booleanField))', - [] + 'from a_index | stats percentile(longField, doubleField) by round(doubleField / 2)', + ['Argument of [percentile] must be a constant, received [doubleField]'] ); 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]', - ] + 'from a_index | stats var0 = percentile(longField, doubleField) by var1 = round(doubleField / 2)', + ['Argument of [=] must be a constant, received [percentile(longField,doubleField)]'] ); testErrorsAndWarnings( - 'from a_index | eval locate(stringField, stringField, numberField, extraArg)', - ['Error: [locate] function expects no more than 3 arguments, got 4.'] + 'from a_index | stats avg(doubleField), percentile(longField, doubleField) by round(doubleField / 2), ipField', + ['Argument of [percentile] must be a constant, received [doubleField]'] ); - testErrorsAndWarnings('from a_index | sort locate(stringField, stringField)', []); - testErrorsAndWarnings('from a_index | eval locate(null, null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval locate(nullVar, nullVar, nullVar)', []); - }); - - describe('to_base64', () => { - testErrorsAndWarnings('row var = to_base64("a")', []); - testErrorsAndWarnings('row to_base64("a")', []); - testErrorsAndWarnings('row var = to_base64(to_string(true))', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(longField, doubleField) by var1 = round(doubleField / 2), ipField', + ['Argument of [=] must be a constant, received [percentile(longField,doubleField)]'] + ); - testErrorsAndWarnings('row var = to_base64(true)', [ - 'Argument of [to_base64] must be [string], found value [true] type [boolean]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), percentile(longField, doubleField) by round(doubleField / 2), doubleField / 2', + ['Argument of [percentile] must be a constant, received [doubleField]'] + ); - testErrorsAndWarnings('from a_index | where length(to_base64(stringField)) > 0', []); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(longField, doubleField) by var1 = round(doubleField / 2), doubleField / 2', + ['Argument of [=] must be a constant, received [percentile(longField,doubleField)]'] + ); - 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 | stats var = percentile(longField, longField)', [ + 'Argument of [=] must be a constant, received [percentile(longField,longField)]', ]); - - 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 | stats percentile(longField, longField)', [ + 'Argument of [percentile] must be a constant, received [longField]', ]); - - testErrorsAndWarnings('from a_index | eval var = to_base64(*)', [ - 'Using wildcards (*) in to_base64 is not allowed', + testErrorsAndWarnings( + 'from a_index | stats var = round(percentile(longField, longField))', + ['Argument of [=] must be a constant, received [round(percentile(longField,longField))]'] + ); + testErrorsAndWarnings('from a_index | stats round(percentile(longField, longField))', [ + 'Argument of [round] must be a constant, received [percentile(longField,longField)]', ]); - testErrorsAndWarnings('from a_index | eval to_base64(stringField, extraArg)', [ - 'Error: [to_base64] function expects exactly one argument, got 2.', - ]); + testErrorsAndWarnings( + 'from a_index | stats var = round(percentile(longField, longField)) + percentile(longField, longField)', + [ + 'Argument of [=] must be a constant, received [round(percentile(longField,longField))+percentile(longField,longField)]', + ] + ); - testErrorsAndWarnings('from a_index | sort to_base64(stringField)', []); - testErrorsAndWarnings('from a_index | eval to_base64(null)', []); - testErrorsAndWarnings('row nullVar = null | eval to_base64(nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats round(percentile(longField, longField)) + percentile(longField, longField)', + [ + 'Argument of [+] must be a constant, received [round(percentile(longField,longField))]', + 'Argument of [+] must be a constant, received [percentile(longField,longField)]', + ] + ); - describe('ip_prefix', () => { - testErrorsAndWarnings('row var = ip_prefix(to_ip("127.0.0.1"), 5, 5)', []); - testErrorsAndWarnings('row ip_prefix(to_ip("127.0.0.1"), 5, 5)', []); + testErrorsAndWarnings('from a_index | stats var0 = percentile(longField, longField)', [ + 'Argument of [=] must be a constant, received [percentile(longField,longField)]', + ]); testErrorsAndWarnings( - 'row var = ip_prefix(to_ip(to_ip("127.0.0.1")), to_integer(true), to_integer(true))', - [] + 'from a_index | stats avg(doubleField), percentile(longField, longField)', + ['Argument of [percentile] must be a constant, received [longField]'] ); - testErrorsAndWarnings('row var = ip_prefix(true, true, true)', [ - 'Argument of [ip_prefix] must be [ip], found value [true] type [boolean]', - 'Argument of [ip_prefix] must be [number], found value [true] type [boolean]', - 'Argument of [ip_prefix] must be [number], found value [true] type [boolean]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(longField, longField)', + ['Argument of [=] must be a constant, received [percentile(longField,longField)]'] + ); testErrorsAndWarnings( - 'from a_index | eval var = ip_prefix(ipField, numberField, numberField)', - [] + 'from a_index | stats percentile(longField, longField) by round(doubleField / 2)', + ['Argument of [percentile] must be a constant, received [longField]'] ); testErrorsAndWarnings( - 'from a_index | eval ip_prefix(ipField, numberField, numberField)', - [] + 'from a_index | stats var0 = percentile(longField, longField) by var1 = round(doubleField / 2)', + ['Argument of [=] must be a constant, received [percentile(longField,longField)]'] ); testErrorsAndWarnings( - 'from a_index | eval var = ip_prefix(to_ip(ipField), to_integer(booleanField), to_integer(booleanField))', - [] + 'from a_index | stats avg(doubleField), percentile(longField, longField) by round(doubleField / 2), ipField', + ['Argument of [percentile] must be a constant, received [longField]'] ); testErrorsAndWarnings( - 'from a_index | eval ip_prefix(booleanField, booleanField, booleanField)', - [ - 'Argument of [ip_prefix] must be [ip], found value [booleanField] type [boolean]', - 'Argument of [ip_prefix] must be [number], found value [booleanField] type [boolean]', - 'Argument of [ip_prefix] must be [number], found value [booleanField] type [boolean]', - ] + 'from a_index | stats avg(doubleField), var0 = percentile(longField, longField) by var1 = round(doubleField / 2), ipField', + ['Argument of [=] must be a constant, received [percentile(longField,longField)]'] ); testErrorsAndWarnings( - 'from a_index | eval ip_prefix(ipField, numberField, numberField, extraArg)', - ['Error: [ip_prefix] function expects exactly 3 arguments, got 4.'] + 'from a_index | stats avg(doubleField), percentile(longField, longField) by round(doubleField / 2), doubleField / 2', + ['Argument of [percentile] must be a constant, received [longField]'] ); testErrorsAndWarnings( - 'from a_index | sort ip_prefix(ipField, numberField, numberField)', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(longField, longField) by var1 = round(doubleField / 2), doubleField / 2', + ['Argument of [=] must be a constant, received [percentile(longField,longField)]'] ); - testErrorsAndWarnings('from a_index | eval ip_prefix(null, null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval ip_prefix(nullVar, nullVar, nullVar)', []); - }); - describe('mv_append', () => { - testErrorsAndWarnings('row var = mv_append(true, true)', []); - testErrorsAndWarnings('row mv_append(true, true)', []); - testErrorsAndWarnings('row var = mv_append(to_boolean(true), to_boolean(true))', []); + testErrorsAndWarnings('from a_index | stats var = percentile(longField, integerField)', [ + 'Argument of [=] must be a constant, received [percentile(longField,integerField)]', + ]); + testErrorsAndWarnings('from a_index | stats percentile(longField, integerField)', [ + 'Argument of [percentile] must be a constant, received [integerField]', + ]); testErrorsAndWarnings( - 'row var = mv_append(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', - [] + 'from a_index | stats var = round(percentile(longField, integerField))', + [ + 'Argument of [=] must be a constant, received [round(percentile(longField,integerField))]', + ] ); + testErrorsAndWarnings('from a_index | stats round(percentile(longField, integerField))', [ + 'Argument of [round] must be a constant, received [percentile(longField,integerField)]', + ]); + testErrorsAndWarnings( - 'row mv_append(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', - [] + 'from a_index | stats var = round(percentile(longField, integerField)) + percentile(longField, integerField)', + [ + 'Argument of [=] must be a constant, received [round(percentile(longField,integerField))+percentile(longField,integerField)]', + ] ); testErrorsAndWarnings( - 'row var = mv_append(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', - [] + 'from a_index | stats round(percentile(longField, integerField)) + percentile(longField, integerField)', + [ + 'Argument of [+] must be a constant, received [round(percentile(longField,integerField))]', + 'Argument of [+] must be a constant, received [percentile(longField,integerField)]', + ] ); + testErrorsAndWarnings('from a_index | stats var0 = percentile(longField, integerField)', [ + 'Argument of [=] must be a constant, received [percentile(longField,integerField)]', + ]); + testErrorsAndWarnings( - 'row var = mv_append(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', - [] + 'from a_index | stats avg(doubleField), percentile(longField, integerField)', + ['Argument of [percentile] must be a constant, received [integerField]'] ); testErrorsAndWarnings( - 'row mv_append(to_cartesianshape("POINT (30 10)"), to_cartesianshape("POINT (30 10)"))', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(longField, integerField)', + ['Argument of [=] must be a constant, received [percentile(longField,integerField)]'] ); testErrorsAndWarnings( - 'row var = mv_append(to_cartesianshape(to_cartesianpoint("POINT (30 10)")), to_cartesianshape(to_cartesianpoint("POINT (30 10)")))', - [] + 'from a_index | stats percentile(longField, integerField) by round(doubleField / 2)', + ['Argument of [percentile] must be a constant, received [integerField]'] ); - testErrorsAndWarnings('row var = mv_append(now(), now())', []); - testErrorsAndWarnings('row mv_append(now(), now())', []); - testErrorsAndWarnings('row var = mv_append(to_datetime(now()), to_datetime(now()))', []); - testErrorsAndWarnings('row var = mv_append(5, 5)', []); - testErrorsAndWarnings('row mv_append(5, 5)', []); - testErrorsAndWarnings('row var = mv_append(to_integer(true), to_integer(true))', []); - testErrorsAndWarnings( - 'row var = mv_append(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', - [] + 'from a_index | stats var0 = percentile(longField, integerField) by var1 = round(doubleField / 2)', + ['Argument of [=] must be a constant, received [percentile(longField,integerField)]'] ); testErrorsAndWarnings( - 'row mv_append(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', - [] + 'from a_index | stats avg(doubleField), percentile(longField, integerField) by round(doubleField / 2), ipField', + ['Argument of [percentile] must be a constant, received [integerField]'] ); testErrorsAndWarnings( - 'row var = mv_append(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(longField, integerField) by var1 = round(doubleField / 2), ipField', + ['Argument of [=] must be a constant, received [percentile(longField,integerField)]'] ); testErrorsAndWarnings( - 'row var = mv_append(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', - [] + 'from a_index | stats avg(doubleField), percentile(longField, integerField) by round(doubleField / 2), doubleField / 2', + ['Argument of [percentile] must be a constant, received [integerField]'] ); testErrorsAndWarnings( - 'row mv_append(to_geoshape("POINT (30 10)"), to_geoshape("POINT (30 10)"))', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(longField, integerField) by var1 = round(doubleField / 2), doubleField / 2', + ['Argument of [=] must be a constant, received [percentile(longField,integerField)]'] ); + testErrorsAndWarnings('from a_index | stats var = percentile(integerField, doubleField)', [ + 'Argument of [=] must be a constant, received [percentile(integerField,doubleField)]', + ]); + testErrorsAndWarnings('from a_index | stats percentile(integerField, doubleField)', [ + 'Argument of [percentile] must be a constant, received [doubleField]', + ]); + testErrorsAndWarnings( - 'row var = mv_append(to_geoshape(to_geopoint("POINT (30 10)")), to_geoshape(to_geopoint("POINT (30 10)")))', - [] + 'from a_index | stats var = round(percentile(integerField, doubleField))', + [ + 'Argument of [=] must be a constant, received [round(percentile(integerField,doubleField))]', + ] ); - testErrorsAndWarnings('row var = mv_append(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []); - testErrorsAndWarnings('row mv_append(to_ip("127.0.0.1"), to_ip("127.0.0.1"))', []); + testErrorsAndWarnings('from a_index | stats round(percentile(integerField, doubleField))', [ + 'Argument of [round] must be a constant, received [percentile(integerField,doubleField)]', + ]); testErrorsAndWarnings( - 'row var = mv_append(to_ip(to_ip("127.0.0.1")), to_ip(to_ip("127.0.0.1")))', - [] + 'from a_index | stats var = round(percentile(integerField, doubleField)) + percentile(integerField, doubleField)', + [ + 'Argument of [=] must be a constant, received [round(percentile(integerField,doubleField))+percentile(integerField,doubleField)]', + ] ); - testErrorsAndWarnings('row var = mv_append("a", "a")', []); - testErrorsAndWarnings('row mv_append("a", "a")', []); - testErrorsAndWarnings('row var = mv_append(to_string(true), to_string(true))', []); - testErrorsAndWarnings('row var = mv_append(to_version("1.0.0"), to_version("1.0.0"))', []); - testErrorsAndWarnings('row mv_append(to_version("1.0.0"), to_version("1.0.0"))', []); - testErrorsAndWarnings('row var = mv_append(to_version("a"), to_version("a"))', []); - testErrorsAndWarnings('from a_index | where mv_append(numberField, numberField) > 0', []); testErrorsAndWarnings( - 'from a_index | where length(mv_append(stringField, stringField)) > 0', - [] + 'from a_index | stats round(percentile(integerField, doubleField)) + percentile(integerField, doubleField)', + [ + 'Argument of [+] must be a constant, received [round(percentile(integerField,doubleField))]', + 'Argument of [+] must be a constant, received [percentile(integerField,doubleField)]', + ] ); + + testErrorsAndWarnings('from a_index | stats var0 = percentile(integerField, doubleField)', [ + 'Argument of [=] must be a constant, received [percentile(integerField,doubleField)]', + ]); + testErrorsAndWarnings( - 'from a_index | eval var = mv_append(booleanField, booleanField)', - [] + 'from a_index | stats avg(doubleField), percentile(integerField, doubleField)', + ['Argument of [percentile] must be a constant, received [doubleField]'] ); - testErrorsAndWarnings('from a_index | eval mv_append(booleanField, booleanField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_boolean(booleanField), to_boolean(booleanField))', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(integerField, doubleField)', + ['Argument of [=] must be a constant, received [percentile(integerField,doubleField)]'] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(cartesianPointField, cartesianPointField)', - [] + 'from a_index | stats percentile(integerField, doubleField) by round(doubleField / 2)', + ['Argument of [percentile] must be a constant, received [doubleField]'] ); testErrorsAndWarnings( - 'from a_index | eval mv_append(cartesianPointField, cartesianPointField)', - [] + 'from a_index | stats var0 = percentile(integerField, doubleField) by var1 = round(doubleField / 2)', + ['Argument of [=] must be a constant, received [percentile(integerField,doubleField)]'] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', - [] + 'from a_index | stats avg(doubleField), percentile(integerField, doubleField) by round(doubleField / 2), ipField', + ['Argument of [percentile] must be a constant, received [doubleField]'] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(cartesianShapeField, cartesianShapeField)', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(integerField, doubleField) by var1 = round(doubleField / 2), ipField', + ['Argument of [=] must be a constant, received [percentile(integerField,doubleField)]'] ); testErrorsAndWarnings( - 'from a_index | eval mv_append(cartesianShapeField, cartesianShapeField)', - [] + 'from a_index | stats avg(doubleField), percentile(integerField, doubleField) by round(doubleField / 2), doubleField / 2', + ['Argument of [percentile] must be a constant, received [doubleField]'] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_cartesianshape(cartesianPointField), to_cartesianshape(cartesianPointField))', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(integerField, doubleField) by var1 = round(doubleField / 2), doubleField / 2', + ['Argument of [=] must be a constant, received [percentile(integerField,doubleField)]'] ); - testErrorsAndWarnings('from a_index | eval var = mv_append(dateField, dateField)', []); - testErrorsAndWarnings('from a_index | eval mv_append(dateField, dateField)', []); + testErrorsAndWarnings('from a_index | stats var = percentile(integerField, longField)', [ + 'Argument of [=] must be a constant, received [percentile(integerField,longField)]', + ]); + testErrorsAndWarnings('from a_index | stats percentile(integerField, longField)', [ + 'Argument of [percentile] must be a constant, received [longField]', + ]); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_datetime(dateField), to_datetime(dateField))', - [] + 'from a_index | stats var = round(percentile(integerField, longField))', + [ + 'Argument of [=] must be a constant, received [round(percentile(integerField,longField))]', + ] ); - testErrorsAndWarnings('from a_index | eval var = mv_append(numberField, numberField)', []); - testErrorsAndWarnings('from a_index | eval mv_append(numberField, numberField)', []); + testErrorsAndWarnings('from a_index | stats round(percentile(integerField, longField))', [ + 'Argument of [round] must be a constant, received [percentile(integerField,longField)]', + ]); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_integer(booleanField), to_integer(booleanField))', - [] + 'from a_index | stats var = round(percentile(integerField, longField)) + percentile(integerField, longField)', + [ + 'Argument of [=] must be a constant, received [round(percentile(integerField,longField))+percentile(integerField,longField)]', + ] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(geoPointField, geoPointField)', - [] + 'from a_index | stats round(percentile(integerField, longField)) + percentile(integerField, longField)', + [ + 'Argument of [+] must be a constant, received [round(percentile(integerField,longField))]', + 'Argument of [+] must be a constant, received [percentile(integerField,longField)]', + ] ); - testErrorsAndWarnings('from a_index | eval mv_append(geoPointField, geoPointField)', []); + + testErrorsAndWarnings('from a_index | stats var0 = percentile(integerField, longField)', [ + 'Argument of [=] must be a constant, received [percentile(integerField,longField)]', + ]); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_geopoint(geoPointField), to_geopoint(geoPointField))', - [] + 'from a_index | stats avg(doubleField), percentile(integerField, longField)', + ['Argument of [percentile] must be a constant, received [longField]'] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(geoShapeField, geoShapeField)', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(integerField, longField)', + ['Argument of [=] must be a constant, received [percentile(integerField,longField)]'] ); - testErrorsAndWarnings('from a_index | eval mv_append(geoShapeField, geoShapeField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_geoshape(geoPointField), to_geoshape(geoPointField))', - [] + 'from a_index | stats percentile(integerField, longField) by round(doubleField / 2)', + ['Argument of [percentile] must be a constant, received [longField]'] ); - testErrorsAndWarnings('from a_index | eval var = mv_append(ipField, ipField)', []); - testErrorsAndWarnings('from a_index | eval mv_append(ipField, ipField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_ip(ipField), to_ip(ipField))', - [] + 'from a_index | stats var0 = percentile(integerField, longField) by var1 = round(doubleField / 2)', + ['Argument of [=] must be a constant, received [percentile(integerField,longField)]'] ); - testErrorsAndWarnings('from a_index | eval var = mv_append(stringField, stringField)', []); - testErrorsAndWarnings('from a_index | eval mv_append(stringField, stringField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_string(booleanField), to_string(booleanField))', - [] + 'from a_index | stats avg(doubleField), percentile(integerField, longField) by round(doubleField / 2), ipField', + ['Argument of [percentile] must be a constant, received [longField]'] ); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(versionField, versionField)', - [] + 'from a_index | stats avg(doubleField), var0 = percentile(integerField, longField) by var1 = round(doubleField / 2), ipField', + ['Argument of [=] must be a constant, received [percentile(integerField,longField)]'] ); - testErrorsAndWarnings('from a_index | eval mv_append(versionField, versionField)', []); testErrorsAndWarnings( - 'from a_index | eval var = mv_append(to_version(stringField), to_version(stringField))', - [] + 'from a_index | stats avg(doubleField), percentile(integerField, longField) by round(doubleField / 2), doubleField / 2', + ['Argument of [percentile] must be a constant, received [longField]'] ); testErrorsAndWarnings( - 'from a_index | eval mv_append(booleanField, booleanField, extraArg)', - ['Error: [mv_append] function expects exactly 2 arguments, got 3.'] + 'from a_index | stats avg(doubleField), var0 = percentile(integerField, longField) by var1 = round(doubleField / 2), doubleField / 2', + ['Argument of [=] must be a constant, received [percentile(integerField,longField)]'] ); - testErrorsAndWarnings('from a_index | sort mv_append(booleanField, booleanField)', []); - testErrorsAndWarnings('from a_index | eval mv_append(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval mv_append(nullVar, nullVar)', []); - }); + testErrorsAndWarnings('from a_index | stats var = percentile(integerField, integerField)', [ + 'Argument of [=] must be a constant, received [percentile(integerField,integerField)]', + ]); + testErrorsAndWarnings('from a_index | stats percentile(integerField, integerField)', [ + 'Argument of [percentile] must be a constant, received [integerField]', + ]); - describe('repeat', () => { - testErrorsAndWarnings('row var = repeat("a", 5)', []); - testErrorsAndWarnings('row repeat("a", 5)', []); - testErrorsAndWarnings('row var = repeat(to_string(true), to_integer(true))', []); + testErrorsAndWarnings( + 'from a_index | stats var = round(percentile(integerField, integerField))', + [ + 'Argument of [=] must be a constant, received [round(percentile(integerField,integerField))]', + ] + ); - testErrorsAndWarnings('row var = repeat(true, true)', [ - 'Argument of [repeat] must be [string], found value [true] type [boolean]', - 'Argument of [repeat] must be [number], found value [true] type [boolean]', - ]); + testErrorsAndWarnings( + 'from a_index | stats round(percentile(integerField, integerField))', + [ + 'Argument of [round] must be a constant, received [percentile(integerField,integerField)]', + ] + ); testErrorsAndWarnings( - 'from a_index | where length(repeat(stringField, numberField)) > 0', - [] + 'from a_index | stats var = round(percentile(integerField, integerField)) + percentile(integerField, integerField)', + [ + 'Argument of [=] must be a constant, received [round(percentile(integerField,integerField))+percentile(integerField,integerField)]', + ] ); testErrorsAndWarnings( - 'from a_index | where length(repeat(booleanField, booleanField)) > 0', + 'from a_index | stats round(percentile(integerField, integerField)) + percentile(integerField, integerField)', [ - 'Argument of [repeat] must be [string], found value [booleanField] type [boolean]', - 'Argument of [repeat] must be [number], found value [booleanField] type [boolean]', + 'Argument of [+] must be a constant, received [round(percentile(integerField,integerField))]', + 'Argument of [+] must be a constant, received [percentile(integerField,integerField)]', ] ); - testErrorsAndWarnings('from a_index | eval var = repeat(stringField, numberField)', []); - testErrorsAndWarnings('from a_index | eval repeat(stringField, numberField)', []); + testErrorsAndWarnings( + 'from a_index | stats var0 = percentile(integerField, integerField)', + ['Argument of [=] must be a constant, received [percentile(integerField,integerField)]'] + ); testErrorsAndWarnings( - 'from a_index | eval var = repeat(to_string(booleanField), to_integer(booleanField))', - [] + 'from a_index | stats avg(doubleField), percentile(integerField, integerField)', + ['Argument of [percentile] must be a constant, received [integerField]'] ); - testErrorsAndWarnings('from a_index | eval repeat(booleanField, booleanField)', [ - 'Argument of [repeat] must be [string], found value [booleanField] type [boolean]', - 'Argument of [repeat] must be [number], found value [booleanField] type [boolean]', - ]); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(integerField, integerField)', + ['Argument of [=] must be a constant, received [percentile(integerField,integerField)]'] + ); - testErrorsAndWarnings('from a_index | eval repeat(stringField, numberField, extraArg)', [ - 'Error: [repeat] function expects exactly 2 arguments, got 3.', - ]); + testErrorsAndWarnings( + 'from a_index | stats percentile(integerField, integerField) by round(doubleField / 2)', + ['Argument of [percentile] must be a constant, received [integerField]'] + ); - testErrorsAndWarnings('from a_index | sort repeat(stringField, numberField)', []); - testErrorsAndWarnings('from a_index | eval repeat(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval repeat(nullVar, nullVar)', []); - }); + testErrorsAndWarnings( + 'from a_index | stats var0 = percentile(integerField, integerField) by var1 = round(doubleField / 2)', + ['Argument of [=] must be a constant, received [percentile(integerField,integerField)]'] + ); - describe('top', () => { - describe('no errors on correct usage', () => { - testErrorsAndWarnings('from a_index | stats var = top(stringField, 3, "asc")', []); - testErrorsAndWarnings('from a_index | stats top(stringField, 1, "desc")', []); - testErrorsAndWarnings('from a_index | stats var = top(stringField, 5, "asc")', []); - testErrorsAndWarnings('from a_index | stats top(stringField, 5, "asc")', []); - }); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), percentile(integerField, integerField) by round(doubleField / 2), ipField', + ['Argument of [percentile] must be a constant, received [integerField]'] + ); - describe('errors on invalid argument count', () => { - testErrorsAndWarnings('from a_index | stats var = top(stringField, 3)', [ - 'Error: [top] function expects exactly 3 arguments, got 2.', - ]); - testErrorsAndWarnings('from a_index | stats var = top(stringField)', [ - 'Error: [top] function expects exactly 3 arguments, got 1.', - ]); - }); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(integerField, integerField) by var1 = round(doubleField / 2), ipField', + ['Argument of [=] must be a constant, received [percentile(integerField,integerField)]'] + ); - describe('limit must be a literal', () => { - testErrorsAndWarnings('from a_index | stats var = top(stringField, numberField, "asc")', [ - 'Argument of [=] must be a constant, received [top(stringField,numberField,"asc")]', - ]); - testErrorsAndWarnings( - 'from a_index | stats var = top(stringField, 100 + numberField, "asc")', - [ - 'Argument of [=] must be a constant, received [top(stringField,100+numberField,"asc")]', - ] - ); - }); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), percentile(integerField, integerField) by round(doubleField / 2), doubleField / 2', + ['Argument of [percentile] must be a constant, received [integerField]'] + ); - describe('order must be "asc" or "desc"', () => { - testErrorsAndWarnings('from a_index | stats var = top(stringField, 1, stringField)', [ - 'Argument of [=] must be a constant, received [top(stringField,1,stringField)]', - ]); - testErrorsAndWarnings( - 'from a_index | stats var = top(stringField, 1, "asdf")', - [], - ['Invalid option ["asdf"] for top. Supported options: ["asc", "desc"].'] - ); - }); + testErrorsAndWarnings( + 'from a_index | stats avg(doubleField), var0 = percentile(integerField, integerField) by var1 = round(doubleField / 2), doubleField / 2', + ['Argument of [=] must be a constant, received [percentile(integerField,integerField)]'] + ); - testErrorsAndWarnings('from a_index | sort top(stringField, numberField, "asc")', [ - 'SORT does not support function top', + testErrorsAndWarnings('from a_index | sort percentile(doubleField, doubleField)', [ + 'SORT does not support function percentile', ]); - testErrorsAndWarnings('from a_index | where top(stringField, numberField, "asc")', [ - 'WHERE does not support function top', + testErrorsAndWarnings('from a_index | where percentile(doubleField, doubleField)', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | where top(stringField, numberField, "asc") > 0', [ - 'WHERE does not support function top', + testErrorsAndWarnings('from a_index | where percentile(doubleField, doubleField) > 0', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | eval var = top(stringField, numberField, "asc")', [ - 'EVAL does not support function top', + testErrorsAndWarnings('from a_index | where percentile(doubleField, longField)', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings( - 'from a_index | eval var = top(stringField, numberField, "asc") > 0', - ['EVAL does not support function top'] - ); - - testErrorsAndWarnings('from a_index | eval top(stringField, numberField, "asc")', [ - 'EVAL does not support function top', + testErrorsAndWarnings('from a_index | where percentile(doubleField, longField) > 0', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | eval top(stringField, numberField, "asc") > 0', [ - 'EVAL does not support function top', + testErrorsAndWarnings('from a_index | where percentile(doubleField, integerField)', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | sort top(stringField, 5, "asc")', [ - 'SORT does not support function top', + testErrorsAndWarnings('from a_index | where percentile(doubleField, integerField) > 0', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | where top(stringField, 5, "asc")', [ - 'WHERE does not support function top', + testErrorsAndWarnings('from a_index | where percentile(longField, doubleField)', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | where top(stringField, 5, "asc") > 0', [ - 'WHERE does not support function top', + testErrorsAndWarnings('from a_index | where percentile(longField, doubleField) > 0', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | eval var = top(stringField, 5, "asc")', [ - 'EVAL does not support function top', + testErrorsAndWarnings('from a_index | where percentile(longField, longField)', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | eval var = top(stringField, 5, "asc") > 0', [ - 'EVAL does not support function top', + testErrorsAndWarnings('from a_index | where percentile(longField, longField) > 0', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | eval top(stringField, 5, "asc")', [ - 'EVAL does not support function top', + testErrorsAndWarnings('from a_index | where percentile(longField, integerField)', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | eval top(stringField, 5, "asc") > 0', [ - 'EVAL does not support function top', + testErrorsAndWarnings('from a_index | where percentile(longField, integerField) > 0', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | stats var = top(stringField, 5, "asc")', []); - testErrorsAndWarnings('from a_index | stats top(stringField, 5, "asc")', []); - testErrorsAndWarnings('from a_index | stats top(stringField, numberField, "asc")', [ - 'Argument of [top] must be a constant, received [numberField]', + testErrorsAndWarnings('from a_index | where percentile(integerField, doubleField)', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings('from a_index | stats top(null, null, null)', []); - testErrorsAndWarnings('row nullVar = null | stats top(nullVar, nullVar, nullVar)', [ - 'Argument of [top] must be a constant, received [nullVar]', - 'Argument of [top] must be a constant, received [nullVar]', + testErrorsAndWarnings('from a_index | where percentile(integerField, doubleField) > 0', [ + 'WHERE does not support function percentile', ]); - }); - - describe('st_distance', () => { - testErrorsAndWarnings( - 'row var = st_distance(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', - [] - ); - - testErrorsAndWarnings( - 'row st_distance(to_cartesianpoint("POINT (30 10)"), to_cartesianpoint("POINT (30 10)"))', - [] - ); - - testErrorsAndWarnings( - 'row var = st_distance(to_cartesianpoint(to_cartesianpoint("POINT (30 10)")), to_cartesianpoint(to_cartesianpoint("POINT (30 10)")))', - [] - ); - - testErrorsAndWarnings( - 'row var = st_distance(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', - [] - ); - - testErrorsAndWarnings( - 'row st_distance(to_geopoint("POINT (30 10)"), to_geopoint("POINT (30 10)"))', - [] - ); - - testErrorsAndWarnings( - 'row var = st_distance(to_geopoint(to_geopoint("POINT (30 10)")), to_geopoint(to_geopoint("POINT (30 10)")))', - [] - ); - testErrorsAndWarnings('row var = st_distance(true, true)', [ - 'Argument of [st_distance] must be [cartesian_point], found value [true] type [boolean]', - 'Argument of [st_distance] must be [cartesian_point], found value [true] type [boolean]', + testErrorsAndWarnings('from a_index | where percentile(integerField, longField)', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings( - 'from a_index | eval var = st_distance(cartesianPointField, cartesianPointField)', - [] - ); - - testErrorsAndWarnings( - 'from a_index | eval st_distance(cartesianPointField, cartesianPointField)', - [] - ); + testErrorsAndWarnings('from a_index | where percentile(integerField, longField) > 0', [ + 'WHERE does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | eval var = st_distance(to_cartesianpoint(cartesianPointField), to_cartesianpoint(cartesianPointField))', - [] - ); + testErrorsAndWarnings('from a_index | where percentile(integerField, integerField)', [ + 'WHERE does not support function percentile', + ]); - testErrorsAndWarnings('from a_index | eval st_distance(booleanField, booleanField)', [ - 'Argument of [st_distance] must be [cartesian_point], found value [booleanField] type [boolean]', - 'Argument of [st_distance] must be [cartesian_point], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | where percentile(integerField, integerField) > 0', [ + 'WHERE does not support function percentile', ]); - testErrorsAndWarnings( - 'from a_index | eval var = st_distance(geoPointField, geoPointField)', - [] - ); - testErrorsAndWarnings('from a_index | eval st_distance(geoPointField, geoPointField)', []); + testErrorsAndWarnings('from a_index | eval var = percentile(doubleField, doubleField)', [ + 'EVAL does not support function percentile', + ]); testErrorsAndWarnings( - 'from a_index | eval var = st_distance(to_geopoint(geoPointField), to_geopoint(geoPointField))', - [] + 'from a_index | eval var = percentile(doubleField, doubleField) > 0', + ['EVAL does not support function percentile'] ); - testErrorsAndWarnings( - 'from a_index | eval st_distance(cartesianPointField, cartesianPointField, extraArg)', - ['Error: [st_distance] function expects exactly 2 arguments, got 3.'] - ); + testErrorsAndWarnings('from a_index | eval percentile(doubleField, doubleField)', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | sort st_distance(cartesianPointField, cartesianPointField)', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(doubleField, doubleField) > 0', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings('from a_index | eval st_distance(null, null)', []); - testErrorsAndWarnings('row nullVar = null | eval st_distance(nullVar, nullVar)', []); - }); + testErrorsAndWarnings('from a_index | eval var = percentile(doubleField, longField)', [ + 'EVAL does not support function percentile', + ]); - describe('weighted_avg', () => { - testErrorsAndWarnings( - 'from a_index | stats var = weighted_avg(numberField, numberField)', - [] - ); - testErrorsAndWarnings('from a_index | stats weighted_avg(numberField, numberField)', []); + testErrorsAndWarnings('from a_index | eval var = percentile(doubleField, longField) > 0', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats var = round(weighted_avg(numberField, numberField))', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(doubleField, longField)', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats round(weighted_avg(numberField, numberField))', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(doubleField, longField) > 0', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats var = round(weighted_avg(numberField, numberField)) + weighted_avg(numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval var = percentile(doubleField, integerField)', [ + 'EVAL does not support function percentile', + ]); testErrorsAndWarnings( - 'from a_index | stats round(weighted_avg(numberField, numberField)) + weighted_avg(numberField, numberField)', - [] + 'from a_index | eval var = percentile(doubleField, integerField) > 0', + ['EVAL does not support function percentile'] ); - testErrorsAndWarnings( - 'from a_index | stats weighted_avg(numberField / 2, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(doubleField, integerField)', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats var0 = weighted_avg(numberField / 2, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(doubleField, integerField) > 0', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), weighted_avg(numberField / 2, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval var = percentile(longField, doubleField)', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = weighted_avg(numberField / 2, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval var = percentile(longField, doubleField) > 0', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats var0 = weighted_avg(numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(longField, doubleField)', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), weighted_avg(numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(longField, doubleField) > 0', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = weighted_avg(numberField, numberField)', - [] - ); + testErrorsAndWarnings('from a_index | eval var = percentile(longField, longField)', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats weighted_avg(numberField, numberField) by round(numberField / 2)', - [] - ); + testErrorsAndWarnings('from a_index | eval var = percentile(longField, longField) > 0', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats var0 = weighted_avg(numberField, numberField) by var1 = round(numberField / 2)', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(longField, longField)', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), weighted_avg(numberField, numberField) by round(numberField / 2), ipField', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(longField, longField) > 0', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = weighted_avg(numberField, numberField) by var1 = round(numberField / 2), ipField', - [] - ); + testErrorsAndWarnings('from a_index | eval var = percentile(longField, integerField)', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), weighted_avg(numberField, numberField) by round(numberField / 2), numberField / 2', - [] - ); + testErrorsAndWarnings('from a_index | eval var = percentile(longField, integerField) > 0', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats avg(numberField), var0 = weighted_avg(numberField, numberField) by var1 = round(numberField / 2), numberField / 2', - [] - ); + testErrorsAndWarnings('from a_index | eval percentile(longField, integerField)', [ + 'EVAL does not support function percentile', + ]); - testErrorsAndWarnings( - 'from a_index | stats var = weighted_avg(avg(numberField), avg(numberField))', - [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ] - ); + testErrorsAndWarnings('from a_index | eval percentile(longField, integerField) > 0', [ + 'EVAL does not support function percentile', + ]); + + testErrorsAndWarnings('from a_index | eval var = percentile(integerField, doubleField)', [ + 'EVAL does not support function percentile', + ]); testErrorsAndWarnings( - 'from a_index | stats weighted_avg(avg(numberField), avg(numberField))', - [ - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - "Aggregate function's parameters must be an attribute, literal or a non-aggregation function; found [avg(numberField)] of type [number]", - ] + 'from a_index | eval var = percentile(integerField, doubleField) > 0', + ['EVAL does not support function percentile'] ); - testErrorsAndWarnings('from a_index | stats weighted_avg(booleanField, booleanField)', [ - 'Argument of [weighted_avg] must be [number], found value [booleanField] type [boolean]', - 'Argument of [weighted_avg] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval percentile(integerField, doubleField)', [ + 'EVAL does not support function percentile', ]); - testErrorsAndWarnings('from a_index | sort weighted_avg(numberField, numberField)', [ - 'SORT does not support function weighted_avg', + testErrorsAndWarnings('from a_index | eval percentile(integerField, doubleField) > 0', [ + 'EVAL does not support function percentile', ]); - testErrorsAndWarnings('from a_index | where weighted_avg(numberField, numberField)', [ - 'WHERE does not support function weighted_avg', + testErrorsAndWarnings('from a_index | eval var = percentile(integerField, longField)', [ + 'EVAL does not support function percentile', ]); - testErrorsAndWarnings('from a_index | where weighted_avg(numberField, numberField) > 0', [ - 'WHERE does not support function weighted_avg', + testErrorsAndWarnings('from a_index | eval var = percentile(integerField, longField) > 0', [ + 'EVAL does not support function percentile', ]); - testErrorsAndWarnings('from a_index | eval var = weighted_avg(numberField, numberField)', [ - 'EVAL does not support function weighted_avg', + testErrorsAndWarnings('from a_index | eval percentile(integerField, longField)', [ + 'EVAL does not support function percentile', + ]); + + testErrorsAndWarnings('from a_index | eval percentile(integerField, longField) > 0', [ + 'EVAL does not support function percentile', + ]); + + testErrorsAndWarnings('from a_index | eval var = percentile(integerField, integerField)', [ + 'EVAL does not support function percentile', ]); testErrorsAndWarnings( - 'from a_index | eval var = weighted_avg(numberField, numberField) > 0', - ['EVAL does not support function weighted_avg'] + 'from a_index | eval var = percentile(integerField, integerField) > 0', + ['EVAL does not support function percentile'] ); - testErrorsAndWarnings('from a_index | eval weighted_avg(numberField, numberField)', [ - 'EVAL does not support function weighted_avg', + testErrorsAndWarnings('from a_index | eval percentile(integerField, integerField)', [ + 'EVAL does not support function percentile', ]); - testErrorsAndWarnings('from a_index | eval weighted_avg(numberField, numberField) > 0', [ - 'EVAL does not support function weighted_avg', + testErrorsAndWarnings('from a_index | eval percentile(integerField, integerField) > 0', [ + 'EVAL does not support function percentile', ]); - testErrorsAndWarnings('from a_index | stats weighted_avg(null, null)', []); - testErrorsAndWarnings('row nullVar = null | stats weighted_avg(nullVar, nullVar)', []); + testErrorsAndWarnings('from a_index | stats percentile(null, null)', []); + testErrorsAndWarnings('row nullVar = null | stats percentile(nullVar, nullVar)', [ + 'Argument of [percentile] must be a constant, received [nullVar]', + ]); }); - describe('exp', () => { - testErrorsAndWarnings('row var = exp(5)', []); - testErrorsAndWarnings('row exp(5)', []); - testErrorsAndWarnings('row var = exp(to_integer(true))', []); - - testErrorsAndWarnings('row var = exp(true)', [ - 'Argument of [exp] must be [number], found value [true] type [boolean]', + describe('to_string', () => { + 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(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row to_string(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = to_str(cartesianPointField)', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = to_string(to_cartesianpoint(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', ]); + 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(cartesianPointField))', [ + 'Unknown column [cartesianPointField]', + ]); + testErrorsAndWarnings('row var = to_string(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row to_string(to_datetime("2021-01-01T00:00:00Z"))', []); + testErrorsAndWarnings('row var = to_str(to_datetime("2021-01-01T00:00:00Z"))', []); - testErrorsAndWarnings('from a_index | where exp(numberField) > 0', []); + testErrorsAndWarnings( + 'row var = to_string(to_datetime(to_datetime("2021-01-01T00:00:00Z")))', + [] + ); - testErrorsAndWarnings('from a_index | where exp(booleanField) > 0', [ - 'Argument of [exp] must be [number], found value [booleanField] type [boolean]', - ]); + testErrorsAndWarnings('row var = to_string(5.5)', []); - testErrorsAndWarnings('from a_index | eval var = exp(numberField)', []); - testErrorsAndWarnings('from a_index | eval exp(numberField)', []); - testErrorsAndWarnings('from a_index | eval var = exp(to_integer(booleanField))', []); + testErrorsAndWarnings('row to_string(5.5)', []); + testErrorsAndWarnings('row var = to_str(5.5)', []); + testErrorsAndWarnings('row var = to_string(to_double(true))', []); + testErrorsAndWarnings('row var = to_string(geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row to_string(geoPointField)', ['Unknown column [geoPointField]']); + testErrorsAndWarnings('row var = to_str(geoPointField)', [ + 'Unknown column [geoPointField]', + ]); + testErrorsAndWarnings('row var = to_string(to_geopoint(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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(geoPointField))', [ + 'Unknown column [geoPointField]', + ]); + 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_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("a")', []); + testErrorsAndWarnings('row to_string("a")', []); + testErrorsAndWarnings('row var = to_str("a")', []); + 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 | 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 exp(booleanField)', [ - 'Argument of [exp] must be [number], found value [booleanField] type [boolean]', + testErrorsAndWarnings('from a_index | eval to_string(counterDoubleField)', [ + 'Argument of [to_string] must be [boolean], found value [counterDoubleField] type [counter_double]', ]); - testErrorsAndWarnings('from a_index | eval var = exp(*)', [ - 'Using wildcards (*) in exp is not allowed', + testErrorsAndWarnings('from a_index | eval var = to_string(*)', [ + 'Using wildcards (*) in to_string is not allowed', ]); - testErrorsAndWarnings('from a_index | eval exp(numberField, extraArg)', [ - 'Error: [exp] function expects exactly one argument, got 2.', + 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(doubleField)', []); + testErrorsAndWarnings('from a_index | eval to_string(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_str(doubleField)', []); + testErrorsAndWarnings('from a_index | eval var = to_string(to_double(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(integerField)', []); + testErrorsAndWarnings('from a_index | eval to_string(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_str(integerField)', []); + testErrorsAndWarnings('from a_index | eval var = to_string(to_integer(booleanField))', []); + 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(keywordField)', []); + testErrorsAndWarnings('from a_index | eval to_string(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_str(keywordField)', []); + testErrorsAndWarnings('from a_index | eval var = to_string(to_string(booleanField))', []); + testErrorsAndWarnings('from a_index | eval var = to_string(longField)', []); + testErrorsAndWarnings('from a_index | eval to_string(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_str(longField)', []); + testErrorsAndWarnings('from a_index | eval var = to_string(textField)', []); + testErrorsAndWarnings('from a_index | eval to_string(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_str(textField)', []); + testErrorsAndWarnings('from a_index | eval var = to_string(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval to_string(unsignedLongField)', []); + testErrorsAndWarnings('from a_index | eval var = to_str(unsignedLongField)', []); + 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(keywordField))', []); + + testErrorsAndWarnings('from a_index | eval to_string(booleanField, extraArg)', [ + 'Error: [to_string] function expects exactly one argument, got 2.', ]); - testErrorsAndWarnings('from a_index | sort exp(numberField)', []); - testErrorsAndWarnings('from a_index | eval exp(null)', []); - testErrorsAndWarnings('row nullVar = null | eval exp(nullVar)', []); + testErrorsAndWarnings('from a_index | sort to_string(booleanField)', []); + testErrorsAndWarnings('from a_index | eval to_string(null)', []); + testErrorsAndWarnings('row nullVar = null | eval to_string(nullVar)', []); + testErrorsAndWarnings('from a_index | eval to_string("2022")', []); + testErrorsAndWarnings('from a_index | eval to_string(concat("20", "22"))', []); }); }); }); diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts index cea9dccbd8d97..6cc515dc4ac74 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts @@ -76,6 +76,7 @@ import { import { collapseWrongArgumentTypeMessages, getMaxMinNumberOfParams } from './helpers'; import { getParamAtPosition } from '../autocomplete/helper'; import { METADATA_FIELDS } from '../shared/constants'; +import { isStringType } from '../shared/esql_types'; function validateFunctionLiteralArg( astFunction: ESQLFunction, @@ -879,6 +880,7 @@ function validateColumnForCommand( if (columnParamsWithInnerTypes.length) { const hasSomeWrongInnerTypes = columnParamsWithInnerTypes.every(({ innerType }) => { + if (innerType === 'string' && isStringType(columnRef.type)) return false; return innerType !== 'any' && innerType !== columnRef.type; }); if (hasSomeWrongInnerTypes) { diff --git a/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_tags.ts b/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_tags.ts index e1b8411538deb..3eeb555359df3 100644 --- a/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_tags.ts +++ b/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_tags.ts @@ -19,5 +19,13 @@ export function mergeTags( const merged = mergeArrays(tagsArrayOfArrays); - return merged.length > 0 ? merged : undefined; + if (merged.length === 0) { + return; + } + + // To streamline API endpoints categorization it's expected that + // tags are sorted alphabetically by name + merged.sort((a, b) => a.name.localeCompare(b.name)); + + return merged; } diff --git a/packages/kbn-openapi-bundler/tests/bundler/result_overrides/sort_tags.test.ts b/packages/kbn-openapi-bundler/tests/bundler/result_overrides/sort_tags.test.ts new file mode 100644 index 0000000000000..0e4a8e77e576b --- /dev/null +++ b/packages/kbn-openapi-bundler/tests/bundler/result_overrides/sort_tags.test.ts @@ -0,0 +1,63 @@ +/* + * 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 { bundleSpecs } from '../bundle_specs'; +import { createOASDocument } from '../../create_oas_document'; + +describe('OpenAPI Bundler - sort tags', () => { + it('sorts tags in the result bundle', async () => { + const spec1 = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: {}, + }, + }, + }, + tags: [ + { name: 'Some tag name', description: 'Some description' }, + { name: '1 tag', description: 'Some description' }, + ], + }); + const spec2 = createOASDocument({ + paths: { + '/api/some_api': { + post: { + responses: {}, + }, + }, + }, + tags: [{ name: 'Another tag name', description: 'Another description' }], + }); + const spec3 = createOASDocument({ + paths: { + '/api/some_api': { + put: { + responses: {}, + }, + }, + }, + tags: [{ name: 'Spec3 tag name', description: 'Spec3 tag description' }], + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec1, + 2: spec2, + 3: spec3, + }) + ); + + expect(bundledSpec.tags).toEqual([ + { name: '1 tag', description: 'Some description' }, + { name: 'Another tag name', description: 'Another description' }, + { name: 'Some tag name', description: 'Some description' }, + { name: 'Spec3 tag name', description: 'Spec3 tag description' }, + ]); + }); +}); diff --git a/packages/kbn-openapi-bundler/tests/create_oas_document.ts b/packages/kbn-openapi-bundler/tests/create_oas_document.ts index a16cef4119f03..2ce877ebe3524 100644 --- a/packages/kbn-openapi-bundler/tests/create_oas_document.ts +++ b/packages/kbn-openapi-bundler/tests/create_oas_document.ts @@ -15,6 +15,7 @@ export function createOASDocument(overrides: { components?: OpenAPIV3.ComponentsObject; servers?: OpenAPIV3.ServerObject[]; security?: OpenAPIV3.SecurityRequirementObject[]; + tags?: OpenAPIV3.TagObject[]; }): OpenAPIV3.Document { const document: OpenAPIV3.Document = { openapi: overrides.openapi ?? '3.0.3', @@ -39,5 +40,9 @@ export function createOASDocument(overrides: { document.security = overrides.security; } + if (overrides.tags) { + document.tags = overrides.tags; + } + return document; } diff --git a/packages/kbn-openapi-bundler/tests/merger/result_overrides/sort_tags.test.ts b/packages/kbn-openapi-bundler/tests/merger/result_overrides/sort_tags.test.ts new file mode 100644 index 0000000000000..1fa25fe59ecf1 --- /dev/null +++ b/packages/kbn-openapi-bundler/tests/merger/result_overrides/sort_tags.test.ts @@ -0,0 +1,63 @@ +/* + * 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 { mergeSpecs } from '../merge_specs'; +import { createOASDocument } from '../../create_oas_document'; + +describe('OpenAPI Merger - sort tags', () => { + it('sorts tags in the result bundle', async () => { + const spec1 = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: {}, + }, + }, + }, + tags: [ + { name: 'Some tag name', description: 'Some description' }, + { name: '1 tag', description: 'Some description' }, + ], + }); + const spec2 = createOASDocument({ + paths: { + '/api/some_api': { + post: { + responses: {}, + }, + }, + }, + tags: [{ name: 'Another tag name', description: 'Another description' }], + }); + const spec3 = createOASDocument({ + paths: { + '/api/some_api': { + put: { + responses: {}, + }, + }, + }, + tags: [{ name: 'Spec3 tag name', description: 'Spec3 tag description' }], + }); + + const [mergedSpec] = Object.values( + await mergeSpecs({ + 1: spec1, + 2: spec2, + 3: spec3, + }) + ); + + expect(mergedSpec.tags).toEqual([ + { name: '1 tag', description: 'Some description' }, + { name: 'Another tag name', description: 'Another description' }, + { name: 'Some tag name', description: 'Some description' }, + { name: 'Spec3 tag name', description: 'Spec3 tag description' }, + ]); + }); +}); diff --git a/packages/kbn-search-connectors/types/native_connectors.ts b/packages/kbn-search-connectors/types/native_connectors.ts index 6459bbdf20ff9..30ce2c790a2ec 100644 --- a/packages/kbn-search-connectors/types/native_connectors.ts +++ b/packages/kbn-search-connectors/types/native_connectors.ts @@ -4662,6 +4662,45 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record { it('should return original columns if fieldsMetadata is not provided', async () => { const columns = [ - { name: 'ecs.version', type: 'string' as DatatableColumnType }, - { name: 'field1', type: 'string' as DatatableColumnType }, - { name: 'field2', type: 'number' as DatatableColumnType }, + { name: 'ecs.version', type: 'keyword' as DatatableColumnType }, + { name: 'field1', type: 'text' as DatatableColumnType }, + { name: 'field2', type: 'double' as DatatableColumnType }, ]; const result = await getColumnsWithMetadata(columns); @@ -24,16 +24,16 @@ describe('getColumnsWithMetadata', () => { it('should return columns with metadata if both name and type match with ECS fields', async () => { const columns = [ - { name: 'ecs.field', type: 'string' as DatatableColumnType }, + { name: 'ecs.field', type: 'text' as DatatableColumnType }, { name: 'ecs.fakeBooleanField', type: 'boolean' as DatatableColumnType }, - { name: 'field2', type: 'number' as DatatableColumnType }, + { name: 'field2', type: 'double' as DatatableColumnType }, ]; const fieldsMetadata = { getClient: jest.fn().mockResolvedValue({ find: jest.fn().mockResolvedValue({ fields: { 'ecs.version': { description: 'ECS version field', type: 'keyword' }, - 'ecs.field': { description: 'ECS field description', type: 'keyword' }, + 'ecs.field': { description: 'ECS field description', type: 'text' }, 'ecs.fakeBooleanField': { description: 'ECS fake boolean field description', type: 'keyword', @@ -48,19 +48,19 @@ describe('getColumnsWithMetadata', () => { expect(result).toEqual([ { name: 'ecs.field', - type: 'string', + type: 'text', metadata: { description: 'ECS field description' }, }, { name: 'ecs.fakeBooleanField', type: 'boolean' }, - { name: 'field2', type: 'number' }, + { name: 'field2', type: 'double' }, ]); }); it('should handle keyword suffix correctly', async () => { const columns = [ - { name: 'ecs.version', type: 'string' as DatatableColumnType }, - { name: 'ecs.version.keyword', type: 'string' as DatatableColumnType }, - { name: 'field2', type: 'number' as DatatableColumnType }, + { name: 'ecs.version', type: 'keyword' as DatatableColumnType }, + { name: 'ecs.version.keyword', type: 'keyword' as DatatableColumnType }, + { name: 'field2', type: 'double' as DatatableColumnType }, ]; const fieldsMetadata = { getClient: jest.fn().mockResolvedValue({ @@ -75,13 +75,13 @@ describe('getColumnsWithMetadata', () => { const result = await getColumnsWithMetadata(columns, fieldsMetadata); expect(result).toEqual([ - { name: 'ecs.version', type: 'string', metadata: { description: 'ECS version field' } }, + { name: 'ecs.version', type: 'keyword', metadata: { description: 'ECS version field' } }, { name: 'ecs.version.keyword', - type: 'string', + type: 'keyword', metadata: { description: 'ECS version field' }, }, - { name: 'field2', type: 'number' }, + { name: 'field2', type: 'double' }, ]); }); }); diff --git a/packages/kbn-text-based-editor/src/ecs_metadata_helper.ts b/packages/kbn-text-based-editor/src/ecs_metadata_helper.ts index 687999350be0e..14198ab9d911a 100644 --- a/packages/kbn-text-based-editor/src/ecs_metadata_helper.ts +++ b/packages/kbn-text-based-editor/src/ecs_metadata_helper.ts @@ -7,7 +7,6 @@ */ import type { ESQLRealField } from '@kbn/esql-validation-autocomplete'; -import { esFieldTypeToKibanaFieldType } from '@kbn/field-types'; import type { FieldsMetadataPublicStart } from '@kbn/fields-metadata-plugin/public'; import { chunk } from 'lodash'; @@ -45,11 +44,7 @@ export async function getColumnsWithMetadata( const metadata = fields.fields[removeKeywordSuffix(c.name)]; // Need to convert metadata's type (e.g. keyword) to ES|QL type (e.g. string) to check if they are the same - if ( - !metadata || - (metadata?.type && esFieldTypeToKibanaFieldType(metadata.type) !== c.type) - ) - return c; + if (!metadata || (metadata?.type && metadata.type !== c.type)) return c; return { ...c, metadata: { description: metadata.description }, diff --git a/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx b/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx index e2d3fd630999d..110e803fdf54e 100644 --- a/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx +++ b/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx @@ -468,7 +468,14 @@ export const TextBasedLanguagesEditor = memo(function TextBasedLanguagesEditor({ undefined, abortController ).result; - const columns = table?.columns.map((c) => ({ name: c.name, type: c.meta.type })) || []; + const columns = + table?.columns.map((c) => { + // Casting unsupported as unknown to avoid plethora of warnings + // Remove when addressed https://github.com/elastic/kibana/issues/189666 + if (!c.meta.esType || c.meta.esType === 'unsupported') + return { name: c.name, type: 'unknown' }; + return { name: c.name, type: c.meta.esType }; + }) || []; return await getRateLimitedColumnsWithMetadata(columns, fieldsMetadata); } catch (e) { // no action yet diff --git a/packages/kbn-text-based-editor/tsconfig.json b/packages/kbn-text-based-editor/tsconfig.json index 632dd05753459..c141fe2c2e8fa 100644 --- a/packages/kbn-text-based-editor/tsconfig.json +++ b/packages/kbn-text-based-editor/tsconfig.json @@ -28,7 +28,6 @@ "@kbn/shared-ux-markdown", "@kbn/fields-metadata-plugin", "@kbn/esql-validation-autocomplete", - "@kbn/field-types" ], "exclude": [ "target/**/*", diff --git a/packages/shared-ux/chrome/navigation/__jest__/build_nav_tree.test.tsx b/packages/shared-ux/chrome/navigation/__jest__/build_nav_tree.test.tsx index 36e275ced131b..d4e983f86e665 100644 --- a/packages/shared-ux/chrome/navigation/__jest__/build_nav_tree.test.tsx +++ b/packages/shared-ux/chrome/navigation/__jest__/build_nav_tree.test.tsx @@ -12,6 +12,7 @@ import type { ChromeProjectNavigationNode, } from '@kbn/core-chrome-browser'; +import { EventTracker } from '../src/analytics'; import { renderNavigation } from './utils'; describe('builds navigation tree', () => { @@ -135,6 +136,43 @@ describe('builds navigation tree', () => { } }); + test('should track click event', async () => { + const navigateToUrl = jest.fn(); + const reportEvent = jest.fn(); + + const node: ChromeProjectNavigationNode = { + id: 'group1', + title: 'Group 1', + path: 'group1', + defaultIsCollapsed: false, + children: [ + { + id: 'item1', + title: 'Item 1', + href: 'https://foo', + path: 'group1.item1', + }, + ], + }; + + const { findByTestId } = renderNavigation({ + navTreeDef: of({ + body: [node], + }), + services: { navigateToUrl, eventTracker: new EventTracker({ reportEvent }) }, + }); + + const navItem = await findByTestId(/nav-item-group1.item1\s/); + navItem.click(); + + expect(navigateToUrl).toHaveBeenCalled(); + expect(reportEvent).toHaveBeenCalledWith('solutionNav_click_navlink', { + href: undefined, + href_prev: undefined, + id: 'item1', + }); + }); + test('should allow custom onClick handler for links', async () => { const navigateToUrl = jest.fn(); const onClick = jest.fn(); diff --git a/packages/shared-ux/chrome/navigation/__jest__/utils.tsx b/packages/shared-ux/chrome/navigation/__jest__/utils.tsx index 04d67c914ad42..41e5409613aac 100644 --- a/packages/shared-ux/chrome/navigation/__jest__/utils.tsx +++ b/packages/shared-ux/chrome/navigation/__jest__/utils.tsx @@ -19,13 +19,15 @@ import { NavigationProvider } from '../src/services'; import { Navigation } from '../src/ui/navigation'; import type { PanelContentProvider } from '../src/ui'; import { NavigationServices } from '../src/types'; +import { EventTracker } from '../src/analytics'; const activeNodes: ChromeProjectNavigationNode[][] = []; export const getServicesMock = (): NavigationServices => { const navigateToUrl = jest.fn().mockResolvedValue(undefined); - const basePath = { prepend: jest.fn((path: string) => `/base${path}`) }; + const basePath = { prepend: jest.fn((path: string) => `/base${path}`), remove: jest.fn() }; const recentlyAccessed$ = new BehaviorSubject([]); + const eventTracker = new EventTracker({ reportEvent: jest.fn() }); return { basePath, @@ -34,6 +36,7 @@ export const getServicesMock = (): NavigationServices => { navigateToUrl, activeNodes$: of(activeNodes), isSideNavCollapsed: false, + eventTracker, }; }; diff --git a/packages/shared-ux/chrome/navigation/index.ts b/packages/shared-ux/chrome/navigation/index.ts index aadb517ae31bc..77dceca515c47 100644 --- a/packages/shared-ux/chrome/navigation/index.ts +++ b/packages/shared-ux/chrome/navigation/index.ts @@ -9,6 +9,8 @@ export { NavigationKibanaProvider, NavigationProvider } from './src/services'; export { Navigation } from './src/ui'; +export { EventType, FieldType } from './src/analytics'; + export type { NavigationProps } from './src/ui'; export type { PanelComponentProps, PanelContent, PanelContentProvider } from './src/ui'; diff --git a/packages/shared-ux/chrome/navigation/mocks/storybook.ts b/packages/shared-ux/chrome/navigation/mocks/storybook.ts index c34819090c5f4..4a68717a9a5d9 100644 --- a/packages/shared-ux/chrome/navigation/mocks/storybook.ts +++ b/packages/shared-ux/chrome/navigation/mocks/storybook.ts @@ -9,6 +9,7 @@ import { AbstractStorybookMock } from '@kbn/shared-ux-storybook-mock'; import { action } from '@storybook/addon-actions'; import { BehaviorSubject } from 'rxjs'; +import { EventTracker } from '../src/analytics'; import { NavigationServices } from '../src/types'; type Arguments = NavigationServices; @@ -35,11 +36,12 @@ export class StorybookMock extends AbstractStorybookMock<{}, NavigationServices> return { ...params, - basePath: { prepend: (suffix: string) => `/basepath${suffix}` }, + basePath: { prepend: (suffix: string) => `/basepath${suffix}`, remove: () => '' }, navigateToUrl, recentlyAccessed$: params.recentlyAccessed$ ?? new BehaviorSubject([]), activeNodes$: params.activeNodes$ ?? new BehaviorSubject([]), isSideNavCollapsed: true, + eventTracker: new EventTracker({ reportEvent: action('Report event') }), }; } diff --git a/packages/shared-ux/chrome/navigation/src/analytics/event_tracker.ts b/packages/shared-ux/chrome/navigation/src/analytics/event_tracker.ts new file mode 100644 index 0000000000000..4d7a6258986be --- /dev/null +++ b/packages/shared-ux/chrome/navigation/src/analytics/event_tracker.ts @@ -0,0 +1,43 @@ +/* + * 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 { AnalyticsServiceStart } from '@kbn/core-analytics-browser'; + +export enum EventType { + CLICK_NAVLINK = 'solutionNav_click_navlink', +} + +export enum FieldType { + ID = 'id', + HREF = 'href', + HREF_PREV = 'href_prev', +} + +export class EventTracker { + constructor(private analytics: Pick) {} + + private track(eventType: string, eventFields: object) { + try { + this.analytics.reportEvent(eventType, eventFields); + } catch (err) { + // eslint-disable-next-line no-console + console.error(`Navigation EventTracker error: ${err.toString()}`); + } + } + + /* + * Track whenever a user clicks on a navigation link in the side nav + */ + public clickNavLink({ id, href, hrefPrev }: { id: string; href?: string; hrefPrev?: string }) { + this.track(EventType.CLICK_NAVLINK, { + [FieldType.ID]: id, + [FieldType.HREF]: href, + [FieldType.HREF_PREV]: hrefPrev, + }); + } +} diff --git a/packages/shared-ux/chrome/navigation/src/analytics/index.ts b/packages/shared-ux/chrome/navigation/src/analytics/index.ts new file mode 100644 index 0000000000000..585ac82ca2835 --- /dev/null +++ b/packages/shared-ux/chrome/navigation/src/analytics/index.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +export { EventTracker, EventType, FieldType } from './event_tracker'; diff --git a/packages/shared-ux/chrome/navigation/src/services.tsx b/packages/shared-ux/chrome/navigation/src/services.tsx index 617e5695579f3..4a82aa31dc966 100644 --- a/packages/shared-ux/chrome/navigation/src/services.tsx +++ b/packages/shared-ux/chrome/navigation/src/services.tsx @@ -6,8 +6,9 @@ * Side Public License, v 1. */ -import React, { FC, PropsWithChildren, useContext } from 'react'; +import React, { FC, PropsWithChildren, useContext, useMemo } from 'react'; import useObservable from 'react-use/lib/useObservable'; +import { EventTracker } from './analytics'; import { NavigationKibanaDependencies, NavigationServices } from './types'; @@ -31,19 +32,30 @@ export const NavigationKibanaProvider: FC { const { core, activeNodes$ } = dependencies; - const { chrome, http } = core; + const { chrome, http, analytics } = core; const { basePath } = http; const { navigateToUrl } = core.application; const isSideNavCollapsed = useObservable(chrome.getIsSideNavCollapsed$(), true); - const value: NavigationServices = { - basePath, - recentlyAccessed$: chrome.recentlyAccessed.get$(), - navigateToUrl, - navIsOpen: true, - activeNodes$, - isSideNavCollapsed, - }; + const value: NavigationServices = useMemo( + () => ({ + basePath, + recentlyAccessed$: chrome.recentlyAccessed.get$(), + navigateToUrl, + navIsOpen: true, + activeNodes$, + isSideNavCollapsed, + eventTracker: new EventTracker({ reportEvent: analytics.reportEvent }), + }), + [ + activeNodes$, + analytics.reportEvent, + basePath, + chrome.recentlyAccessed, + isSideNavCollapsed, + navigateToUrl, + ] + ); return {children}; }; diff --git a/packages/shared-ux/chrome/navigation/src/types.ts b/packages/shared-ux/chrome/navigation/src/types.ts index f15bb1a51e117..82d987250a981 100644 --- a/packages/shared-ux/chrome/navigation/src/types.ts +++ b/packages/shared-ux/chrome/navigation/src/types.ts @@ -15,8 +15,9 @@ import type { ChromeProjectNavigationNode, ChromeRecentlyAccessedHistoryItem, } from '@kbn/core-chrome-browser'; +import { EventTracker } from './analytics'; -type BasePathService = Pick; +export type BasePathService = Pick; /** * @internal @@ -35,6 +36,7 @@ export interface NavigationServices { navigateToUrl: NavigateToUrlFn; activeNodes$: Observable; isSideNavCollapsed: boolean; + eventTracker: EventTracker; } /** @@ -56,6 +58,9 @@ export interface NavigationKibanaDependencies { basePath: BasePathService; getLoadingCount$(): Observable; }; + analytics: { + reportEvent: (eventType: string, eventData: object) => void; + }; }; activeNodes$: Observable; } diff --git a/packages/shared-ux/chrome/navigation/src/ui/components/navigation_section_ui.tsx b/packages/shared-ux/chrome/navigation/src/ui/components/navigation_section_ui.tsx index 3d549cf663703..6a53239590d92 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/components/navigation_section_ui.tsx +++ b/packages/shared-ux/chrome/navigation/src/ui/components/navigation_section_ui.tsx @@ -21,8 +21,9 @@ import type { EuiThemeSize, RenderAs } from '@kbn/core-chrome-browser/src/projec import { useNavigation as useServices } from '../../services'; import { isAbsoluteLink, isActiveFromUrl, isAccordionNode } from '../../utils'; -import type { NavigateToUrlFn } from '../../types'; +import type { BasePathService, NavigateToUrlFn } from '../../types'; import { useNavigation } from '../navigation'; +import { EventTracker } from '../../analytics'; import { useAccordionState } from '../hooks'; import { DEFAULT_IS_COLLAPSIBLE, @@ -183,6 +184,8 @@ const getEuiProps = ( treeDepth: number; getIsCollapsed: (path: string) => boolean; activeNodes: ChromeProjectNavigationNode[][]; + eventTracker: EventTracker; + basePath: BasePathService; } ): { navNode: ChromeProjectNavigationNode; @@ -192,7 +195,15 @@ const getEuiProps = ( dataTestSubj: string; spaceBefore?: EuiThemeSize | null; } & Pick => { - const { navigateToUrl, closePanel, treeDepth, getIsCollapsed, activeNodes } = deps; + const { + navigateToUrl, + closePanel, + treeDepth, + getIsCollapsed, + activeNodes, + eventTracker, + basePath, + } = deps; const { navNode, isItem, hasChildren, hasLink } = serializeNavNode(_navNode); const { path, href, onClick: customOnClick, isCollapsible = DEFAULT_IS_COLLAPSIBLE } = navNode; @@ -239,6 +250,14 @@ const getEuiProps = ( href, external: isExternal, onClick: (e) => { + if (href) { + eventTracker.clickNavLink({ + href: basePath.remove(href), + id: navNode.id, + hrefPrev: basePath.remove(window.location.pathname), + }); + } + if (customOnClick) { customOnClick(e); return; @@ -253,6 +272,14 @@ const getEuiProps = ( : undefined; const onClick = (e: React.MouseEvent) => { + if (href) { + eventTracker.clickNavLink({ + href: basePath.remove(href), + id: navNode.id, + hrefPrev: basePath.remove(window.location.pathname), + }); + } + if (customOnClick) { customOnClick(e); return; @@ -293,6 +320,8 @@ function nodeToEuiCollapsibleNavProps( treeDepth: number; getIsCollapsed: (path: string) => boolean; activeNodes: ChromeProjectNavigationNode[][]; + eventTracker: EventTracker; + basePath: BasePathService; } ): { items: Array; @@ -369,7 +398,7 @@ interface Props { export const NavigationSectionUI: FC = React.memo(({ navNode: _navNode }) => { const { activeNodes } = useNavigation(); - const { navigateToUrl } = useServices(); + const { navigateToUrl, eventTracker, basePath } = useServices(); const [items, setItems] = useState(); const { navNode } = useMemo( @@ -394,8 +423,10 @@ export const NavigationSectionUI: FC = React.memo(({ navNode: _navNode }) treeDepth: 0, getIsCollapsed, activeNodes, + eventTracker, + basePath, }); - }, [navNode, navigateToUrl, closePanel, getIsCollapsed, activeNodes]); + }, [navNode, navigateToUrl, closePanel, getIsCollapsed, activeNodes, eventTracker, basePath]); const { items: topLevelItems } = props; diff --git a/packages/shared-ux/chrome/navigation/tsconfig.json b/packages/shared-ux/chrome/navigation/tsconfig.json index d123d451597e6..9936cc9f1b892 100644 --- a/packages/shared-ux/chrome/navigation/tsconfig.json +++ b/packages/shared-ux/chrome/navigation/tsconfig.json @@ -22,6 +22,7 @@ "@kbn/i18n", "@kbn/shared-ux-storybook-mock", "@kbn/core-http-browser", + "@kbn/core-analytics-browser", ], "exclude": [ "target/**/*" diff --git a/src/dev/build/lib/config.test.ts b/src/dev/build/lib/config.test.ts index 76a45ddb2e182..e19c2cb58a7c1 100644 --- a/src/dev/build/lib/config.test.ts +++ b/src/dev/build/lib/config.test.ts @@ -127,6 +127,7 @@ describe('#getTargetPlatforms()', () => { "linux-arm64", "linux-x64", "linux-x64", + "win32-arm64", "win32-x64", ] `); @@ -156,6 +157,7 @@ describe('#getNodePlatforms()', () => { 'linux-arm64', 'linux-x64', 'linux-x64', + 'win32-arm64', 'win32-x64', ]); }); diff --git a/src/dev/build/lib/platform.ts b/src/dev/build/lib/platform.ts index dc70fb47dcefc..a17228a48e79b 100644 --- a/src/dev/build/lib/platform.ts +++ b/src/dev/build/lib/platform.ts @@ -61,6 +61,7 @@ export const DOWNLOAD_PLATFORMS = [ new Platform('darwin', 'x64', 'darwin-x86_64', null), new Platform('darwin', 'arm64', 'darwin-aarch64', null), new Platform('win32', 'x64', 'windows-x86_64', null), + new Platform('win32', 'arm64', 'windows-arm64', null), ]; export const SERVERLESS_PLATFORMS = [ diff --git a/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts b/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts index e52e500df42b9..531fe1b5ce174 100644 --- a/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts +++ b/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts @@ -92,8 +92,15 @@ it('runs expected fs operations', async () => { Object { "copy": Array [ Array [ - /.node_binaries//default/node.exe, - /.node_binaries//default/win32-x64/node.exe, + /.node_binaries//default/win32-x64/download/node.exe, + /.node_binaries//default/win32-x64/extract/node.exe, + Object { + "clone": true, + }, + ], + Array [ + /.node_binaries//default/win32-arm64/download/node.exe, + /.node_binaries//default/win32-arm64/extract/node.exe, Object { "clone": true, }, @@ -101,57 +108,57 @@ it('runs expected fs operations', async () => { ], "untar": Array [ Array [ - /.node_binaries///node-v-linux-x64.tar.gz, - /.node_binaries///linux-x64, + /.node_binaries///linux-x64/download/node-v-linux-x64.tar.gz, + /.node_binaries///linux-x64/extract, Object { "strip": 1, }, ], Array [ - /.node_binaries///node-v-linux-arm64.tar.gz, - /.node_binaries///linux-arm64, + /.node_binaries///linux-arm64/download/node-v-linux-arm64.tar.gz, + /.node_binaries///linux-arm64/extract, Object { "strip": 1, }, ], Array [ - /.node_binaries//default/node-v-darwin-x64.tar.gz, - /.node_binaries//default/darwin-x64, + /.node_binaries//default/darwin-x64/download/node-v-darwin-x64.tar.gz, + /.node_binaries//default/darwin-x64/extract, Object { "strip": 1, }, ], Array [ - /.node_binaries//default/node-v-darwin-arm64.tar.gz, - /.node_binaries//default/darwin-arm64, + /.node_binaries//default/darwin-arm64/download/node-v-darwin-arm64.tar.gz, + /.node_binaries//default/darwin-arm64/extract, Object { "strip": 1, }, ], Array [ - /.node_binaries///node-v-linux-x64.tar.gz, - /.node_binaries///linux-x64, + /.node_binaries///linux-x64/download/node-v-linux-x64.tar.gz, + /.node_binaries///linux-x64/extract, Object { "strip": 1, }, ], Array [ - /.node_binaries///node-v-linux-x64.tar.gz, - /.node_binaries///linux-x64, + /.node_binaries///linux-x64/download/node-v-linux-x64.tar.gz, + /.node_binaries///linux-x64/extract, Object { "strip": 1, }, ], Array [ - /.node_binaries///node-v-linux-arm64.tar.gz, - /.node_binaries///linux-arm64, + /.node_binaries///linux-arm64/download/node-v-linux-arm64.tar.gz, + /.node_binaries///linux-arm64/extract, Object { "strip": 1, }, ], Array [ - /.node_binaries///node-v-linux-arm64.tar.gz, - /.node_binaries///linux-arm64, + /.node_binaries///linux-arm64/download/node-v-linux-arm64.tar.gz, + /.node_binaries///linux-arm64/extract, Object { "strip": 1, }, diff --git a/src/dev/build/tasks/nodejs/node_download_info.ts b/src/dev/build/tasks/nodejs/node_download_info.ts index 263704c41546d..9e5237a08e183 100644 --- a/src/dev/build/tasks/nodejs/node_download_info.ts +++ b/src/dev/build/tasks/nodejs/node_download_info.ts @@ -26,7 +26,7 @@ export function getNodeDownloadInfo(config: Config, platform: Platform) { return variants.map((variant) => { const downloadName = platform.isWindows() - ? 'win-x64/node.exe' + ? `win-${platform.getArchitecture()}/node.exe` : `node-v${version}-${arch}.tar.gz`; let variantPath = ''; @@ -36,9 +36,17 @@ export function getNodeDownloadInfo(config: Config, platform: Platform) { '.node_binaries', version, variant, + platform.getNodeArch(), + 'download', basename(downloadName) ); - const extractDir = config.resolveFromRepo('.node_binaries', version, variant, arch); + const extractDir = config.resolveFromRepo( + '.node_binaries', + version, + variant, + platform.getNodeArch(), + 'extract' + ); return { url, diff --git a/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts b/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts index 995244e9d2b84..799ed86671730 100644 --- a/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts +++ b/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts @@ -141,6 +141,11 @@ it('checks shasums for each downloaded node build', async () => { "", undefined, ], + Array [ + , + "", + undefined, + ], ], "results": Array [ Object { @@ -152,6 +157,20 @@ it('checks shasums for each downloaded node build', async () => { "linux:default:linux-x64:downloadName": "valid shasum", "linux:serverless:linux-arm64:downloadName": "valid shasum", "linux:serverless:linux-x64:downloadName": "valid shasum", + "win32:default:win32-arm64:downloadName": "valid shasum", + "win32:default:win32-x64:downloadName": "valid shasum", + }, + }, + Object { + "type": "return", + "value": Object { + "darwin:default:darwin-arm64:downloadName": "valid shasum", + "darwin:default:darwin-x64:downloadName": "valid shasum", + "linux:default:linux-arm64:downloadName": "valid shasum", + "linux:default:linux-x64:downloadName": "valid shasum", + "linux:serverless:linux-arm64:downloadName": "valid shasum", + "linux:serverless:linux-x64:downloadName": "valid shasum", + "win32:default:win32-arm64:downloadName": "valid shasum", "win32:default:win32-x64:downloadName": "valid shasum", }, }, @@ -164,6 +183,7 @@ it('checks shasums for each downloaded node build', async () => { "linux:default:linux-x64:downloadName": "valid shasum", "linux:serverless:linux-arm64:downloadName": "valid shasum", "linux:serverless:linux-x64:downloadName": "valid shasum", + "win32:default:win32-arm64:downloadName": "valid shasum", "win32:default:win32-x64:downloadName": "valid shasum", }, }, @@ -176,6 +196,7 @@ it('checks shasums for each downloaded node build', async () => { "linux:default:linux-x64:downloadName": "valid shasum", "linux:serverless:linux-arm64:downloadName": "valid shasum", "linux:serverless:linux-x64:downloadName": "valid shasum", + "win32:default:win32-arm64:downloadName": "valid shasum", "win32:default:win32-x64:downloadName": "valid shasum", }, }, @@ -188,6 +209,7 @@ it('checks shasums for each downloaded node build', async () => { "linux:default:linux-x64:downloadName": "valid shasum", "linux:serverless:linux-arm64:downloadName": "valid shasum", "linux:serverless:linux-x64:downloadName": "valid shasum", + "win32:default:win32-arm64:downloadName": "valid shasum", "win32:default:win32-x64:downloadName": "valid shasum", }, }, @@ -200,6 +222,7 @@ it('checks shasums for each downloaded node build', async () => { "linux:default:linux-x64:downloadName": "valid shasum", "linux:serverless:linux-arm64:downloadName": "valid shasum", "linux:serverless:linux-x64:downloadName": "valid shasum", + "win32:default:win32-arm64:downloadName": "valid shasum", "win32:default:win32-x64:downloadName": "valid shasum", }, }, @@ -212,6 +235,7 @@ it('checks shasums for each downloaded node build', async () => { "linux:default:linux-x64:downloadName": "valid shasum", "linux:serverless:linux-arm64:downloadName": "valid shasum", "linux:serverless:linux-x64:downloadName": "valid shasum", + "win32:default:win32-arm64:downloadName": "valid shasum", "win32:default:win32-x64:downloadName": "valid shasum", }, }, @@ -224,6 +248,7 @@ it('checks shasums for each downloaded node build', async () => { "linux:default:linux-x64:downloadName": "valid shasum", "linux:serverless:linux-arm64:downloadName": "valid shasum", "linux:serverless:linux-x64:downloadName": "valid shasum", + "win32:default:win32-arm64:downloadName": "valid shasum", "win32:default:win32-x64:downloadName": "valid shasum", }, }, @@ -278,6 +303,15 @@ it('checks shasums for each downloaded node build', async () => { "variant": null, }, ], + Array [ + , + Platform { + "architecture": "arm64", + "buildName": "windows-arm64", + "name": "win32", + "variant": null, + }, + ], Array [ , Platform { @@ -343,6 +377,15 @@ it('checks shasums for each downloaded node build', async () => { }, ], }, + Object { + "type": "return", + "value": Array [ + Object { + "downloadName": "win32:default:win32-arm64:downloadName", + "downloadPath": "win32:default:win32-arm64:downloadPath", + }, + ], + }, Object { "type": "return", "value": Array [ @@ -387,6 +430,10 @@ it('checks shasums for each downloaded node build', async () => { "win32:default:win32-x64:downloadPath", "sha256", ], + Array [ + "win32:default:win32-arm64:downloadPath", + "sha256", + ], Array [ "linux:serverless:linux-x64:downloadPath", "sha256", @@ -425,6 +472,10 @@ it('checks shasums for each downloaded node build', async () => { "type": "return", "value": "valid shasum", }, + Object { + "type": "return", + "value": "valid shasum", + }, ], } `); diff --git a/src/dev/build/tasks/os_packages/docker_generator/run.ts b/src/dev/build/tasks/os_packages/docker_generator/run.ts index 25cb0d8d0d2d1..62d17f0455723 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/run.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/run.ts @@ -43,7 +43,8 @@ export async function runDockerGenerator( if (flags.baseImage === 'ubuntu') baseImageName = 'ubuntu:20.04'; if (flags.baseImage === 'ubi') baseImageName = 'docker.elastic.co/ubi9/ubi-minimal:latest'; if (flags.baseImage === 'wolfi') - baseImageName = 'docker.elastic.co/wolfi/chainguard-base:20230214'; + baseImageName = + 'docker.elastic.co/wolfi/chainguard-base:latest@sha256:19764e89441be1f36544f715a738abc1a1898f35ed729486d33172eb54e8d84a'; let imageFlavor = ''; if (flags.baseImage === 'ubi') imageFlavor += `-ubi`; diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index b241cc96b8a83..989322e130dcd 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -86,7 +86,7 @@ export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint '@elastic/ems-client@8.5.3': ['Elastic License 2.0'], - '@elastic/eui@95.4.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@95.5.0': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry 'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary '@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause) diff --git a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts index c127f473ee624..2a89147b0de29 100644 --- a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts +++ b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts @@ -221,8 +221,20 @@ export class MonacoEditorActionsProvider { } = context; const { toasts } = notifications; try { - const requests = await this.getRequests(); - if (!requests.length) { + const allRequests = await this.getRequests(); + // if any request doesnt have a method then we gonna treat it as a non-valid + // request + const requests = allRequests.filter((request) => request.method); + + // If we do have requests but none have methods we are not sending the request + if (allRequests.length > 0 && !requests.length) { + toasts.addWarning( + i18n.translate('console.notification.monaco.error.nonSupportedRequest', { + defaultMessage: 'The selected request is not valid.', + }) + ); + return; + } else if (!requests.length) { toasts.add( i18n.translate('console.notification.monaco.error.noRequestSelectedTitle', { defaultMessage: diff --git a/src/plugins/console/public/application/containers/editor/monaco/utils/autocomplete_utils.test.ts b/src/plugins/console/public/application/containers/editor/monaco/utils/autocomplete_utils.test.ts index c5a423e38902d..8822902627944 100644 --- a/src/plugins/console/public/application/containers/editor/monaco/utils/autocomplete_utils.test.ts +++ b/src/plugins/console/public/application/containers/editor/monaco/utils/autocomplete_utils.test.ts @@ -8,6 +8,8 @@ /* * Mock the function "populateContext" that accesses the autocomplete definitions */ +import { monaco } from '@kbn/monaco'; + const mockPopulateContext = jest.fn(); jest.mock('../../../../../lib/autocomplete/engine', () => { @@ -20,6 +22,7 @@ jest.mock('../../../../../lib/autocomplete/engine', () => { import { AutoCompleteContext } from '../../../../../lib/autocomplete/types'; import { getDocumentationLinkFromAutocomplete, + getUrlPathCompletionItems, shouldTriggerSuggestions, } from './autocomplete_utils'; @@ -136,4 +139,62 @@ describe('autocomplete_utils', () => { expect(actual).toBe(false); }); }); + + describe('getUrlPathCompletionItems', () => { + beforeEach(() => { + // mock autocomplete set with endpoints and index names + const mockAutocompleteSet = [ + { + name: '_cat', + }, + { + name: '_search', + }, + { + name: 'index1', + meta: 'index', + }, + { + name: 'index2', + meta: 'index', + }, + ] as AutoCompleteContext['autoCompleteSet']; + // mock the populateContext function that finds the correct autocomplete endpoint object and puts it into the context object + mockPopulateContext.mockImplementation((...args) => { + const context = args[0][1]; + context.autoCompleteSet = mockAutocompleteSet; + }); + }); + it('only suggests index items if there is a comma at the end of the line', () => { + const mockModel = { + getValueInRange: () => 'GET .kibana,', + getWordUntilPosition: () => ({ startColumn: 13 }), + } as unknown as monaco.editor.ITextModel; + const mockPosition = { lineNumber: 1, column: 13 } as unknown as monaco.Position; + const items = getUrlPathCompletionItems(mockModel, mockPosition); + expect(items.length).toBe(2); + expect(items.every((item) => item.detail === 'index')).toBe(true); + }); + + it('only suggests index items if there is a comma in the last url path token', () => { + const mockModel = { + getValueInRange: () => 'GET .kibana,index', + getWordUntilPosition: () => ({ startColumn: 13 }), + } as unknown as monaco.editor.ITextModel; + const mockPosition = { lineNumber: 1, column: 18 } as unknown as monaco.Position; + const items = getUrlPathCompletionItems(mockModel, mockPosition); + expect(items.length).toBe(2); + expect(items.every((item) => item.detail === 'index')).toBe(true); + }); + + it('suggest endpoints and index names if no comma', () => { + const mockModel = { + getValueInRange: () => 'GET _search', + getWordUntilPosition: () => ({ startColumn: 12 }), + } as unknown as monaco.editor.ITextModel; + const mockPosition = { lineNumber: 1, column: 12 } as unknown as monaco.Position; + const items = getUrlPathCompletionItems(mockModel, mockPosition); + expect(items.length).toBe(4); + }); + }); }); diff --git a/src/plugins/console/public/application/containers/editor/monaco/utils/autocomplete_utils.ts b/src/plugins/console/public/application/containers/editor/monaco/utils/autocomplete_utils.ts index 3f23c4cce2418..bbfa33d84e70e 100644 --- a/src/plugins/console/public/application/containers/editor/monaco/utils/autocomplete_utils.ts +++ b/src/plugins/console/public/application/containers/editor/monaco/utils/autocomplete_utils.ts @@ -121,43 +121,50 @@ export const getUrlPathCompletionItems = ( endColumn: column, }); + // flag to only suggest index names + let onlyIndexNames = false; // get the method and previous url parts for context const { method, urlPathTokens } = parseLine(lineContent); // if the line ends with /, then we use all url path tokens for autocomplete suggestions - // otherwise, we want to ignore the last token + // otherwise, we don't use the last token for populating the autocomplete context if (!lineContent.trim().endsWith('/')) { - urlPathTokens.pop(); + const lastToken = urlPathTokens.pop(); + // if the last token contains a comma, only suggest index names + if (lastToken?.includes(',')) { + onlyIndexNames = true; + } + } + let { autoCompleteSet } = populateContextForMethodAndUrl(method, urlPathTokens); + autoCompleteSet = autoCompleteSet ?? []; + // filter out non index names items if needed + if (onlyIndexNames) { + autoCompleteSet = autoCompleteSet.filter((term) => term.meta === 'index'); } - const { autoCompleteSet } = populateContextForMethodAndUrl(method, urlPathTokens); - const wordUntilPosition = model.getWordUntilPosition(position); const range = { - startLineNumber: position.lineNumber, + startLineNumber: lineNumber, // replace the whole word with the suggestion startColumn: lineContent.endsWith('.') ? // if there is a dot at the end of the content, it's ignored in the wordUntilPosition wordUntilPosition.startColumn - 1 : wordUntilPosition.startColumn, - endLineNumber: position.lineNumber, - endColumn: position.column, + endLineNumber: lineNumber, + endColumn: column, }; - if (autoCompleteSet && autoCompleteSet.length > 0) { - return ( - filterTermsWithoutName(autoCompleteSet) - // map autocomplete items to completion items - .map((item) => { - return { - label: item.name + '', - insertText: item.name + '', - detail: item.meta ?? i18nTexts.endpoint, - // the kind is only used to configure the icon - kind: monaco.languages.CompletionItemKind.Constant, - range, - }; - }) - ); - } - return []; + return ( + filterTermsWithoutName(autoCompleteSet) + // map autocomplete items to completion items + .map((item) => { + return { + label: item.name + '', + insertText: item.name + '', + detail: item.meta ?? i18nTexts.endpoint, + // the kind is only used to configure the icon + kind: monaco.languages.CompletionItemKind.Constant, + range, + }; + }) + ); }; /* @@ -336,7 +343,16 @@ const getInsertText = ( } let insertText = ''; if (typeof name === 'string') { - insertText = bodyContent.endsWith('"') ? '' : '"'; + const bodyContentLines = bodyContent.split('\n'); + const currentContentLine = bodyContentLines[bodyContentLines.length - 1]; + const incompleteFieldRegex = /.*"[^"]*$/; + if (incompleteFieldRegex.test(currentContentLine)) { + // The cursor is after an unmatched quote (e.g. '..."abc', '..."') + insertText = ''; + } else { + // The cursor is at the beginning of a field so the insert text should start with a quote + insertText = '"'; + } if (insertValue && insertValue !== '{' && insertValue !== '[') { insertText += `${insertValue}"`; } else { diff --git a/src/plugins/controls/common/options_list/types.ts b/src/plugins/controls/common/options_list/types.ts index 1242e866ca089..4192cc6aac26d 100644 --- a/src/plugins/controls/common/options_list/types.ts +++ b/src/plugins/controls/common/options_list/types.ts @@ -7,7 +7,7 @@ */ import { DataView, FieldSpec, RuntimeFieldSpec } from '@kbn/data-views-plugin/common'; -import type { BoolQuery, Filter, Query, TimeRange } from '@kbn/es-query'; +import type { AggregateQuery, BoolQuery, Filter, Query, TimeRange } from '@kbn/es-query'; import type { DataControlInput } from '../types'; import { OptionsListSelection } from './options_list_selections'; @@ -68,7 +68,7 @@ export type OptionsListRequest = Omit< dataView: DataView; filters?: Filter[]; field: FieldSpec; - query?: Query; + query?: Query | AggregateQuery; }; /** diff --git a/src/plugins/data_view_editor/public/data_view_editor_service.ts b/src/plugins/data_view_editor/public/data_view_editor_service.ts index 01c1842ee9425..76d5870cb094c 100644 --- a/src/plugins/data_view_editor/public/data_view_editor_service.ts +++ b/src/plugins/data_view_editor/public/data_view_editor_service.ts @@ -350,6 +350,7 @@ export class DataViewEditorService { const getFieldsOptions: GetFieldsOptions = { pattern: this.indexPattern, allowHidden: this.allowHidden, + allowNoIndex: true, }; if (this.type === INDEX_PATTERN_TYPE.ROLLUP) { getFieldsOptions.type = INDEX_PATTERN_TYPE.ROLLUP; diff --git a/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts b/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts index 7ce9c50977cd1..4c9c434007e23 100644 --- a/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts +++ b/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts @@ -93,9 +93,7 @@ export class IndexPatternsFetcher { fieldTypes, includeEmptyFields, } = options; - const allowNoIndices = fieldCapsOptions - ? fieldCapsOptions.allow_no_indices - : this.allowNoIndices; + const allowNoIndices = fieldCapsOptions?.allow_no_indices || this.allowNoIndices; const expandWildcards = allowHidden ? 'all' : 'open'; diff --git a/src/plugins/discover/common/esql_locator.ts b/src/plugins/discover/common/esql_locator.ts index fa7ca618e5bf9..ce4c772cc676c 100644 --- a/src/plugins/discover/common/esql_locator.ts +++ b/src/plugins/discover/common/esql_locator.ts @@ -9,14 +9,14 @@ import { DISCOVER_ESQL_LOCATOR } from '@kbn/deeplinks-analytics'; import { LocatorDefinition, LocatorPublic } from '@kbn/share-plugin/common'; import { SerializableRecord } from '@kbn/utility-types'; -import { getIndexForESQLQuery, getInitialESQLQuery } from '@kbn/esql-utils'; +import { getIndexForESQLQuery, getInitialESQLQuery, getESQLAdHocDataview } from '@kbn/esql-utils'; import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; export type DiscoverESQLLocatorParams = SerializableRecord; export interface DiscoverESQLLocatorDependencies { discoverAppLocator: LocatorPublic; - getIndices: DataViewsPublicPluginStart['getIndices']; + dataViews: DataViewsPublicPluginStart; } export type DiscoverESQLLocator = LocatorPublic; @@ -27,10 +27,10 @@ export class DiscoverESQLLocatorDefinition implements LocatorDefinition { - const { discoverAppLocator, getIndices } = this.deps; - - const indexName = await getIndexForESQLQuery({ dataViews: { getIndices } }); - const esql = getInitialESQLQuery(indexName ?? '*'); + const { discoverAppLocator, dataViews } = this.deps; + const indexName = (await getIndexForESQLQuery({ dataViews })) ?? '*'; + const dataView = await getESQLAdHocDataview(`from ${indexName}`, dataViews); + const esql = getInitialESQLQuery(dataView); const params = { query: { esql }, diff --git a/src/plugins/discover/public/application/main/discover_main_route.tsx b/src/plugins/discover/public/application/main/discover_main_route.tsx index f37487b6b93b7..0e1c1472ac556 100644 --- a/src/plugins/discover/public/application/main/discover_main_route.tsx +++ b/src/plugins/discover/public/application/main/discover_main_route.tsx @@ -377,7 +377,7 @@ function getLoadParamsForNewSearch(stateContainer: DiscoverStateContainer): { ? { // reset to a default ES|QL query query: { - esql: getInitialESQLQuery(prevDataView.getIndexPattern()), + esql: getInitialESQLQuery(prevDataView), }, } : undefined; diff --git a/src/plugins/discover/public/global_search/search_provider.ts b/src/plugins/discover/public/global_search/search_provider.ts index d4a21e9603a3c..e9b6bb6f048a5 100644 --- a/src/plugins/discover/public/global_search/search_provider.ts +++ b/src/plugins/discover/public/global_search/search_provider.ts @@ -50,7 +50,7 @@ export const getESQLSearchProvider: ( const params = { query: { - esql: getInitialESQLQuery(defaultDataView?.getIndexPattern()), + esql: getInitialESQLQuery(defaultDataView), }, dataViewSpec: defaultDataView?.toSpec(), }; diff --git a/src/plugins/discover/public/plugin.tsx b/src/plugins/discover/public/plugin.tsx index fcce348a319d1..d81bacb958d38 100644 --- a/src/plugins/discover/public/plugin.tsx +++ b/src/plugins/discover/public/plugin.tsx @@ -278,7 +278,7 @@ export class DiscoverPlugin plugins.share?.url.locators.create( new DiscoverESQLLocatorDefinition({ discoverAppLocator: this.locator, - getIndices: plugins.dataViews.getIndices, + dataViews: plugins.dataViews, }) ); } diff --git a/src/plugins/links/public/actions/compatibility_check.ts b/src/plugins/links/public/actions/compatibility_check.ts new file mode 100644 index 0000000000000..986c91368abfa --- /dev/null +++ b/src/plugins/links/public/actions/compatibility_check.ts @@ -0,0 +1,16 @@ +/* + * 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 { apiIsPresentationContainer, PresentationContainer } from '@kbn/presentation-containers'; +import { EmbeddableApiContext } from '@kbn/presentation-publishing'; + +export const compatibilityCheck = ( + api: EmbeddableApiContext['embeddable'] +): api is PresentationContainer => { + return apiIsPresentationContainer(api); +}; diff --git a/src/plugins/links/public/actions/create_links_panel_action.ts b/src/plugins/links/public/actions/create_links_panel_action.ts index eb8f2c11d8682..02d157055f758 100644 --- a/src/plugins/links/public/actions/create_links_panel_action.ts +++ b/src/plugins/links/public/actions/create_links_panel_action.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import { apiIsPresentationContainer } from '@kbn/presentation-containers'; import { EmbeddableApiContext } from '@kbn/presentation-publishing'; import { ADD_PANEL_TRIGGER, IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; import { COMMON_EMBEDDABLE_GROUPING } from '@kbn/embeddable-plugin/public'; @@ -21,12 +20,12 @@ export const registerCreateLinksPanelAction = () => { getIconType: () => APP_ICON, order: 10, isCompatible: async ({ embeddable }) => { - return apiIsPresentationContainer(embeddable); + const { compatibilityCheck } = await import('./compatibility_check'); + return compatibilityCheck(embeddable); }, execute: async ({ embeddable }) => { - if (!apiIsPresentationContainer(embeddable)) { - throw new IncompatibleActionError(); - } + const { compatibilityCheck } = await import('./compatibility_check'); + if (!compatibilityCheck(embeddable)) throw new IncompatibleActionError(); const { openEditorFlyout } = await import('../editor/open_editor_flyout'); const runtimeState = await openEditorFlyout({ parentDashboard: embeddable, diff --git a/src/plugins/links/public/editor/open_editor_flyout.tsx b/src/plugins/links/public/editor/open_editor_flyout.tsx index cb3ce3a5d7591..08434f6631ae5 100644 --- a/src/plugins/links/public/editor/open_editor_flyout.tsx +++ b/src/plugins/links/public/editor/open_editor_flyout.tsx @@ -62,7 +62,7 @@ export async function openEditorFlyout({ ? parentDashboard.savedObjectId.value : undefined; - return new Promise((resolve, reject) => { + return new Promise((resolve) => { const flyoutId = `linksEditorFlyout-${uuidv4()}`; const closeEditorFlyout = (editorFlyout: OverlayRef) => { @@ -116,7 +116,7 @@ export async function openEditorFlyout({ }; const onCancel = () => { - reject(); + resolve(undefined); closeEditorFlyout(editorFlyout); }; diff --git a/src/plugins/links/public/editor/open_link_editor_flyout.tsx b/src/plugins/links/public/editor/open_link_editor_flyout.tsx index e6c931be5aee0..eac3135d8f089 100644 --- a/src/plugins/links/public/editor/open_link_editor_flyout.tsx +++ b/src/plugins/links/public/editor/open_link_editor_flyout.tsx @@ -49,14 +49,14 @@ export async function openLinkEditorFlyout({ }); }; - return new Promise((resolve, reject) => { + return new Promise((resolve) => { const onSave = async (newLink: UnorderedLink) => { resolve(newLink); await unmountFlyout(); }; const onCancel = async () => { - reject(); + resolve(undefined); await unmountFlyout(); }; @@ -71,8 +71,5 @@ export async function openLinkEditorFlyout({ , ref.current ); - }).catch(() => { - // on reject (i.e. on cancel), just return the original list of links - return undefined; }); } diff --git a/src/plugins/links/public/embeddable/links_embeddable.test.tsx b/src/plugins/links/public/embeddable/links_embeddable.test.tsx index 39de26a6a77c9..e6dbe32e86730 100644 --- a/src/plugins/links/public/embeddable/links_embeddable.test.tsx +++ b/src/plugins/links/public/embeddable/links_embeddable.test.tsx @@ -153,6 +153,7 @@ describe('getLinksEmbeddableFactory', () => { savedObjectId: '123', title: 'my links', description: 'just a few links', + hidePanelTitles: false, } as LinksSerializedState; const expectedRuntimeState = { @@ -163,6 +164,7 @@ describe('getLinksEmbeddableFactory', () => { description: 'just a few links', title: 'my links', savedObjectId: '123', + hidePanelTitles: false, }; let parent: LinksParentApi; @@ -210,7 +212,7 @@ describe('getLinksEmbeddableFactory', () => { savedObjectId: '123', title: 'my links', description: 'just a few links', - hidePanelTitles: undefined, + hidePanelTitles: false, }, references: [], }); @@ -238,7 +240,7 @@ describe('getLinksEmbeddableFactory', () => { rawState: { title: 'my links', description: 'just a few links', - hidePanelTitles: undefined, + hidePanelTitles: false, attributes: { description: 'some links', title: 'links 001', @@ -261,6 +263,7 @@ describe('getLinksEmbeddableFactory', () => { }, description: 'just a few links', title: 'my links', + hidePanelTitles: true, } as LinksSerializedState; const expectedRuntimeState = { @@ -271,6 +274,7 @@ describe('getLinksEmbeddableFactory', () => { description: 'just a few links', title: 'my links', savedObjectId: undefined, + hidePanelTitles: true, }; let parent: LinksParentApi; @@ -315,7 +319,7 @@ describe('getLinksEmbeddableFactory', () => { rawState: { title: 'my links', description: 'just a few links', - hidePanelTitles: undefined, + hidePanelTitles: true, attributes: { links: getLinks(), layout: 'horizontal', @@ -356,7 +360,7 @@ describe('getLinksEmbeddableFactory', () => { savedObjectId: '333', title: 'my links', description: 'just a few links', - hidePanelTitles: undefined, + hidePanelTitles: true, }, references: [], }); diff --git a/src/plugins/links/public/embeddable/links_embeddable.tsx b/src/plugins/links/public/embeddable/links_embeddable.tsx index 23f9d82b7cb03..8fc6d464cd50f 100644 --- a/src/plugins/links/public/embeddable/links_embeddable.tsx +++ b/src/plugins/links/public/embeddable/links_embeddable.tsx @@ -71,7 +71,7 @@ export const getLinksEmbeddableFactory = () => { deserializeState: async (serializedState) => { // Clone the state to avoid an object not extensible error when injecting references const state = cloneDeep(serializedState.rawState); - const { title, description } = serializedState.rawState; + const { title, description, hidePanelTitles } = serializedState.rawState; if (linksSerializeStateIsByReference(state)) { const linksSavedObject = await linksClient.get(state.savedObjectId); @@ -80,6 +80,7 @@ export const getLinksEmbeddableFactory = () => { ...runtimeState, title, description, + hidePanelTitles, }; } @@ -93,6 +94,7 @@ export const getLinksEmbeddableFactory = () => { return { title, description, + hidePanelTitles, links: resolvedLinks, layout: attributesWithInjectedIds.layout, defaultPanelTitle: attributesWithInjectedIds.title, @@ -175,21 +177,18 @@ export const getLinksEmbeddableFactory = () => { savedObjectId$.next(undefined); }, onEdit: async () => { - try { - const { openEditorFlyout } = await import('../editor/open_editor_flyout'); - const newState = await openEditorFlyout({ - initialState: api.snapshotRuntimeState(), - parentDashboard: parentApi, - }); - if (newState) { - links$.next(newState.links); - layout$.next(newState.layout); - defaultPanelTitle.next(newState.defaultPanelTitle); - defaultPanelDescription.next(newState.defaultPanelDescription); - savedObjectId$.next(newState.savedObjectId); - } - } catch { - // do nothing, user cancelled + const { openEditorFlyout } = await import('../editor/open_editor_flyout'); + const newState = await openEditorFlyout({ + initialState: api.snapshotRuntimeState(), + parentDashboard: parentApi, + }); + + if (newState) { + links$.next(newState.links); + layout$.next(newState.layout); + defaultPanelTitle.next(newState.defaultPanelTitle); + defaultPanelDescription.next(newState.defaultPanelDescription); + savedObjectId$.next(newState.savedObjectId); } }, }, diff --git a/src/plugins/navigation/public/analytics/index.ts b/src/plugins/navigation/public/analytics/index.ts new file mode 100644 index 0000000000000..2c51c4e994a95 --- /dev/null +++ b/src/plugins/navigation/public/analytics/index.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +export { registerNavigationEventTypes } from './register_event_types'; diff --git a/src/plugins/navigation/public/analytics/register_event_types.ts b/src/plugins/navigation/public/analytics/register_event_types.ts new file mode 100644 index 0000000000000..d1571f8ff0245 --- /dev/null +++ b/src/plugins/navigation/public/analytics/register_event_types.ts @@ -0,0 +1,60 @@ +/* + * 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 type { CoreSetup, EventTypeOpts, RootSchema } from '@kbn/core/public'; +import { + FieldType as NavigationFieldType, + EventType as NavigationEventType, +} from '@kbn/shared-ux-chrome-navigation'; + +const fields: Record>> = { + [NavigationFieldType.ID]: { + [NavigationFieldType.ID]: { + type: 'keyword', + _meta: { + description: 'The ID of navigation node.', + }, + }, + }, + [NavigationFieldType.HREF]: { + [NavigationFieldType.HREF]: { + type: 'keyword', + _meta: { + description: 'The href of the navigation node.', + optional: true, + }, + }, + }, + [NavigationFieldType.HREF_PREV]: { + [NavigationFieldType.HREF_PREV]: { + type: 'keyword', + _meta: { + description: 'The previous href before clicking on a navigation node.', + optional: true, + }, + }, + }, +}; + +const eventTypes: Array>> = [ + { + eventType: NavigationEventType.CLICK_NAVLINK, + schema: { + ...fields[NavigationFieldType.ID], + ...fields[NavigationFieldType.HREF], + ...fields[NavigationFieldType.HREF_PREV], + }, + }, +]; + +export function registerNavigationEventTypes(core: CoreSetup) { + const { analytics } = core; + for (const eventType of eventTypes) { + analytics.registerEventType(eventType); + } +} diff --git a/src/plugins/navigation/public/plugin.tsx b/src/plugins/navigation/public/plugin.tsx index bef9b7c3a933c..f58e61c7589f6 100644 --- a/src/plugins/navigation/public/plugin.tsx +++ b/src/plugins/navigation/public/plugin.tsx @@ -33,6 +33,7 @@ import type { import { TopNavMenuExtensionsRegistry, createTopNav } from './top_nav_menu'; import { RegisteredTopNavMenuData } from './top_nav_menu/top_nav_menu_data'; import { SideNavComponent } from './side_navigation'; +import { registerNavigationEventTypes } from './analytics'; export class NavigationPublicPlugin implements @@ -52,7 +53,9 @@ export class NavigationPublicPlugin constructor(private initializerContext: PluginInitializerContext) {} - public setup(_core: CoreSetup): NavigationPublicSetup { + public setup(core: CoreSetup): NavigationPublicSetup { + registerNavigationEventTypes(core); + return { registerMenuItem: this.topNavMenuExtensionsRegistry.register.bind( this.topNavMenuExtensionsRegistry diff --git a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx index 4afa5f84997ee..466b75ba140a1 100644 --- a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx +++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx @@ -92,7 +92,7 @@ export function ChangeDataView({ Boolean(textBasedLanguage) ); const [isTextLangTransitionModalVisible, setIsTextLangTransitionModalVisible] = useState(false); - const [selectedDataViewId, setSelectedDataViewId] = useState(currentDataViewId); + const [selectedDataView, setSelectedDataView] = useState(undefined); const kibana = useKibana(); const { application, data, storage, dataViews, dataViewEditor, appName, usageCollection } = @@ -117,6 +117,10 @@ export function ChangeDataView({ adHocDataViews?.map(mapAdHocDataView) ?? []; setDataViewsList(savedDataViewRefs.concat(adHocDataViewRefs)); + if (currentDataViewId) { + const currentDataview = await data.dataViews.get(currentDataViewId, false); + setSelectedDataView(currentDataview); + } }; fetchDataViews(); }, [data, currentDataViewId, adHocDataViews, savedDataViews, isTextBasedLangSelected]); @@ -308,7 +312,8 @@ export function ChangeDataView({ isTextBasedLangSelected={isTextBasedLangSelected} setPopoverIsOpen={setPopoverIsOpen} onChangeDataView={async (newId) => { - setSelectedDataViewId(newId); + const currentDataview = await data.dataViews.get(newId, false); + setSelectedDataView(currentDataview); setPopoverIsOpen(false); if (isTextBasedLangSelected) { @@ -348,7 +353,13 @@ export function ChangeDataView({ color="success" size="s" fullWidth - onClick={() => onTextBasedSubmit({ esql: getInitialESQLQuery(trigger.title!) })} + onClick={() => { + if (selectedDataView) { + onTextBasedSubmit({ + esql: getInitialESQLQuery(selectedDataView), + }); + } + }} data-test-subj="select-text-based-language-panel" contentProps={{ css: { @@ -393,8 +404,8 @@ export function ChangeDataView({ language: 'kuery', query: '', }); - if (selectedDataViewId) { - onChangeDataView(selectedDataViewId); + if (selectedDataView?.id) { + onChangeDataView(selectedDataView?.id); } setTriggerLabel(trigger.label); if (shouldDismissModal) { @@ -405,7 +416,7 @@ export function ChangeDataView({ onChangeDataView, onTextLangQuerySubmit, onTransitionModalDismiss, - selectedDataViewId, + selectedDataView?.id, trigger.label, ] ); diff --git a/src/plugins/unified_search/public/query_string_input/query_bar.scss b/src/plugins/unified_search/public/query_string_input/query_bar.scss index 2ecf27416a907..99e93d876ee50 100644 --- a/src/plugins/unified_search/public/query_string_input/query_bar.scss +++ b/src/plugins/unified_search/public/query_string_input/query_bar.scss @@ -3,7 +3,3 @@ background-image: euiFormControlGradient($euiColorDanger); } } -// increase the section height to avoid vertical scrolling -.euiQuickSelectPopover__section { - max-height: 142px; -} diff --git a/test/api_integration/apis/esql/errors.ts b/test/api_integration/apis/esql/errors.ts index e74f86efcb44c..193d48c478209 100644 --- a/test/api_integration/apis/esql/errors.ts +++ b/test/api_integration/apis/esql/errors.ts @@ -137,6 +137,7 @@ export default function ({ getService }: FtrProviderContext) { describe('error messages', () => { const config = readSetupFromESQLPackage(); const { queryToErrors, indexes, policies } = parseConfig(config); + const missmatches: Array<{ query: string; error: string }> = []; // Swap these for DEBUG/further investigation on ES bugs const stringVariants = ['text', 'keyword'] as const; @@ -182,11 +183,18 @@ export default function ({ getService }: FtrProviderContext) { for (const index of indexes) { // setup all indexes, mappings and policies here - log.info(`creating a index "${index}" with mapping...`); + log.info( + `creating a index "${index}" with mapping...\n${JSON.stringify(config.fields)}` + ); + const fieldsExcludingCounterType = config.fields.filter( + // ES|QL supports counter_integer, counter_long, counter_double, date_period, etc. + // but they are not types suitable for Elasticsearch indices + (c: { type: string }) => !c.type.startsWith('counter_') && c.type !== 'date_period' + ); await es.indices.create( createIndexRequest( index, - /unsupported/.test(index) ? config.unsupported_field : config.fields, + /unsupported/.test(index) ? config.unsupported_field : fieldsExcludingCounterType, stringFieldType, numberFieldType ), diff --git a/test/functional/apps/console/monaco/_autocomplete.ts b/test/functional/apps/console/monaco/_autocomplete.ts index 755ffa0364a01..b949a979a49db 100644 --- a/test/functional/apps/console/monaco/_autocomplete.ts +++ b/test/functional/apps/console/monaco/_autocomplete.ts @@ -261,21 +261,6 @@ GET _search ); expect(await PageObjects.console.monaco.isAutocompleteVisible()).to.be.eql(true); }); - - // not fixed for monaco yet https://github.com/elastic/kibana/issues/184442 - it.skip('should not activate auto-complete after comma following endpoint in URL', async () => { - await PageObjects.console.monaco.enterText('GET _search'); - - await PageObjects.console.sleepForDebouncePeriod(); - log.debug('Key type ","'); - await PageObjects.console.monaco.enterText(','); // i.e. 'GET _search,' - - await PageObjects.console.sleepForDebouncePeriod(); - log.debug('Key type Ctrl+SPACE'); - await PageObjects.console.monaco.pressCtrlSpace(); - - expect(await PageObjects.console.monaco.isAutocompleteVisible()).to.be.eql(false); - }); }); // not implemented for monaco yet https://github.com/elastic/kibana/issues/184856 diff --git a/test/functional/apps/console/monaco/_console.ts b/test/functional/apps/console/monaco/_console.ts index b48ba75529579..1c6afc39c5046 100644 --- a/test/functional/apps/console/monaco/_console.ts +++ b/test/functional/apps/console/monaco/_console.ts @@ -14,6 +14,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const log = getService('log'); + const toasts = getService('toasts'); const browser = getService('browser'); const PageObjects = getPageObjects(['common', 'console', 'header']); const security = getService('security'); @@ -57,17 +58,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(initialSize.width).to.be.greaterThan(afterSize.width); }); - it('should return statusCode 400 to unsupported HTTP verbs', async () => { - const expectedResponseContains = '"statusCode": 400'; + it('should not send request with unsupported HTTP verbs', async () => { await PageObjects.console.monaco.clearEditorText(); await PageObjects.console.monaco.enterText('OPTIONS /'); await PageObjects.console.clickPlay(); await retry.try(async () => { - const actualResponse = await PageObjects.console.monaco.getOutputText(); - log.debug(actualResponse); - expect(actualResponse).to.contain(expectedResponseContains); - - expect(await PageObjects.console.hasSuccessBadge()).to.be(false); + expect(await toasts.getCount()).to.equal(1); }); }); diff --git a/test/functional/apps/console/monaco/_misc_console_behavior.ts b/test/functional/apps/console/monaco/_misc_console_behavior.ts index 1d72fa796e421..f7ad2957c8411 100644 --- a/test/functional/apps/console/monaco/_misc_console_behavior.ts +++ b/test/functional/apps/console/monaco/_misc_console_behavior.ts @@ -27,11 +27,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); describe('keyboard shortcuts', () => { - let tabCount = 1; - - after(async () => { - if (tabCount > 1) { + let tabOpened = false; + afterEach(async () => { + if (tabOpened) { await browser.closeCurrentWindow(); + tabOpened = false; await browser.switchTab(0); } }); @@ -91,20 +91,24 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await PageObjects.console.monaco.getCurrentLineNumber()).to.be(4); }); - // flaky - it.skip('should open documentation when Ctrl+/ is pressed', async () => { - await PageObjects.console.monaco.enterText('GET _search'); - await PageObjects.console.monaco.pressEscape(); - await PageObjects.console.monaco.pressCtrlSlash(); - await retry.tryForTime(10000, async () => { - await browser.switchTab(1); - tabCount++; - }); - - // Retry until the documentation is loaded - await retry.try(async () => { - const url = await browser.getCurrentUrl(); - expect(url).to.contain('search-search.html'); + describe('open documentation', () => { + const requests = ['GET _search', 'GET test_index/_search', 'GET /_search']; + requests.forEach((request) => { + it('should open documentation when Ctrl+/ is pressed', async () => { + await PageObjects.console.monaco.enterText(request); + await PageObjects.console.monaco.pressEscape(); + await PageObjects.console.monaco.pressCtrlSlash(); + await retry.tryForTime(10000, async () => { + await browser.switchTab(1); + tabOpened = true; + }); + + // Retry until the documentation is loaded + await retry.try(async () => { + const url = await browser.getCurrentUrl(); + expect(url).to.contain('search-search.html'); + }); + }); }); }); }); diff --git a/test/functional/apps/dashboard/group5/embed_mode.ts b/test/functional/apps/dashboard/group5/embed_mode.ts index 3c2cfbae77a9f..c819a05c8ceb2 100644 --- a/test/functional/apps/dashboard/group5/embed_mode.ts +++ b/test/functional/apps/dashboard/group5/embed_mode.ts @@ -126,7 +126,7 @@ export default function ({ 'dashboard_embed_mode_scrolling', updateBaselines ); - expect(percentDifference).to.be.lessThan(0.02); + expect(percentDifference).to.be.lessThan(0.021); }); }); diff --git a/test/functional/apps/management/data_views/_data_view_create_delete.ts b/test/functional/apps/management/data_views/_data_view_create_delete.ts index 81f455149e2ba..26fe6a9f50df4 100644 --- a/test/functional/apps/management/data_views/_data_view_create_delete.ts +++ b/test/functional/apps/management/data_views/_data_view_create_delete.ts @@ -147,10 +147,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { return Promise.all(comparedHeaders); }); }); + + it('should support unmatched index pattern segments', async function () { + await PageObjects.settings.createIndexPattern('l*,z*', '@timestamp'); + const patternName = await PageObjects.settings.getIndexPageHeading(); + expect(patternName).to.be('l*,z*'); + await PageObjects.settings.removeIndexPattern(); + }); }); describe('edit index pattern', () => { it('on edit click', async () => { + await testSubjects.click('detail-link-logstash-*'); await PageObjects.settings.editIndexPattern('logstash-*', '@timestamp', 'Logstash Star'); await retry.try(async () => { diff --git a/tsconfig.base.json b/tsconfig.base.json index 18fca49a07497..1d8a9b6c83833 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -86,6 +86,8 @@ "@kbn/apm-synthtrace/*": ["packages/kbn-apm-synthtrace/*"], "@kbn/apm-synthtrace-client": ["packages/kbn-apm-synthtrace-client"], "@kbn/apm-synthtrace-client/*": ["packages/kbn-apm-synthtrace-client/*"], + "@kbn/apm-types": ["packages/kbn-apm-types"], + "@kbn/apm-types/*": ["packages/kbn-apm-types/*"], "@kbn/apm-utils": ["packages/kbn-apm-utils"], "@kbn/apm-utils/*": ["packages/kbn-apm-utils/*"], "@kbn/app-link-test-plugin": ["test/plugin_functional/plugins/app_link_test"], diff --git a/versions.json b/versions.json index 3816626bb83ca..b096cb490ff00 100644 --- a/versions.json +++ b/versions.json @@ -20,7 +20,7 @@ "previousMinor": true }, { - "version": "7.17.23", + "version": "7.17.24", "branch": "7.17", "previousMajor": true } diff --git a/x-pack/packages/kbn-data-forge/src/data_sources/service_logs/index.ts b/x-pack/packages/kbn-data-forge/src/data_sources/service_logs/index.ts index a74afb5bd7328..b22b60574c3c2 100644 --- a/x-pack/packages/kbn-data-forge/src/data_sources/service_logs/index.ts +++ b/x-pack/packages/kbn-data-forge/src/data_sources/service_logs/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { faker } from '@faker-js/faker'; import { omit, sample } from 'lodash'; import { SERVICE_LOGS } from '../../constants'; import { GeneratorFunction } from '../../types'; import { generateService } from './lib/generate_service'; +import { generateLogMessage } from './lib/generate_log_message'; export const generateEvent: GeneratorFunction = (_config, _schedule, index, timestamp) => { const service = generateService(index + 1); @@ -19,10 +19,10 @@ export const generateEvent: GeneratorFunction = (_config, _schedule, index, time { namespace: SERVICE_LOGS, '@timestamp': timestamp.toISOString(), - message: faker.git.commitMessage(), data_stream: { type: 'logs', dataset: SERVICE_LOGS, namespace: 'default' }, service: omit(service, 'hostsWithCloud'), ...hostWithCloud, + ...generateLogMessage(timestamp), }, ]; }; diff --git a/x-pack/packages/kbn-data-forge/src/data_sources/service_logs/lib/generate_log_message.ts b/x-pack/packages/kbn-data-forge/src/data_sources/service_logs/lib/generate_log_message.ts new file mode 100644 index 0000000000000..168b749855a35 --- /dev/null +++ b/x-pack/packages/kbn-data-forge/src/data_sources/service_logs/lib/generate_log_message.ts @@ -0,0 +1,61 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { faker } from '@faker-js/faker'; +import { Moment } from 'moment'; +import { URL } from 'node:url'; + +// $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" + +export function generateLogMessage(timestamp: Moment) { + const statusCode = faker.internet.httpStatusCode(); + const method = faker.internet.httpMethod(); + const logLevel = statusCode >= 500 ? 'error' : 'info'; + const userAgent = faker.internet.userAgent(); + const remoteAddress = faker.internet.ipv4(); + const path = `/api/${faker.word.noun()}/${faker.word.verb()}`; + const rawUrl = `${faker.internet.url()}/${path}`; + const parsedUrl = new URL(rawUrl); + const bytesSent = parseInt( + faker.string.numeric({ length: { min: 3, max: 10 }, allowLeadingZeros: false }), + 10 + ); + const message = `${remoteAddress} - - [${timestamp.toISOString()}] "${method} ${path} HTTP/1.1" ${statusCode} ${bytesSent} "${ + parsedUrl.origin + }" "${userAgent}"`; + return { + message, + log: { level: logLevel }, + url: { + domain: parsedUrl.hostname, + port: parsedUrl.port || 80, + full: rawUrl, + original: rawUrl, + path, + scheme: parsedUrl.protocol, + }, + http: { + request: { + method, + referrer: parsedUrl.origin, + mime_type: 'application/json', + body: { + bytes: parseInt(faker.string.numeric(3), 10), + }, + }, + response: { + bytes: bytesSent, + mime_type: 'application/json', + status_code: statusCode, + }, + version: '1.1', + }, + user_agent: { + original: userAgent, + }, + }; +} diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts index 1e759df2819ed..d97f2aef17b4b 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts @@ -21,5 +21,5 @@ export type AssistantFeatureKey = keyof AssistantFeatures; export const defaultAssistantFeatures = Object.freeze({ assistantKnowledgeBaseByDefault: false, assistantModelEvaluation: false, - assistantBedrockChat: false, + assistantBedrockChat: true, }); diff --git a/x-pack/packages/kbn-langchain/server/language_models/bedrock_chat.ts b/x-pack/packages/kbn-langchain/server/language_models/bedrock_chat.ts index 3381da798a249..ac229b97c8757 100644 --- a/x-pack/packages/kbn-langchain/server/language_models/bedrock_chat.ts +++ b/x-pack/packages/kbn-langchain/server/language_models/bedrock_chat.ts @@ -69,7 +69,7 @@ export class ActionsClientBedrockChatModel extends _BedrockChat { params: { subAction: 'invokeAIRaw', subActionParams: { - messages: inputBody.messages, + messages: prepareMessages(inputBody.messages), temperature: params.temperature ?? inputBody.temperature, stopSequences: inputBody.stop_sequences, system: inputBody.system, @@ -99,3 +99,20 @@ export class ActionsClientBedrockChatModel extends _BedrockChat { }); } } + +const prepareMessages = (messages: Array<{ role: string; content: string[] }>) => + messages.reduce((acc, { role, content }) => { + const lastMessage = acc[acc.length - 1]; + + if (!lastMessage || lastMessage.role !== role) { + acc.push({ role, content }); + return acc; + } + + if (lastMessage.role === role) { + acc[acc.length - 1].content = lastMessage.content.concat(content); + return acc; + } + + return acc; + }, [] as Array<{ role: string; content: string[] }>); diff --git a/x-pack/packages/kbn-langchain/server/language_models/gemini_chat.ts b/x-pack/packages/kbn-langchain/server/language_models/gemini_chat.ts index 1a691737cac1c..a34f34ecce482 100644 --- a/x-pack/packages/kbn-langchain/server/language_models/gemini_chat.ts +++ b/x-pack/packages/kbn-langchain/server/language_models/gemini_chat.ts @@ -69,7 +69,7 @@ export class ActionsClientGeminiChatModel extends ChatGoogleGenerativeAI { } async completionWithRetry( - request: string | GenerateContentRequest | Array, + request: GenerateContentRequest, options?: this['ParsedCallOptions'] ): Promise { return this.caller.callWithOptions({ signal: options?.signal }, async () => { @@ -80,7 +80,8 @@ export class ActionsClientGeminiChatModel extends ChatGoogleGenerativeAI { subAction: 'invokeAIRaw', subActionParams: { model: this.#model, - messages: request, + messages: request.contents, + tools: request.tools, temperature: this.#temperature, }, }, diff --git a/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts b/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts index 53b17f737c9fa..dd8f6aef06141 100644 --- a/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts +++ b/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts @@ -273,7 +273,7 @@ export type InferenceServiceSettings = export type InferenceAPIConfigResponse = { // Refers to a deployment id - inference_id: string; + model_id: string; task_type: 'sparse_embedding' | 'text_embedding'; task_settings: { model?: string; diff --git a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap index 286a41c376c23..53d79f80d697b 100644 --- a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap +++ b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap @@ -4490,6 +4490,33 @@ Object { ], "type": "number", }, + "tools": Object { + "flags": Object { + "default": [Function], + "error": [Function], + "presence": "optional", + }, + "items": Array [ + Object { + "flags": Object { + "error": [Function], + "presence": "optional", + }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], + "type": "any", + }, + ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], + "type": "array", + }, }, "type": "object", } diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/graph.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/graph.ts index 2a20dbc9be866..7ee0e6912b563 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/graph.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/graph.ts @@ -90,7 +90,7 @@ export const getDefaultAssistantGraph = ({ default: () => undefined, }, messages: { - value: (x: BaseMessage[], y: BaseMessage[]) => x.concat(y), + value: (x: BaseMessage[], y: BaseMessage[]) => y ?? x, default: () => [], }, chatTitle: { diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/helpers.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/helpers.ts index 0d39e7f0711ae..dc146d6b1b692 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/helpers.ts @@ -90,6 +90,7 @@ export const streamGraph = async ({ runName: DEFAULT_ASSISTANT_GRAPH_ID, tags: traceOptions?.tags ?? [], version: 'v2', + streamMode: 'values', }, llmType === 'bedrock' ? { includeNames: ['Summarizer'] } : undefined ); diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts index 68dfd720f3569..4e64b38fc0b9f 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts @@ -127,7 +127,7 @@ export const callAssistantGraph: AgentExecutor = async ({ streamRunnable: isStream, }) : llmType && ['bedrock', 'gemini'].includes(llmType) && bedrockChatEnabled - ? createToolCallingAgent({ + ? await createToolCallingAgent({ llm, tools, prompt: diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/execute_tools.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/execute_tools.ts index c20155e7c01db..6796385686cc6 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/execute_tools.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/execute_tools.ts @@ -8,7 +8,8 @@ import { RunnableConfig } from '@langchain/core/runnables'; import { StructuredTool } from '@langchain/core/tools'; import { ToolExecutor } from '@langchain/langgraph/prebuilt'; -import { isArray } from 'lodash'; +import { castArray } from 'lodash'; +import { AgentAction } from 'langchain/agents'; import { AgentState, NodeParamsBase } from '../types'; export interface ExecuteToolsParams extends NodeParamsBase { @@ -34,23 +35,30 @@ export const executeTools = async ({ config, logger, state, tools }: ExecuteTool logger.debug(() => `Node state:\n${JSON.stringify(state, null, 2)}`); const toolExecutor = new ToolExecutor({ tools }); - const agentAction = isArray(state.agentOutcome) ? state.agentOutcome[0] : state.agentOutcome; + const agentAction = state.agentOutcome; if (!agentAction || 'returnValues' in agentAction) { throw new Error('Agent has not been run yet'); } - let out; - try { - out = await toolExecutor.invoke(agentAction, config); - } catch (err) { - return { - steps: [{ action: agentAction, observation: JSON.stringify(`Error: ${err}`, null, 2) }], - }; - } + const steps = await Promise.all( + castArray(state.agentOutcome as AgentAction)?.map(async (action) => { + let out; + try { + out = await toolExecutor.invoke(action, config); + } catch (err) { + return { + action, + observation: JSON.stringify(`Error: ${err}`, null, 2), + }; + } + + return { + action, + observation: JSON.stringify(out, null, 2), + }; + }) + ); - return { - ...state, - steps: [{ action: agentAction, observation: JSON.stringify(out, null, 2) }], - }; + return { steps }; }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/generate_chat_title.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/generate_chat_title.ts index c9fa5c98ef470..74cf0fca3929a 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/generate_chat_title.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/generate_chat_title.ts @@ -46,7 +46,6 @@ export const generateChatTitle = async ({ logger.debug(`chatTitle: ${chatTitle}`); return { - ...state, chatTitle, }; }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/get_persisted_conversation.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/get_persisted_conversation.ts index 8f4b285410fbd..a4dd031507067 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/get_persisted_conversation.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/get_persisted_conversation.ts @@ -27,7 +27,6 @@ export const getPersistedConversation = async ({ if (!conversationId) { logger.debug('Cannot get conversation, because conversationId is undefined'); return { - ...state, conversation: undefined, messages: [], chatTitle: '', @@ -39,7 +38,6 @@ export const getPersistedConversation = async ({ if (!conversation) { logger.debug('Requested conversation, because conversation is undefined'); return { - ...state, conversation: undefined, messages: [], chatTitle: '', @@ -50,11 +48,21 @@ export const getPersistedConversation = async ({ logger.debug(`conversationId: ${conversationId}`); const messages = getLangChainMessages(conversation.messages ?? []); + + if (!state.input) { + const lastMessage = messages?.splice(-1)[0]; + return { + conversation, + messages, + chatTitle: conversation.title, + input: lastMessage?.content as string, + }; + } + return { - ...state, conversation, messages, chatTitle: conversation.title, - input: !state.input ? conversation.messages?.slice(-1)[0].content : state.input, + input: state.input, }; }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/persist_conversation_changes.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/persist_conversation_changes.ts index 40717d7d64e78..615c4b2449c4c 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/persist_conversation_changes.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/persist_conversation_changes.ts @@ -57,7 +57,6 @@ export const persistConversationChanges = async ({ const langChainMessages = getLangChainMessages(state.conversation.messages ?? []); const messages = langChainMessages.slice(0, -1); // all but the last message return { - ...state, conversation: state.conversation, messages, }; @@ -78,7 +77,7 @@ export const persistConversationChanges = async ({ }); if (!updatedConversation) { logger.debug('Not updated conversation'); - return { ...state, conversation: undefined, messages: [] }; + return { conversation: undefined, messages: [] }; } logger.debug(`conversationId: ${conversationId}`); @@ -86,7 +85,6 @@ export const persistConversationChanges = async ({ const messages = langChainMessages.slice(0, -1); // all but the last message return { - ...state, conversation: updatedConversation, messages, }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/run_agent.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/run_agent.ts index 9f59fedbbadef..fcd6686f1d17f 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/run_agent.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/run_agent.ts @@ -42,13 +42,12 @@ export const runAgent = async ({ const agentOutcome = await agentRunnable.withConfig({ tags: [AGENT_NODE_TAG] }).invoke( { ...state, - messages: state.messages.splice(-1), chat_history: state.messages, // TODO: Message de-dupe with ...state spread }, config ); + return { - ...state, agentOutcome, }; }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/should_continue.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/should_continue.ts index 57fcb5510318b..803fedb6f42dc 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/should_continue.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/should_continue.ts @@ -31,7 +31,7 @@ export const shouldContinue = ({ logger, state }: ShouldContinueParams) => { export const shouldContinueGenerateTitle = ({ logger, state }: ShouldContinueParams) => { logger.debug(`Node state:\n${JSON.stringify(state, null, 2)}`); - if (state.conversation?.title !== NEW_CHAT) { + if (state.conversation?.title?.length && state.conversation?.title !== NEW_CHAT) { return 'end'; } diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/prompts.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/prompts.ts index e32b0ea03439b..a811cc77575e5 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/prompts.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/prompts.ts @@ -17,7 +17,7 @@ export const openAIFunctionAgentPrompt = ChatPromptTemplate.fromMessages([ export const bedrockToolCallingAgentPrompt = ChatPromptTemplate.fromMessages([ [ 'system', - 'You are a helpful assistant. ALWAYS use the provided tools. Use tools as often as possible, as they have access to the latest data and syntax.', + 'You are a helpful assistant. ALWAYS use the provided tools. Use tools as often as possible, as they have access to the latest data and syntax. Always return value from ESQLKnowledgeBaseTool as is. Never return tags in the response, but make sure to include tags content in the response. Do not reflect on the quality of the returned search results in your response.', ], ['placeholder', '{chat_history}'], ['human', '{input}'], diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx index 2859b0ff7d8ae..9fa6df1e9f8ca 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx @@ -22,7 +22,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { AVCResultsBanner2024 } from '@kbn/avc-banner'; +import { AVCResultsBanner2024, useIsStillYear2024 } from '@kbn/avc-banner'; import { isIntegrationPolicyTemplate, @@ -313,7 +313,7 @@ export const OverviewPage: React.FC = memo( {isUnverified && } - {isElasticDefend && showAVCBanner && ( + {useIsStillYear2024() && isElasticDefend && showAVCBanner && ( <> diff --git a/x-pack/plugins/fleet/server/services/agents/status.test.ts b/x-pack/plugins/fleet/server/services/agents/status.test.ts new file mode 100644 index 0000000000000..d4b2fcbc8e9ae --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agents/status.test.ts @@ -0,0 +1,155 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { errors as EsErrors } from '@elastic/elasticsearch'; + +import { createAppContextStartContractMock } from '../../mocks'; + +import { appContextService } from '../app_context'; + +import { getAgentStatusForAgentPolicy } from './status'; + +describe('getAgentStatusForAgentPolicy', () => { + beforeEach(async () => { + appContextService.start(createAppContextStartContractMock()); + }); + + afterEach(() => { + appContextService.stop(); + }); + + it('should return agent status for agent policy', async () => { + const esClient = { + search: jest.fn().mockResolvedValue({ + aggregations: { + status: { + buckets: [ + { + key: 'online', + doc_count: 1, + }, + { + key: 'error', + doc_count: 2, + }, + ], + }, + }, + }), + }; + + const soClient = { + find: jest.fn().mockResolvedValue({ + saved_objects: [ + { + id: 'agentPolicyId', + attributes: { + name: 'Policy 1', + }, + }, + ], + }), + }; + const agentPolicyId = 'agentPolicyId'; + const filterKuery = 'filterKuery'; + const spaceId = 'spaceId'; + + const result = await getAgentStatusForAgentPolicy( + esClient as any, + soClient as any, + agentPolicyId, + filterKuery, + spaceId + ); + + expect(result).toEqual( + expect.objectContaining({ + active: 3, + all: 3, + error: 2, + events: 0, + inactive: 0, + offline: 0, + online: 1, + other: 0, + total: 3, + unenrolled: 0, + updating: 0, + }) + ); + + expect(esClient.search).toHaveBeenCalledTimes(1); + }); + + it('retries on 503', async () => { + const esClient = { + search: jest + .fn() + .mockRejectedValueOnce( + new EsErrors.ResponseError({ warnings: [], meta: {} as any, statusCode: 503 }) + ) + .mockResolvedValue({ + aggregations: { + status: { + buckets: [ + { + key: 'online', + doc_count: 1, + }, + { + key: 'error', + doc_count: 2, + }, + ], + }, + }, + }), + }; + + const soClient = { + find: jest.fn().mockResolvedValue({ + saved_objects: [ + { + id: 'agentPolicyId', + attributes: { + name: 'Policy 1', + }, + }, + ], + }), + }; + const agentPolicyId = 'agentPolicyId'; + const filterKuery = 'filterKuery'; + const spaceId = 'spaceId'; + + const result = await getAgentStatusForAgentPolicy( + esClient as any, + soClient as any, + agentPolicyId, + filterKuery, + spaceId + ); + + expect(result).toEqual( + expect.objectContaining({ + active: 3, + all: 3, + error: 2, + events: 0, + inactive: 0, + offline: 0, + online: 1, + other: 0, + total: 3, + unenrolled: 0, + updating: 0, + }) + ); + + expect(esClient.search).toHaveBeenCalledTimes(2); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/agents/status.ts b/x-pack/plugins/fleet/server/services/agents/status.ts index 31fb9f5fe9218..1940a816dd2d7 100644 --- a/x-pack/plugins/fleet/server/services/agents/status.ts +++ b/x-pack/plugins/fleet/server/services/agents/status.ts @@ -19,10 +19,12 @@ import { agentStatusesToSummary } from '../../../common/services'; import { AGENTS_INDEX } from '../../constants'; import type { AgentStatus } from '../../types'; -import { FleetUnauthorizedError } from '../../errors'; +import { FleetError, FleetUnauthorizedError } from '../../errors'; import { appContextService } from '../app_context'; +import { retryTransientEsErrors } from '../epm/elasticsearch/retry'; + import { getAgentById, removeSOAttributes } from './crud'; import { buildAgentStatusRuntimeField } from './build_status_runtime_field'; @@ -104,28 +106,34 @@ export async function getAgentStatusForAgentPolicy( let response; try { - response = await esClient.search< - null, - { status: AggregationsTermsAggregateBase } - >({ - index: AGENTS_INDEX, - size: 0, - query, - fields: Object.keys(runtimeFields), - runtime_mappings: runtimeFields, - aggregations: { - status: { - terms: { - field: 'status', - size: Object.keys(statuses).length, + response = await retryTransientEsErrors( + () => + esClient.search< + null, + { status: AggregationsTermsAggregateBase } + >({ + index: AGENTS_INDEX, + size: 0, + query, + fields: Object.keys(runtimeFields), + runtime_mappings: runtimeFields, + aggregations: { + status: { + terms: { + field: 'status', + size: Object.keys(statuses).length, + }, + }, }, - }, - }, - ignore_unavailable: true, - }); + ignore_unavailable: true, + }), + { logger } + ); } catch (error) { logger.debug(`Error getting agent statuses: ${error}`); - throw error; + throw new FleetError( + `Unable to retrive agent statuses for policy ${agentPolicyId} due to error: ${error.message}` + ); } const buckets = (response?.aggregations?.status?.buckets || @@ -153,11 +161,14 @@ export async function getAgentStatusForAgentPolicy( total: allActive, }; } + export async function getIncomingDataByAgentsId( esClient: ElasticsearchClient, agentsIds: string[], returnDataPreview: boolean = false ) { + const logger = appContextService.getLogger(); + try { const { has_all_requested: hasAllPrivileges } = await esClient.security.hasPrivileges({ body: { @@ -169,46 +180,51 @@ export async function getIncomingDataByAgentsId( ], }, }); + if (!hasAllPrivileges) { throw new FleetUnauthorizedError('Missing permissions to read data streams indices'); } - const searchResult = await esClient.search({ - index: DATA_STREAM_INDEX_PATTERN, - allow_partial_search_results: true, - _source: returnDataPreview, - timeout: '5s', - size: returnDataPreview ? MAX_AGENT_DATA_PREVIEW_SIZE : 0, - body: { - query: { - bool: { - filter: [ - { - terms: { - 'agent.id': agentsIds, - }, - }, - { - range: { - '@timestamp': { - gte: 'now-5m', - lte: 'now', + const searchResult = await retryTransientEsErrors( + () => + esClient.search({ + index: DATA_STREAM_INDEX_PATTERN, + allow_partial_search_results: true, + _source: returnDataPreview, + timeout: '5s', + size: returnDataPreview ? MAX_AGENT_DATA_PREVIEW_SIZE : 0, + body: { + query: { + bool: { + filter: [ + { + terms: { + 'agent.id': agentsIds, + }, + }, + { + range: { + '@timestamp': { + gte: 'now-5m', + lte: 'now', + }, + }, }, + ], + }, + }, + aggs: { + agent_ids: { + terms: { + field: 'agent.id', + size: agentsIds.length, }, }, - ], - }, - }, - aggs: { - agent_ids: { - terms: { - field: 'agent.id', - size: agentsIds.length, }, }, - }, - }, - }); + }), + { logger } + ); if (!searchResult.aggregations?.agent_ids) { return { @@ -231,7 +247,10 @@ export async function getIncomingDataByAgentsId( ); return { items, dataPreview }; - } catch (e) { - throw new Error(e); + } catch (error) { + logger.debug(`Error getting incoming data for agents: ${error}`); + throw new FleetError( + `Unable to retrive incoming data for agents due to error: ${error.message}` + ); } } diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx index 76b8295b6b1f4..c4d366daa1d29 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx @@ -731,7 +731,7 @@ describe('', () => { httpRequestsMockHelpers.setInferenceModels({ data: [ { - inference_id: customInferenceModel, + model_id: customInferenceModel, task_type: 'sparse_embedding', service: 'elser', service_settings: { diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx index ed5af67840513..75afa8c9455b2 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx @@ -71,9 +71,9 @@ jest.mock('../../../public/application/components/mappings_editor/mappings_state jest.mock('../../../public/application/services/api', () => ({ useLoadInferenceEndpoints: jest.fn().mockReturnValue({ data: [ - { inference_id: 'endpoint-1', task_type: 'text_embedding' }, - { inference_id: 'endpoint-2', task_type: 'sparse_embedding' }, - { inference_id: 'endpoint-3', task_type: 'completion' }, + { model_id: 'endpoint-1', task_type: 'text_embedding' }, + { model_id: 'endpoint-2', task_type: 'sparse_embedding' }, + { model_id: 'endpoint-3', task_type: 'completion' }, ] as InferenceAPIConfigResponse[], isLoading: false, error: null, diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/select_inference_id.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/select_inference_id.tsx index 15d5ee9ba72c0..672d64766e576 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/select_inference_id.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/select_inference_id.tsx @@ -54,10 +54,10 @@ type SelectInferenceIdContentProps = SelectInferenceIdProps & { const defaultEndpoints = [ { - inference_id: 'elser_model_2', + model_id: 'elser_model_2', }, { - inference_id: 'e5', + model_id: 'e5', }, ]; @@ -135,15 +135,15 @@ const SelectInferenceIdContent: React.FC = ({ ); const missingDefaultEndpoints = defaultEndpoints.filter( - (endpoint) => !(filteredEndpoints || []).find((e) => e.inference_id === endpoint.inference_id) + (endpoint) => !(filteredEndpoints || []).find((e) => e.model_id === endpoint.model_id) ); const newOptions: EuiSelectableOption[] = [ ...(filteredEndpoints || []), ...missingDefaultEndpoints, ].map((endpoint) => ({ - label: endpoint.inference_id, - 'data-test-subj': `custom-inference_${endpoint.inference_id}`, - checked: value === endpoint.inference_id ? 'on' : undefined, + label: endpoint.model_id, + 'data-test-subj': `custom-inference_${endpoint.model_id}`, + checked: value === endpoint.model_id ? 'on' : undefined, })); if (value && !newOptions.find((option) => option.label === value)) { // Sometimes we create a new endpoint but the backend is slow in updating so we need to optimistically update diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.test.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.test.ts index c4e668f9635d1..72e007b86f786 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.test.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.test.ts @@ -142,7 +142,7 @@ jest.mock('../../../../../../../services/api', () => ({ getInferenceEndpoints: jest.fn().mockResolvedValue({ data: [ { - inference_id: 'e5', + model_id: 'e5', task_type: 'text_embedding', service: 'elasticsearch', service_settings: { diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.ts index 57871383149cf..5ef20e50cf00c 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.ts @@ -119,7 +119,7 @@ export function useSemanticText(props: UseSemanticTextProps) { dispatch({ type: 'field.add', value: data }); const inferenceEndpoints = await getInferenceEndpoints(); const hasInferenceEndpoint = inferenceEndpoints.data?.some( - (inference) => inference.inference_id === inferenceId + (inference) => inference.model_id === inferenceId ); // if inference endpoint exists already, do not create new inference endpoint if (hasInferenceEndpoint) { diff --git a/x-pack/plugins/index_management/public/application/hooks/use_index_errors.ts b/x-pack/plugins/index_management/public/application/hooks/use_index_errors.ts index 2130a449a1063..f6c7767b4e2d0 100644 --- a/x-pack/plugins/index_management/public/application/hooks/use_index_errors.ts +++ b/x-pack/plugins/index_management/public/application/hooks/use_index_errors.ts @@ -40,7 +40,7 @@ export const useIndexErrors = ( const semanticTextFieldsWithErrors = semanticTextFields .map((field) => { const model = endpoints.find( - (endpoint) => endpoint.inference_id === field.source.inference_id + (endpoint) => endpoint.model_id === field.source.inference_id ); if (!model) { return { diff --git a/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.test.ts b/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.test.ts index 62746791510c0..6e80bcea5c349 100644 --- a/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.test.ts +++ b/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.test.ts @@ -49,7 +49,7 @@ jest.mock('../application/services/api', () => ({ getInferenceEndpoints: jest.fn().mockResolvedValue({ data: [ { - inference_id: 'e5', + model_id: 'e5', task_type: 'text_embedding', service: 'elasticsearch', service_settings: { diff --git a/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.ts b/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.ts index 9ad3e74e96a9e..79d4c8f79cf33 100644 --- a/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.ts +++ b/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.ts @@ -45,7 +45,7 @@ const getCustomInferenceIdMap = ( isDownloading: false, modelStats: undefined, }; - inferenceMap[model.inference_id] = inferenceEntry; + inferenceMap[model.model_id] = inferenceEntry; return inferenceMap; }, {}); const defaultInferenceIds = { diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.ts b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.ts index 4e6f1ef70acbd..1274008d0de88 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.ts +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.ts @@ -10,12 +10,14 @@ import { getESQLResults, formatESQLColumns, } from '@kbn/esql-utils'; -import type { AggregateQuery } from '@kbn/es-query'; +import { type AggregateQuery, buildEsQuery } from '@kbn/es-query'; import type { ESQLRow } from '@kbn/es-types'; import { getLensAttributesFromSuggestion } from '@kbn/visualization-utils'; import type { DataViewSpec } from '@kbn/data-views-plugin/public'; import type { DataView } from '@kbn/data-views-plugin/common'; import type { DatatableColumn } from '@kbn/expressions-plugin/common'; +import { getTime } from '@kbn/data-plugin/common'; +import { type DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { TypedLensByValueInput } from '../../../embeddable/embeddable_component'; import type { LensPluginStartDependencies } from '../../../plugin'; import type { DatasourceMap, VisualizationMap } from '../../../types'; @@ -27,6 +29,21 @@ export interface ESQLDataGridAttrs { columns: DatatableColumn[]; } +const getDSLFilter = (queryService: DataPublicPluginStart['query'], timeFieldName?: string) => { + const kqlQuery = queryService.queryString.getQuery(); + const filters = queryService.filterManager.getFilters(); + const timeFilter = + queryService.timefilter.timefilter.getTime() && + getTime(undefined, queryService.timefilter.timefilter.getTime(), { + fieldName: timeFieldName, + }); + + return buildEsQuery(undefined, kqlQuery || [], [ + ...(filters ?? []), + ...(timeFilter ? [timeFilter] : []), + ]); +}; + export const getGridAttrs = async ( query: AggregateQuery, adHocDataViews: DataViewSpec[], @@ -38,18 +55,20 @@ export const getGridAttrs = async ( return adHoc.name === indexPattern; }); - const [results, dataView] = await Promise.all([ - getESQLResults({ - esqlQuery: query.esql, - search: deps.data.search.search, - signal: abortController?.signal, - dropNullColumns: true, - timeRange: deps.data.query.timefilter.timefilter.getAbsoluteTime(), - }), - dataViewSpec - ? deps.dataViews.create(dataViewSpec) - : getESQLAdHocDataview(query.esql, deps.dataViews), - ]); + const dataView = dataViewSpec + ? await deps.dataViews.create(dataViewSpec) + : await getESQLAdHocDataview(query.esql, deps.dataViews); + + const filter = getDSLFilter(deps.data.query, dataView.timeFieldName); + + const results = await getESQLResults({ + esqlQuery: query.esql, + search: deps.data.search.search, + signal: abortController?.signal, + filter, + dropNullColumns: true, + timeRange: deps.data.query.timefilter.timefilter.getAbsoluteTime(), + }); const columns = formatESQLColumns(results.response.columns); diff --git a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/create_action_helpers.ts b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/create_action_helpers.ts index 8768bc721480d..96cd0ab6877e3 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/create_action_helpers.ts +++ b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/create_action_helpers.ts @@ -14,6 +14,7 @@ import { getIndexForESQLQuery, ENABLE_ESQL, getESQLQueryColumns, + getInitialESQLQuery, } from '@kbn/esql-utils'; import type { Datasource, Visualization } from '../../types'; import type { LensPluginStartDependencies } from '../../plugin'; @@ -81,10 +82,10 @@ export async function executeCreateAction({ setVisualizationMap(visualizationMap); } - const defaultIndex = dataView.getIndexPattern(); + const esqlQuery = getInitialESQLQuery(dataView); const defaultEsqlQuery = { - esql: `FROM ${defaultIndex} | LIMIT 10`, + esql: esqlQuery, }; // For the suggestions api we need only the columns @@ -93,7 +94,7 @@ export async function executeCreateAction({ // all the table const abortController = new AbortController(); const columns = await getESQLQueryColumns({ - esqlQuery: `from ${defaultIndex}`, + esqlQuery, search: deps.data.search.search, signal: abortController.signal, timeRange: deps.data.query.timefilter.timefilter.getAbsoluteTime(), diff --git a/x-pack/plugins/ml/public/alerting/anomaly_detection_rule/ml_anomaly_alert_trigger.tsx b/x-pack/plugins/ml/public/alerting/anomaly_detection_rule/ml_anomaly_alert_trigger.tsx index d885d04053441..2f36f3f687caf 100644 --- a/x-pack/plugins/ml/public/alerting/anomaly_detection_rule/ml_anomaly_alert_trigger.tsx +++ b/x-pack/plugins/ml/public/alerting/anomaly_detection_rule/ml_anomaly_alert_trigger.tsx @@ -197,6 +197,7 @@ const MlAnomalyAlertTrigger: FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps onChange={useCallback(onAlertParamChange('jobSelection'), [])} errors={Array.isArray(errors.jobSelection) ? errors.jobSelection : []} + shouldUseDropdownJobCreate /> >; + /** + * Flag to indicate whether to use the job creation button in the empty prompt or the dropdown when no jobs are available. + */ + shouldUseDropdownJobCreate?: boolean; } export const JobSelectorControl: FC = ({ @@ -55,6 +60,7 @@ export const JobSelectorControl: FC = ({ allowSelectAll = false, createJobUrl, options: defaultOptions, + shouldUseDropdownJobCreate = false, }) => { const { services: { @@ -66,6 +72,7 @@ export const JobSelectorControl: FC = ({ const isMounted = useMountedState(); const [options, setOptions] = useState>>([]); + const [areJobsLoading, setAreJobsLoading] = useState(false); const jobIds = useMemo(() => new Set(), []); const groupIds = useMemo(() => new Set(), []); @@ -78,6 +85,7 @@ export const JobSelectorControl: FC = ({ ); const fetchOptions = useCallback(async () => { + setAreJobsLoading(true); try { const { jobIds: jobIdOptions, groupIds: groupIdOptions } = await adJobsApiService.getAllJobAndGroupIds(); @@ -147,6 +155,7 @@ export const JobSelectorControl: FC = ({ }), }); } + setAreJobsLoading(false); }, [ adJobsApiService, allowSelectAll, @@ -200,7 +209,9 @@ export const JobSelectorControl: FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [createJobUrl]); - return ( + if (areJobsLoading === true) return ; + + return jobIds.size || shouldUseDropdownJobCreate ? ( = ({ isInvalid={!!errors?.length} /> + ) : ( + + + + } + body={ + navigateToUrl(createJobUrl!)} + disabled={createJobUrl === undefined} + > + + + } + /> ); }; diff --git a/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx b/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx index 9f89e049b937f..4e8d88f8b33ef 100644 --- a/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx +++ b/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx @@ -123,6 +123,7 @@ const AnomalyDetectionJobsHealthRuleTrigger: FC = ({ defaultMessage="Include jobs or groups" /> } + shouldUseDropdownJobCreate /> @@ -148,6 +149,7 @@ const AnomalyDetectionJobsHealthRuleTrigger: FC = ({ /> } options={excludeJobsOptions} + shouldUseDropdownJobCreate /> diff --git a/x-pack/plugins/ml/public/application/components/job_selector/job_selector_flyout.tsx b/x-pack/plugins/ml/public/application/components/job_selector/job_selector_flyout.tsx index 6d4ca53f72d51..b4da44047fd86 100644 --- a/x-pack/plugins/ml/public/application/components/job_selector/job_selector_flyout.tsx +++ b/x-pack/plugins/ml/public/application/components/job_selector/job_selector_flyout.tsx @@ -242,7 +242,9 @@ export const JobSelectorFlyoutContent: FC = ({ )} - {withTimeRangeSelector && applyTimeRangeConfig !== undefined && ( + {withTimeRangeSelector && + applyTimeRangeConfig !== undefined && + jobs.length !== 0 ? ( = ({ data-test-subj="mlFlyoutJobSelectorSwitchApplyTimeRange" /> - )} + ) : null}
@@ -278,19 +280,7 @@ export const JobSelectorFlyoutContent: FC = ({ - - - - {i18n.translate('xpack.ml.jobSelector.applyFlyoutButton', { - defaultMessage: 'Apply', - })} - - + = ({ })} + + {jobs.length !== 0 ? ( + + {i18n.translate('xpack.ml.jobSelector.applyFlyoutButton', { + defaultMessage: 'Apply', + })} + + ) : null} + diff --git a/x-pack/plugins/ml/public/application/components/job_selector/job_selector_table/job_selector_table.js b/x-pack/plugins/ml/public/application/components/job_selector/job_selector_table/job_selector_table.js index 1afed1eaac8ca..b9086c31beded 100644 --- a/x-pack/plugins/ml/public/application/components/job_selector/job_selector_table/job_selector_table.js +++ b/x-pack/plugins/ml/public/application/components/job_selector/job_selector_table/job_selector_table.js @@ -13,12 +13,11 @@ import { TimeRangeBar } from '../timerange_bar'; import { FormattedMessage } from '@kbn/i18n-react'; import { + EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, EuiTabbedContent, - EuiCallOut, EuiButton, - EuiText, LEFT_ALIGNMENT, CENTER_ALIGNMENT, SortableProperties, @@ -265,17 +264,20 @@ export function JobSelectorTable({ {jobs.length === 0 && ( - +

+ +

} - iconType="iInCircle" - > - + body={ - -
+ } + /> )} {jobs.length !== 0 && singleSelection === true && renderJobsTable()} {jobs.length !== 0 && !singleSelection && renderTabs()} diff --git a/x-pack/plugins/ml/public/application/model_management/delete_models_modal.tsx b/x-pack/plugins/ml/public/application/model_management/delete_models_modal.tsx index 1e08ae9874567..2b48ab3fbb14e 100644 --- a/x-pack/plugins/ml/public/application/model_management/delete_models_modal.tsx +++ b/x-pack/plugins/ml/public/application/model_management/delete_models_modal.tsx @@ -49,7 +49,7 @@ export const DeleteModelsModal: FC = ({ models, onClose const modelsWithInferenceAPIs = models.filter((m) => m.hasInferenceServices); const inferenceAPIsIDs: string[] = modelsWithInferenceAPIs.flatMap((model) => { - return (model.inference_apis ?? []).map((inference) => inference.inference_id); + return (model.inference_apis ?? []).map((inference) => inference.model_id); }); const pipelinesCount = modelsWithPipelines.reduce((acc, curr) => { diff --git a/x-pack/plugins/ml/public/application/model_management/force_stop_dialog.tsx b/x-pack/plugins/ml/public/application/model_management/force_stop_dialog.tsx index 26583623c04f3..171143a581194 100644 --- a/x-pack/plugins/ml/public/application/model_management/force_stop_dialog.tsx +++ b/x-pack/plugins/ml/public/application/model_management/force_stop_dialog.tsx @@ -41,7 +41,7 @@ export const StopModelDeploymentsConfirmDialog: FC { if (!model.inference_apis) return true; - return !model.inference_apis.some((inference) => inference.inference_id === deploymentId); + return !model.inference_apis.some((inference) => inference.model_id === deploymentId); }) ); }, [model]); @@ -110,7 +110,7 @@ export const StopModelDeploymentsConfirmDialog: FC(() => { - return (model.inference_apis ?? []).map((inference) => inference.inference_id); + return (model.inference_apis ?? []).map((inference) => inference.model_id); }, [model]); return ( diff --git a/x-pack/plugins/ml/public/application/model_management/inference_api_tab.tsx b/x-pack/plugins/ml/public/application/model_management/inference_api_tab.tsx index dc86c359bb1aa..dba6621a269b5 100644 --- a/x-pack/plugins/ml/public/application/model_management/inference_api_tab.tsx +++ b/x-pack/plugins/ml/public/application/model_management/inference_api_tab.tsx @@ -28,7 +28,7 @@ export const InferenceApi: FC = ({ inferenceApis }) => { {inferenceApis.map((inferenceApi, i) => { const initialIsOpen = i <= 2; - const modelId = inferenceApi.inference_id; + const modelId = inferenceApi.model_id; return ( diff --git a/x-pack/plugins/ml/public/application/model_management/model_actions.tsx b/x-pack/plugins/ml/public/application/model_management/model_actions.tsx index 0bdd994be2b7f..b9f17084bd81f 100644 --- a/x-pack/plugins/ml/public/application/model_management/model_actions.tsx +++ b/x-pack/plugins/ml/public/application/model_management/model_actions.tsx @@ -332,7 +332,7 @@ export function useModelActions({ item.deployment_ids.some( (dId) => Array.isArray(item.inference_apis) && - !item.inference_apis.some((inference) => inference.inference_id === dId) + !item.inference_apis.some((inference) => inference.model_id === dId) )), enabled: (item) => !isLoading, onClick: async (item) => { diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_initializer.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_initializer.tsx index 536084cc01496..93bf3110b3776 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_initializer.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_initializer.tsx @@ -101,57 +101,59 @@ export const AnomalyChartsInitializer: FC = ({ errors={jobIdsErrors} /> - - - } - isInvalid={!isPanelTitleValid} - > - { - titleManuallyChanged.current = true; - setPanelTitle(e.target.value); - }} + {jobIds.length > 0 ? ( + + + } isInvalid={!isPanelTitleValid} - /> - + > + { + titleManuallyChanged.current = true; + setPanelTitle(e.target.value); + }} + isInvalid={!isPanelTitleValid} + /> + - + ) : undefined + } + label={ - ) : undefined - } - label={ - + setMaxSeriesToPlot(parseInt(e.target.value, 10))} + min={1} + max={MAX_ANOMALY_CHARTS_ALLOWED} /> - } - > - setMaxSeriesToPlot(parseInt(e.target.value, 10))} - min={1} - max={MAX_ANOMALY_CHARTS_ALLOWED} - /> - - +
+ + ) : null} diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx index 52c84770da12c..ceb22e0172c8d 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx @@ -157,52 +157,58 @@ export const AnomalySwimlaneInitializer: FC = ( }} errors={jobIdsErrors} /> + {jobIds.length > 0 ? ( + <> + + } + isInvalid={!isPanelTitleValid} + fullWidth + > + { + titleManuallyChanged.current = true; + setPanelTitle(e.target.value); + }} + isInvalid={!isPanelTitleValid} + fullWidth + /> + - - } - isInvalid={!isPanelTitleValid} - fullWidth - > - { - titleManuallyChanged.current = true; - setPanelTitle(e.target.value); - }} - isInvalid={!isPanelTitleValid} - fullWidth - /> - - - - } - fullWidth - > - setSwimlaneType(id as SwimlaneType)} - /> - + + } + fullWidth + > + setSwimlaneType(id as SwimlaneType)} + /> + + + ) : null} {swimlaneType === SWIMLANE_TYPE.VIEW_BY && ( <> diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx index 4e2e338eee8ee..9f21ca3f4af75 100644 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx @@ -150,29 +150,31 @@ export const SingleMetricViewerInitializer: FC - - } - isInvalid={!isPanelTitleValid} - fullWidth - > - { - titleManuallyChanged.current = true; - setPanelTitle(e.target.value); - }} + {job?.job_id && jobId && jobId === job.job_id ? ( + + } isInvalid={!isPanelTitleValid} fullWidth - /> - + > + { + titleManuallyChanged.current = true; + setPanelTitle(e.target.value); + }} + isInvalid={!isPanelTitleValid} + fullWidth + /> + + ) : null} {job?.job_id && jobId && jobId === job.job_id ? ( { { model_id: 'model2' }, ] as TrainedModelConfigResponse[]; - client.asInternalUser.transport.request.mockResolvedValue({ endpoints: inferenceServices }); + client.asInternalUser.transport.request.mockResolvedValue({ models: inferenceServices }); jest.clearAllMocks(); }); @@ -44,7 +44,7 @@ describe('populateInferenceServicesProvider', () => { describe('when the user has required privileges', () => { beforeEach(() => { - client.asCurrentUser.transport.request.mockResolvedValue({ endpoints: inferenceServices }); + client.asCurrentUser.transport.request.mockResolvedValue({ models: inferenceServices }); }); test('should populate inference services for trained models', async () => { diff --git a/x-pack/plugins/ml/server/routes/trained_models.ts b/x-pack/plugins/ml/server/routes/trained_models.ts index a41967704136d..5b2441435268d 100644 --- a/x-pack/plugins/ml/server/routes/trained_models.ts +++ b/x-pack/plugins/ml/server/routes/trained_models.ts @@ -69,16 +69,16 @@ export const populateInferenceServicesProvider = (client: IScopedClusterClient) try { // Check if model is used by an inference service - const { endpoints } = await esClient.transport.request<{ - endpoints: InferenceAPIConfigResponse[]; + const { models } = await esClient.transport.request<{ + models: InferenceAPIConfigResponse[]; }>({ method: 'GET', path: `/_inference/_all`, }); const inferenceAPIMap = groupBy( - endpoints, - (endpoint) => endpoint.service === 'elser' && endpoint.service_settings.model_id + models, + (model) => model.service === 'elser' && model.service_settings.model_id ); for (const model of trainedModels) { diff --git a/x-pack/plugins/observability_solution/apm/common/es_fields/apm.ts b/x-pack/plugins/observability_solution/apm/common/es_fields/apm.ts index 539484fed182e..9ab614df857fe 100644 --- a/x-pack/plugins/observability_solution/apm/common/es_fields/apm.ts +++ b/x-pack/plugins/observability_solution/apm/common/es_fields/apm.ts @@ -4,192 +4,5 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -export const TIMESTAMP = 'timestamp.us'; -export const AGENT = 'agent'; -export const AGENT_NAME = 'agent.name'; -export const AGENT_VERSION = 'agent.version'; -export const AGENT_ACTIVATION_METHOD = 'agent.activation_method'; -export const DESTINATION_ADDRESS = 'destination.address'; - -export const CLOUD = 'cloud'; -export const CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone'; -export const CLOUD_PROVIDER = 'cloud.provider'; -export const CLOUD_REGION = 'cloud.region'; -export const CLOUD_MACHINE_TYPE = 'cloud.machine.type'; -export const CLOUD_ACCOUNT_ID = 'cloud.account.id'; -export const CLOUD_INSTANCE_ID = 'cloud.instance.id'; -export const CLOUD_INSTANCE_NAME = 'cloud.instance.name'; -export const CLOUD_SERVICE_NAME = 'cloud.service.name'; - -export const EVENT_SUCCESS_COUNT = 'event.success_count'; - -export const SERVICE = 'service'; -export const SERVICE_NAME = 'service.name'; -export const SERVICE_ENVIRONMENT = 'service.environment'; -export const SERVICE_FRAMEWORK_NAME = 'service.framework.name'; -export const SERVICE_FRAMEWORK_VERSION = 'service.framework.version'; -export const SERVICE_LANGUAGE_NAME = 'service.language.name'; -export const SERVICE_LANGUAGE_VERSION = 'service.language.version'; -export const SERVICE_RUNTIME_NAME = 'service.runtime.name'; -export const SERVICE_RUNTIME_VERSION = 'service.runtime.version'; -export const SERVICE_NODE_NAME = 'service.node.name'; -export const SERVICE_VERSION = 'service.version'; -export const SERVICE_TARGET_TYPE = 'service.target.type'; -export const SERVICE_OVERFLOW_COUNT = 'service_transaction.aggregation.overflow_count'; - -export const URL_FULL = 'url.full'; -export const HTTP_REQUEST_METHOD = 'http.request.method'; -export const HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code'; -export const USER_ID = 'user.id'; -export const USER_AGENT_ORIGINAL = 'user_agent.original'; -export const USER_AGENT_NAME = 'user_agent.name'; - -export const OBSERVER_HOSTNAME = 'observer.hostname'; -export const OBSERVER_LISTENING = 'observer.listening'; -export const PROCESSOR_EVENT = 'processor.event'; - -export const TRANSACTION_DURATION = 'transaction.duration.us'; -export const TRANSACTION_DURATION_HISTOGRAM = 'transaction.duration.histogram'; -export const TRANSACTION_DURATION_SUMMARY = 'transaction.duration.summary'; -export const TRANSACTION_TYPE = 'transaction.type'; -export const TRANSACTION_RESULT = 'transaction.result'; -export const TRANSACTION_NAME = 'transaction.name'; -export const TRANSACTION_ID = 'transaction.id'; -export const TRANSACTION_SAMPLED = 'transaction.sampled'; -export const TRANSACTION_PAGE_URL = 'transaction.page.url'; -export const TRANSACTION_FAILURE_COUNT = 'transaction.failure_count'; -export const TRANSACTION_SUCCESS_COUNT = 'transaction.success_count'; -export const TRANSACTION_OVERFLOW_COUNT = 'transaction.aggregation.overflow_count'; -// for transaction metrics -export const TRANSACTION_ROOT = 'transaction.root'; -export const TRANSACTION_PROFILER_STACK_TRACE_IDS = 'transaction.profiler_stack_trace_ids'; - -export const EVENT_OUTCOME = 'event.outcome'; - -export const TRACE_ID = 'trace.id'; - -export const SPAN_DURATION = 'span.duration.us'; -export const SPAN_TYPE = 'span.type'; -export const SPAN_SUBTYPE = 'span.subtype'; -export const SPAN_SELF_TIME_SUM = 'span.self_time.sum.us'; -export const SPAN_ACTION = 'span.action'; -export const SPAN_NAME = 'span.name'; -export const SPAN_ID = 'span.id'; -export const SPAN_DESTINATION_SERVICE_RESOURCE = 'span.destination.service.resource'; -export const SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT = - 'span.destination.service.response_time.count'; - -export const SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM = - 'span.destination.service.response_time.sum.us'; - -export const SPAN_LINKS = 'span.links'; -export const SPAN_LINKS_TRACE_ID = 'span.links.trace.id'; -export const SPAN_LINKS_SPAN_ID = 'span.links.span.id'; - -export const SPAN_COMPOSITE_COUNT = 'span.composite.count'; -export const SPAN_COMPOSITE_SUM = 'span.composite.sum.us'; -export const SPAN_COMPOSITE_COMPRESSION_STRATEGY = 'span.composite.compression_strategy'; - -export const SPAN_SYNC = 'span.sync'; - -// Parent ID for a transaction or span -export const PARENT_ID = 'parent.id'; - -export const ERROR_ID = 'error.id'; -export const ERROR_GROUP_ID = 'error.grouping_key'; -export const ERROR_GROUP_NAME = 'error.grouping_name'; -export const ERROR_CULPRIT = 'error.culprit'; -export const ERROR_LOG_LEVEL = 'error.log.level'; -export const ERROR_LOG_MESSAGE = 'error.log.message'; -export const ERROR_EXCEPTION = 'error.exception'; -export const ERROR_EXC_MESSAGE = 'error.exception.message'; // only to be used in es queries, since error.exception is now an array -export const ERROR_EXC_HANDLED = 'error.exception.handled'; // only to be used in es queries, since error.exception is now an array -export const ERROR_EXC_TYPE = 'error.exception.type'; -export const ERROR_PAGE_URL = 'error.page.url'; -export const ERROR_TYPE = 'error.type'; - -// METRICS -export const METRIC_SYSTEM_FREE_MEMORY = 'system.memory.actual.free'; -export const METRIC_SYSTEM_TOTAL_MEMORY = 'system.memory.total'; -export const METRIC_SYSTEM_CPU_PERCENT = 'system.cpu.total.norm.pct'; -export const METRIC_PROCESS_CPU_PERCENT = 'system.process.cpu.total.norm.pct'; -export const METRIC_CGROUP_MEMORY_LIMIT_BYTES = 'system.process.cgroup.memory.mem.limit.bytes'; -export const METRIC_CGROUP_MEMORY_USAGE_BYTES = 'system.process.cgroup.memory.mem.usage.bytes'; - -export const METRIC_JAVA_HEAP_MEMORY_MAX = 'jvm.memory.heap.max'; -export const METRIC_JAVA_HEAP_MEMORY_COMMITTED = 'jvm.memory.heap.committed'; -export const METRIC_JAVA_HEAP_MEMORY_USED = 'jvm.memory.heap.used'; -export const METRIC_JAVA_NON_HEAP_MEMORY_MAX = 'jvm.memory.non_heap.max'; -export const METRIC_JAVA_NON_HEAP_MEMORY_COMMITTED = 'jvm.memory.non_heap.committed'; -export const METRIC_JAVA_NON_HEAP_MEMORY_USED = 'jvm.memory.non_heap.used'; -export const METRIC_JAVA_THREAD_COUNT = 'jvm.thread.count'; -export const METRIC_JAVA_GC_COUNT = 'jvm.gc.count'; -export const METRIC_JAVA_GC_TIME = 'jvm.gc.time'; - -export const METRICSET_NAME = 'metricset.name'; -export const METRICSET_INTERVAL = 'metricset.interval'; - -export const LABEL_NAME = 'labels.name'; -export const LABEL_GC = 'labels.gc'; -export const LABEL_TYPE = 'labels.type'; -export const LABEL_TELEMETRY_AUTO_VERSION = 'labels.telemetry_auto_version'; -export const LABEL_LIFECYCLE_STATE = 'labels.lifecycle_state'; - -export const HOST = 'host'; -export const HOST_HOSTNAME = 'host.hostname'; // Do not use. Please use `HOST_NAME` instead. -export const HOST_NAME = 'host.name'; -export const HOST_OS_PLATFORM = 'host.os.platform'; -export const HOST_ARCHITECTURE = 'host.architecture'; -export const HOST_OS_VERSION = 'host.os.version'; - -export const CONTAINER_ID = 'container.id'; -export const CONTAINER = 'container'; -export const CONTAINER_IMAGE = 'container.image.name'; - -export const KUBERNETES = 'kubernetes'; -export const KUBERNETES_POD_NAME = 'kubernetes.pod.name'; -export const KUBERNETES_POD_UID = 'kubernetes.pod.uid'; - -export const FAAS_ID = 'faas.id'; -export const FAAS_NAME = 'faas.name'; -export const FAAS_COLDSTART = 'faas.coldstart'; -export const FAAS_TRIGGER_TYPE = 'faas.trigger.type'; -export const FAAS_DURATION = 'faas.duration'; -export const FAAS_COLDSTART_DURATION = 'faas.coldstart_duration'; -export const FAAS_BILLED_DURATION = 'faas.billed_duration'; - -// OpenTelemetry Metrics -export const METRIC_OTEL_SYSTEM_CPU_UTILIZATION = 'system.cpu.utilization'; -export const METRIC_OTEL_SYSTEM_MEMORY_UTILIZATION = 'system.memory.utilization'; - -export const METRIC_OTEL_JVM_PROCESS_CPU_PERCENT = 'process.runtime.jvm.cpu.utilization'; -export const METRIC_OTEL_JVM_PROCESS_MEMORY_USAGE = 'process.runtime.jvm.memory.usage'; -export const METRIC_OTEL_JVM_PROCESS_MEMORY_COMMITTED = 'process.runtime.jvm.memory.committed'; -export const METRIC_OTEL_JVM_PROCESS_MEMORY_LIMIT = 'process.runtime.jvm.memory.limit'; -export const METRIC_OTEL_JVM_PROCESS_THREADS_COUNT = 'process.runtime.jvm.threads.count'; -export const METRIC_OTEL_JVM_SYSTEM_CPU_PERCENT = 'process.runtime.jvm.system.cpu.utilization'; -export const METRIC_OTEL_JVM_GC_DURATION = 'process.runtime.jvm.gc.duration'; -export const VALUE_OTEL_JVM_PROCESS_MEMORY_HEAP = 'heap'; -export const VALUE_OTEL_JVM_PROCESS_MEMORY_NON_HEAP = 'non_heap'; - -// Metadata -export const TIER = '_tier'; -export const INDEX = '_index'; -export const DATA_STEAM_TYPE = 'data_stream.type'; - -// Mobile -export const NETWORK_CONNECTION_TYPE = 'network.connection.type'; -export const DEVICE_MODEL_IDENTIFIER = 'device.model.identifier'; -export const SESSION_ID = 'session.id'; -export const APP_LAUNCH_TIME = 'application.launch.time'; -export const EVENT_NAME = 'event.name'; - -// Location -export const CLIENT_GEO_COUNTRY_ISO_CODE = 'client.geo.country_iso_code'; -export const CLIENT_GEO_REGION_ISO_CODE = 'client.geo.region_iso_code'; -export const CLIENT_GEO_COUNTRY_NAME = 'client.geo.country_name'; -export const CLIENT_GEO_CITY_NAME = 'client.geo.city_name'; -export const CLIENT_GEO_REGION_NAME = 'client.geo.region_name'; - -export const CHILD_ID = 'child.id'; +export * from '@kbn/apm-types/es_fields'; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/entities/charts/log_error_rate_chart.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/entities/charts/log_error_rate_chart.tsx index db893e717e099..d734da4fbf80f 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/entities/charts/log_error_rate_chart.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/entities/charts/log_error_rate_chart.tsx @@ -68,7 +68,7 @@ export function LogErrorRateChart({ height }: { height: number }) { type: 'linemark', color: currentPeriodColor, title: i18n.translate('xpack.apm.logs.chart.logsErrorRate', { - defaultMessage: 'Log Error Rate', + defaultMessage: 'Log Error %', }), }, ]; @@ -80,7 +80,7 @@ export function LogErrorRateChart({ height }: { height: number }) {

{i18n.translate('xpack.apm.logErrorRate', { - defaultMessage: 'Log error rate', + defaultMessage: 'Log error %', })}

diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/multi_signal_inventory/table/get_service_columns.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/multi_signal_inventory/table/get_service_columns.tsx index 251bc3771f60c..5d68ed16683a1 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/multi_signal_inventory/table/get_service_columns.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/multi_signal_inventory/table/get_service_columns.tsx @@ -224,7 +224,7 @@ export function getServiceColumns({ name: ( ; - }; - - // Shared by errors and transactions - container?: Container; - host?: Host; - http?: Http; - kubernetes?: Kubernetes; - process?: Process; - service: Service; - url?: Url; - user?: User; -} +export type { ErrorRaw, Log, Exception, Processor } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/event_raw.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/event_raw.ts index 31a1952cdc03d..b0e4f134164bc 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/event_raw.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/event_raw.ts @@ -5,21 +5,4 @@ * 2.0. */ -import { APMBaseDoc } from './apm_base_doc'; -import { TimestampUs } from './fields/timestamp_us'; - -export interface EventRaw extends APMBaseDoc { - timestamp: TimestampUs; - transaction?: { - id: string; - sampled?: boolean; - type: string; - }; - log: { - message?: string; - }; - event: { - action: string; - category: string; - }; -} +export type { EventRaw } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/cloud.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/cloud.ts index bc0c3ea8002ad..b187506ef52d4 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/cloud.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/cloud.ts @@ -5,29 +5,4 @@ * 2.0. */ -export interface Cloud { - availability_zone?: string; - instance?: { - name: string; - id: string; - }; - machine?: { - type: string; - }; - project?: { - id: string; - name: string; - }; - provider?: string; - region?: string; - account?: { - id: string; - name: string; - }; - image?: { - id: string; - }; - service?: { - name: string; - }; -} +export type { Cloud } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/container.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/container.ts index c17517b7c5f2d..fc5f749f46f60 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/container.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/container.ts @@ -5,7 +5,4 @@ * 2.0. */ -export interface Container { - id?: string | null; - image?: string | null; -} +export type { Container } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/event_outcome.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/event_outcome.ts index d0ca41fcba4ed..8ec05dc0274ee 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/event_outcome.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/event_outcome.ts @@ -5,4 +5,4 @@ * 2.0. */ -export type EventOutcome = 'success' | 'failure' | 'unknown'; +export type { EventOutcome } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/faas.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/faas.ts index 1229b8134ac13..1779fc3528132 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/faas.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/faas.ts @@ -5,12 +5,4 @@ * 2.0. */ -export interface Faas { - id: string; - coldstart?: boolean; - execution?: string; - trigger?: { - type?: string; - request_id?: string; - }; -} +export type { Faas } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/host.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/host.ts index 6d1941ff0184c..96cf79ab1d659 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/host.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/host.ts @@ -5,12 +5,4 @@ * 2.0. */ -export interface Host { - architecture?: string; - hostname?: string; - name?: string; - ip?: string; - os?: { - platform?: string; - }; -} +export type { Host } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/http.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/http.ts index 547f117b41326..b2f7ffc6843ef 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/http.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/http.ts @@ -5,8 +5,4 @@ * 2.0. */ -export interface Http { - request?: { method: string; [key: string]: unknown }; - response?: { status_code: number; [key: string]: unknown }; - version?: string; -} +export type { Http } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/kubernetes.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/kubernetes.ts index 5cf0b497dad18..4c7cbf15dd2b2 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/kubernetes.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/kubernetes.ts @@ -5,17 +5,4 @@ * 2.0. */ -export interface Kubernetes { - pod?: { uid?: string | null; [key: string]: unknown }; - namespace?: string; - replicaset?: { - name?: string; - }; - deployment?: { - name?: string; - }; - container?: { - id?: string; - name?: string; - }; -} +export type { Kubernetes } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/observer.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/observer.ts index 81a0bf1e0bfd2..65fab1814a172 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/observer.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/observer.ts @@ -5,12 +5,4 @@ * 2.0. */ -export interface Observer { - ephemeral_id?: string; - hostname?: string; - id?: string; - name?: string; - type?: string; - version: string; - version_major: number; -} +export type { Observer } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/page.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/page.ts index f934435594786..3070d8ab6ec69 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/page.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/page.ts @@ -6,6 +6,4 @@ */ // only for RUM agent: shared by error and transaction -export interface Page { - url: string; -} +export type { Page } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/process.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/process.ts index 10973e3b66a5f..c372c6f3ef959 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/process.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/process.ts @@ -5,9 +5,4 @@ * 2.0. */ -export interface Process { - args?: string[]; - pid: number; - ppid?: number; - title?: string; -} +export type { Process } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/service.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/service.ts index 7158c886e8109..dc7f872117cdc 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/service.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/service.ts @@ -5,23 +5,4 @@ * 2.0. */ -export interface Service { - name: string; - environment?: string; - framework?: { - name: string; - version?: string; - }; - node?: { - name?: string; - }; - runtime?: { - name: string; - version: string; - }; - language?: { - name: string; - version?: string; - }; - version?: string; -} +export type { Service } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/span_links.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/span_links.ts index 5e0028ad58176..05027bfd70bf5 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/span_links.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/span_links.ts @@ -5,7 +5,4 @@ * 2.0. */ -export interface SpanLink { - trace: { id: string }; - span: { id: string }; -} +export type { SpanLink } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/stackframe.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/stackframe.ts index 90d7f20047573..ca357ec00732d 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/stackframe.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/stackframe.ts @@ -5,39 +5,4 @@ * 2.0. */ -interface Line { - column?: number; - number: number; -} - -interface Sourcemap { - error?: string; - updated?: boolean; -} - -interface StackframeBase { - abs_path?: string; - classname?: string; - context?: { - post?: string[]; - pre?: string[]; - }; - exclude_from_grouping?: boolean; - filename?: string; - function?: string; - module?: string; - library_frame?: boolean; - line?: Line; - sourcemap?: Sourcemap; - vars?: { - [key: string]: unknown; - }; -} - -export type StackframeWithLineContext = StackframeBase & { - line: Line & { - context: string; - }; -}; - -export type Stackframe = StackframeBase | StackframeWithLineContext; +export type { StackframeWithLineContext, Stackframe } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/timestamp_us.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/timestamp_us.ts index f6f944b6fe95f..a36b28a35635f 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/timestamp_us.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/timestamp_us.ts @@ -5,6 +5,4 @@ * 2.0. */ -export interface TimestampUs { - us: number; -} +export type { TimestampUs } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/url.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/url.ts index 001d6370e5f06..f30ba85fd474d 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/url.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/url.ts @@ -5,8 +5,4 @@ * 2.0. */ -export interface Url { - domain?: string; - full: string; - original?: string; -} +export type { Url } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/user.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/user.ts index dcb5fa03dcd5a..a727d61d53005 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/user.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/user.ts @@ -5,6 +5,4 @@ * 2.0. */ -export interface User { - id: string; -} +export type { User } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/user_agent.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/user_agent.ts index 884f627353d9b..71eb4bd41e434 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/user_agent.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/fields/user_agent.ts @@ -5,16 +5,4 @@ * 2.0. */ -export interface UserAgent { - device?: { - name: string; - }; - name?: string; - original: string; - os?: { - name: string; - version?: string; - full?: string; - }; - version?: string; -} +export type { UserAgent } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/metric_raw.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/metric_raw.ts index d7d015fd21da5..7bd8dcbe6869c 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/metric_raw.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/metric_raw.ts @@ -5,119 +5,4 @@ * 2.0. */ -import { APMBaseDoc } from './apm_base_doc'; -import { Cloud } from './fields/cloud'; -import { Container } from './fields/container'; -import { Host } from './fields/host'; -import { Kubernetes } from './fields/kubernetes'; -import { Service } from './fields/service'; - -type BaseMetric = APMBaseDoc & { - processor: { - name: 'metric'; - event: 'metric'; - }; - cloud?: Cloud; - container?: Container; - kubernetes?: Kubernetes; - service?: Service; - host?: Host; -}; - -type BaseBreakdownMetric = BaseMetric & { - transaction: { - name: string; - type: string; - }; - span: { - self_time: { - count: number; - sum: { - us: number; - }; - }; - }; -}; - -type TransactionBreakdownMetric = BaseBreakdownMetric & { - transaction: { - duration: { - count: number; - sum: { - us: number; - }; - }; - breakdown: { - count: number; - }; - }; -}; - -type SpanBreakdownMetric = BaseBreakdownMetric & { - span: { - type: string; - subtype?: string; - }; -}; - -type SystemMetric = BaseMetric & { - system: unknown; - service: { - node?: { - name: string; - }; - }; -}; - -type CGroupMetric = SystemMetric; -type JVMMetric = SystemMetric & { - jvm: unknown; -}; - -type TransactionDurationMetric = BaseMetric & { - transaction: { - name: string; - type: string; - result?: string; - duration: { - histogram: { - values: number[]; - counts: number[]; - }; - }; - }; - service: { - name: string; - node?: { - name: string; - }; - environment?: string; - version?: string; - }; -}; - -export type SpanDestinationMetric = BaseMetric & { - span: { - destination: { - service: { - resource: string; - response_time: { - count: number; - sum: { - us: number; - }; - }; - }; - }; - }; -}; - -export type MetricRaw = - | BaseMetric - | TransactionBreakdownMetric - | SpanBreakdownMetric - | TransactionDurationMetric - | SpanDestinationMetric - | SystemMetric - | CGroupMetric - | JVMMetric; +export type { MetricRaw } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/span_raw.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/span_raw.ts index 301a4c96dfa35..42427f9d8623e 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/span_raw.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/span_raw.ts @@ -5,75 +5,4 @@ * 2.0. */ -import { APMBaseDoc } from './apm_base_doc'; -import { EventOutcome } from './fields/event_outcome'; -import { Http } from './fields/http'; -import { SpanLink } from './fields/span_links'; -import { Stackframe } from './fields/stackframe'; -import { TimestampUs } from './fields/timestamp_us'; -import { Url } from './fields/url'; - -interface Processor { - name: 'transaction'; - event: 'span'; -} - -export interface SpanRaw extends APMBaseDoc { - processor: Processor; - trace: { id: string }; // trace is required - event?: { outcome?: EventOutcome }; - service: { - name: string; - environment?: string; - }; - span: { - destination?: { - service: { - resource: string; - }; - }; - action?: string; - duration: { us: number }; - id: string; - name: string; - stacktrace?: Stackframe[]; - subtype?: string; - sync?: boolean; - type: string; - http?: { - url?: { - original?: string; - }; - response: { - status_code: number; - }; - method?: string; - }; - db?: { - statement?: string; - type?: string; - }; - message?: { - queue?: { name: string }; - age?: { ms: number }; - body?: string; - headers?: Record; - }; - composite?: { - count: number; - sum: { us: number }; - compression_strategy: string; - }; - links?: SpanLink[]; - }; - timestamp: TimestampUs; - transaction?: { - id: string; - }; - child?: { id: string[] }; - code?: { - stacktrace?: string; - }; - http?: Http; - url?: Url; -} +export type { SpanRaw } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/transaction_raw.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/transaction_raw.ts index 4046bb9470fb7..adfc536ab06cf 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/transaction_raw.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/raw/transaction_raw.ts @@ -5,74 +5,4 @@ * 2.0. */ -import { APMBaseDoc } from './apm_base_doc'; -import { Cloud } from './fields/cloud'; -import { Container } from './fields/container'; -import { EventOutcome } from './fields/event_outcome'; -import { Host } from './fields/host'; -import { Http } from './fields/http'; -import { Kubernetes } from './fields/kubernetes'; -import { Page } from './fields/page'; -import { Process } from './fields/process'; -import { Service } from './fields/service'; -import { TimestampUs } from './fields/timestamp_us'; -import { Url } from './fields/url'; -import { User } from './fields/user'; -import { UserAgent } from './fields/user_agent'; -import { Faas } from './fields/faas'; -import { SpanLink } from './fields/span_links'; - -interface Processor { - name: 'transaction'; - event: 'transaction'; -} - -export interface TransactionRaw extends APMBaseDoc { - processor: Processor; - timestamp: TimestampUs; - trace: { id: string }; // trace is required - event?: { outcome?: EventOutcome }; - transaction: { - duration: { us: number }; - id: string; - marks?: { - // "agent": not defined by APM Server - only sent by RUM agent - agent?: { - [name: string]: number; - }; - }; - name?: string; - page?: Page; // special property for RUM: shared by error and transaction - result?: string; - sampled: boolean; - span_count?: { - started?: number; - dropped?: number; - }; - type: string; - custom?: Record; - message?: { - queue?: { name: string }; - age?: { ms: number }; - body?: string; - headers?: Record; - }; - }; - - // Shared by errors and transactions - container?: Container; - ecs?: { version?: string }; - host?: Host; - http?: Http; - kubernetes?: Kubernetes; - process?: Process; - service: Service; - url?: Url; - user?: User; - user_agent?: UserAgent; - cloud?: Cloud; - faas?: Faas; - span?: { - links?: SpanLink[]; - }; -} +export type { TransactionRaw } from '@kbn/apm-types/es_schemas_raw'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/apm_error.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/apm_error.ts index 13521d90a84aa..a4c5c7fe0867c 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/apm_error.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/apm_error.ts @@ -5,9 +5,4 @@ * 2.0. */ -import { ErrorRaw } from '../raw/error_raw'; -import { Agent } from './fields/agent'; - -export interface APMError extends ErrorRaw { - agent: Agent; -} +export type { APMError } from '@kbn/apm-types/es_schemas_ui'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/event.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/event.ts index 8d9fccea1c8bf..de726d110914c 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/event.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/event.ts @@ -5,9 +5,4 @@ * 2.0. */ -import { EventRaw } from '../raw/event_raw'; -import { Agent } from './fields/agent'; - -export interface Event extends EventRaw { - agent: Agent; -} +export type { Event } from '@kbn/apm-types/es_schemas_ui'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/fields/agent.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/fields/agent.ts index 67f4a6b2ba10b..b53da484ec747 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/fields/agent.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/fields/agent.ts @@ -5,12 +5,9 @@ * 2.0. */ -import type { AgentName } from '@kbn/elastic-agent-utils'; - -export type { ElasticAgentName, OpenTelemetryAgentName, AgentName } from '@kbn/elastic-agent-utils'; - -export interface Agent { - ephemeral_id?: string; - name: AgentName; - version: string; -} +export type { + Agent, + ElasticAgentName, + OpenTelemetryAgentName, + AgentName, +} from '@kbn/apm-types/es_schemas_ui'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/metric.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/metric.ts index b06a686c23ef7..d2c9833391564 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/metric.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/metric.ts @@ -5,6 +5,4 @@ * 2.0. */ -import { MetricRaw } from '../raw/metric_raw'; - -export type Metric = MetricRaw; +export type { Metric } from '@kbn/apm-types/es_schemas_ui'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/span.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/span.ts index cfee36de51429..92e2fd44eabd8 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/span.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/span.ts @@ -5,9 +5,4 @@ * 2.0. */ -import { SpanRaw } from '../raw/span_raw'; -import { Agent } from './fields/agent'; - -export interface Span extends SpanRaw { - agent: Agent; -} +export type { Span } from '@kbn/apm-types/es_schemas_ui'; diff --git a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/transaction.ts b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/transaction.ts index 2dfbc860ec05a..db8012401f398 100644 --- a/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/transaction.ts +++ b/x-pack/plugins/observability_solution/apm/typings/es_schemas/ui/transaction.ts @@ -5,18 +5,4 @@ * 2.0. */ -import { TransactionRaw } from '../raw/transaction_raw'; -import { Agent } from './fields/agent'; - -// Make `transaction.name` required instead of optional. -// `transaction.name` can be missing in Elasticsearch but the UI will only aggregate on transactions with a name, -// and thus it doesn't make sense to treat it as optional -type InnerTransaction = TransactionRaw['transaction']; -interface InnerTransactionWithName extends InnerTransaction { - name: string; -} - -export interface Transaction extends TransactionRaw { - agent: Agent; - transaction: InnerTransactionWithName; -} +export type { Transaction } from '@kbn/apm-types/es_schemas_ui'; diff --git a/x-pack/plugins/observability_solution/infra/common/formatters/snapshot_metric_formats.ts b/x-pack/plugins/observability_solution/infra/common/formatters/snapshot_metric_formats.ts index 1715a28b1caab..72c68d47e9776 100644 --- a/x-pack/plugins/observability_solution/infra/common/formatters/snapshot_metric_formats.ts +++ b/x-pack/plugins/observability_solution/infra/common/formatters/snapshot_metric_formats.ts @@ -35,6 +35,8 @@ export const METRIC_FORMATTERS: MetricFormatters = { }, ['rx']: { formatter: InfraFormatterType.bits, template: '{{value}}/s' }, ['tx']: { formatter: InfraFormatterType.bits, template: '{{value}}/s' }, + ['rxV2']: { formatter: InfraFormatterType.bits, template: '{{value}}/s' }, + ['txV2']: { formatter: InfraFormatterType.bits, template: '{{value}}/s' }, ['logRate']: { formatter: InfraFormatterType.abbreviatedNumber, template: '{{value}}/s', diff --git a/x-pack/plugins/observability_solution/infra/common/http_api/infra/get_infra_metrics.ts b/x-pack/plugins/observability_solution/infra/common/http_api/infra/get_infra_metrics.ts index 03114642146ff..8cbd09470ee71 100644 --- a/x-pack/plugins/observability_solution/infra/common/http_api/infra/get_infra_metrics.ts +++ b/x-pack/plugins/observability_solution/infra/common/http_api/infra/get_infra_metrics.ts @@ -16,6 +16,8 @@ export const InfraMetricTypeRT = rt.keyof({ memoryFree: null, rx: null, tx: null, + rxV2: null, + txV2: null, }); export const RangeRT = rt.type({ diff --git a/x-pack/plugins/observability_solution/infra/common/inventory_models/intl_strings.ts b/x-pack/plugins/observability_solution/infra/common/inventory_models/intl_strings.ts index 5a90113c9069e..c8e0c4d0d2ae3 100644 --- a/x-pack/plugins/observability_solution/infra/common/inventory_models/intl_strings.ts +++ b/x-pack/plugins/observability_solution/infra/common/inventory_models/intl_strings.ts @@ -6,7 +6,11 @@ */ import { i18n } from '@kbn/i18n'; -import { SnapshotMetricType, SnapshotMetricTypeKeys } from '@kbn/metrics-data-access-plugin/common'; +import { + type InventoryItemType, + type SnapshotMetricType, + SnapshotMetricTypeKeys, +} from '@kbn/metrics-data-access-plugin/common'; import { toMetricOpt } from '../snapshot_metric_i18n'; interface Lookup { @@ -44,10 +48,11 @@ export const fieldToName = (field: string) => { }; const snapshotTypeKeys = Object.keys(SnapshotMetricTypeKeys) as SnapshotMetricType[]; -export const SNAPSHOT_METRIC_TRANSLATIONS = snapshotTypeKeys.reduce((result, metric) => { - const text = toMetricOpt(metric)?.text; - if (text) { - result[metric] = text; - } - return result; -}, {} as Record); +export const getSnapshotMetricTranslations = (nodeType: InventoryItemType) => + snapshotTypeKeys.reduce((result, metric) => { + const text = toMetricOpt(metric, nodeType)?.text; + if (text) { + result[metric] = text; + } + return result; + }, {} as Record); diff --git a/x-pack/plugins/observability_solution/infra/common/snapshot_metric_i18n.ts b/x-pack/plugins/observability_solution/infra/common/snapshot_metric_i18n.ts index 3dc948d7bc82d..0561ea0c3add1 100644 --- a/x-pack/plugins/observability_solution/infra/common/snapshot_metric_i18n.ts +++ b/x-pack/plugins/observability_solution/infra/common/snapshot_metric_i18n.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { mapValues } from 'lodash'; -import { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; // Lowercase versions of all metrics, for when they need to be used in the middle of a sentence; // these may need to be translated differently depending on language, e.g. still capitalizing "CPU" @@ -28,6 +28,14 @@ const TranslationsLowercase = { defaultMessage: 'outbound traffic', }), + InboundTrafficLegacy: i18n.translate('xpack.infra.waffle.metricOptions.inboundTrafficText', { + defaultMessage: 'inbound traffic (Legacy)', + }), + + OutboundTrafficLegacy: i18n.translate('xpack.infra.waffle.metricOptions.outboundTrafficText', { + defaultMessage: 'outbound traffic (Legacy)', + }), + LogRate: i18n.translate('xpack.infra.waffle.metricOptions.hostLogRateText', { defaultMessage: 'log rate', }), @@ -94,8 +102,11 @@ const Translations = mapValues( (translation) => `${translation[0].toUpperCase()}${translation.slice(1)}` ); +const showLegacyLabel = (nodeType?: InventoryItemType) => nodeType === 'host'; + export const toMetricOpt = ( - metric: SnapshotMetricType + metric: SnapshotMetricType, + nodeType?: InventoryItemType ): { text: string; textLC: string; value: SnapshotMetricType } | undefined => { switch (metric) { case 'cpu': @@ -112,15 +123,35 @@ export const toMetricOpt = ( }; case 'rx': return { - text: Translations.InboundTraffic, - textLC: TranslationsLowercase.InboundTraffic, + text: showLegacyLabel(nodeType) + ? Translations.InboundTrafficLegacy + : Translations.InboundTraffic, + textLC: showLegacyLabel(nodeType) + ? TranslationsLowercase.InboundTrafficLegacy + : TranslationsLowercase.InboundTraffic, value: 'rx', }; case 'tx': + return { + text: showLegacyLabel(nodeType) + ? Translations.OutboundTrafficLegacy + : Translations.OutboundTraffic, + textLC: showLegacyLabel(nodeType) + ? TranslationsLowercase.OutboundTrafficLegacy + : TranslationsLowercase.OutboundTraffic, + value: 'tx', + }; + case 'rxV2': + return { + text: Translations.InboundTraffic, + textLC: TranslationsLowercase.InboundTraffic, + value: 'rxV2', + }; + case 'txV2': return { text: Translations.OutboundTraffic, textLC: TranslationsLowercase.OutboundTraffic, - value: 'tx', + value: 'txV2', }; case 'logRate': return { diff --git a/x-pack/plugins/observability_solution/infra/common/source_configuration/source_configuration.ts b/x-pack/plugins/observability_solution/infra/common/source_configuration/source_configuration.ts index 59e5e653ca538..116c30d8274e3 100644 --- a/x-pack/plugins/observability_solution/infra/common/source_configuration/source_configuration.ts +++ b/x-pack/plugins/observability_solution/infra/common/source_configuration/source_configuration.ts @@ -130,15 +130,6 @@ export interface InfraSourceConfiguration /** * Source status */ -const SourceStatusFieldRuntimeType = rt.type({ - name: rt.string, - type: rt.string, - searchable: rt.boolean, - aggregatable: rt.boolean, - displayable: rt.boolean, -}); - -export type InfraSourceIndexField = rt.TypeOf; export const SourceStatusRuntimeType = rt.type({ logIndicesExist: rt.boolean, diff --git a/x-pack/plugins/observability_solution/infra/public/alerting/inventory/components/expression.tsx b/x-pack/plugins/observability_solution/infra/public/alerting/inventory/components/expression.tsx index 18bd2f1d3711f..c8e537621c81b 100644 --- a/x-pack/plugins/observability_solution/infra/public/alerting/inventory/components/expression.tsx +++ b/x-pack/plugins/observability_solution/infra/public/alerting/inventory/components/expression.tsx @@ -577,7 +577,7 @@ export const ExpressionRow: FC> = (props) myMetrics = containerSnapshotMetricTypes; break; } - return myMetrics.map(toMetricOpt); + return myMetrics.map((myMetric) => toMetricOpt(myMetric, props.nodeType)); }, [props.nodeType]); return ( @@ -775,6 +775,8 @@ const metricUnit: Record = { memory: { label: '%' }, rx: { label: 'bits/s' }, tx: { label: 'bits/s' }, + rxV2: { label: 'bits/s' }, + txV2: { label: 'bits/s' }, logRate: { label: '/s' }, diskIOReadBytes: { label: 'bytes/s' }, diskIOWriteBytes: { label: 'bytes/s' }, diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx index 78c5ea3371872..545bc57c65315 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx @@ -113,8 +113,8 @@ export const Timeline: React.FC = ({ interval, yAxisFormatter, isVisible } }, [nodeType, metricsHostsAnomalies, metricsK8sAnomalies]); - const metricLabel = toMetricOpt(metric.type)?.textLC; - const metricPopoverLabel = toMetricOpt(metric.type)?.text; + const metricLabel = toMetricOpt(metric.type, nodeType)?.textLC; + const metricPopoverLabel = toMetricOpt(metric.type, nodeType)?.text; const chartMetric = { color: Color.color0, diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/toolbars/metrics_and_groupby_toolbar_items.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/toolbars/metrics_and_groupby_toolbar_items.tsx index cdfefd037e0c7..81a82bd93f766 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/toolbars/metrics_and_groupby_toolbar_items.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/toolbars/metrics_and_groupby_toolbar_items.tsx @@ -23,8 +23,10 @@ interface Props extends ToolbarProps { export const MetricsAndGroupByToolbarItems = (props: Props) => { const metricOptions = useMemo( () => - props.metricTypes.map(toMetricOpt).filter((v) => v) as Array<{ text: string; value: string }>, - [props.metricTypes] + props.metricTypes + .map((metric) => toMetricOpt(metric, props.nodeType)) + .filter((v) => v) as Array<{ text: string; value: string }>, + [props.metricTypes, props.nodeType] ); const groupByOptions = useMemo( diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx index 8ad60dad6a33c..439999d5b143f 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx @@ -47,8 +47,8 @@ describe('ConditionalToolTip', () => { metrics: [ { name: 'cpu', value: 0.1, avg: 0.4, max: 0.7 }, { name: 'memory', value: 0.8, avg: 0.8, max: 1 }, - { name: 'tx', value: 1000000, avg: 1000000, max: 1000000 }, - { name: 'rx', value: 1000000, avg: 1000000, max: 1000000 }, + { name: 'txV2', value: 1000000, avg: 1000000, max: 1000000 }, + { name: 'rxV2', value: 1000000, avg: 1000000, max: 1000000 }, { name: 'cedd6ca0-5775-11eb-a86f-adb714b6c486', max: 0.34164999922116596, @@ -80,8 +80,8 @@ describe('ConditionalToolTip', () => { const expectedMetrics = [ { type: 'cpu' }, { type: 'memory' }, - { type: 'tx' }, - { type: 'rx' }, + { type: 'txV2' }, + { type: 'rxV2' }, { aggregation: 'avg', field: 'host.cpu.pct', diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx index 0140dd54e77b2..0558dd6ad67ee 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx @@ -20,7 +20,7 @@ import { useSourceContext } from '../../../../../containers/metrics_source'; import { InfraWaffleMapNode } from '../../../../../common/inventory/types'; import { useSnapshot } from '../../hooks/use_snaphot'; import { createInventoryMetricFormatter } from '../../lib/create_inventory_metric_formatter'; -import { SNAPSHOT_METRIC_TRANSLATIONS } from '../../../../../../common/inventory_models/intl_strings'; +import { getSnapshotMetricTranslations } from '../../../../../../common/inventory_models/intl_strings'; import { useWaffleOptionsContext } from '../../hooks/use_waffle_options'; import { createFormatterForMetric } from '../../../metrics_explorer/components/helpers/create_formatter_for_metric'; @@ -86,7 +86,7 @@ export const ConditionalToolTip = ({ node, nodeType, currentTime }: Props) => { ) : ( metrics.map((metric) => { const metricName = SnapshotMetricTypeRT.is(metric.name) ? metric.name : 'custom'; - const name = SNAPSHOT_METRIC_TRANSLATIONS[metricName] || metricName; + const name = getSnapshotMetricTranslations(nodeType)[metricName] || metricName; // if custom metric, find field and label from waffleOptionsContext result // because useSnapshot does not return it const customMetric = diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/create_inventory_metric_formatter.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/create_inventory_metric_formatter.ts index 934d17a570080..056109587d36d 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/create_inventory_metric_formatter.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/create_inventory_metric_formatter.ts @@ -65,6 +65,8 @@ const METRIC_FORMATTERS: MetricFormatters = { }, rx: { formatter: InfraFormatterType.bits, template: '{{value}}/s' }, tx: { formatter: InfraFormatterType.bits, template: '{{value}}/s' }, + rxV2: { formatter: InfraFormatterType.bits, template: '{{value}}/s' }, + txV2: { formatter: InfraFormatterType.bits, template: '{{value}}/s' }, logRate: { formatter: InfraFormatterType.abbreviatedNumber, template: '{{value}}/s', diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/metric_detail/components/time_controls.test.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/metric_detail/components/time_controls.test.tsx index 959ded8e0cdbf..70dc780efe590 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/metric_detail/components/time_controls.test.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/metric_detail/components/time_controls.test.tsx @@ -44,10 +44,13 @@ describe('MetricsTimeControls', () => { /> ); component - .find('[data-test-subj="superDatePickerToggleQuickMenuButton"]') + .find('button[data-test-subj="superDatePickerToggleQuickMenuButton"]') .first() .simulate('click'); - component.find('[data-test-subj="superDatePickerCommonlyUsed_Today"]').last().simulate('click'); + component + .find('button[data-test-subj="superDatePickerCommonlyUsed_Today"]') + .last() + .simulate('click'); expect(handleTimeChange.mock.calls.length).toBe(1); const timeRangeInput = handleTimeChange.mock.calls[0][0]; expect(timeRangeInput.from).toBe('now/d'); diff --git a/x-pack/plugins/observability_solution/infra/server/lib/adapters/fields/adapter_types.ts b/x-pack/plugins/observability_solution/infra/server/lib/adapters/fields/adapter_types.ts deleted file mode 100644 index 60b95acf29e02..0000000000000 --- a/x-pack/plugins/observability_solution/infra/server/lib/adapters/fields/adapter_types.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { InfraPluginRequestHandlerContext } from '../../../types'; - -export interface FieldsAdapter { - getIndexFields( - requestContext: InfraPluginRequestHandlerContext, - indices: string - ): Promise; -} - -export interface IndexFieldDescriptor { - name: string; - type: string; - searchable: boolean; - aggregatable: boolean; - displayable: boolean; -} diff --git a/x-pack/plugins/observability_solution/infra/server/lib/adapters/fields/framework_fields_adapter.ts b/x-pack/plugins/observability_solution/infra/server/lib/adapters/fields/framework_fields_adapter.ts deleted file mode 100644 index 45bb8dc0957d9..0000000000000 --- a/x-pack/plugins/observability_solution/infra/server/lib/adapters/fields/framework_fields_adapter.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { FieldSpec } from '@kbn/data-views-plugin/common'; -import type { InfraPluginRequestHandlerContext } from '../../../types'; -import { isNoSuchRemoteClusterMessage, NoSuchRemoteClusterError } from '../../sources/errors'; -import { KibanaFramework } from '../framework/kibana_framework_adapter'; -import { FieldsAdapter, IndexFieldDescriptor } from './adapter_types'; - -export class FrameworkFieldsAdapter implements FieldsAdapter { - private framework: KibanaFramework; - - constructor(framework: KibanaFramework) { - this.framework = framework; - } - - public async getIndexFields( - requestContext: InfraPluginRequestHandlerContext, - indices: string - ): Promise { - const indexPatternsService = await this.framework.getIndexPatternsServiceWithRequestContext( - requestContext - ); - - try { - // NOTE: Unfortunately getFieldsForWildcard is typed to "any" here in the data plugin, FieldSpec is used below in the map. - const response = await indexPatternsService.getFieldsForWildcard({ - pattern: indices, - allowNoIndex: true, - }); - - return response.map((field: FieldSpec) => ({ - ...field, - displayable: true, - })); - } catch (error) { - if (isNoSuchRemoteClusterMessage(error.message)) { - throw new NoSuchRemoteClusterError(); - } - throw error; - } - } -} diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts index 94879de3f8070..e6ed1750eea3a 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts @@ -22,7 +22,7 @@ import { } from '@kbn/alerting-plugin/common'; import { AlertsClientError, RuleExecutorOptions, RuleTypeState } from '@kbn/alerting-plugin/server'; import { convertToBuiltInComparators, getAlertUrl } from '@kbn/observability-plugin/common'; -import { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { ObservabilityMetricsAlert } from '@kbn/alerts-as-data-utils'; import { getOriginalActionGroup } from '../../../utils/get_original_action_group'; import { @@ -226,12 +226,13 @@ export const createInventoryMetricThresholdExecutor = if (nextState === AlertStates.ALERT || nextState === AlertStates.WARNING) { reason = results .map((result) => - buildReasonWithVerboseMetricName( + buildReasonWithVerboseMetricName({ group, - result[group], - buildFiredAlertReason, - nextState === AlertStates.WARNING - ) + resultItem: result[group], + buildReason: buildFiredAlertReason, + useWarningThreshold: nextState === AlertStates.WARNING, + nodeType, + }) ) .join('\n'); } @@ -240,14 +241,24 @@ export const createInventoryMetricThresholdExecutor = reason = results .filter((result) => result[group].isNoData) .map((result) => - buildReasonWithVerboseMetricName(group, result[group], buildNoDataAlertReason) + buildReasonWithVerboseMetricName({ + group, + resultItem: result[group], + buildReason: buildNoDataAlertReason, + nodeType, + }) ) .join('\n'); } else if (nextState === AlertStates.ERROR) { reason = results .filter((result) => result[group].isError) .map((result) => - buildReasonWithVerboseMetricName(group, result[group], buildErrorAlertReason) + buildReasonWithVerboseMetricName({ + group, + resultItem: result[group], + buildReason: buildErrorAlertReason, + nodeType, + }) ) .join('\n'); } @@ -384,12 +395,19 @@ const formatThreshold = (metric: SnapshotMetricType, value: number | number[]) = return threshold; }; -const buildReasonWithVerboseMetricName = ( - group: string, - resultItem: ConditionResult, - buildReason: (r: any) => string, - useWarningThreshold?: boolean -) => { +const buildReasonWithVerboseMetricName = ({ + group, + resultItem, + buildReason, + useWarningThreshold, + nodeType, +}: { + group: string; + resultItem: ConditionResult; + buildReason: (r: any) => string; + useWarningThreshold?: boolean; + nodeType?: InventoryItemType; +}) => { if (!resultItem) return ''; const thresholdToFormat = useWarningThreshold @@ -399,7 +417,7 @@ const buildReasonWithVerboseMetricName = ( ...resultItem, group, metric: - toMetricOpt(resultItem.metric)?.text || + toMetricOpt(resultItem.metric, nodeType)?.text || (resultItem.metric === 'custom' && resultItem.customMetric ? getCustomMetricLabel(resultItem.customMetric) : resultItem.metric), diff --git a/x-pack/plugins/observability_solution/infra/server/lib/domains/fields_domain.ts b/x-pack/plugins/observability_solution/infra/server/lib/domains/fields_domain.ts deleted file mode 100644 index b80fa9d796021..0000000000000 --- a/x-pack/plugins/observability_solution/infra/server/lib/domains/fields_domain.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { InfraPluginRequestHandlerContext } from '../../types'; -import { FieldsAdapter } from '../adapters/fields'; -import { InfraSourceIndexField, InfraSources } from '../sources'; - -export class InfraFieldsDomain { - constructor( - private readonly adapter: FieldsAdapter, - private readonly libs: { sources: InfraSources } - ) {} - - public async getFields( - requestContext: InfraPluginRequestHandlerContext, - sourceId: string, - indexType: 'METRICS' - ): Promise { - const soClient = (await requestContext.core).savedObjects.client; - const { configuration } = await this.libs.sources.getSourceConfiguration(soClient, sourceId); - - const fields = await this.adapter.getIndexFields(requestContext, configuration.metricAlias); - - return fields; - } -} diff --git a/x-pack/plugins/observability_solution/infra/server/lib/infra_types.ts b/x-pack/plugins/observability_solution/infra/server/lib/infra_types.ts index 8cf0fc81a7321..08cf030a16219 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/infra_types.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/infra_types.ts @@ -18,13 +18,11 @@ import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { RulesServiceSetup } from '../services/rules'; import { InfraConfig, InfraPluginStartServicesAccessor } from '../types'; import { KibanaFramework } from './adapters/framework/kibana_framework_adapter'; -import { InfraFieldsDomain } from './domains/fields_domain'; import { InfraMetricsDomain } from './domains/metrics_domain'; import { InfraSources } from './sources'; import { InfraSourceStatus } from './source_status'; export interface InfraDomainLibs { - fields: InfraFieldsDomain; logEntries: ILogsSharedLogEntriesDomain; metrics: InfraMetricsDomain; } diff --git a/x-pack/plugins/observability_solution/infra/server/plugin.ts b/x-pack/plugins/observability_solution/infra/server/plugin.ts index 0182d34b76866..61f53b4b9260d 100644 --- a/x-pack/plugins/observability_solution/infra/server/plugin.ts +++ b/x-pack/plugins/observability_solution/infra/server/plugin.ts @@ -23,7 +23,6 @@ import { LOGS_FEATURE_ID, METRICS_FEATURE_ID } from '../common/constants'; import { publicConfigKeys } from '../common/plugin_config_types'; import { LOGS_FEATURE, METRICS_FEATURE } from './features'; import { initInfraServer } from './infra_server'; -import { FrameworkFieldsAdapter } from './lib/adapters/fields/framework_fields_adapter'; import { InfraServerPluginSetupDeps, InfraServerPluginStartDeps } from './lib/adapters/framework'; import { KibanaFramework } from './lib/adapters/framework/kibana_framework_adapter'; import { KibanaMetricsAdapter } from './lib/adapters/metrics/kibana_metrics_adapter'; @@ -33,7 +32,6 @@ import { LOGS_RULES_ALERT_CONTEXT, METRICS_RULES_ALERT_CONTEXT, } from './lib/alerting/register_rule_types'; -import { InfraFieldsDomain } from './lib/domains/fields_domain'; import { InfraMetricsDomain } from './lib/domains/metrics_domain'; import { InfraBackendLibs, InfraDomainLibs } from './lib/infra_types'; import { infraSourceConfigurationSavedObjectType, InfraSources } from './lib/sources'; @@ -210,9 +208,6 @@ export class InfraServerPlugin // and make them available via the request context so we can do away with // the wrapper classes const domainLibs: InfraDomainLibs = { - fields: new InfraFieldsDomain(new FrameworkFieldsAdapter(framework), { - sources, - }), logEntries: plugins.logsShared.logEntries, metrics: new InfraMetricsDomain(new KibanaMetricsAdapter(framework)), }; diff --git a/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts b/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts index 945e0d684ab5e..3540dac3d311c 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts @@ -24,7 +24,7 @@ import { MetricsSourceStatus, partialMetricsSourceConfigurationReqPayloadRT, } from '../../../common/metrics_sources'; -import { InfraSource, InfraSourceIndexField } from '../../lib/sources'; +import { InfraSource } from '../../lib/sources'; import { InfraPluginRequestHandlerContext } from '../../types'; import { getInfraMetricsClient } from '../../lib/helpers/get_infra_metrics_client'; @@ -42,36 +42,24 @@ export const initMetricsSourceConfigurationRoutes = (libs: InfraBackendLibs) => requestContext: InfraPluginRequestHandlerContext, sourceId: string ): Promise => { - const [metricIndicesExistSettled, indexFieldsSettled] = await Promise.allSettled([ - libs.sourceStatus.hasMetricIndices(requestContext, sourceId), - libs.fields.getFields(requestContext, sourceId, 'METRICS'), - ]); - - /** - * Extract values from promises settlements - */ - const metricIndicesExist = isFulfilled(metricIndicesExistSettled) - ? metricIndicesExistSettled.value - : defaultStatus.metricIndicesExist; - const remoteClustersExist = hasRemoteCluster( - indexFieldsSettled, - metricIndicesExistSettled - ); - - /** - * Report gracefully handled rejections - */ - if (!isFulfilled(indexFieldsSettled)) { - logger.error(indexFieldsSettled.reason); - } - if (!isFulfilled(metricIndicesExistSettled)) { - logger.error(metricIndicesExistSettled.reason); - } + try { + const hasMetricIndices = await libs.sourceStatus.hasMetricIndices(requestContext, sourceId); + return { + metricIndicesExist: hasMetricIndices, + remoteClustersExist: true, + }; + } catch (err) { + logger.error(err); + + if (err instanceof NoSuchRemoteClusterError) { + return defaultStatus; + } - return { - metricIndicesExist, - remoteClustersExist, - }; + return { + metricIndicesExist: false, + remoteClustersExist: true, + }; + } }; framework.registerRoute( @@ -283,12 +271,3 @@ export const initMetricsSourceConfigurationRoutes = (libs: InfraBackendLibs) => const isFulfilled = ( promiseSettlement: PromiseSettledResult ): promiseSettlement is PromiseFulfilledResult => promiseSettlement.status === 'fulfilled'; - -const hasRemoteCluster = (...promiseSettlements: Array>) => { - const isRemoteMissing = promiseSettlements.some( - (settlement) => - !isFulfilled(settlement) && settlement.reason instanceof NoSuchRemoteClusterError - ); - - return !isRemoteMissing; -}; diff --git a/x-pack/plugins/observability_solution/logs_shared/public/components/logging/log_text_stream/column_headers.tsx b/x-pack/plugins/observability_solution/logs_shared/public/components/logging/log_text_stream/column_headers.tsx index 88161e794c37e..e1478123ab29b 100644 --- a/x-pack/plugins/observability_solution/logs_shared/public/components/logging/log_text_stream/column_headers.tsx +++ b/x-pack/plugins/observability_solution/logs_shared/public/components/logging/log_text_stream/column_headers.tsx @@ -108,14 +108,12 @@ export const LogColumnHeader: FC< 'data-test-subj'?: string; }> > = ({ children, columnWidth, 'data-test-subj': dataTestSubj }) => ( - + {children} ); -const LogColumnHeaderWrapper = euiStyled(LogEntryColumn).attrs((props) => ({ - role: props.role ?? 'columnheader', -}))` +const LogColumnHeaderWrapper = euiStyled(LogEntryColumn)` align-items: center; display: flex; flex-direction: row; diff --git a/x-pack/plugins/observability_solution/logs_shared/public/components/logging/log_text_stream/log_entry_column.tsx b/x-pack/plugins/observability_solution/logs_shared/public/components/logging/log_text_stream/log_entry_column.tsx index a62f08903764a..fb7560a4e93b8 100644 --- a/x-pack/plugins/observability_solution/logs_shared/public/components/logging/log_text_stream/log_entry_column.tsx +++ b/x-pack/plugins/observability_solution/logs_shared/public/components/logging/log_text_stream/log_entry_column.tsx @@ -30,8 +30,8 @@ export interface LogEntryColumnProps { shrinkWeight: number; } -export const LogEntryColumn = euiStyled.div.attrs(() => ({ - role: 'cell', +export const LogEntryColumn = euiStyled.div.attrs((props) => ({ + role: props.role ?? 'cell', }))` align-items: stretch; display: flex; diff --git a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/index.ts b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/index.ts index e1d4f60bc9f74..42e8a0b81e6c8 100644 --- a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/index.ts +++ b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/index.ts @@ -54,5 +54,5 @@ export const host: InventoryModel = { ...awsRequiredMetrics, ...nginxRequireMetrics, ], - tooltipMetrics: ['cpu', 'memory', 'tx', 'rx'], + tooltipMetrics: ['cpu', 'memory', 'txV2', 'rxV2'], }; diff --git a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/formulas/network.ts b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/formulas/network.ts index d35beeb7469d0..9c45b276f3af9 100644 --- a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/formulas/network.ts +++ b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/formulas/network.ts @@ -12,20 +12,16 @@ export const rx: LensBaseLayer = { label: i18n.translate('xpack.metricsData.assetDetails.formulas.rx', { defaultMessage: 'Network Inbound (RX)', }), - value: - "average(host.network.ingress.bytes) * 8 / (max(metricset.period, kql='host.network.ingress.bytes: *') / 1000)", + value: 'sum(host.network.ingress.bytes) * 8', format: 'bits', decimals: 1, - normalizeByUnit: 's', }; export const tx: LensBaseLayer = { label: i18n.translate('xpack.metricsData.assetDetails.formulas.tx', { defaultMessage: 'Network Outbound (TX)', }), - value: - "average(host.network.egress.bytes) * 8 / (max(metricset.period, kql='host.network.egress.bytes: *') / 1000)", + value: 'sum(host.network.egress.bytes) * 8', format: 'bits', decimals: 1, - normalizeByUnit: 's', }; diff --git a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/index.ts b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/index.ts index 8cf567b40165e..e6f1cf6ac1912 100644 --- a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/index.ts +++ b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/index.ts @@ -17,6 +17,8 @@ import { memoryTotal } from './memory_total'; import { normalizedLoad1m } from './normalized_load_1m'; import { rx } from './rx'; import { tx } from './tx'; +import { txV2 } from './tx_v2'; +import { rxV2 } from './rx_v2'; export const snapshot = { cpu, @@ -31,4 +33,6 @@ export const snapshot = { normalizedLoad1m, rx, tx, + rxV2, + txV2, }; diff --git a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx_v2.ts b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx_v2.ts new file mode 100644 index 0000000000000..3f8466010a518 --- /dev/null +++ b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx_v2.ts @@ -0,0 +1,39 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { MetricsUIAggregation } from '../../../types'; +export const rxV2: MetricsUIAggregation = { + rx_sum: { + sum: { + field: 'host.network.ingress.bytes', + }, + }, + min_timestamp: { + min: { + field: '@timestamp', + }, + }, + max_timestamp: { + max: { + field: '@timestamp', + }, + }, + rxV2: { + bucket_script: { + buckets_path: { + value: 'rx_sum', + minTime: 'min_timestamp', + maxTime: 'max_timestamp', + }, + script: { + source: 'params.value / ((params.maxTime - params.minTime) / 1000)', + lang: 'painless', + }, + gap_policy: 'skip', + }, + }, +}; diff --git a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx_v2.ts b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx_v2.ts new file mode 100644 index 0000000000000..100bd3d0bf306 --- /dev/null +++ b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx_v2.ts @@ -0,0 +1,39 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { MetricsUIAggregation } from '../../../types'; +export const txV2: MetricsUIAggregation = { + tx_sum: { + sum: { + field: 'host.network.egress.bytes', + }, + }, + min_timestamp: { + min: { + field: '@timestamp', + }, + }, + max_timestamp: { + max: { + field: '@timestamp', + }, + }, + txV2: { + bucket_script: { + buckets_path: { + value: 'tx_sum', + minTime: 'min_timestamp', + maxTime: 'max_timestamp', + }, + script: { + source: 'params.value / ((params.maxTime - params.minTime) / 1000)', + lang: 'painless', + }, + gap_policy: 'skip', + }, + }, +}; diff --git a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/types.ts b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/types.ts index 4967324be21fc..c9accaca490f6 100644 --- a/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/types.ts +++ b/x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/types.ts @@ -358,6 +358,8 @@ export const SnapshotMetricTypeKeys = { normalizedLoad1m: null, tx: null, rx: null, + txV2: null, + rxV2: null, logRate: null, diskIOReadBytes: null, diskIOWriteBytes: null, @@ -385,7 +387,7 @@ export interface InventoryMetrics { tsvb: { [name: string]: TSVBMetricModelCreator }; snapshot: { [name: string]: MetricsUIAggregation | undefined }; defaultSnapshot: SnapshotMetricType; - /** This is used by the inventory view to calculate the appropriate amount of time for the metrics detail page. Some metris like awsS3 require multiple days where others like host only need an hour.*/ + /** This is used by the inventory view to calculate the appropriate amount of time for the metrics detail page. Some metrics like awsS3 require multiple days where others like host only need an hour.*/ defaultTimeRangeInSeconds: number; } diff --git a/x-pack/plugins/observability_solution/slo/public/components/slo/simple_burn_rate/burn_rate.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/simple_burn_rate/burn_rate.tsx new file mode 100644 index 0000000000000..4a9fc50ed9370 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/simple_burn_rate/burn_rate.tsx @@ -0,0 +1,101 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiIcon, EuiLoadingChart, EuiStat, EuiTextColor, EuiToolTip } from '@elastic/eui'; +import numeral from '@elastic/numeral'; +import { i18n } from '@kbn/i18n'; +import { SLOWithSummaryResponse } from '@kbn/slo-schema'; +import moment from 'moment'; +import React from 'react'; +import { useFetchSloBurnRates } from '../../../hooks/use_fetch_slo_burn_rates'; +import { toDuration, toMinutes } from '../../../utils/slo/duration'; + +interface Props { + slo: SLOWithSummaryResponse; + duration: string; + lastRefreshTime?: number; +} + +export function SimpleBurnRate({ slo, duration, lastRefreshTime }: Props) { + const [refreshTime, setRefreshTime] = React.useState(lastRefreshTime); + const { isLoading, data, refetch } = useFetchSloBurnRates({ + slo, + windows: [{ name: 'burn_rate', duration }], + }); + + React.useEffect(() => { + if (lastRefreshTime !== refreshTime) { + setRefreshTime(lastRefreshTime); + refetch(); + } + }, [refreshTime, lastRefreshTime, refetch]); + + const durationLabel = i18n.translate('xpack.slo.burnRate.durationLabel', { + defaultMessage: 'Last {duration}', + values: { duration }, + }); + + if (isLoading || data === undefined) { + return ( + } + textAlign="left" + isLoading={isLoading} + titleColor={'subdued'} + description={ + + + {durationLabel} + + + } + /> + ); + } + + const burnRate = data.burnRates[0]; + const color = burnRate.burnRate > 1 ? 'danger' : 'success'; + const timeToExhaustLabel = i18n.translate('xpack.slo.burnRate.exhaustionTimeLabel', { + defaultMessage: 'At this rate, the entire error budget will be exhausted in {hour} hours.', + values: { + hour: numeral( + moment + .duration(toMinutes(toDuration(slo.timeWindow.duration)) / burnRate.burnRate, 'minutes') + .asHours() + ).format('0'), + }, + }); + + return ( + 1 ? ( + + + + {durationLabel} + + + + ) : ( + + + {durationLabel} + + + ) + } + /> + ); +} diff --git a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_selector.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_selector.tsx index 2a46e9404e52d..9835335e5e29f 100644 --- a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_selector.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_selector.tsx @@ -29,6 +29,7 @@ export function SloSelector({ initialSlos, onSelected, hasError, singleSelection label: slo.instanceId !== ALL_VALUE ? `${slo.name} (${slo.instanceId})` : slo.name, value: `${slo.id}-${slo.instanceId}`, })) ?? []; + const [options, setOptions] = useState>>([]); const [selectedOptions, setSelectedOptions] = useState>>( mapSlosToOptions(initialSlos) diff --git a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/burn_rate.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/burn_rate.tsx new file mode 100644 index 0000000000000..bb92363359112 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/burn_rate.tsx @@ -0,0 +1,152 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiLink, EuiLoadingChart } from '@elastic/eui'; +import { css } from '@emotion/css'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { SLOWithSummaryResponse } from '@kbn/slo-schema'; +import React, { useEffect, useRef, useState } from 'react'; +import { SimpleBurnRate } from '../../../components/slo/simple_burn_rate/burn_rate'; +import { useFetchSloDetails } from '../../../hooks/use_fetch_slo_details'; +import { SloOverviewDetails } from '../common/slo_overview_details'; +import { EmbeddableProps } from './types'; + +export function BurnRate({ sloId, sloInstanceId, duration, reloadSubject }: EmbeddableProps) { + const containerRef = useRef(null); + const [lastRefreshTime, setLastRefreshTime] = useState(undefined); + const [selectedSlo, setSelectedSlo] = useState(null); + const [showAllGroups, setShowAllGroups] = useState(false); + + const { isLoading, data: slo } = useFetchSloDetails({ + sloId, + instanceId: sloInstanceId, + }); + + useEffect(() => { + reloadSubject?.subscribe(() => { + setLastRefreshTime(Date.now()); + }); + + return () => { + reloadSubject?.unsubscribe(); + }; + }, [reloadSubject]); + + const isSloNotFound = !isLoading && slo === undefined; + + if (isLoading || !slo) { + return ( + + + + + + ); + } + + if (isSloNotFound) { + return ( + + + {i18n.translate('xpack.slo.sloEmbeddable.overview.sloNotFoundText', { + defaultMessage: + 'The SLO has been deleted. You can safely delete the widget from the dashboard.', + })} + + + ); + } + + const hasGroupings = Object.keys(slo.groupings).length > 0; + const firstGrouping = hasGroupings ? Object.entries(slo.groupings)[0] : undefined; + const firstGroupLabel = firstGrouping ? `${firstGrouping[0]}: ${firstGrouping[1]}` : null; + const hasMoreThanOneGrouping = Object.keys(slo.groupings).length > 1; + + return ( +
+ + + + { + setSelectedSlo(slo); + }} + > +

{slo.name}

+
+
+ {hasGroupings && ( + + + {firstGroupLabel} + + + {hasMoreThanOneGrouping && !showAllGroups ? ( + + setShowAllGroups(true)} + onClickAriaLabel={i18n.translate( + 'xpack.slo.burnRateEmbeddable.moreInstanceAriaLabel', + { defaultMessage: 'Show more' } + )} + > + + + + ) : null} + + {hasMoreThanOneGrouping && showAllGroups + ? Object.entries(slo.groupings) + .splice(1) + .map(([key, value]) => ( + + + {key}: {value} + + + )) + : null} + + )} +
+ + + + +
+ + +
+ ); +} + +const container = css` + height: 100%; +`; + +const link = css` + font-size: 16px; + font-weight: 700; +`; diff --git a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/burn_rate_react_embeddable_factory.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/burn_rate_react_embeddable_factory.tsx new file mode 100644 index 0000000000000..d0370877b511e --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/burn_rate_react_embeddable_factory.tsx @@ -0,0 +1,116 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { i18n } from '@kbn/i18n'; +import React, { useEffect } from 'react'; +import { Router } from '@kbn/shared-ux-router'; +import { createBrowserHistory } from 'history'; +import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import { + initializeTitles, + useBatchedPublishingSubjects, + fetch$, +} from '@kbn/presentation-publishing'; +import { BehaviorSubject, Subject } from 'rxjs'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { SLO_BURN_RATE_EMBEDDABLE_ID } from './constants'; +import { SloBurnRateEmbeddableState, SloEmbeddableDeps, BurnRateApi } from './types'; +import { BurnRate } from './burn_rate'; + +export const getTitle = () => + i18n.translate('xpack.slo.burnRateEmbeddable.title', { + defaultMessage: 'SLO Burn Rate', + }); + +const queryClient = new QueryClient(); + +export const getBurnRateEmbeddableFactory = (deps: SloEmbeddableDeps) => { + const factory: ReactEmbeddableFactory< + SloBurnRateEmbeddableState, + SloBurnRateEmbeddableState, + BurnRateApi + > = { + type: SLO_BURN_RATE_EMBEDDABLE_ID, + deserializeState: (state) => { + return state.rawState as SloBurnRateEmbeddableState; + }, + buildEmbeddable: async (state, buildApi, uuid, parentApi) => { + const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state); + const defaultTitle$ = new BehaviorSubject(getTitle()); + const sloId$ = new BehaviorSubject(state.sloId); + const sloInstanceId$ = new BehaviorSubject(state.sloInstanceId); + const duration$ = new BehaviorSubject(state.duration); + const reload$ = new Subject(); + + const api = buildApi( + { + ...titlesApi, + defaultPanelTitle: defaultTitle$, + serializeState: () => { + return { + rawState: { + ...serializeTitles(), + sloId: sloId$.getValue(), + sloInstanceId: sloInstanceId$.getValue(), + duration: duration$.getValue(), + }, + }; + }, + }, + { + sloId: [sloId$, (value) => sloId$.next(value)], + sloInstanceId: [sloInstanceId$, (value) => sloInstanceId$.next(value)], + duration: [duration$, (value) => duration$.next(value)], + ...titleComparators, + } + ); + + const fetchSubscription = fetch$(api) + .pipe() + .subscribe((next) => { + reload$.next(next.isReload); + }); + + return { + api, + Component: () => { + const [sloId, sloInstanceId, duration] = useBatchedPublishingSubjects( + sloId$, + sloInstanceId$, + duration$ + ); + + const I18nContext = deps.i18n.Context; + + useEffect(() => { + return () => { + fetchSubscription.unsubscribe(); + }; + }, []); + + return ( + + + + + + + + + + ); + }, + }; + }, + }; + return factory; +}; diff --git a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/configuration.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/configuration.tsx new file mode 100644 index 0000000000000..55305f076d893 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/configuration.tsx @@ -0,0 +1,140 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiButton, + EuiButtonEmpty, + EuiFieldText, + EuiFlexGroup, + EuiFlexItem, + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, + EuiFormRow, + EuiIcon, + EuiTitle, + EuiToolTip, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { ALL_VALUE } from '@kbn/slo-schema'; +import React, { useState } from 'react'; +import { SloSelector } from '../alerts/slo_selector'; +import type { EmbeddableProps } from './types'; + +interface Props { + onCreate: (props: EmbeddableProps) => void; + onCancel: () => void; +} + +interface SloConfig { + sloId: string; + sloInstanceId: string; +} + +export function Configuration({ onCreate, onCancel }: Props) { + const [selectedSlo, setSelectedSlo] = useState(); + const [duration, setDuration] = useState('1h'); + const [hasError, setHasError] = useState(false); + + const isDurationValid = duration.match(/^\d+[mhd]$/); // matches 1m, 78m, 1h, 6h, 1d, 24d + + const isValid = !!selectedSlo && isDurationValid; + + const onConfirmClick = () => { + if (isValid) { + onCreate({ + sloId: selectedSlo.sloId, + sloInstanceId: selectedSlo.sloInstanceId, + duration, + }); + } + }; + + return ( + + + +

+ {i18n.translate('xpack.slo.burnRateEmbeddable.configuration.headerTitle', { + defaultMessage: 'Burn rate configuration', + })} +

+
+
+ + + + { + setHasError(slo === undefined); + if (slo && 'id' in slo) { + setSelectedSlo({ sloId: slo.id, sloInstanceId: slo.instanceId ?? ALL_VALUE }); + } + }} + /> + + + + setDuration(e.target.value)} + isInvalid={!isDurationValid} + append={ + + + + } + /> + + + + + + + + + + + + + + + +
+ ); +} diff --git a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/index.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/constants.ts similarity index 63% rename from x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/index.ts rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/constants.ts index e8fb1a03045d9..b6147bb3f4145 100644 --- a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/index.ts +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/constants.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './use_event_enrichment'; -export * from './use_investigation_enrichment'; +export const SLO_BURN_RATE_EMBEDDABLE_ID = 'SLO_BURN_RATE_EMBEDDABLE'; +export const ADD_BURN_RATE_ACTION_ID = 'CREATE_SLO_BURN_RATE_EMBEDDABLE'; diff --git a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/open_configuration.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/open_configuration.tsx new file mode 100644 index 0000000000000..e8a7777b29a62 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/open_configuration.tsx @@ -0,0 +1,54 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CoreStart } from '@kbn/core/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import React from 'react'; +import { SloPublicPluginsStart } from '../../..'; +import { Configuration } from './configuration'; +import type { EmbeddableProps, SloBurnRateEmbeddableState } from './types'; + +export async function openConfiguration( + coreStart: CoreStart, + pluginStart: SloPublicPluginsStart, + initialState?: SloBurnRateEmbeddableState +): Promise { + const { overlays } = coreStart; + const queryClient = new QueryClient(); + return new Promise(async (resolve, reject) => { + try { + const flyoutSession = overlays.openFlyout( + toMountPoint( + + + { + flyoutSession.close(); + resolve(update); + }} + onCancel={() => { + flyoutSession.close(); + reject(); + }} + /> + + , + coreStart + ) + ); + } catch (error) { + reject(error); + } + }); +} diff --git a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/types.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/types.ts new file mode 100644 index 0000000000000..3e95151afb986 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/burn_rate/types.ts @@ -0,0 +1,45 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { + ApplicationStart, + IUiSettingsClient, + NotificationsStart, + type CoreStart, +} from '@kbn/core/public'; +import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import { + PublishesPanelTitle, + PublishesWritablePanelTitle, + SerializedTitles, +} from '@kbn/presentation-publishing'; +import { Subject } from 'rxjs'; + +export interface EmbeddableProps { + sloId: string; + sloInstanceId: string; + duration: string; + reloadSubject?: Subject; +} + +interface BurnRateCustomInput { + sloId: string; + sloInstanceId: string; + duration: string; +} + +export type SloBurnRateEmbeddableState = SerializedTitles & BurnRateCustomInput; +export type BurnRateApi = DefaultEmbeddableApi & + PublishesWritablePanelTitle & + PublishesPanelTitle; + +export interface SloEmbeddableDeps { + uiSettings: IUiSettingsClient; + http: CoreStart['http']; + i18n: CoreStart['i18n']; + application: ApplicationStart; + notifications: NotificationsStart; +} diff --git a/x-pack/plugins/observability_solution/slo/public/hooks/query_key_factory.ts b/x-pack/plugins/observability_solution/slo/public/hooks/query_key_factory.ts index 11f10b624106f..93f8a76b71db0 100644 --- a/x-pack/plugins/observability_solution/slo/public/hooks/query_key_factory.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/query_key_factory.ts @@ -41,7 +41,8 @@ export const sloKeys = { groups: () => [...sloKeys.all, 'group'] as const, overview: (filters: SLOOverviewFilter) => ['overview', filters] as const, details: () => [...sloKeys.all, 'details'] as const, - detail: (sloId?: string) => [...sloKeys.details(), sloId] as const, + detail: (sloId: string, instanceId: string | undefined, remoteName: string | undefined) => + [...sloKeys.details(), { sloId, instanceId, remoteName }] as const, rules: () => [...sloKeys.all, 'rules'] as const, rule: (sloIds: string[]) => [...sloKeys.rules(), sloIds] as const, activeAlerts: () => [...sloKeys.all, 'activeAlerts'] as const, diff --git a/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_burn_rates.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_burn_rates.ts index 1623e6609b85b..3da6e09072dfd 100644 --- a/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_burn_rates.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_burn_rates.ts @@ -4,23 +4,19 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { ALL_VALUE, GetSLOBurnRatesResponse, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { QueryObserverResult, RefetchOptions, RefetchQueryFilters, useQuery, } from '@tanstack/react-query'; -import { ALL_VALUE, GetSLOBurnRatesResponse, SLOWithSummaryResponse } from '@kbn/slo-schema'; +import { SLO_LONG_REFETCH_INTERVAL } from '../constants'; import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; -import { SLO_LONG_REFETCH_INTERVAL } from '../constants'; export interface UseFetchSloBurnRatesResponse { - isInitialLoading: boolean; isLoading: boolean; - isRefetching: boolean; - isSuccess: boolean; - isError: boolean; data: GetSLOBurnRatesResponse | undefined; refetch: ( options?: (RefetchOptions & RefetchQueryFilters) | undefined @@ -39,41 +35,35 @@ export function useFetchSloBurnRates({ shouldRefetch, }: UseFetchSloBurnRatesParams): UseFetchSloBurnRatesResponse { const { http } = useKibana().services; - const { isInitialLoading, isLoading, isError, isSuccess, isRefetching, data, refetch } = useQuery( - { - queryKey: sloKeys.burnRates(slo.id, slo.instanceId, windows), - queryFn: async ({ signal }) => { - try { - const response = await http.post( - `/internal/observability/slos/${slo.id}/_burn_rates`, - { - body: JSON.stringify({ - windows, - instanceId: slo.instanceId ?? ALL_VALUE, - remoteName: slo.remote?.remoteName, - }), - signal, - } - ); + const { isLoading, data, refetch } = useQuery({ + queryKey: sloKeys.burnRates(slo.id, slo.instanceId, windows), + queryFn: async ({ signal }) => { + try { + const response = await http.post( + `/internal/observability/slos/${slo.id}/_burn_rates`, + { + body: JSON.stringify({ + windows, + instanceId: slo.instanceId ?? ALL_VALUE, + remoteName: slo.remote?.remoteName, + }), + signal, + } + ); - return response; - } catch (error) { - // ignore error - } - }, - refetchInterval: shouldRefetch ? SLO_LONG_REFETCH_INTERVAL : undefined, - refetchOnWindowFocus: false, - keepPreviousData: true, - } - ); + return response; + } catch (error) { + // ignore error + } + }, + refetchInterval: shouldRefetch ? SLO_LONG_REFETCH_INTERVAL : undefined, + refetchOnWindowFocus: false, + keepPreviousData: true, + }); return { data, - refetch, isLoading, - isRefetching, - isInitialLoading, - isSuccess, - isError, + refetch, }; } diff --git a/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_details.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_details.ts index 9f5e2ef718182..589701be319ae 100644 --- a/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_details.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_details.ts @@ -36,14 +36,14 @@ export function useFetchSloDetails({ }: { sloId?: string; instanceId?: string; - remoteName?: string | null; + remoteName?: string; shouldRefetch?: boolean; }): UseFetchSloDetailsResponse { const { http } = useKibana().services; const { isInitialLoading, isLoading, isError, isSuccess, isRefetching, data, refetch } = useQuery( { - queryKey: sloKeys.detail(sloId), + queryKey: sloKeys.detail(sloId!, instanceId, remoteName), queryFn: async ({ signal }) => { try { const response = await http.get(`/api/observability/slos/${sloId}`, { diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_get_query_params.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_get_query_params.ts index bea5080d91884..163e2cd526a6a 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_get_query_params.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_get_query_params.ts @@ -52,7 +52,7 @@ export function useGetQueryParams() { return { instanceId: !!instanceId && instanceId !== ALL_VALUE ? instanceId : undefined, - remoteName, + remoteName: remoteName !== null ? remoteName : undefined, isDeletingSlo: deleteSlo === 'true', removeDeleteQueryParam, isResettingSlo: resetSlo === 'true', diff --git a/x-pack/plugins/observability_solution/slo/public/plugin.ts b/x-pack/plugins/observability_solution/slo/public/plugin.ts index 8147512e019e9..3e320238794bc 100644 --- a/x-pack/plugins/observability_solution/slo/public/plugin.ts +++ b/x-pack/plugins/observability_solution/slo/public/plugin.ts @@ -15,20 +15,21 @@ import { PluginInitializerContext, } from '@kbn/core/public'; import { BehaviorSubject, firstValueFrom } from 'rxjs'; -import { SloPublicPluginsSetup, SloPublicPluginsStart } from './types'; import { PLUGIN_NAME, sloAppId } from '../common'; -import type { SloPublicSetup, SloPublicStart } from './types'; +import { ExperimentalFeatures, SloConfig } from '../common/config'; +import { SLOS_BASE_PATH } from '../common/locators/paths'; +import { SLO_ALERTS_EMBEDDABLE_ID } from './embeddable/slo/alerts/constants'; +import { SLO_BURN_RATE_EMBEDDABLE_ID } from './embeddable/slo/burn_rate/constants'; +import { SLO_ERROR_BUDGET_ID } from './embeddable/slo/error_budget/constants'; +import { SLO_OVERVIEW_EMBEDDABLE_ID } from './embeddable/slo/overview/constants'; +import { SloOverviewEmbeddableState } from './embeddable/slo/overview/types'; import { SloDetailsLocatorDefinition } from './locators/slo_details'; import { SloEditLocatorDefinition } from './locators/slo_edit'; import { SloListLocatorDefinition } from './locators/slo_list'; -import { SLOS_BASE_PATH } from '../common/locators/paths'; import { getCreateSLOFlyoutLazy } from './pages/slo_edit/shared_flyout/get_create_slo_flyout'; import { registerBurnRateRuleType } from './rules/register_burn_rate_rule_type'; -import { ExperimentalFeatures, SloConfig } from '../common/config'; -import { SLO_OVERVIEW_EMBEDDABLE_ID } from './embeddable/slo/overview/constants'; -import { SloOverviewEmbeddableState } from './embeddable/slo/overview/types'; -import { SLO_ERROR_BUDGET_ID } from './embeddable/slo/error_budget/constants'; -import { SLO_ALERTS_EMBEDDABLE_ID } from './embeddable/slo/alerts/constants'; +import type { SloPublicSetup, SloPublicStart } from './types'; +import { SloPublicPluginsSetup, SloPublicPluginsStart } from './types'; export class SloPlugin implements Plugin @@ -95,6 +96,7 @@ export class SloPlugin const hasPlatinumLicense = license.hasAtLeast('platinum'); if (hasPlatinumLicense) { const [coreStart, pluginsStart] = await coreSetup.getStartServices(); + pluginsStart.dashboard.registerDashboardPanelPlacementSetting( SLO_OVERVIEW_EMBEDDABLE_ID, (serializedState: SloOverviewEmbeddableState | undefined) => { @@ -104,6 +106,7 @@ export class SloPlugin return { width: 12, height: 8 }; } ); + pluginsSetup.embeddable.registerReactEmbeddableFactory( SLO_OVERVIEW_EMBEDDABLE_ID, async () => { @@ -134,6 +137,24 @@ export class SloPlugin return getErrorBudgetEmbeddableFactory(deps); }); + pluginsStart.dashboard.registerDashboardPanelPlacementSetting( + SLO_BURN_RATE_EMBEDDABLE_ID, + () => { + return { width: 14, height: 7 }; + } + ); + pluginsSetup.embeddable.registerReactEmbeddableFactory( + SLO_BURN_RATE_EMBEDDABLE_ID, + async () => { + const deps = { ...coreStart, ...pluginsStart }; + + const { getBurnRateEmbeddableFactory } = await import( + './embeddable/slo/burn_rate/burn_rate_react_embeddable_factory' + ); + return getBurnRateEmbeddableFactory(deps); + } + ); + const registerAsyncSloUiActions = async () => { if (pluginsSetup.uiActions) { const { registerSloUiActions } = await import('./ui_actions'); diff --git a/x-pack/plugins/observability_solution/slo/public/ui_actions/create_burn_rate_panel_action.tsx b/x-pack/plugins/observability_solution/slo/public/ui_actions/create_burn_rate_panel_action.tsx new file mode 100644 index 0000000000000..0b00d33b4cf6a --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/ui_actions/create_burn_rate_panel_action.tsx @@ -0,0 +1,57 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { CoreSetup } from '@kbn/core/public'; +import { i18n } from '@kbn/i18n'; +import { apiIsPresentationContainer } from '@kbn/presentation-containers'; +import { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import { + IncompatibleActionError, + type UiActionsActionDefinition, +} from '@kbn/ui-actions-plugin/public'; +import { SloPublicPluginsStart, SloPublicStart } from '..'; +import { + ADD_BURN_RATE_ACTION_ID, + SLO_BURN_RATE_EMBEDDABLE_ID, +} from '../embeddable/slo/burn_rate/constants'; +import { COMMON_SLO_GROUPING } from '../embeddable/slo/common/constants'; + +export function createBurnRatePanelAction( + getStartServices: CoreSetup['getStartServices'] +): UiActionsActionDefinition { + return { + id: ADD_BURN_RATE_ACTION_ID, + grouping: COMMON_SLO_GROUPING, + order: 30, + getIconType: () => 'visGauge', + isCompatible: async ({ embeddable }) => { + return apiIsPresentationContainer(embeddable); + }, + execute: async ({ embeddable }) => { + if (!apiIsPresentationContainer(embeddable)) throw new IncompatibleActionError(); + const [coreStart, deps] = await getStartServices(); + try { + const { openConfiguration } = await import( + '../embeddable/slo/burn_rate/open_configuration' + ); + const initialState = await openConfiguration(coreStart, deps); + embeddable.addNewPanel( + { + panelType: SLO_BURN_RATE_EMBEDDABLE_ID, + initialState, + }, + true + ); + } catch (e) { + return Promise.reject(); + } + }, + getDisplayName: () => + i18n.translate('xpack.slo.burnRateEmbeddable.ariaLabel', { + defaultMessage: 'SLO Burn Rate', + }), + }; +} diff --git a/x-pack/plugins/observability_solution/slo/public/ui_actions/index.ts b/x-pack/plugins/observability_solution/slo/public/ui_actions/index.ts index 95c1f19a8842a..26411f02e753d 100644 --- a/x-pack/plugins/observability_solution/slo/public/ui_actions/index.ts +++ b/x-pack/plugins/observability_solution/slo/public/ui_actions/index.ts @@ -11,6 +11,7 @@ import { createOverviewPanelAction } from './create_overview_panel_action'; import { createAddErrorBudgetPanelAction } from './create_error_budget_action'; import { createAddAlertsPanelAction } from './create_alerts_panel_action'; import { SloPublicPluginsStart, SloPublicStart, SloPublicPluginsSetup } from '..'; +import { createBurnRatePanelAction } from './create_burn_rate_panel_action'; export function registerSloUiActions( core: CoreSetup, @@ -24,6 +25,7 @@ export function registerSloUiActions( const addOverviewPanelAction = createOverviewPanelAction(core.getStartServices); const addErrorBudgetPanelAction = createAddErrorBudgetPanelAction(core.getStartServices); const addAlertsPanelAction = createAddAlertsPanelAction(core.getStartServices); + const addBurnRatePanelAction = createBurnRatePanelAction(core.getStartServices); // Assign triggers // Only register these actions in stateful kibana, and the serverless observability project @@ -31,5 +33,6 @@ export function registerSloUiActions( uiActions.addTriggerAction(ADD_PANEL_TRIGGER, addOverviewPanelAction); uiActions.addTriggerAction(ADD_PANEL_TRIGGER, addErrorBudgetPanelAction); uiActions.addTriggerAction(ADD_PANEL_TRIGGER, addAlertsPanelAction); + uiActions.addTriggerAction(ADD_PANEL_TRIGGER, addBurnRatePanelAction); } } diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.test.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.test.ts index 6e955fa3928aa..d66386deb1669 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.test.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.test.ts @@ -7,13 +7,10 @@ import os from 'os'; import { args } from './args'; -import { getChromiumPackage } from '../../../utils'; // Since chromium v111 headless mode in arm based macs is not working with `--disable-gpu` // This is a known issue: headless uses swiftshader by default and swiftshader's support for WebGL is currently disabled on Arm pending the resolution of https://issuetracker.google.com/issues/165000222. -// As a workaround, we force hardware GL drivers on mac. -// The best way to do this starting with v112 is by passing --enable-gpu, -// v111 and older versions should work with --use-angle. +// As a workaround, we pass --enable-gpu to stop forcing swiftshader, see https://issues.chromium.org/issues/40256775#comment4 describe('headless webgl arm mac workaround', () => { const originalPlatform = process.platform; afterEach(() => { @@ -37,21 +34,15 @@ describe('headless webgl arm mac workaround', () => { expect(flags.includes(`--disable-gpu`)).toBe(true); }); - test("doesn't disable gpu when on an arm mac, adds --use-angle", () => { + test("doesn't disable gpu when on an arm mac, adds --enable-gpu", () => { simulateEnv('darwin', 'arm64'); const flags = args({ userDataDir: '/', proxy: { enabled: false }, }); + expect(flags.includes(`--disable-gpu`)).toBe(false); - expect(flags.includes(`--use-angle`)).toBe(true); - - // if you're updating this, then you're likely updating chromium - // please double-check that the --use-angle flag is still needed for arm macs - // instead of --use-angle you may need --enable-gpu - expect(getChromiumPackage().binaryChecksum).toBe( - 'e5d4ccdbf3b66532c7c0973be2d5bbd3189079646ced55fe4db61d8e7e7bfc7e' - ); // just putting this here so that someone updating the chromium version will see this comment + expect(flags.includes(`--enable-gpu`)).toBe(true); }); }); diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.ts index fc1bf51d77493..2337e452cdc94 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.ts @@ -73,12 +73,11 @@ export const args = ({ flags.push('--no-sandbox'); } - // Since chromium v111 headless mode in arm based macs is not working with `--disable-gpu` + // Headless mode in arm based macs is not working with `--disable-gpu` // This is a known issue: headless uses swiftshader by default and swiftshader's support for WebGL is currently disabled on Arm pending the resolution of https://issuetracker.google.com/issues/165000222. - // As a workaround, we force hardware GL drivers on mac: v111 and older versions should work with --use-angle. - // The best way to do this when the issue is resolved will be to pass --enable-gpu, + // As a workaround, we pass --enable-gpu to stop forcing swiftshader, see https://issues.chromium.org/issues/40256775#comment4 if (os.arch() === 'arm64' && process.platform === 'darwin') { - flags.push('--use-angle'); + flags.push('--enable-gpu'); } else { flags.push('--disable-gpu'); } diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/paths.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/paths.ts index 21dde6af6b7de..ba82fe21734e4 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/paths.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/paths.ts @@ -44,10 +44,10 @@ export class ChromiumArchivePaths { platform: 'darwin', architecture: 'x64', archiveFilename: 'chrome-mac.zip', - archiveChecksum: 'f69bb2f5f402aa2bdd28ccab3a9b36857d1591a1f443fa5b8865df644805cb96', - binaryChecksum: 'c6289a1a1d45021b2259ea0c9ae65ea37199452b5457831680a5e192a3f19add', + archiveChecksum: 'fa8004f3c8c5574c089c901e48429d1b01720bf3dd25e05ac56c41d0ab470c10', + binaryChecksum: '56f25cb6881e5c2b1aac0d8e87630517d1af8effdc9319d35f872add048df1ca', binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium', - revision: 1274550, + revision: 1300317, // 1300313 is not available for Mac_x64 location: 'common', archivePath: 'Mac', isPreInstalled: false, @@ -56,10 +56,10 @@ export class ChromiumArchivePaths { platform: 'darwin', architecture: 'arm64', archiveFilename: 'chrome-mac.zip', - archiveChecksum: '55d8cfe56d4461645a663de263ae670f78cc69b69aee16a62c47f361fa9a62f2', - binaryChecksum: 'e5d4ccdbf3b66532c7c0973be2d5bbd3189079646ced55fe4db61d8e7e7bfc7e', + archiveChecksum: 'bea49fd3ccd6aaccd7cdc4df38306f002a2934aaa2c044f3b5a3272b31ec77ca', + binaryChecksum: '4c55d9e47deb1179c377c9785afdcdb5f3d3f351bff62b414d43e32ff195bd55', binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium', - revision: 1274557, // 1274542 is not available for Mac_Arm + revision: 1300314, // 1300313 is not available for Mac_Arm location: 'common', archivePath: 'Mac_Arm', isPreInstalled: false, @@ -67,22 +67,22 @@ export class ChromiumArchivePaths { { platform: 'linux', architecture: 'x64', - archiveFilename: 'chromium-46cf136-locales-linux_x64.zip', - archiveChecksum: '8ea5f2d72352230f7927725a6ffd6d5fb462a0c8ad76e320003748b62df6d221', - binaryChecksum: 'e7f8109ef7535dab500166b335524dfa4e92324fa31a2a61f510a5fa5afc2eee', + archiveFilename: 'chromium-5b5d829-locales-linux_x64.zip', + archiveChecksum: '799e8fd5f47ea70b8a3972d39b2617c9cbebc7fc433a89251dae312a7c77534b', + binaryChecksum: '216b8f7ff9b41e985397342c2df54e4f8e07a01a3b8a929f39b9a10931d26ff5', binaryRelativePath: 'headless_shell-linux_x64/headless_shell', - revision: 1274542, + revision: 1300313, location: 'custom', isPreInstalled: true, }, { platform: 'linux', architecture: 'arm64', - archiveFilename: 'chromium-46cf136-locales-linux_arm64.zip', - archiveChecksum: '7d01fe8a78a019cf714c913d37353f85d54c4c7d4fde91d6c96605d259a66414', - binaryChecksum: 'd1a8b8708dc5ced8a9c526a0d823a4074325573f9c06fabe14e18fd3a36691c9', + archiveFilename: 'chromium-5b5d829-locales-linux_arm64.zip', + archiveChecksum: '961e20c45c61f8e948efdc4128bb17c23217bbcb28537f270ccf5bf0826981e7', + binaryChecksum: 'fc4027fb6b1c96bef9374d5d9f791097fae2ec2ddc4e0134167075bd52d1458f', binaryRelativePath: 'headless_shell-linux_arm64/headless_shell', - revision: 1274542, + revision: 1300313, location: 'custom', isPreInstalled: true, }, @@ -90,10 +90,10 @@ export class ChromiumArchivePaths { platform: 'win32', architecture: 'x64', archiveFilename: 'chrome-win.zip', - archiveChecksum: 'd5e9691fb9d378ae13c8956be0d9eb45674d033e8b38125ace2f2fdd458e5ca0', - binaryChecksum: '4d8f95e4f218fc3010ab2f0d8f8674f16d554622218e73f9a7c8a22dbba2e078', + archiveChecksum: '27a2ed1473cefc6f48ff5665faa1fbcc69ef5be47ee21777a60e87c8379fdd93', + binaryChecksum: 'd603401a5e6f8bd734b329876e4221a4d24a1999f14df6e32eeb5e6a72520d96', binaryRelativePath: path.join('chrome-win', 'chrome.exe'), - revision: 1274557, + revision: 1300320, // 1300313 is not available for win32 location: 'common', archivePath: 'Win', isPreInstalled: true, diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.test.tsx index 693224b2f5015..288ba5089d367 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.test.tsx @@ -13,7 +13,7 @@ import { CopyIDAction } from './copy_id_action'; const mockInferenceEndpoint = { deployment: 'not_applicable', endpoint: { - inference_id: 'hugging-face-embeddings', + model_id: 'hugging-face-embeddings', task_type: 'text_embedding', service: 'hugging_face', service_settings: { @@ -58,7 +58,7 @@ describe('CopyIDAction', () => { it('renders the label with correct text', () => { const TestComponent = () => { - return ; + return ; }; const { getByTestId } = render(); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.tsx index bf3764cbc467a..4641899b59720 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.tsx @@ -11,22 +11,22 @@ import React from 'react'; import { useKibana } from '../../../../../../hooks/use_kibana'; interface CopyIDActionProps { - inferenceId: string; + modelId: string; } -export const CopyIDAction = ({ inferenceId }: CopyIDActionProps) => { +export const CopyIDAction = ({ modelId }: CopyIDActionProps) => { const { services: { notifications }, } = useKibana(); const toasts = notifications?.toasts; return ( - + {(copy) => ( { copy(); toasts?.addSuccess({ title: i18n.translate('xpack.searchInferenceEndpoints.actions.copyIDSuccess', { - defaultMessage: 'Inference endpoint ID {inferenceId} copied', - values: { inferenceId }, + defaultMessage: 'Inference endpoint ID {modelId} copied', + values: { modelId }, }), }); }} diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.tsx index 7bc428f49affa..88a982fd0b76e 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.tsx @@ -28,7 +28,7 @@ export const DeleteAction: React.FC = ({ selectedEndpoint }) deleteEndpoint({ type: selectedEndpoint.type, - id: selectedEndpoint.endpoint.inference_id, + id: selectedEndpoint.endpoint.model_id, }); }; @@ -37,7 +37,7 @@ export const DeleteAction: React.FC = ({ selectedEndpoint }) ({ describe('RenderEndpoint component tests', () => { describe('with cohere service', () => { const mockEndpoint = { - inference_id: 'cohere-2', + model_id: 'cohere-2', service: 'cohere', service_settings: { similarity: 'cosine', @@ -68,7 +68,7 @@ describe('RenderEndpoint component tests', () => { describe('with elasticsearch service', () => { const mockEndpoint = { - inference_id: 'model-123', + model_id: 'model-123', service: 'elasticsearch', service_settings: { num_allocations: 5, @@ -102,7 +102,7 @@ describe('RenderEndpoint component tests', () => { describe('with azureaistudio service', () => { const mockEndpoint = { - inference_id: 'azure-ai-1', + model_id: 'azure-ai-1', service: 'azureaistudio', service_settings: { target: 'westus', @@ -155,7 +155,7 @@ describe('RenderEndpoint component tests', () => { describe('with azureopenai service', () => { const mockEndpoint = { - inference_id: 'azure-openai-1', + model_id: 'azure-openai-1', service: 'azureopenai', service_settings: { resource_name: 'resource-xyz', @@ -174,7 +174,7 @@ describe('RenderEndpoint component tests', () => { describe('with mistral service', () => { const mockEndpoint = { - inference_id: 'mistral-ai-1', + model_id: 'mistral-ai-1', service: 'mistral', service_settings: { model: 'model-xyz', @@ -233,7 +233,7 @@ describe('RenderEndpoint component tests', () => { describe('with googleaistudio service', () => { const mockEndpoint = { - inference_id: 'google-ai-1', + model_id: 'google-ai-1', service: 'googleaistudio', service_settings: { model_id: 'model-abc', @@ -267,7 +267,7 @@ describe('RenderEndpoint component tests', () => { describe('with amazonbedrock service', () => { const mockEndpoint = { - inference_id: 'amazon-bedrock-1', + model_id: 'amazon-bedrock-1', service: 'amazonbedrock', service_settings: { region: 'us-west-1', @@ -287,7 +287,7 @@ describe('RenderEndpoint component tests', () => { describe('for MIT licensed models', () => { const mockEndpointWithMitLicensedModel = { - inference_id: 'model-123', + model_id: 'model-123', service: 'elasticsearch', service_settings: { num_allocations: 5, @@ -306,7 +306,7 @@ describe('RenderEndpoint component tests', () => { it('does not render the MIT license badge if the model is not eligible', () => { const mockEndpointWithNonMitLicensedModel = { - inference_id: 'model-123', + model_id: 'model-123', service: 'elasticsearch', service_settings: { num_allocations: 5, diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx index b09b260e8cf15..1cb34a06ff997 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx @@ -23,7 +23,7 @@ export const EndpointInfo: React.FC = ({ endpoint }) => { return ( - {endpoint.inference_id} + {endpoint.model_id} diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx index 096a36c5e56ec..70791287d9ae1 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx @@ -15,7 +15,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const inferenceEndpoints = [ { - inference_id: 'my-elser-model-05', + model_id: 'my-elser-model-05', task_type: 'sparse_embedding', service: 'elser', service_settings: { @@ -26,7 +26,7 @@ const inferenceEndpoints = [ task_settings: {}, }, { - inference_id: 'my-elser-model-04', + model_id: 'my-elser-model-04', task_type: 'sparse_embedding', service: 'elser', service_settings: { diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx index 9157e27c268cd..cb3b885659417 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx @@ -108,7 +108,7 @@ export const TabularPage: React.FC = ({ inferenceEndpoints }) actions: [ { render: (inferenceEndpoint: InferenceEndpointUI) => ( - + ), }, { diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx index 3b10e2d56887d..df058df72fb42 100644 --- a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx @@ -16,7 +16,7 @@ import { TRAINED_MODEL_STATS_QUERY_KEY } from '../../common/constants'; const inferenceEndpoints = [ { - inference_id: 'my-elser-model-04', + model_id: 'my-elser-model-04', task_type: 'sparse_embedding', service: 'elser', service_settings: { @@ -27,7 +27,7 @@ const inferenceEndpoints = [ task_settings: {}, }, { - inference_id: 'my-elser-model-01', + model_id: 'my-elser-model-01', task_type: 'sparse_embedding', service: 'elser', service_settings: { @@ -38,7 +38,7 @@ const inferenceEndpoints = [ task_settings: {}, }, { - inference_id: 'my-elser-model-05', + model_id: 'my-elser-model-05', task_type: 'text_embedding', service: 'elasticsearch', service_settings: { @@ -110,13 +110,11 @@ describe('useTableData', () => { ); const expectedSortedData = [...inferenceEndpoints].sort((a, b) => - b.inference_id.localeCompare(a.inference_id) + b.model_id.localeCompare(a.model_id) ); - const sortedEndpoints = result.current.sortedTableData.map( - (item) => item.endpoint.inference_id - ); - const expectedModelIds = expectedSortedData.map((item) => item.inference_id); + const sortedEndpoints = result.current.sortedTableData.map((item) => item.endpoint.model_id); + const expectedModelIds = expectedSortedData.map((item) => item.model_id); expect(sortedEndpoints).toEqual(expectedModelIds); }); @@ -148,9 +146,7 @@ describe('useTableData', () => { { wrapper } ); const filteredData = result.current.sortedTableData; - expect( - filteredData.every((item) => item.endpoint.inference_id.includes(searchKey)) - ).toBeTruthy(); + expect(filteredData.every((item) => item.endpoint.model_id.includes(searchKey))).toBeTruthy(); }); it('should update deployment status based on deploymentStatus object', () => { diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx index e5a6b1ca44d1f..1b3ce7814891f 100644 --- a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx @@ -64,7 +64,7 @@ export const useTableData = ( } return filteredEndpoints - .filter((endpoint) => endpoint.inference_id.includes(searchKey)) + .filter((endpoint) => endpoint.model_id.includes(searchKey)) .map((endpoint) => { const isElasticService = endpoint.service === ServiceProviderKeys.elasticsearch || @@ -94,9 +94,9 @@ export const useTableData = ( const bValue = b[queryParams.sortField]; if (queryParams.sortOrder === SortOrder.asc) { - return aValue.inference_id.localeCompare(bValue.inference_id); + return aValue.model_id.localeCompare(bValue.model_id); } else { - return bValue.inference_id.localeCompare(aValue.inference_id); + return bValue.model_id.localeCompare(aValue.model_id); } }); }, [tableData, queryParams]); diff --git a/x-pack/plugins/search_inference_endpoints/server/lib/fetch_inference_endpoints.test.ts b/x-pack/plugins/search_inference_endpoints/server/lib/fetch_inference_endpoints.test.ts index ce34edad3b86f..ee282f3056caa 100644 --- a/x-pack/plugins/search_inference_endpoints/server/lib/fetch_inference_endpoints.test.ts +++ b/x-pack/plugins/search_inference_endpoints/server/lib/fetch_inference_endpoints.test.ts @@ -12,28 +12,28 @@ import { fetchInferenceEndpoints } from './fetch_inference_endpoints'; describe('fetch indices', () => { const mockInferenceEndpointsResponse = [ { - inference_id: 'my-elser-model-03', + model_id: 'my-elser-model-03', task_type: 'sparse_embedding', service: 'elser', service_settings: { num_allocations: 1, num_threads: 1, model_id: '.elser_model_2' }, task_settings: {}, }, { - inference_id: 'my-elser-model-04', + model_id: 'my-elser-model-04', task_type: 'sparse_embedding', service: 'elser', service_settings: { num_allocations: 1, num_threads: 1, model_id: '.elser_model_2' }, task_settings: {}, }, { - inference_id: 'my-elser-model-05', + model_id: 'my-elser-model-05', task_type: 'sparse_embedding', service: 'elser', service_settings: { num_allocations: 1, num_threads: 1, model_id: '.elser_model_2' }, task_settings: {}, }, { - inference_id: 'my-elser-model-06', + model_id: 'my-elser-model-06', task_type: 'sparse_embedding', service: 'elser', service_settings: { num_allocations: 1, num_threads: 1, model_id: '.elser_model_2' }, diff --git a/x-pack/plugins/search_playground/public/utils/stream.ts b/x-pack/plugins/search_playground/public/utils/stream.ts index 57146263d2653..d06e3f0d10201 100644 --- a/x-pack/plugins/search_playground/public/utils/stream.ts +++ b/x-pack/plugins/search_playground/public/utils/stream.ts @@ -27,7 +27,8 @@ type StreamPartValueType = { export type StreamPartType = | ReturnType | ReturnType - | ReturnType; + | ReturnType + | ReturnType; const NEWLINE = '\n'.charCodeAt(0); @@ -121,7 +122,20 @@ const messageAnnotationsStreamPart = createStreamPart('8', 'message_annotations' return { type: 'message_annotations', value }; }); -const streamParts = [textStreamPart, errorStreamPart, messageAnnotationsStreamPart] as const; +const bufferStreamPart = createStreamPart('10', 'buffer', (value) => { + if (typeof value !== 'string') { + throw new Error('"buffer" parts expect a string value.'); + } + + return { type: 'buffer', value }; +}); + +const streamParts = [ + textStreamPart, + errorStreamPart, + bufferStreamPart, + messageAnnotationsStreamPart, +] as const; type StreamPartMap = { [P in StreamParts as P['code']]: P; diff --git a/x-pack/plugins/search_playground/server/routes.ts b/x-pack/plugins/search_playground/server/routes.ts index a71e650a8dae8..fc02973f41b7f 100644 --- a/x-pack/plugins/search_playground/server/routes.ts +++ b/x-pack/plugins/search_playground/server/routes.ts @@ -90,7 +90,8 @@ export function defineRoutes({ }, }, errorHandler(async (context, request, response) => { - const [{ analytics }, { actions }] = await getStartServices(); + const [{ analytics }, { actions, cloud }] = await getStartServices(); + const { client } = (await context.core).elasticsearch; const aiClient = Assist({ es_client: client.asCurrentUser, @@ -149,7 +150,13 @@ export function defineRoutes({ isCitationsEnabled: data.citations, }); - return handleStreamResponse({ logger, stream, response, request }); + return handleStreamResponse({ + logger, + stream, + response, + request, + isCloud: cloud?.isCloudEnabled ?? false, + }); } catch (e) { logger.error('Failed to create the chat stream', e); diff --git a/x-pack/plugins/search_playground/server/types.ts b/x-pack/plugins/search_playground/server/types.ts index ecec570a85caf..c3f1e8571a6b7 100644 --- a/x-pack/plugins/search_playground/server/types.ts +++ b/x-pack/plugins/search_playground/server/types.ts @@ -6,14 +6,17 @@ */ import { PluginStartContract as ActionsPluginStartContract } from '@kbn/actions-plugin/server'; +import { CloudStart } from '@kbn/cloud-plugin/server'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SearchPlaygroundPluginSetup {} + // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SearchPlaygroundPluginStart {} export interface SearchPlaygroundPluginStartDependencies { actions: ActionsPluginStartContract; + cloud?: CloudStart; } export * from '../common/types'; diff --git a/x-pack/plugins/search_playground/server/utils/handle_stream_response.test.ts b/x-pack/plugins/search_playground/server/utils/handle_stream_response.test.ts index 464a2bf8548d0..a4ddf1178e00e 100644 --- a/x-pack/plugins/search_playground/server/utils/handle_stream_response.test.ts +++ b/x-pack/plugins/search_playground/server/utils/handle_stream_response.test.ts @@ -7,7 +7,7 @@ import { handleStreamResponse } from './handle_stream_response'; -jest.mock('@kbn/ml-response-stream/server', () => ({ +jest.mock('./stream_factory', () => ({ streamFactory: jest.fn().mockReturnValue({ end: jest.fn(), push: jest.fn(), diff --git a/x-pack/plugins/search_playground/server/utils/handle_stream_response.ts b/x-pack/plugins/search_playground/server/utils/handle_stream_response.ts index 2e2ed7c9e765b..3f08a698a07f8 100644 --- a/x-pack/plugins/search_playground/server/utils/handle_stream_response.ts +++ b/x-pack/plugins/search_playground/server/utils/handle_stream_response.ts @@ -5,41 +5,41 @@ * 2.0. */ -import { streamFactory } from '@kbn/ml-response-stream/server'; import type { KibanaRequest, KibanaResponseFactory, Logger } from '@kbn/core/server'; -const timeout = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); +import { streamFactory } from './stream_factory'; export const handleStreamResponse = async ({ stream, request, response, logger, - maxTimeoutMs = 250, + isCloud = false, }: { stream: ReadableStream; logger: Logger; request: KibanaRequest; response: KibanaResponseFactory; maxTimeoutMs?: number; + isCloud?: boolean; }) => { - const { end, push, responseWithHeaders } = streamFactory(request.headers, logger); - const reader = (stream as ReadableStream).getReader(); + const { end, push, responseWithHeaders } = streamFactory(logger, isCloud); + const reader = stream.getReader(); const textDecoder = new TextDecoder(); - let handleStopRequest = false; + const abortController = new AbortController(); + request.events.aborted$.subscribe(() => { - handleStopRequest = true; + abortController.abort(); }); request.events.completed$.subscribe(() => { - handleStopRequest = true; + abortController.abort(); }); async function pushStreamUpdate() { try { const { done, value }: { done: boolean; value?: Uint8Array } = await reader.read(); - - if (done || handleStopRequest) { + if (done || abortController.signal.aborted) { end(); return; } @@ -54,15 +54,21 @@ export const handleStreamResponse = async ({ push(decodedValue); - await timeout(Math.floor(Math.random() * maxTimeoutMs)); - void pushStreamUpdate(); - } catch (e) { - logger.error(`There was an error: ${e.toString()}`); + } catch (error) { + logger.error(`Error occurred while pushing the next chunk: ${error.toString()}`); + end(); + abortController.abort(); + throw error; } } - void pushStreamUpdate(); + try { + void pushStreamUpdate(); + } catch (error) { + logger.error('Failed to push stream update', error); + throw error; + } return response.ok(responseWithHeaders); }; diff --git a/x-pack/plugins/search_playground/server/utils/stream_factory.test.ts b/x-pack/plugins/search_playground/server/utils/stream_factory.test.ts new file mode 100644 index 0000000000000..e6085377b7802 --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/stream_factory.test.ts @@ -0,0 +1,70 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { streamFactory } from './stream_factory'; +import { Logger } from '@kbn/logging'; +import { PassThrough } from 'stream'; + +describe('streamFactory', () => { + it('should create a stream with the correct initial state', () => { + const logger = { + error: jest.fn(), + } as unknown as Logger; + + const { DELIMITER, responseWithHeaders } = streamFactory(logger); + + expect(DELIMITER).toBe('\n'); + expect(responseWithHeaders.headers).toEqual({ + 'X-Accel-Buffering': 'no', + 'X-Content-Type-Options': 'nosniff', + 'Cache-Control': 'no-cache', + Connection: 'keep-alive', + 'Transfer-Encoding': 'chunked', + }); + expect(responseWithHeaders.body).toBeInstanceOf(PassThrough); + }); + + it('should push data to the stream correctly', () => { + const logger = { + error: jest.fn(), + } as unknown as Logger; + + const { push, responseWithHeaders } = streamFactory(logger); + + const data = 'test data'; + push(data); + + let output = ''; + responseWithHeaders.body.on('data', (chunk) => { + output += chunk.toString(); + }); + + responseWithHeaders.body.end(() => { + expect(output).toContain(data); + }); + }); + + it('should handle flush buffer mechanism', () => { + const logger = { + error: jest.fn(), + } as unknown as Logger; + + const { push, responseWithHeaders } = streamFactory(logger); + + const data = 'short'; + push(data); + + let output = ''; + responseWithHeaders.body.on('data', (chunk) => { + output += chunk.toString(); + }); + + responseWithHeaders.body.end(() => { + expect(output).toContain(data); + }); + }); +}); diff --git a/x-pack/plugins/search_playground/server/utils/stream_factory.ts b/x-pack/plugins/search_playground/server/utils/stream_factory.ts new file mode 100644 index 0000000000000..19f56e3890480 --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/stream_factory.ts @@ -0,0 +1,115 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// adapted from @kbn/ml-response-stream with the following changes: +// - removed gzip compression +// - removed support for ndjson +// - improved the cloud proxy buffer to work for our use case (works for newline string chunks vs ndjson only) + +import type { Logger } from '@kbn/core/server'; + +import { PassThrough } from 'stream'; + +import type { ResponseHeaders } from '@kbn/core-http-server'; +import { repeat } from 'lodash'; + +const DELIMITER = ` +`; + +export interface StreamResponseWithHeaders { + body: PassThrough; + headers?: ResponseHeaders; +} + +export interface StreamFactoryReturnType { + DELIMITER: string; + end: () => void; + push: (d: string) => void; + responseWithHeaders: StreamResponseWithHeaders; +} + +export function streamFactory(logger: Logger, flushFix: boolean = true): StreamFactoryReturnType { + const cloudProxyBufferSize = 4096; + + const flushPayload = flushFix + ? DELIMITER + '10: "' + repeat('0', cloudProxyBufferSize * 2) + '"' + DELIMITER + : undefined; + let currentBufferSize = 0; + + const stream = new PassThrough(); + const backPressureBuffer: string[] = []; + let tryToEnd = false; + + const flushBufferIfNeeded = () => { + if (currentBufferSize && currentBufferSize <= cloudProxyBufferSize) { + push(flushPayload as unknown as string); + currentBufferSize = 0; + } + }; + + const flushIntervalId = setInterval(flushBufferIfNeeded, 250); + + function end() { + tryToEnd = true; + clearInterval(flushIntervalId); + + if (backPressureBuffer.length > 0) { + const el = backPressureBuffer.shift(); + if (el !== undefined) { + push(el); + } + return; + } + + stream.end(); + } + + function push(d: string) { + if (d === undefined) { + logger.error('Stream chunk must not be undefined.'); + return; + } + + if (backPressureBuffer.length > 0) { + backPressureBuffer.push(d); + return; + } + + if (tryToEnd) { + return; + } + + try { + const line = d as unknown as string; + const writeOk = stream.write(line); + + currentBufferSize = + currentBufferSize <= cloudProxyBufferSize + ? JSON.stringify(line).length + currentBufferSize + : cloudProxyBufferSize; + + if (!writeOk) { + backPressureBuffer.push(d); + } + } catch (e) { + logger.error(`Could not serialize or stream data chunk: ${e.toString()}`); + } + } + + const responseWithHeaders: StreamResponseWithHeaders = { + body: stream, + headers: { + 'X-Accel-Buffering': 'no', + 'X-Content-Type-Options': 'nosniff', + 'Cache-Control': 'no-cache', + Connection: 'keep-alive', + 'Transfer-Encoding': 'chunked', + }, + }; + + return { DELIMITER, end, push, responseWithHeaders }; +} diff --git a/x-pack/plugins/search_playground/tsconfig.json b/x-pack/plugins/search_playground/tsconfig.json index 7e7217975cc85..20ede9bad89ad 100644 --- a/x-pack/plugins/search_playground/tsconfig.json +++ b/x-pack/plugins/search_playground/tsconfig.json @@ -17,7 +17,6 @@ "@kbn/i18n", "@kbn/i18n-react", "@kbn/kibana-react-plugin", - "@kbn/ml-response-stream", "@kbn/security-plugin", "@kbn/user-profile-components", "@kbn/shared-ux-router", diff --git a/x-pack/plugins/security/common/index.ts b/x-pack/plugins/security/common/index.ts index 1f5767fc56b64..2d5e6fd6ec7f1 100644 --- a/x-pack/plugins/security/common/index.ts +++ b/x-pack/plugins/security/common/index.ts @@ -12,6 +12,11 @@ export type { BuiltinESPrivileges, RawKibanaPrivileges, RoleMapping, + RoleMappingRule, + RoleMappingAllRule, + RoleMappingAnyRule, + RoleMappingExceptRule, + RoleMappingFieldRule, RoleTemplate, StoredRoleTemplate, InvalidRoleTemplate, diff --git a/x-pack/plugins/security/common/model/index.ts b/x-pack/plugins/security/common/model/index.ts index 4ad46b29212d8..1e73ead22655e 100644 --- a/x-pack/plugins/security/common/model/index.ts +++ b/x-pack/plugins/security/common/model/index.ts @@ -40,4 +40,9 @@ export type { InvalidRoleTemplate, RoleTemplate, RoleMapping, + RoleMappingRule, + RoleMappingAllRule, + RoleMappingAnyRule, + RoleMappingExceptRule, + RoleMappingFieldRule, } from './role_mapping'; diff --git a/x-pack/plugins/security/common/model/role_mapping.ts b/x-pack/plugins/security/common/model/role_mapping.ts index 1c6e43e8c5a7a..06520e8169909 100644 --- a/x-pack/plugins/security/common/model/role_mapping.ts +++ b/x-pack/plugins/security/common/model/role_mapping.ts @@ -5,23 +5,23 @@ * 2.0. */ -interface RoleMappingAnyRule { +export interface RoleMappingAnyRule { any: RoleMappingRule[]; } -interface RoleMappingAllRule { +export interface RoleMappingAllRule { all: RoleMappingRule[]; } -interface RoleMappingFieldRule { +export interface RoleMappingFieldRule { field: Record; } -interface RoleMappingExceptRule { +export interface RoleMappingExceptRule { except: RoleMappingRule; } -type RoleMappingRule = +export type RoleMappingRule = | RoleMappingAnyRule | RoleMappingAllRule | RoleMappingFieldRule diff --git a/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/edit_role_mapping_page.test.tsx b/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/edit_role_mapping_page.test.tsx index 8fdd6dce1e3db..e74d2f7703f31 100644 --- a/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/edit_role_mapping_page.test.tsx +++ b/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/edit_role_mapping_page.test.tsx @@ -441,4 +441,43 @@ describe('EditRoleMappingPage', () => { expect(rulePanels).toHaveLength(1); expect(rulePanels.at(0).props().readOnly).toBeTruthy(); }); + + it('renders a warning when empty any or all rules are present', async () => { + const roleMappingsAPI = roleMappingsAPIClientMock.create(); + const securityFeaturesAPI = securityFeaturesAPIClientMock.create(); + roleMappingsAPI.saveRoleMapping.mockResolvedValue(null); + roleMappingsAPI.getRoleMapping.mockResolvedValue({ + name: 'foo', + role_templates: [ + { + template: { id: 'foo' }, + }, + ], + enabled: true, + rules: { + all: [ + { + field: { + username: '*', + }, + }, + { + all: [], + }, + ], + }, + }); + securityFeaturesAPI.checkFeatures.mockResolvedValue({ + canReadSecurity: true, + hasCompatibleRealms: true, + canUseInlineScripts: true, + canUseStoredScripts: true, + }); + + const wrapper = renderView(roleMappingsAPI, securityFeaturesAPI, 'foo'); + await nextTick(); + wrapper.update(); + + expect(findTestSubject(wrapper, 'emptyAnyOrAllRulesWarning')).toHaveLength(1); + }); }); diff --git a/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/edit_role_mapping_page.tsx b/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/edit_role_mapping_page.tsx index 7886c55f46ed7..f9f1160bcca79 100644 --- a/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/edit_role_mapping_page.tsx +++ b/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/edit_role_mapping_page.tsx @@ -8,6 +8,7 @@ import { EuiButton, EuiButtonEmpty, + EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiForm, @@ -26,7 +27,12 @@ import type { PublicMethodsOf } from '@kbn/utility-types'; import { MappingInfoPanel } from './mapping_info_panel'; import { RuleEditorPanel } from './rule_editor_panel'; import { validateRoleMappingForSave } from './services/role_mapping_validation'; -import type { RoleMapping } from '../../../../common'; +import type { + RoleMapping, + RoleMappingAllRule, + RoleMappingAnyRule, + RoleMappingRule, +} from '../../../../common'; import type { RolesAPIClient } from '../../roles'; import type { SecurityFeaturesAPIClient } from '../../security_features'; import { @@ -176,6 +182,8 @@ export class EditRoleMappingPage extends Component { readOnly={this.props.readOnly} /> + {this.getFormWarnings()} + {this.getFormButtons()} @@ -211,6 +219,65 @@ export class EditRoleMappingPage extends Component { ); }; + private isObject = (record?: any): record is object => { + return typeof record === 'object' && record !== null; + }; + + private isRoleMappingAnyRule = (obj: unknown): obj is RoleMappingAnyRule => { + return this.isObject(obj) && 'any' in obj && Array.isArray(obj.any); + }; + + private isRoleMappingAllRule = (obj: unknown): obj is RoleMappingAllRule => { + return this.isObject(obj) && 'all' in obj && Array.isArray(obj.all); + }; + + private checkEmptyAnyAllMappings = (obj: RoleMappingRule) => { + const arrToCheck: RoleMappingRule[] = [obj]; + + while (arrToCheck.length > 0) { + const currentObj = arrToCheck.pop(); + if (this.isObject(obj)) { + for (const key in currentObj) { + if (Object.hasOwn(currentObj, key)) { + if (this.isRoleMappingAnyRule(currentObj)) { + if (currentObj.any.length === 0) { + return true; + } + arrToCheck.push(...currentObj.any); + } else if (this.isRoleMappingAllRule(currentObj)) { + if (currentObj.all.length === 0) { + return true; + } + arrToCheck.push(...currentObj.all); + } else if (this.isObject(currentObj[key as keyof RoleMappingRule])) { + arrToCheck.push(currentObj[key as keyof RoleMappingRule] as RoleMappingRule); + } + } + } + } + } + return false; + }; + + private getFormWarnings = () => { + if (this.checkEmptyAnyAllMappings(this.state.roleMapping!.rules as RoleMappingRule)) { + return ( + + + + ); + } + return null; + }; + private getFormButtons = () => { if (this.props.readOnly === true) { return this.getReturnToRoleMappingListButton(); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/prebuilt_rules/model/diff/three_way_diff/three_way_diff_outcome.ts b/x-pack/plugins/security_solution/common/api/detection_engine/prebuilt_rules/model/diff/three_way_diff/three_way_diff_outcome.ts index 44885d1932070..d5d656f3bb385 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/prebuilt_rules/model/diff/three_way_diff/three_way_diff_outcome.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/prebuilt_rules/model/diff/three_way_diff/three_way_diff_outcome.ts @@ -7,6 +7,8 @@ import { isEqual } from 'lodash'; import { MissingVersion } from './three_way_diff'; +import type { RuleDataSource } from '../diffable_rule/diffable_field_types'; +import { DataSourceType } from '../diffable_rule/diffable_field_types'; /** * Result of comparing three versions of a value against each other. @@ -75,6 +77,33 @@ export const determineOrderAgnosticDiffOutcome = ( }); }; +/** + * Determines diff outcome for `data_source` field + * + * NOTE: uses order agnostic comparison for nested array fields (e.g. `index`) + */ +export const determineDiffOutcomeForDataSource = ( + baseVersion: RuleDataSource | MissingVersion, + currentVersion: RuleDataSource, + targetVersion: RuleDataSource +): ThreeWayDiffOutcome => { + const isBaseVersionMissing = baseVersion === MissingVersion; + + if ( + (isBaseVersionMissing || isIndexPatternDataSourceType(baseVersion)) && + isIndexPatternDataSourceType(currentVersion) && + isIndexPatternDataSourceType(targetVersion) + ) { + return determineOrderAgnosticDiffOutcome( + isBaseVersionMissing ? MissingVersion : baseVersion.index_patterns, + currentVersion.index_patterns, + targetVersion.index_patterns + ); + } + + return determineDiffOutcome(baseVersion, currentVersion, targetVersion); +}; + interface DetermineDiffOutcomeProps { baseEqlCurrent: boolean; baseEqlTarget: boolean; @@ -121,3 +150,8 @@ export const determineIfValueCanUpdate = (diffCase: ThreeWayDiffOutcome): boolea diffCase === ThreeWayDiffOutcome.MissingBaseCanUpdate ); }; + +const isIndexPatternDataSourceType = ( + version: RuleDataSource +): version is Extract => + version.type === DataSourceType.index_patterns; diff --git a/x-pack/plugins/security_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route.gen.ts new file mode 100644 index 0000000000000..ecdbf03058130 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route.gen.ts @@ -0,0 +1,34 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Draft Timeline API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { TimelineType, TimelineResponse } from '../model/components.gen'; + +export type CleanDraftTimelinesRequestBody = z.infer; +export const CleanDraftTimelinesRequestBody = z.object({ + timelineType: TimelineType, +}); +export type CleanDraftTimelinesRequestBodyInput = z.input; + +export type CleanDraftTimelinesResponse = z.infer; +export const CleanDraftTimelinesResponse = z.object({ + data: z.object({ + persistTimeline: z.object({ + timeline: TimelineResponse, + }), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route.schema.yaml similarity index 80% rename from x-pack/plugins/security_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route.schema.yaml index 2a5d004507fb8..e5e9f3ed4cfc6 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Draft Timeline API - version: 8.9.0 + version: '2023-10-31' servers: - url: 'http://{kibana_host}:{port}' variables: @@ -12,7 +12,9 @@ servers: paths: /api/timeline/_draft: post: - operationId: cleanDraftTimelines + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: CleanDraftTimelines summary: Retrieves a draft timeline or timeline template. description: | Retrieves a clean draft timeline. If a draft timeline does not exist, it is created and returned. @@ -25,9 +27,10 @@ paths: application/json: schema: type: object + required: [timelineType] properties: timelineType: - $ref: '../model/components.yaml#/components/schemas/TimelineType' + $ref: '../model/components.schema.yaml#/components/schemas/TimelineType' responses: '200': description: Indicates that the draft timeline was successfully created. In the event the user already has a draft timeline, the existing draft timeline is cleared and returned. @@ -35,17 +38,18 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [persistTimeline] properties: persistTimeline: type: object + required: [timeline] properties: timeline: - $ref: '../model/components.yaml#/components/schemas/TimelineResponse' - required: - - data + $ref: '../model/components.schema.yaml#/components/schemas/TimelineResponse' '403': description: Indicates that the user does not have the required permissions to create a draft timeline. content: @@ -67,4 +71,4 @@ paths: message: type: string status_code: - type: number \ No newline at end of file + type: number diff --git a/x-pack/plugins/security_solution/common/api/timeline/create_timelines/create_timelines_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/create_timelines/create_timelines_route.gen.ts new file mode 100644 index 0000000000000..9b5775ca81617 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/create_timelines/create_timelines_route.gen.ts @@ -0,0 +1,45 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Create Timelines API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { + TimelineStatus, + TimelineType, + SavedTimeline, + TimelineResponse, +} from '../model/components.gen'; + +export type CreateTimelinesRequestBody = z.infer; +export const CreateTimelinesRequestBody = z.object({ + status: TimelineStatus.nullable().optional(), + timelineId: z.string().nullable().optional(), + templateTimelineId: z.string().nullable().optional(), + templateTimelineVersion: z.number().nullable().optional(), + timelineType: TimelineType.nullable().optional(), + version: z.string().nullable().optional(), + timeline: SavedTimeline, +}); +export type CreateTimelinesRequestBodyInput = z.input; + +export type CreateTimelinesResponse = z.infer; +export const CreateTimelinesResponse = z.object({ + data: z.object({ + persistTimeline: z.object({ + timeline: TimelineResponse.optional(), + }), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/create_timelines/create_timelines_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/create_timelines/create_timelines_route.schema.yaml similarity index 75% rename from x-pack/plugins/security_solution/common/api/timeline/create_timelines/create_timelines_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/create_timelines/create_timelines_route.schema.yaml index d2e2817642943..561ce75c84fe2 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/create_timelines/create_timelines_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/create_timelines/create_timelines_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Create Timelines API - version: 8.9.0 + version: '2023-10-31' externalDocs: url: https://www.elastic.co/guide/en/security/current/timeline-api-create.html description: Documentation @@ -15,7 +15,9 @@ servers: paths: /api/timeline: post: - operationId: createTimelines + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: CreateTimelines summary: Creates a new timeline. tags: - access:securitySolution @@ -30,9 +32,8 @@ paths: - timeline properties: status: - allOf: - - $ref: '../model/components.yaml#/components/schemas/TimelineStatus' - - nullable: true + $ref: '../model/components.schema.yaml#/components/schemas/TimelineStatus' + nullable: true timelineId: type: string nullable: true @@ -43,14 +44,13 @@ paths: type: number nullable: true timelineType: - allOf: - - $ref: '../model/components.yaml#/components/schemas/TimelineType' - - nullable: true + $ref: '../model/components.schema.yaml#/components/schemas/TimelineType' + nullable: true version: type: string nullable: true timeline: - $ref: '../model/components.yaml#/components/schemas/SavedTimeline' + $ref: '../model/components.schema.yaml#/components/schemas/SavedTimeline' responses: '200': description: Indicates the timeline was successfully created. @@ -58,17 +58,17 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [persistTimeline] properties: persistTimeline: type: object properties: timeline: - $ref: '../model/components.yaml#/components/schemas/TimelineResponse' - required: - - data + $ref: '../model/components.schema.yaml#/components/schemas/TimelineResponse' '405': description: Indicates that there was an error in the timeline creation. content: @@ -79,4 +79,4 @@ paths: body: type: string statusCode: - type: number \ No newline at end of file + type: number diff --git a/x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route.gen.ts new file mode 100644 index 0000000000000..eceda37016443 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route.gen.ts @@ -0,0 +1,35 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Notes API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +export type DeleteNoteRequestBody = z.infer; +export const DeleteNoteRequestBody = z.union([ + z + .object({ + noteId: z.string(), + }) + .nullable(), + z.object({ + noteIds: z.array(z.string()).nullable(), + }), +]); +export type DeleteNoteRequestBodyInput = z.input; + +export type DeleteNoteResponse = z.infer; +export const DeleteNoteResponse = z.object({ + data: z.object({}).optional(), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route.schema.yaml similarity index 58% rename from x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route.schema.yaml index 16901b9b0f804..b330cc82d2fdc 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/delete_note/delete_note_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Notes API - version: 8.9.0 + version: '2023-10-31' servers: - url: 'http://{kibana_host}:{port}' variables: @@ -12,7 +12,9 @@ servers: paths: /api/note: delete: - operationId: deleteNote + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: DeleteNote summary: Deletes a note from a timeline. tags: - access:securitySolution @@ -23,18 +25,20 @@ paths: application/json: schema: oneOf: - type: object - properties: - noteId: - type: string - nullable: true - type: object - properties: - noteIds: - type: array - items: - type: string - nullable: true + - type: object + required: [noteId] + nullable: true + properties: + noteId: + type: string + - type: object + required: [noteIds] + properties: + noteIds: + type: array + nullable: true + items: + type: string responses: '200': description: Indicates the note was successfully deleted. diff --git a/x-pack/plugins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route.gen.ts new file mode 100644 index 0000000000000..a52a5779770b3 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route.gen.ts @@ -0,0 +1,34 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Delete Timelines API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +export type DeleteTimelinesRequestBody = z.infer; +export const DeleteTimelinesRequestBody = z.object({ + savedObjectIds: z.array(z.string()), + /** + * Saved search ids that should be deleted alongside the timelines + */ + searchIds: z.array(z.string()).optional(), +}); +export type DeleteTimelinesRequestBodyInput = z.input; + +export type DeleteTimelinesResponse = z.infer; +export const DeleteTimelinesResponse = z.object({ + data: z.object({ + deleteTimeline: z.boolean(), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route.schema.yaml similarity index 83% rename from x-pack/plugins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route.schema.yaml index 5be42a6696d63..85c1b7c9a6736 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/delete_timelines/delete_timelines_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Delete Timelines API - version: 8.9.0 + version: '2023-10-31' externalDocs: url: https://www.elastic.co/guide/en/security/current/timeline-api-delete.html description: Documentation @@ -15,7 +15,9 @@ servers: paths: /api/timeline: delete: - operationId: deleteTimelines + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: DeleteTimelines summary: Deletes one or more timelines or timeline templates. tags: - access:securitySolution @@ -26,8 +28,7 @@ paths: application/json: schema: type: object - required: - - savedObjectIds + required: [savedObjectIds] properties: savedObjectIds: type: array @@ -35,7 +36,7 @@ paths: type: string searchIds: type: array - description: Saved search ids that should be deleted alongside the timelines + description: Saved search ids that should be deleted alongside the timelines items: type: string responses: @@ -45,11 +46,11 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [deleteTimeline] properties: deleteTimeline: type: boolean - required: - - data \ No newline at end of file diff --git a/x-pack/plugins/security_solution/common/api/timeline/export_timelines/export_timelines_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/export_timelines/export_timelines_route.gen.ts new file mode 100644 index 0000000000000..fbe1957522b75 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/export_timelines/export_timelines_route.gen.ts @@ -0,0 +1,32 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Import Timelines API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +export type ExportTimelinesRequestQuery = z.infer; +export const ExportTimelinesRequestQuery = z.object({ + /** + * The name of the file to export + */ + file_name: z.string(), +}); +export type ExportTimelinesRequestQueryInput = z.input; + +export type ExportTimelinesRequestBody = z.infer; +export const ExportTimelinesRequestBody = z.object({ + ids: z.array(z.string()).nullable().optional(), +}); +export type ExportTimelinesRequestBodyInput = z.input; diff --git a/x-pack/plugins/security_solution/common/api/timeline/export_timelines/export_timelines_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/export_timelines/export_timelines_route.schema.yaml similarity index 89% rename from x-pack/plugins/security_solution/common/api/timeline/export_timelines/export_timelines_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/export_timelines/export_timelines_route.schema.yaml index 360c53e6d72e8..2c0a367dc5d28 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/export_timelines/export_timelines_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/export_timelines/export_timelines_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Import Timelines API - version: 8.9.0 + version: '2023-10-31' externalDocs: url: https://www.elastic.co/guide/en/security/current/timeline-api-import.html description: Documentation @@ -15,13 +15,16 @@ servers: paths: /api/timeline/_export: post: - operationId: exportTimelines + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: ExportTimelines summary: Exports timelines as an NDJSON file tags: - access:securitySolution parameters: - in: query name: file_name + required: true schema: type: string description: The name of the file to export @@ -56,4 +59,4 @@ paths: body: type: string statusCode: - type: number \ No newline at end of file + type: number diff --git a/x-pack/plugins/security_solution/common/api/timeline/get_draft_timelines/get_draft_timelines_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/get_draft_timelines/get_draft_timelines_route.gen.ts new file mode 100644 index 0000000000000..db0c0db421df2 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/get_draft_timelines/get_draft_timelines_route.gen.ts @@ -0,0 +1,34 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Get Draft Timelines API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { TimelineType, TimelineResponse } from '../model/components.gen'; + +export type GetDraftTimelinesRequestQuery = z.infer; +export const GetDraftTimelinesRequestQuery = z.object({ + timelineType: TimelineType, +}); +export type GetDraftTimelinesRequestQueryInput = z.input; + +export type GetDraftTimelinesResponse = z.infer; +export const GetDraftTimelinesResponse = z.object({ + data: z.object({ + persistTimeline: z.object({ + timeline: TimelineResponse, + }), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/get_draft_timelines/get_draft_timelines_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/get_draft_timelines/get_draft_timelines_route.schema.yaml similarity index 79% rename from x-pack/plugins/security_solution/common/api/timeline/get_draft_timelines/get_draft_timelines_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/get_draft_timelines/get_draft_timelines_route.schema.yaml index c0a73bcaefee2..c7a77af98a7f3 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/get_draft_timelines/get_draft_timelines_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/get_draft_timelines/get_draft_timelines_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Get Draft Timelines API - version: 8.9.0 + version: '2023-10-31' servers: - url: 'http://{kibana_host}:{port}' variables: @@ -12,15 +12,18 @@ servers: paths: /api/timeline/_draft: get: - operationId: getDraftTimelines + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: GetDraftTimelines summary: Retrieves the draft timeline for the current user. If the user does not have a draft timeline, an empty timeline is returned. tags: - access:securitySolution parameters: - in: query name: timelineType + required: true schema: - $ref: '../model/components.yaml#/components/schemas/TimelineType' + $ref: '../model/components.schema.yaml#/components/schemas/TimelineType' responses: '200': description: Indicates that the draft timeline was successfully retrieved. @@ -28,15 +31,18 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [persistTimeline] properties: persistTimeline: type: object + required: [timeline] properties: timeline: - $ref: '../model/components.yaml#/components/schemas/TimelineResponse' + $ref: '../model/components.schema.yaml#/components/schemas/TimelineResponse' '403': description: If a draft timeline was not found and we attempted to create one, it indicates that the user does not have the required permissions to create a draft timeline. content: @@ -58,4 +64,4 @@ paths: message: type: string status_code: - type: number \ No newline at end of file + type: number diff --git a/x-pack/plugins/security_solution/common/api/timeline/get_notes/get_notes_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/get_notes/get_notes_route.gen.ts new file mode 100644 index 0000000000000..f97db62d24797 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/get_notes/get_notes_route.gen.ts @@ -0,0 +1,32 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Notes API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +export type DocumentIds = z.infer; +export const DocumentIds = z.union([z.array(z.string()), z.string()]); + +export type GetNotesRequestQuery = z.infer; +export const GetNotesRequestQuery = z.object({ + documentIds: DocumentIds, + page: z.coerce.number().optional(), + perPage: z.coerce.number().optional(), + search: z.string().nullable().optional(), + sortField: z.string().nullable().optional(), + sortOrder: z.string().nullable().optional(), + filter: z.string().nullable().optional(), +}); +export type GetNotesRequestQueryInput = z.input; diff --git a/x-pack/plugins/security_solution/common/api/timeline/get_notes/get_notes_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/get_notes/get_notes_route.schema.yaml similarity index 74% rename from x-pack/plugins/security_solution/common/api/timeline/get_notes/get_notes_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/get_notes/get_notes_route.schema.yaml index a78b7e6f9cbee..f2e58e2b4e729 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/get_notes/get_notes_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/get_notes/get_notes_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Notes API - version: 8.9.0 + version: '2023-10-31' servers: - url: 'http://{kibana_host}:{port}' variables: @@ -12,19 +12,19 @@ servers: paths: /api/note: get: - operationId: getNotes + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: GetNotes description: Gets notes + summary: Get all notes for a given document. tags: - access:securitySolution parameters: - name: documentIds in: query + required: true schema: - oneOf: - - type: array - items: - type: string - - type: string + $ref: '#/components/schemas/DocumentIds' - name: page in: query schema: @@ -56,5 +56,14 @@ paths: type: string nullable: true responses: - 200: + '200': description: Indicates the requested notes were returned. + +components: + schemas: + DocumentIds: + oneOf: + - type: array + items: + type: string + - type: string diff --git a/x-pack/plugins/security_solution/common/api/timeline/get_timeline/get_timeline_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/get_timeline/get_timeline_route.gen.ts new file mode 100644 index 0000000000000..d178b80e35b7f --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/get_timeline/get_timeline_route.gen.ts @@ -0,0 +1,39 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Get Timeline API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { TimelineResponse } from '../model/components.gen'; + +export type GetTimelineRequestQuery = z.infer; +export const GetTimelineRequestQuery = z.object({ + /** + * The ID of the template timeline to retrieve + */ + template_timeline_id: z.string().optional(), + /** + * The ID of the timeline to retrieve + */ + id: z.string().optional(), +}); +export type GetTimelineRequestQueryInput = z.input; + +export type GetTimelineResponse = z.infer; +export const GetTimelineResponse = z.object({ + data: z.object({ + getOneTimeline: TimelineResponse.nullable(), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/get_timeline/get_timeline_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/get_timeline/get_timeline_route.schema.yaml similarity index 79% rename from x-pack/plugins/security_solution/common/api/timeline/get_timeline/get_timeline_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/get_timeline/get_timeline_route.schema.yaml index 0341a26c356cf..9a94bafb63a76 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/get_timeline/get_timeline_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/get_timeline/get_timeline_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Get Timeline API - version: 8.9.0 + version: '2023-10-31' externalDocs: url: https://www.elastic.co/guide/en/security/current/_get_timeline_or_timeline_template_by_savedobjectid.html description: Documentation @@ -15,7 +15,9 @@ servers: paths: /api/timeline: get: - operationId: getTimeline + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: GetTimeline summary: Get an existing saved timeline or timeline template. This API is used to retrieve an existing saved timeline or timeline template. tags: - access:securitySolution @@ -37,13 +39,12 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [getOneTimeline] properties: getOneTimeline: - oneOf: - - $ref: '../model/components.yaml#/components/schemas/TimelineResponse' - - nullable: true - required: - - data \ No newline at end of file + $ref: '../model/components.schema.yaml#/components/schemas/TimelineResponse' + nullable: true diff --git a/x-pack/plugins/security_solution/common/api/timeline/get_timelines/get_timelines_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/get_timelines/get_timelines_route.gen.ts new file mode 100644 index 0000000000000..58b5683a89bf3 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/get_timelines/get_timelines_route.gen.ts @@ -0,0 +1,53 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Get Timelines API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { + TimelineType, + SortFieldTimeline, + TimelineStatus, + TimelineResponse, +} from '../model/components.gen'; + +export type GetTimelinesRequestQuery = z.infer; +export const GetTimelinesRequestQuery = z.object({ + /** + * If true, only timelines that are marked as favorites by the user are returned. + */ + only_user_favorite: z.enum(['true', 'false']).nullable().optional(), + timeline_type: TimelineType.nullable().optional(), + sort_field: SortFieldTimeline.optional(), + sort_order: z.enum(['asc', 'desc']).optional(), + page_size: z.string().nullable().optional(), + page_index: z.string().nullable().optional(), + search: z.string().nullable().optional(), + status: TimelineStatus.nullable().optional(), +}); +export type GetTimelinesRequestQueryInput = z.input; + +export type GetTimelinesResponse = z.infer; +export const GetTimelinesResponse = z.object({ + data: z.object({ + timelines: z.array(TimelineResponse), + totalCount: z.number(), + defaultTimelineCount: z.number(), + templateTimelineCount: z.number(), + favoriteCount: z.number(), + elasticTemplateTimelineCount: z.number(), + customTemplateTimelineCount: z.number(), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/get_timelines/get_timelines_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/get_timelines/get_timelines_route.schema.yaml similarity index 72% rename from x-pack/plugins/security_solution/common/api/timeline/get_timelines/get_timelines_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/get_timelines/get_timelines_route.schema.yaml index beb452557cd8e..189865a9344d4 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/get_timelines/get_timelines_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/get_timelines/get_timelines_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Get Timelines API - version: 8.9.0 + version: '2023-10-31' externalDocs: url: https://www.elastic.co/guide/en/security/current/timeline-api-get.html description: Documentation @@ -15,7 +15,9 @@ servers: paths: /api/timelines: get: - operationId: getTimelines + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: GetTimelines summary: This API is used to retrieve a list of existing saved timelines or timeline templates. tags: - access:securitySolution @@ -32,13 +34,12 @@ paths: - in: query name: timeline_type schema: - allOf: - - $ref: '../model/components.yaml#/components/schemas/TimelineType' - - nullable: true + $ref: '../model/components.schema.yaml#/components/schemas/TimelineType' + nullable: true - in: query name: sort_field - schema: - $ref: '../model/components.yaml#/components/schemas/SortFieldTimeline' + schema: + $ref: '../model/components.schema.yaml#/components/schemas/SortFieldTimeline' - in: query name: sort_order schema: @@ -64,9 +65,8 @@ paths: - in: query name: status schema: - allOf: - - $ref: '../model/components.yaml#/components/schemas/TimelineStatus' - - nullable: true + $ref: '../model/components.schema.yaml#/components/schemas/TimelineStatus' + nullable: true responses: '200': description: Indicates that the (template) timelines were found and returned. @@ -74,14 +74,25 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: + [ + timelines, + totalCount, + defaultTimelineCount, + templateTimelineCount, + favoriteCount, + elasticTemplateTimelineCount, + customTemplateTimelineCount, + ] properties: timelines: type: array items: - $ref: '../model/components.yaml#/components/schemas/TimelineResponse' + $ref: '../model/components.schema.yaml#/components/schemas/TimelineResponse' totalCount: type: number defaultTimelineCount: @@ -94,8 +105,6 @@ paths: type: number customTemplateTimelineCount: type: number - required: - - data '400': description: Bad request. The user supplied invalid data. content: @@ -106,4 +115,4 @@ paths: body: type: string statusCode: - type: number \ No newline at end of file + type: number diff --git a/x-pack/plugins/security_solution/common/api/timeline/import_timelines/import_timelines_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/import_timelines/import_timelines_route.gen.ts new file mode 100644 index 0000000000000..d1bad2e075c86 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/import_timelines/import_timelines_route.gen.ts @@ -0,0 +1,38 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Import Timelines API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { Readable, ImportTimelineResult } from '../model/components.gen'; + +export type ImportTimelinesRequestBody = z.infer; +export const ImportTimelinesRequestBody = z.object({ + file: Readable.merge( + z.object({ + hapi: z.object({ + filename: z.string(), + headers: z.object({}), + isImmutable: z.enum(['true', 'false']).optional(), + }), + }) + ), +}); +export type ImportTimelinesRequestBodyInput = z.input; + +export type ImportTimelinesResponse = z.infer; +export const ImportTimelinesResponse = z.object({ + data: ImportTimelineResult, +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/import_timelines/import_timelines_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/import_timelines/import_timelines_route.schema.yaml similarity index 68% rename from x-pack/plugins/security_solution/common/api/timeline/import_timelines/import_timelines_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/import_timelines/import_timelines_route.schema.yaml index 7ada9a0e4a148..9925ae10322e6 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/import_timelines/import_timelines_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/import_timelines/import_timelines_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Import Timelines API - version: 8.9.0 + version: '2023-10-31' externalDocs: url: https://www.elastic.co/guide/en/security/current/timeline-api-import.html description: Documentation @@ -15,7 +15,9 @@ servers: paths: /api/timeline/_import: post: - operationId: importTimelines + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: ImportTimelines summary: Imports timelines. tags: - access:securitySolution @@ -28,17 +30,24 @@ paths: type: object properties: file: - type: object allOf: - - $ref: '../model/components.yaml#/components/schemas/Readable' - - properties: - hapi: - type: object - properties: - filename: - type: string - headers: - type: object + - $ref: '../model/components.schema.yaml#/components/schemas/Readable' + - type: object + required: [hapi] + properties: + hapi: + type: object + required: [filename, headers] + properties: + filename: + type: string + headers: + type: object + isImmutable: + type: string + enum: + - 'true' + - 'false' responses: '200': description: Indicates the import of timelines was successful. @@ -46,11 +55,10 @@ paths: application/json: schema: type: object + required: [data] properties: data: - $ref: '../model/components.yaml#/components/schemas/ImportTimelineResult' - required: - - data + $ref: '../model/components.schema.yaml#/components/schemas/ImportTimelineResult' '400': description: Indicates the import of timelines was unsuccessful because of an invalid file extension. @@ -89,4 +97,4 @@ paths: body: type: string statusCode: - type: number \ No newline at end of file + type: number diff --git a/x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route.gen.ts new file mode 100644 index 0000000000000..befdf84f496e4 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route.gen.ts @@ -0,0 +1,36 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Install Prepackaged Timelines API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { ImportTimelines, SavedTimeline, ImportTimelineResult } from '../model/components.gen'; + +export type InstallPrepackedTimelinesRequestBody = z.infer< + typeof InstallPrepackedTimelinesRequestBody +>; +export const InstallPrepackedTimelinesRequestBody = z.object({ + timelinesToInstall: z.array(ImportTimelines.nullable()), + timelinesToUpdate: z.array(ImportTimelines.nullable()), + prepackagedTimelines: z.array(SavedTimeline), +}); +export type InstallPrepackedTimelinesRequestBodyInput = z.input< + typeof InstallPrepackedTimelinesRequestBody +>; + +export type InstallPrepackedTimelinesResponse = z.infer; +export const InstallPrepackedTimelinesResponse = z.object({ + data: ImportTimelineResult, +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route.schema.yaml similarity index 66% rename from x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route.schema.yaml index 247e6aa8e3f68..af96bbeb9c6d2 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Install Prepackaged Timelines API - version: 8.9.0 + version: '2023-10-31' servers: - url: 'http://{kibana_host}:{port}' variables: @@ -12,7 +12,9 @@ servers: paths: /api/timeline/_prepackaged: post: - operationId: installPrepackedTimelines + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: InstallPrepackedTimelines summary: Installs prepackaged timelines. tags: - access:securitySolution @@ -23,23 +25,22 @@ paths: application/json: schema: type: object + required: [timelinesToInstall, timelinesToUpdate, prepackagedTimelines] properties: timelinesToInstall: type: array items: - allOf: - - $ref: '../model/components.yaml#/components/schemas/ImportTimelines' - - nullable: true + $ref: '../model/components.schema.yaml#/components/schemas/ImportTimelines' + nullable: true timelinesToUpdate: type: array items: - allOf: - - $ref: '../model/components.yaml#/components/schemas/ImportTimelines' - - nullable: true + $ref: '../model/components.schema.yaml#/components/schemas/ImportTimelines' + nullable: true prepackagedTimelines: type: array items: - $ref: '../model/components.yaml#/components/schemas/SavedTimeline' + $ref: '../model/components.schema.yaml#/components/schemas/SavedTimeline' responses: '200': description: Indicates the installation of prepackaged timelines was successful. @@ -47,11 +48,10 @@ paths: application/json: schema: type: object + required: [data] properties: data: - $ref: '../model/components.yaml#/components/schemas/ImportTimelineResult' - required: - - data + $ref: '../model/components.schema.yaml#/components/schemas/ImportTimelineResult' '500': description: Indicates the installation of prepackaged timelines was unsuccessful. content: @@ -62,4 +62,4 @@ paths: body: type: string statusCode: - type: number \ No newline at end of file + type: number diff --git a/x-pack/plugins/security_solution/common/api/timeline/model/components.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/model/components.gen.ts new file mode 100644 index 0000000000000..fdc3ef1e1ed52 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/model/components.gen.ts @@ -0,0 +1,354 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Shared Timeline Components + * version: not applicable + */ + +import type { ZodTypeDef } from 'zod'; +import { z } from 'zod'; + +/** + * The type of timeline to create. Valid values are `default` and `template`. + */ +export type TimelineType = z.infer; +export const TimelineType = z.enum(['default', 'template']); +export type TimelineTypeEnum = typeof TimelineType.enum; +export const TimelineTypeEnum = TimelineType.enum; + +/** + * The type of data provider to create. Valid values are `default` and `template`. + */ +export type DataProviderType = z.infer; +export const DataProviderType = z.enum(['default', 'template']); +export type DataProviderTypeEnum = typeof DataProviderType.enum; +export const DataProviderTypeEnum = DataProviderType.enum; + +export type ColumnHeaderResult = z.infer; +export const ColumnHeaderResult = z.object({ + aggregatable: z.boolean().optional(), + category: z.string().optional(), + columnHeaderType: z.string().optional(), + description: z.string().optional(), + example: z.union([z.string(), z.number()]).optional(), + indexes: z.array(z.string()).optional(), + id: z.string().optional(), + name: z.string().optional(), + placeholder: z.string().optional(), + searchable: z.boolean().optional(), + type: z.string().optional(), +}); + +export type QueryMatchResult = z.infer; +export const QueryMatchResult = z.object({ + field: z.string().optional(), + displayField: z.string().optional(), + value: z.string().optional(), + displayValue: z.string().optional(), + operator: z.string().optional(), +}); + +export interface DataProviderResult { + id?: string; + name?: string; + enabled?: boolean; + excluded?: boolean; + kqlQuery?: string; + queryMatch?: QueryMatchResult; + and?: DataProviderResult[]; + type?: DataProviderType; +} +export interface DataProviderResultInput { + id?: string; + name?: string; + enabled?: boolean; + excluded?: boolean; + kqlQuery?: string; + queryMatch?: QueryMatchResult; + and?: DataProviderResultInput[]; + type?: DataProviderType; +} +export const DataProviderResult: z.ZodType< + DataProviderResult, + ZodTypeDef, + DataProviderResultInput +> = z.object({ + id: z.string().optional(), + name: z.string().optional(), + enabled: z.boolean().optional(), + excluded: z.boolean().optional(), + kqlQuery: z.string().optional(), + queryMatch: QueryMatchResult.optional(), + and: z.array(z.lazy(() => DataProviderResult)).optional(), + type: DataProviderType.optional(), +}); + +export type RowRendererId = z.infer; +export const RowRendererId = z.enum([ + 'alert', + 'alerts', + 'auditd', + 'auditd_file', + 'library', + 'netflow', + 'plain', + 'registry', + 'suricata', + 'system', + 'system_dns', + 'system_endgame_process', + 'system_file', + 'system_fim', + 'system_security_event', + 'system_socket', + 'threat_match', + 'zeek', +]); +export type RowRendererIdEnum = typeof RowRendererId.enum; +export const RowRendererIdEnum = RowRendererId.enum; + +export type FavoriteTimelineResult = z.infer; +export const FavoriteTimelineResult = z.object({ + fullName: z.string().nullable().optional(), + userName: z.string().nullable().optional(), + favoriteDate: z.number().nullable().optional(), +}); + +export type FilterTimelineResult = z.infer; +export const FilterTimelineResult = z.object({ + exists: z.boolean().optional(), + meta: z + .object({ + alias: z.string().optional(), + controlledBy: z.string().optional(), + disabled: z.boolean().optional(), + field: z.string().optional(), + formattedValue: z.string().optional(), + index: z.string().optional(), + key: z.string().optional(), + negate: z.boolean().optional(), + params: z.string().optional(), + type: z.string().optional(), + value: z.string().optional(), + }) + .optional(), + match_all: z.string().optional(), + missing: z.string().optional(), + query: z.string().optional(), + range: z.string().optional(), + script: z.string().optional(), +}); + +export type SerializedFilterQueryResult = z.infer; +export const SerializedFilterQueryResult = z.object({ + filterQuery: z + .object({ + kuery: z + .object({ + kind: z.string().optional(), + expression: z.string().optional(), + }) + .optional(), + serializedQuery: z.string().optional(), + }) + .optional(), +}); + +export type Sort = z.infer; +export const Sort = z.object({ + columnId: z.string().nullable().optional(), + columnType: z.string().nullable().optional(), + sortDirection: z.string().nullable().optional(), +}); + +export type SavedTimeline = z.infer; +export const SavedTimeline = z.object({ + columns: ColumnHeaderResult.nullable().optional(), + created: z.number().nullable().optional(), + createdBy: z.string().nullable().optional(), + dataProviders: z + .array(z.lazy(() => DataProviderResult)) + .nullable() + .optional(), + dataViewId: z.string().nullable().optional(), + dateRange: z + .object({ + end: z.union([z.string(), z.number()]).optional(), + start: z.union([z.string(), z.number()]).optional(), + }) + .nullable() + .optional(), + description: z.string().nullable().optional(), + eqlOptions: z + .object({ + eventCategoryField: z.string().optional(), + tiebreakerField: z.string().optional(), + timestampField: z.string().optional(), + }) + .nullable() + .optional(), + eventType: z.string().nullable().optional(), + excludedRowRendererIds: z.array(RowRendererId).nullable().optional(), + favorite: z.array(FavoriteTimelineResult).nullable().optional(), + filters: z.array(FilterTimelineResult).nullable().optional(), + kqlMode: z.string().nullable().optional(), + kqlQuery: SerializedFilterQueryResult.nullable().optional(), + indexNames: z.array(z.string()).nullable().optional(), + savedSearchId: z.string().nullable().optional(), + savedQueryId: z.string().nullable().optional(), + sort: Sort.nullable().optional(), + status: z.enum(['active', 'draft', 'immutable']).nullable().optional(), + title: z.string().nullable().optional(), + templateTimelineId: z.string().nullable().optional(), + templateTimelineVersion: z.number().nullable().optional(), + timelineType: TimelineType.nullable().optional(), + updated: z.number().nullable().optional(), + updatedBy: z.string().nullable().optional(), +}); + +export type BareNote = z.infer; +export const BareNote = z.object({ + eventId: z.string().nullable().optional(), + note: z.string().nullable().optional(), + timelineId: z.string().nullable(), + created: z.number().nullable().optional(), + createdBy: z.string().nullable().optional(), + updated: z.number().nullable().optional(), + updatedBy: z.string().nullable().optional(), +}); + +export type Note = z.infer; +export const Note = BareNote.merge( + z.object({ + noteId: z.string().optional(), + version: z.string().optional(), + }) +); + +export type PinnedEvent = z.infer; +export const PinnedEvent = z.object({ + pinnedEventId: z.string(), + eventId: z.string(), + timelineId: z.string(), + created: z.number().nullable().optional(), + createdBy: z.string().nullable().optional(), + updated: z.number().nullable().optional(), + updatedBy: z.string().nullable().optional(), + version: z.string(), +}); + +export type TimelineResponse = z.infer; +export const TimelineResponse = SavedTimeline.merge( + z.object({ + eventIdToNoteIds: z.array(Note).optional(), + notes: z.array(Note).optional(), + noteIds: z.array(z.string()).optional(), + pinnedEventIds: z.array(z.string()).optional(), + pinnedEventsSaveObject: z.array(PinnedEvent).optional(), + savedObjectId: z.string(), + version: z.string(), + }) +); + +export type FavoriteTimelineResponse = z.infer; +export const FavoriteTimelineResponse = z.object({ + savedObjectId: z.string(), + version: z.string(), + code: z.number().nullable().optional(), + message: z.string().nullable().optional(), + templateTimelineId: z.string().nullable().optional(), + templateTimelineVersion: z.number().nullable().optional(), + timelineType: TimelineType.optional(), + favorite: z.array(FavoriteTimelineResult).optional(), +}); + +export type GlobalNote = z.infer; +export const GlobalNote = z.object({ + noteId: z.string().optional(), + version: z.string().optional(), + note: z.string().optional(), + timelineId: z.string().optional(), + created: z.number().optional(), + createdBy: z.string().optional(), + updated: z.number().optional(), + updatedBy: z.string().optional(), +}); + +/** + * The field to sort the timelines by. + */ +export type SortFieldTimeline = z.infer; +export const SortFieldTimeline = z.enum(['title', 'description', 'updated', 'created']); +export type SortFieldTimelineEnum = typeof SortFieldTimeline.enum; +export const SortFieldTimelineEnum = SortFieldTimeline.enum; + +/** + * The status of the timeline. Valid values are `active`, `draft`, and `immutable`. + */ +export type TimelineStatus = z.infer; +export const TimelineStatus = z.enum(['active', 'draft', 'immutable']); +export type TimelineStatusEnum = typeof TimelineStatus.enum; +export const TimelineStatusEnum = TimelineStatus.enum; + +export type ImportTimelines = z.infer; +export const ImportTimelines = SavedTimeline.merge( + z.object({ + savedObjectId: z.string().nullable().optional(), + version: z.string().nullable().optional(), + globalNotes: z.array(BareNote).nullable().optional(), + eventNotes: z.array(BareNote).nullable().optional(), + pinnedEventIds: z.array(z.string()).nullable().optional(), + }) +); + +export type ImportTimelineResult = z.infer; +export const ImportTimelineResult = z.object({ + success: z.boolean().optional(), + success_count: z.number().optional(), + timelines_installed: z.number().optional(), + timelines_updated: z.number().optional(), + errors: z + .array( + z.object({ + id: z.string().optional(), + error: z + .object({ + message: z.string().optional(), + status_code: z.number().optional(), + }) + .optional(), + }) + ) + .optional(), +}); + +export type ExportedTimelines = z.infer; +export const ExportedTimelines = SavedTimeline.merge( + z.object({ + globalNotes: z.array(Note).optional(), + eventNotes: z.array(Note).optional(), + pinnedEventIds: z.array(z.string()).optional(), + }) +); + +export type Readable = z.infer; +export const Readable = z.object({ + _maxListeners: z.object({}).catchall(z.unknown()).optional(), + _readableState: z.object({}).catchall(z.unknown()).optional(), + _read: z.object({}).catchall(z.unknown()).optional(), + readable: z.boolean().optional(), + _events: z.object({}).catchall(z.unknown()).optional(), + _eventsCount: z.number().optional(), + _data: z.object({}).catchall(z.unknown()).optional(), + _position: z.number().optional(), + _encoding: z.string().optional(), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/model/components.yaml b/x-pack/plugins/security_solution/common/api/timeline/model/components.schema.yaml similarity index 84% rename from x-pack/plugins/security_solution/common/api/timeline/model/components.yaml rename to x-pack/plugins/security_solution/common/api/timeline/model/components.schema.yaml index 9c007aa195838..53146d1cbb4d5 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/model/components.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/model/components.schema.yaml @@ -1,3 +1,8 @@ +openapi: 3.0.0 +info: + title: Shared Timeline Components + version: 'not applicable' +paths: {} components: schemas: TimelineType: @@ -5,32 +10,40 @@ components: enum: - default - template - default: default + # enum default value is temporarily unsupported by the code generator + # default: default description: The type of timeline to create. Valid values are `default` and `template`. DataProviderType: type: string enum: - default - template - default: default + # enum default value is temporarily unsupported by the code generator + # default: default description: The type of data provider to create. Valid values are `default` and `template`. SavedTimeline: type: object properties: columns: $ref: '#/components/schemas/ColumnHeaderResult' + nullable: true created: type: number + nullable: true createdBy: type: string + nullable: true dataProviders: type: array + nullable: true items: $ref: '#/components/schemas/DataProviderResult' dataViewId: type: string + nullable: true dateRange: type: object + nullable: true properties: end: oneOf: @@ -42,8 +55,10 @@ components: - type: number description: type: string + nullable: true eqlOptions: type: object + nullable: true properties: eventCategoryField: type: string @@ -53,48 +68,67 @@ components: type: string eventType: type: string + nullable: true excludedRowRendererIds: type: array + nullable: true items: $ref: '#/components/schemas/RowRendererId' favorite: type: array + nullable: true items: $ref: '#/components/schemas/FavoriteTimelineResult' filters: type: array + nullable: true items: $ref: '#/components/schemas/FilterTimelineResult' kqlMode: type: string + nullable: true kqlQuery: + nullable: true $ref: '#/components/schemas/SerializedFilterQueryResult' indexNames: type: array + nullable: true items: type: string + savedSearchId: + type: string + nullable: true savedQueryId: type: string + nullable: true sort: + nullable: true $ref: '#/components/schemas/Sort' status: type: string + nullable: true enum: - active - draft - immutable title: type: string + nullable: true templateTimelineId: type: string + nullable: true templateTimelineVersion: type: number + nullable: true timelineType: + nullable: true $ref: '#/components/schemas/TimelineType' updated: type: number + nullable: true updatedBy: type: string + nullable: true TimelineResponse: allOf: - $ref: '#/components/schemas/SavedTimeline' @@ -220,21 +254,29 @@ components: $ref: '#/components/schemas/DataProviderType' BareNote: type: object + required: [timelineId] properties: eventId: type: string + nullable: true note: type: string + nullable: true timelineId: type: string + nullable: true created: type: number + nullable: true createdBy: type: string + nullable: true updated: type: number + nullable: true updatedBy: type: string + nullable: true Note: allOf: - $ref: '#/components/schemas/BareNote' @@ -263,15 +305,6 @@ components: type: number updatedBy: type: string - Note: - allOf: - - $ref: '#/components/schemas/BareNote' - - type: object - properties: - noteId: - type: string - version: - type: string RowRendererId: type: string enum: @@ -298,10 +331,13 @@ components: properties: fullName: type: string + nullable: true userName: type: string + nullable: true favoriteDate: type: number + nullable: true FilterTimelineResult: type: object properties: @@ -359,6 +395,7 @@ components: type: string PinnedEvent: type: object + required: [eventId, pinnedEventId, timelineId, version] properties: pinnedEventId: type: string @@ -368,12 +405,16 @@ components: type: string created: type: number + nullable: true createdBy: type: string + nullable: true updated: type: number + nullable: true updatedBy: type: string + nullable: true version: type: string Sort: @@ -381,27 +422,29 @@ components: properties: columnId: type: string + nullable: true + columnType: + type: string + nullable: true sortDirection: type: string + nullable: true SortFieldTimeline: - type: object + type: string description: The field to sort the timelines by. - properties: - title: - type: string - description: - type: string - updated: - type: string - created: - type: string + enum: + - title + - description + - updated + - created TimelineStatus: type: string enum: - active - draft - immutable - default: draft + # enum default value is temporarily unsupported by the code generator + # default: draft description: The status of the timeline. Valid values are `active`, `draft`, and `immutable`. ImportTimelines: allOf: @@ -475,19 +518,24 @@ components: type: object properties: _maxListeners: - type: {} + type: object + additionalProperties: true _readableState: - type: {} + type: object + additionalProperties: true _read: - type: {} + type: object + additionalProperties: true readable: type: boolean _events: - type: {} + type: object + additionalProperties: true _eventsCount: type: number _data: - type: {} + type: object + additionalProperties: true _position: type: number _encoding: diff --git a/x-pack/plugins/security_solution/common/api/timeline/patch_timelines/patch_timeline_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/patch_timelines/patch_timeline_route.gen.ts new file mode 100644 index 0000000000000..9dd91246a9144 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/patch_timelines/patch_timeline_route.gen.ts @@ -0,0 +1,36 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Patch Timeline API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { SavedTimeline, TimelineResponse } from '../model/components.gen'; + +export type PatchTimelineRequestBody = z.infer; +export const PatchTimelineRequestBody = z.object({ + timelineId: z.string().nullable(), + version: z.string().nullable(), + timeline: SavedTimeline, +}); +export type PatchTimelineRequestBodyInput = z.input; + +export type PatchTimelineResponse = z.infer; +export const PatchTimelineResponse = z.object({ + data: z.object({ + persistTimeline: z.object({ + timeline: TimelineResponse, + }), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/patch_timelines/patch_timeline_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/patch_timelines/patch_timeline_route.schema.yaml similarity index 75% rename from x-pack/plugins/security_solution/common/api/timeline/patch_timelines/patch_timeline_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/patch_timelines/patch_timeline_route.schema.yaml index 2a4f1e1fadfa7..04d6de3cc3f87 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/patch_timelines/patch_timeline_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/patch_timelines/patch_timeline_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Patch Timeline API - version: 8.9.0 + version: '2023-10-31' servers: - url: 'http://{kibana_host}:{port}' variables: @@ -12,7 +12,9 @@ servers: paths: /api/timeline: patch: - operationId: patchTimeline + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: PatchTimeline summary: Updates an existing timeline. description: Updates an existing timeline. This API is used to update the title, description, date range, pinned events, pinned queries, and/or pinned saved queries of an existing timeline. tags: @@ -24,13 +26,16 @@ paths: application/json: schema: type: object + required: [timelineId, version, timeline] properties: timelineId: type: string + nullable: true version: type: string + nullable: true timeline: - $ref: '../model/components.yaml#/components/schemas/SavedTimeline' + $ref: '../model/components.schema.yaml#/components/schemas/SavedTimeline' responses: '200': description: Indicates that the draft timeline was successfully created. In the event the user already has a draft timeline, the existing draft timeline is cleared and returned. @@ -38,17 +43,18 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [persistTimeline] properties: persistTimeline: type: object + required: [timeline] properties: timeline: - $ref: '../model/components.yaml#/components/schemas/TimelineResponse' - required: - - data + $ref: '../model/components.schema.yaml#/components/schemas/TimelineResponse' '405': description: Indicates that the user does not have the required access to create a draft timeline. content: @@ -59,4 +65,4 @@ paths: body: type: string statusCode: - type: number \ No newline at end of file + type: number diff --git a/x-pack/plugins/security_solution/common/api/timeline/persist_favorite/persist_favorite_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/persist_favorite/persist_favorite_route.gen.ts new file mode 100644 index 0000000000000..f28483e8f0e66 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/persist_favorite/persist_favorite_route.gen.ts @@ -0,0 +1,35 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Favorite API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { TimelineType, FavoriteTimelineResponse } from '../model/components.gen'; + +export type PersistFavoriteRouteRequestBody = z.infer; +export const PersistFavoriteRouteRequestBody = z.object({ + timelineId: z.string().nullable(), + templateTimelineId: z.string().nullable(), + templateTimelineVersion: z.number().nullable(), + timelineType: TimelineType.nullable(), +}); +export type PersistFavoriteRouteRequestBodyInput = z.input; + +export type PersistFavoriteRouteResponse = z.infer; +export const PersistFavoriteRouteResponse = z.object({ + data: z.object({ + persistFavorite: FavoriteTimelineResponse, + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/persist_favorite/persist_favorite_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/persist_favorite/persist_favorite_route.schema.yaml similarity index 74% rename from x-pack/plugins/security_solution/common/api/timeline/persist_favorite/persist_favorite_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/persist_favorite/persist_favorite_route.schema.yaml index 88eced8f9a843..87a9e4d21ac68 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/persist_favorite/persist_favorite_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/persist_favorite/persist_favorite_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Favorite API - version: 8.9.0 + version: '2023-10-31' servers: - url: 'http://{kibana_host}:{port}' variables: @@ -12,7 +12,9 @@ servers: paths: /api/timeline/_favorite: patch: - operationId: persistFavoriteRoute + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: PersistFavoriteRoute summary: Persists a given users favorite status of a timeline. tags: - access:securitySolution @@ -23,6 +25,7 @@ paths: application/json: schema: type: object + required: [timelineId, templateTimelineId, templateTimelineVersion, timelineType] properties: timelineId: type: string @@ -34,9 +37,8 @@ paths: type: number nullable: true timelineType: - allOf: - - $ref: '../model/components.yaml#/components/schemas/TimelineType' - - nullable: true + $ref: '../model/components.schema.yaml#/components/schemas/TimelineType' + nullable: true responses: '200': description: Indicates the favorite status was successfully updated. @@ -44,14 +46,14 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [persistFavorite] properties: persistFavorite: - $ref: '../model/components.yaml#/components/schemas/FavoriteTimelineResponse' - required: - - data + $ref: '../model/components.schema.yaml#/components/schemas/FavoriteTimelineResponse' '403': description: Indicates the user does not have the required permissions to persist the favorite status. content: @@ -62,4 +64,4 @@ paths: body: type: string statusCode: - type: number \ No newline at end of file + type: number diff --git a/x-pack/plugins/security_solution/common/api/timeline/persist_note/persist_note_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/persist_note/persist_note_route.gen.ts new file mode 100644 index 0000000000000..5cbb0464218fb --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/persist_note/persist_note_route.gen.ts @@ -0,0 +1,42 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Notes API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { BareNote, Note } from '../model/components.gen'; + +export type PersistNoteRouteRequestBody = z.infer; +export const PersistNoteRouteRequestBody = z.object({ + note: BareNote, + overrideOwner: z.boolean().nullable().optional(), + noteId: z.string().nullable().optional(), + version: z.string().nullable().optional(), + eventIngested: z.string().nullable().optional(), + eventTimestamp: z.string().nullable().optional(), + eventDataView: z.string().nullable().optional(), +}); +export type PersistNoteRouteRequestBodyInput = z.input; + +export type PersistNoteRouteResponse = z.infer; +export const PersistNoteRouteResponse = z.object({ + data: z.object({ + persistNote: z.object({ + code: z.number(), + message: z.string(), + note: Note, + }), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/persist_note/persist_note_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/persist_note/persist_note_route.schema.yaml similarity index 68% rename from x-pack/plugins/security_solution/common/api/timeline/persist_note/persist_note_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/persist_note/persist_note_route.schema.yaml index f0c9e140f241e..e5de10d97e013 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/persist_note/persist_note_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/persist_note/persist_note_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Notes API - version: 8.14.0 + version: '2023-10-31' externalDocs: url: https://www.elastic.co/guide/en/security/current/timeline-api-update.html description: Documentation @@ -15,7 +15,9 @@ servers: paths: /api/note: patch: - operationId: persistNoteRoute + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: PersistNoteRoute summary: Persists a note to a timeline. tags: - access:securitySolution @@ -26,11 +28,10 @@ paths: application/json: schema: type: object - required: - - note + required: [note] properties: note: - $ref: '../model/components.yaml#/components/schemas/BareNote' + $ref: '../model/components.schema.yaml#/components/schemas/BareNote' overrideOwner: type: boolean nullable: true @@ -40,6 +41,15 @@ paths: version: type: string nullable: true + eventIngested: + type: string + nullable: true + eventTimestamp: + type: string + nullable: true + eventDataView: + type: string + nullable: true responses: '200': description: Indicates the note was successfully created. @@ -47,18 +57,19 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [persistNote] properties: persistNote: type: object + required: [code, message, note] properties: code: type: number message: type: string note: - $ref: '../model/components.yaml#/components/schemas/Note' - required: - - data + $ref: '../model/components.schema.yaml#/components/schemas/Note' diff --git a/x-pack/plugins/security_solution/common/api/timeline/pinned_events/pinned_events_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/pinned_events/pinned_events_route.gen.ts new file mode 100644 index 0000000000000..20556779db7c4 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/pinned_events/pinned_events_route.gen.ts @@ -0,0 +1,41 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Pinned Event API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { PinnedEvent } from '../model/components.gen'; + +export type PersistPinnedEventRouteRequestBody = z.infer; +export const PersistPinnedEventRouteRequestBody = z.object({ + eventId: z.string(), + pinnedEventId: z.string().nullable().optional(), + timelineId: z.string(), +}); +export type PersistPinnedEventRouteRequestBodyInput = z.input< + typeof PersistPinnedEventRouteRequestBody +>; + +export type PersistPinnedEventRouteResponse = z.infer; +export const PersistPinnedEventRouteResponse = z.object({ + data: z.object({ + persistPinnedEventOnTimeline: PinnedEvent.merge( + z.object({ + code: z.number().optional(), + message: z.string().optional(), + }) + ), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/pinned_events/pinned_events_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/pinned_events/pinned_events_route.schema.yaml similarity index 81% rename from x-pack/plugins/security_solution/common/api/timeline/pinned_events/pinned_events_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/pinned_events/pinned_events_route.schema.yaml index 506cd0cc15544..dd16dda4f273c 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/pinned_events/pinned_events_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/pinned_events/pinned_events_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Pinned Event API - version: 8.14.0 + version: '2023-10-31' externalDocs: url: https://www.elastic.co/guide/en/security/current/_pin_an_event_to_an_existing_timeline.html description: Documentation @@ -15,7 +15,9 @@ servers: paths: /api/pinned_event: patch: - operationId: persistPinnedEventRoute + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: PersistPinnedEventRoute summary: Persists a pinned event to a timeline. tags: - access:securitySolution @@ -26,8 +28,7 @@ paths: application/json: schema: type: object - required: - - eventId + required: [eventId, timelineId] properties: eventId: type: string @@ -43,18 +44,18 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [persistPinnedEventOnTimeline] properties: persistPinnedEventOnTimeline: allOf: - - $ref: '../model/components.yaml#/components/schemas/PinnedEvent' + - $ref: '../model/components.schema.yaml#/components/schemas/PinnedEvent' - type: object properties: code: type: number message: type: string - required: - - data diff --git a/x-pack/plugins/security_solution/common/api/timeline/resolve_timeline/resolve_timeline_route.gen.ts b/x-pack/plugins/security_solution/common/api/timeline/resolve_timeline/resolve_timeline_route.gen.ts new file mode 100644 index 0000000000000..4db6738dc0b87 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/resolve_timeline/resolve_timeline_route.gen.ts @@ -0,0 +1,39 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Elastic Security - Timeline - Resolve Timeline API + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { TimelineResponse } from '../model/components.gen'; + +export type ResolveTimelineRequestQuery = z.infer; +export const ResolveTimelineRequestQuery = z.object({ + /** + * The ID of the template timeline to resolve + */ + template_timeline_id: z.string().optional(), + /** + * The ID of the timeline to resolve + */ + id: z.string().optional(), +}); +export type ResolveTimelineRequestQueryInput = z.input; + +export type ResolveTimelineResponse = z.infer; +export const ResolveTimelineResponse = z.object({ + data: z.object({ + getOneTimeline: TimelineResponse.nullable(), + }), +}); diff --git a/x-pack/plugins/security_solution/common/api/timeline/resolve_timeline/resolve_timeline_route_schema.yaml b/x-pack/plugins/security_solution/common/api/timeline/resolve_timeline/resolve_timeline_route.schema.yaml similarity index 72% rename from x-pack/plugins/security_solution/common/api/timeline/resolve_timeline/resolve_timeline_route_schema.yaml rename to x-pack/plugins/security_solution/common/api/timeline/resolve_timeline/resolve_timeline_route.schema.yaml index 5c5a4b228339c..6c2b0d309f01f 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/resolve_timeline/resolve_timeline_route_schema.yaml +++ b/x-pack/plugins/security_solution/common/api/timeline/resolve_timeline/resolve_timeline_route.schema.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Elastic Security - Timeline - Resolve Timeline API - version: 8.9.0 + version: '2023-10-31' servers: - url: 'http://{kibana_host}:{port}' variables: @@ -10,9 +10,11 @@ servers: port: default: '5601' paths: - /api/timeline: + /api/timeline/resolve: get: - operationId: resolveTimeline + x-labels: [serverless, ess] + x-codegen-enabled: true + operationId: ResolveTimeline summary: Get an existing saved timeline or timeline template. tags: - access:securitySolution @@ -34,17 +36,16 @@ paths: application/json: schema: type: object + required: [data] properties: data: type: object + required: [getOneTimeline] properties: getOneTimeline: - oneOf: - - $ref: '../model/components.yaml#/components/schemas/TimelineResponse' - - nullable: true - required: - - data + $ref: '../model/components.schema.yaml#/components/schemas/TimelineResponse' + nullable: true '400': description: The request is missing parameters '404': - description: The (template) timeline was not found \ No newline at end of file + description: The (template) timeline was not found diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 62888d91a2351..cc38eefffe5f2 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -98,16 +98,6 @@ export const allowedExperimentalValues = Object.freeze({ */ responseActionScanEnabled: false, - /** - * Enables top charts on Alerts Page - */ - alertsPageChartsEnabled: true, - - /** - * Enables the alert type column in KPI visualizations on Alerts Page - */ - alertTypeEnabled: false, - /** * Enables new notes */ @@ -131,7 +121,7 @@ export const allowedExperimentalValues = Object.freeze({ /** * Enables the Assistant BedrockChat Langchain model, introduced in `8.15.0`. */ - assistantBedrockChat: false, + assistantBedrockChat: true, /** * Enables the Managed User section inside the new user details flyout. diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts index 9efb295c13496..290cd6e57eb92 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts @@ -15,14 +15,6 @@ export { CtiQueries } from '../../../api/search_strategy'; export type CtiEnrichment = Record; export type EventFields = Record; -export interface CtiEnrichmentIdentifiers { - id: string | undefined; - field: string | undefined; - value: string | undefined; - type: string | undefined; - feedName: string | undefined; -} - export interface CtiEventEnrichmentStrategyResponse extends IEsSearchResponse { enrichments: CtiEnrichment[]; inspect: Inspect; diff --git a/x-pack/plugins/security_solution/common/utils/data_retrieval.test.ts b/x-pack/plugins/security_solution/common/utils/data_retrieval.test.ts deleted file mode 100644 index d7ab3986a14f9..0000000000000 --- a/x-pack/plugins/security_solution/common/utils/data_retrieval.test.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { getFirstElement } from './data_retrieval'; - -describe('getFirstElement', () => { - it('returns undefined if array is undefined', () => { - expect(getFirstElement(undefined)).toEqual(undefined); - }); - - it('returns undefined if array is empty', () => { - expect(getFirstElement([])).toEqual(undefined); - }); - - it('returns the first element if present', () => { - expect(getFirstElement(['hi mom'])).toEqual('hi mom'); - }); - - it('returns the first element of multiple', () => { - expect(getFirstElement(['hi mom', 'hello world'])).toEqual('hi mom'); - }); -}); diff --git a/x-pack/plugins/security_solution/common/utils/data_retrieval.ts b/x-pack/plugins/security_solution/common/utils/data_retrieval.ts deleted file mode 100644 index 04b6839b854b4..0000000000000 --- a/x-pack/plugins/security_solution/common/utils/data_retrieval.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -/** - * Retrieves the first element of the given array. - * - * @param array the array to retrieve a value from - * @returns the first element of the array, or undefined if the array is undefined - */ -export const getFirstElement: (array: T[] | undefined) => T | undefined = (array) => - array ? array[0] : undefined; diff --git a/x-pack/plugins/security_solution/docs/openapi/ess/security_solution_timeline_api_2023_10_31.bundled.schema.yaml b/x-pack/plugins/security_solution/docs/openapi/ess/security_solution_timeline_api_2023_10_31.bundled.schema.yaml new file mode 100644 index 0000000000000..169029d2ff88b --- /dev/null +++ b/x-pack/plugins/security_solution/docs/openapi/ess/security_solution_timeline_api_2023_10_31.bundled.schema.yaml @@ -0,0 +1,1472 @@ +openapi: 3.0.3 +info: + title: Bundled OpenAPI specs + version: '2023-10-31' +servers: + - url: 'http://{kibana_host}:{port}' + variables: + kibana_host: + default: localhost + port: + default: '5601' +paths: + /api/note: + delete: + operationId: DeleteNote + requestBody: + content: + application/json: + schema: + oneOf: + - nullable: true + type: object + properties: + noteId: + type: string + required: + - noteId + - type: object + properties: + noteIds: + items: + type: string + nullable: true + type: array + required: + - noteIds + description: The id of the note to delete. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + description: Indicates the note was successfully deleted. + summary: Deletes a note from a timeline. + tags: + - 'access:securitySolution' + get: + description: Gets notes + operationId: GetNotes + parameters: + - in: query + name: documentIds + required: true + schema: + $ref: '#/components/schemas/DocumentIds' + - in: query + name: page + schema: + nullable: true + type: number + - in: query + name: perPage + schema: + nullable: true + type: number + - in: query + name: search + schema: + nullable: true + type: string + - in: query + name: sortField + schema: + nullable: true + type: string + - in: query + name: sortOrder + schema: + nullable: true + type: string + - in: query + name: filter + schema: + nullable: true + type: string + responses: + '200': + description: Indicates the requested notes were returned. + summary: Get all notes for a given document. + tags: + - 'access:securitySolution' + patch: + operationId: PersistNoteRoute + requestBody: + content: + application/json: + schema: + type: object + properties: + eventDataView: + nullable: true + type: string + eventIngested: + nullable: true + type: string + eventTimestamp: + nullable: true + type: string + note: + $ref: '#/components/schemas/BareNote' + noteId: + nullable: true + type: string + overrideOwner: + nullable: true + type: boolean + version: + nullable: true + type: string + required: + - note + description: The note to persist or update along with additional metadata. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistNote: + type: object + properties: + code: + type: number + message: + type: string + note: + $ref: '#/components/schemas/Note' + required: + - code + - message + - note + required: + - persistNote + required: + - data + description: Indicates the note was successfully created. + summary: Persists a note to a timeline. + tags: + - 'access:securitySolution' + /api/pinned_event: + patch: + operationId: PersistPinnedEventRoute + requestBody: + content: + application/json: + schema: + type: object + properties: + eventId: + type: string + pinnedEventId: + nullable: true + type: string + timelineId: + type: string + required: + - eventId + - timelineId + description: The pinned event to persist or update along with additional metadata. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistPinnedEventOnTimeline: + allOf: + - $ref: '#/components/schemas/PinnedEvent' + - type: object + properties: + code: + type: number + message: + type: string + required: + - persistPinnedEventOnTimeline + required: + - data + description: Indicate the event was successfully pinned in the timeline. + summary: Persists a pinned event to a timeline. + tags: + - 'access:securitySolution' + /api/timeline: + delete: + operationId: DeleteTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + savedObjectIds: + items: + type: string + type: array + searchIds: + description: >- + Saved search ids that should be deleted alongside the + timelines + items: + type: string + type: array + required: + - savedObjectIds + description: The ids of the timelines or timeline templates to delete. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deleteTimeline: + type: boolean + required: + - deleteTimeline + required: + - data + description: Indicates the timeline was successfully deleted. + summary: Deletes one or more timelines or timeline templates. + tags: + - 'access:securitySolution' + get: + operationId: GetTimeline + parameters: + - description: The ID of the template timeline to retrieve + in: query + name: template_timeline_id + schema: + type: string + - description: The ID of the timeline to retrieve + in: query + name: id + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + getOneTimeline: + $ref: '#/components/schemas/TimelineResponse' + nullable: true + required: + - getOneTimeline + required: + - data + description: Indicates that the (template) timeline was found and returned. + summary: >- + Get an existing saved timeline or timeline template. This API is used to + retrieve an existing saved timeline or timeline template. + tags: + - 'access:securitySolution' + patch: + description: >- + Updates an existing timeline. This API is used to update the title, + description, date range, pinned events, pinned queries, and/or pinned + saved queries of an existing timeline. + operationId: PatchTimeline + requestBody: + content: + application/json: + schema: + type: object + properties: + timeline: + $ref: '#/components/schemas/SavedTimeline' + timelineId: + nullable: true + type: string + version: + nullable: true + type: string + required: + - timelineId + - version + - timeline + description: The timeline updates along with the timeline ID and version. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistTimeline: + type: object + properties: + timeline: + $ref: '#/components/schemas/TimelineResponse' + required: + - timeline + required: + - persistTimeline + required: + - data + description: >- + Indicates that the draft timeline was successfully created. In the + event the user already has a draft timeline, the existing draft + timeline is cleared and returned. + '405': + content: + application/json: + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: >- + Indicates that the user does not have the required access to create + a draft timeline. + summary: Updates an existing timeline. + tags: + - 'access:securitySolution' + post: + operationId: CreateTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + status: + $ref: '#/components/schemas/TimelineStatus' + nullable: true + templateTimelineId: + nullable: true + type: string + templateTimelineVersion: + nullable: true + type: number + timeline: + $ref: '#/components/schemas/SavedTimeline' + timelineId: + nullable: true + type: string + timelineType: + $ref: '#/components/schemas/TimelineType' + nullable: true + version: + nullable: true + type: string + required: + - timeline + description: >- + The required timeline fields used to create a new timeline along with + optional fields that will be created if not provided. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistTimeline: + type: object + properties: + timeline: + $ref: '#/components/schemas/TimelineResponse' + required: + - persistTimeline + required: + - data + description: Indicates the timeline was successfully created. + '405': + content: + application/json: + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: Indicates that there was an error in the timeline creation. + summary: Creates a new timeline. + tags: + - 'access:securitySolution' + /api/timeline/_draft: + get: + operationId: GetDraftTimelines + parameters: + - in: query + name: timelineType + required: true + schema: + $ref: '#/components/schemas/TimelineType' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistTimeline: + type: object + properties: + timeline: + $ref: '#/components/schemas/TimelineResponse' + required: + - timeline + required: + - persistTimeline + required: + - data + description: Indicates that the draft timeline was successfully retrieved. + '403': + content: + 'application:json': + schema: + type: object + properties: + message: + type: string + status_code: + type: number + description: >- + If a draft timeline was not found and we attempted to create one, it + indicates that the user does not have the required permissions to + create a draft timeline. + '409': + content: + 'application:json': + schema: + type: object + properties: + message: + type: string + status_code: + type: number + description: >- + This should never happen, but if a draft timeline was not found and + we attempted to create one, it indicates that there is already a + draft timeline with the given timelineId. + summary: >- + Retrieves the draft timeline for the current user. If the user does not + have a draft timeline, an empty timeline is returned. + tags: + - 'access:securitySolution' + post: + description: > + Retrieves a clean draft timeline. If a draft timeline does not exist, it + is created and returned. + operationId: CleanDraftTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + timelineType: + $ref: '#/components/schemas/TimelineType' + required: + - timelineType + description: >- + The type of timeline to create. Valid values are `default` and + `template`. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistTimeline: + type: object + properties: + timeline: + $ref: '#/components/schemas/TimelineResponse' + required: + - timeline + required: + - persistTimeline + required: + - data + description: >- + Indicates that the draft timeline was successfully created. In the + event the user already has a draft timeline, the existing draft + timeline is cleared and returned. + '403': + content: + 'application:json': + schema: + type: object + properties: + message: + type: string + status_code: + type: number + description: >- + Indicates that the user does not have the required permissions to + create a draft timeline. + '409': + content: + 'application:json': + schema: + type: object + properties: + message: + type: string + status_code: + type: number + description: >- + Indicates that there is already a draft timeline with the given + timelineId. + summary: Retrieves a draft timeline or timeline template. + tags: + - 'access:securitySolution' + /api/timeline/_export: + post: + operationId: ExportTimelines + parameters: + - description: The name of the file to export + in: query + name: file_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + ids: + items: + type: string + nullable: true + type: array + description: The ids of the timelines to export + required: true + responses: + '200': + content: + application/ndjson: + schema: + description: NDJSON of the exported timelines + type: string + description: Indicates the timelines were successfully exported + '400': + content: + application/ndjson: + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: Indicates that the export size limit was exceeded + summary: Exports timelines as an NDJSON file + tags: + - 'access:securitySolution' + /api/timeline/_favorite: + patch: + operationId: PersistFavoriteRoute + requestBody: + content: + application/json: + schema: + type: object + properties: + templateTimelineId: + nullable: true + type: string + templateTimelineVersion: + nullable: true + type: number + timelineId: + nullable: true + type: string + timelineType: + $ref: '#/components/schemas/TimelineType' + nullable: true + required: + - timelineId + - templateTimelineId + - templateTimelineVersion + - timelineType + description: The required fields used to favorite a (template) timeline. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistFavorite: + $ref: '#/components/schemas/FavoriteTimelineResponse' + required: + - persistFavorite + required: + - data + description: Indicates the favorite status was successfully updated. + '403': + content: + 'application:json': + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: >- + Indicates the user does not have the required permissions to persist + the favorite status. + summary: Persists a given users favorite status of a timeline. + tags: + - 'access:securitySolution' + /api/timeline/_import: + post: + operationId: ImportTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + file: + allOf: + - $ref: '#/components/schemas/Readable' + - type: object + properties: + hapi: + type: object + properties: + filename: + type: string + headers: + type: object + isImmutable: + enum: + - 'true' + - 'false' + type: string + required: + - filename + - headers + required: + - hapi + description: The timelines to import as a readable stream. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/ImportTimelineResult' + required: + - data + description: Indicates the import of timelines was successful. + '400': + content: + application/json: + schema: + type: object + properties: + body: + type: string + id: + type: string + statusCode: + type: number + description: >- + Indicates the import of timelines was unsuccessful because of an + invalid file extension. + '404': + content: + application/json: + schema: + type: object + properties: + id: + type: string + statusCode: + type: number + description: >- + Indicates that we were unable to locate the saved object client + necessary to handle the import. + '409': + content: + application/json: + schema: + type: object + properties: + body: + type: string + id: + type: string + statusCode: + type: number + description: Indicates the import of timelines was unsuccessful. + summary: Imports timelines. + tags: + - 'access:securitySolution' + /api/timeline/_prepackaged: + post: + operationId: InstallPrepackedTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + prepackagedTimelines: + items: + $ref: '#/components/schemas/SavedTimeline' + type: array + timelinesToInstall: + items: + $ref: '#/components/schemas/ImportTimelines' + nullable: true + type: array + timelinesToUpdate: + items: + $ref: '#/components/schemas/ImportTimelines' + nullable: true + type: array + required: + - timelinesToInstall + - timelinesToUpdate + - prepackagedTimelines + description: The timelines to install or update. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/ImportTimelineResult' + required: + - data + description: Indicates the installation of prepackaged timelines was successful. + '500': + content: + 'application:json': + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: >- + Indicates the installation of prepackaged timelines was + unsuccessful. + summary: Installs prepackaged timelines. + tags: + - 'access:securitySolution' + /api/timeline/resolve: + get: + operationId: ResolveTimeline + parameters: + - description: The ID of the template timeline to resolve + in: query + name: template_timeline_id + schema: + type: string + - description: The ID of the timeline to resolve + in: query + name: id + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + getOneTimeline: + $ref: '#/components/schemas/TimelineResponse' + nullable: true + required: + - getOneTimeline + required: + - data + description: The (template) timeline has been found + '400': + description: The request is missing parameters + '404': + description: The (template) timeline was not found + summary: Get an existing saved timeline or timeline template. + tags: + - 'access:securitySolution' + /api/timelines: + get: + operationId: GetTimelines + parameters: + - description: >- + If true, only timelines that are marked as favorites by the user are + returned. + in: query + name: only_user_favorite + schema: + enum: + - 'true' + - 'false' + nullable: true + type: string + - in: query + name: timeline_type + schema: + $ref: '#/components/schemas/TimelineType' + nullable: true + - in: query + name: sort_field + schema: + $ref: '#/components/schemas/SortFieldTimeline' + - in: query + name: sort_order + schema: + enum: + - asc + - desc + type: string + - in: query + name: page_size + schema: + nullable: true + type: string + - in: query + name: page_index + schema: + nullable: true + type: string + - in: query + name: search + schema: + nullable: true + type: string + - in: query + name: status + schema: + $ref: '#/components/schemas/TimelineStatus' + nullable: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customTemplateTimelineCount: + type: number + defaultTimelineCount: + type: number + elasticTemplateTimelineCount: + type: number + favoriteCount: + type: number + templateTimelineCount: + type: number + timelines: + items: + $ref: '#/components/schemas/TimelineResponse' + type: array + totalCount: + type: number + required: + - timelines + - totalCount + - defaultTimelineCount + - templateTimelineCount + - favoriteCount + - elasticTemplateTimelineCount + - customTemplateTimelineCount + required: + - data + description: Indicates that the (template) timelines were found and returned. + '400': + content: + 'application:json': + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: Bad request. The user supplied invalid data. + summary: >- + This API is used to retrieve a list of existing saved timelines or + timeline templates. + tags: + - 'access:securitySolution' +components: + schemas: + BareNote: + type: object + properties: + created: + nullable: true + type: number + createdBy: + nullable: true + type: string + eventId: + nullable: true + type: string + note: + nullable: true + type: string + timelineId: + nullable: true + type: string + updated: + nullable: true + type: number + updatedBy: + nullable: true + type: string + required: + - timelineId + ColumnHeaderResult: + type: object + properties: + aggregatable: + type: boolean + category: + type: string + columnHeaderType: + type: string + description: + type: string + example: + oneOf: + - type: string + - type: number + id: + type: string + indexes: + items: + type: string + type: array + name: + type: string + placeholder: + type: string + searchable: + type: boolean + type: + type: string + DataProviderResult: + type: object + properties: + and: + items: + $ref: '#/components/schemas/DataProviderResult' + type: array + enabled: + type: boolean + excluded: + type: boolean + id: + type: string + kqlQuery: + type: string + name: + type: string + queryMatch: + $ref: '#/components/schemas/QueryMatchResult' + type: + $ref: '#/components/schemas/DataProviderType' + DataProviderType: + description: >- + The type of data provider to create. Valid values are `default` and + `template`. + enum: + - default + - template + type: string + DocumentIds: + oneOf: + - items: + type: string + type: array + - type: string + FavoriteTimelineResponse: + type: object + properties: + code: + nullable: true + type: number + favorite: + items: + $ref: '#/components/schemas/FavoriteTimelineResult' + type: array + message: + nullable: true + type: string + savedObjectId: + type: string + templateTimelineId: + nullable: true + type: string + templateTimelineVersion: + nullable: true + type: number + timelineType: + $ref: '#/components/schemas/TimelineType' + version: + type: string + required: + - savedObjectId + - version + FavoriteTimelineResult: + type: object + properties: + favoriteDate: + nullable: true + type: number + fullName: + nullable: true + type: string + userName: + nullable: true + type: string + FilterTimelineResult: + type: object + properties: + exists: + type: boolean + match_all: + type: string + meta: + type: object + properties: + alias: + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + formattedValue: + type: string + index: + type: string + key: + type: string + negate: + type: boolean + params: + type: string + type: + type: string + value: + type: string + missing: + type: string + query: + type: string + range: + type: string + script: + type: string + ImportTimelineResult: + type: object + properties: + errors: + items: + type: object + properties: + error: + type: object + properties: + message: + type: string + status_code: + type: number + id: + type: string + type: array + success: + type: boolean + success_count: + type: number + timelines_installed: + type: number + timelines_updated: + type: number + ImportTimelines: + allOf: + - $ref: '#/components/schemas/SavedTimeline' + - type: object + properties: + eventNotes: + items: + $ref: '#/components/schemas/BareNote' + nullable: true + type: array + globalNotes: + items: + $ref: '#/components/schemas/BareNote' + nullable: true + type: array + pinnedEventIds: + items: + type: string + nullable: true + type: array + savedObjectId: + nullable: true + type: string + version: + nullable: true + type: string + Note: + allOf: + - $ref: '#/components/schemas/BareNote' + - type: object + properties: + noteId: + type: string + version: + type: string + PinnedEvent: + type: object + properties: + created: + nullable: true + type: number + createdBy: + nullable: true + type: string + eventId: + type: string + pinnedEventId: + type: string + timelineId: + type: string + updated: + nullable: true + type: number + updatedBy: + nullable: true + type: string + version: + type: string + required: + - eventId + - pinnedEventId + - timelineId + - version + QueryMatchResult: + type: object + properties: + displayField: + type: string + displayValue: + type: string + field: + type: string + operator: + type: string + value: + type: string + Readable: + type: object + properties: + _data: + additionalProperties: true + type: object + _encoding: + type: string + _events: + additionalProperties: true + type: object + _eventsCount: + type: number + _maxListeners: + additionalProperties: true + type: object + _position: + type: number + _read: + additionalProperties: true + type: object + _readableState: + additionalProperties: true + type: object + readable: + type: boolean + RowRendererId: + enum: + - alert + - alerts + - auditd + - auditd_file + - library + - netflow + - plain + - registry + - suricata + - system + - system_dns + - system_endgame_process + - system_file + - system_fim + - system_security_event + - system_socket + - threat_match + - zeek + type: string + SavedTimeline: + type: object + properties: + columns: + $ref: '#/components/schemas/ColumnHeaderResult' + nullable: true + created: + nullable: true + type: number + createdBy: + nullable: true + type: string + dataProviders: + items: + $ref: '#/components/schemas/DataProviderResult' + nullable: true + type: array + dataViewId: + nullable: true + type: string + dateRange: + nullable: true + type: object + properties: + end: + oneOf: + - type: string + - type: number + start: + oneOf: + - type: string + - type: number + description: + nullable: true + type: string + eqlOptions: + nullable: true + type: object + properties: + eventCategoryField: + type: string + tiebreakerField: + type: string + timestampField: + type: string + eventType: + nullable: true + type: string + excludedRowRendererIds: + items: + $ref: '#/components/schemas/RowRendererId' + nullable: true + type: array + favorite: + items: + $ref: '#/components/schemas/FavoriteTimelineResult' + nullable: true + type: array + filters: + items: + $ref: '#/components/schemas/FilterTimelineResult' + nullable: true + type: array + indexNames: + items: + type: string + nullable: true + type: array + kqlMode: + nullable: true + type: string + kqlQuery: + $ref: '#/components/schemas/SerializedFilterQueryResult' + nullable: true + savedQueryId: + nullable: true + type: string + savedSearchId: + nullable: true + type: string + sort: + $ref: '#/components/schemas/Sort' + nullable: true + status: + enum: + - active + - draft + - immutable + nullable: true + type: string + templateTimelineId: + nullable: true + type: string + templateTimelineVersion: + nullable: true + type: number + timelineType: + $ref: '#/components/schemas/TimelineType' + nullable: true + title: + nullable: true + type: string + updated: + nullable: true + type: number + updatedBy: + nullable: true + type: string + SerializedFilterQueryResult: + type: object + properties: + filterQuery: + type: object + properties: + kuery: + type: object + properties: + expression: + type: string + kind: + type: string + serializedQuery: + type: string + Sort: + type: object + properties: + columnId: + nullable: true + type: string + columnType: + nullable: true + type: string + sortDirection: + nullable: true + type: string + SortFieldTimeline: + description: The field to sort the timelines by. + enum: + - title + - description + - updated + - created + type: string + TimelineResponse: + allOf: + - $ref: '#/components/schemas/SavedTimeline' + - type: object + properties: + eventIdToNoteIds: + items: + $ref: '#/components/schemas/Note' + type: array + noteIds: + items: + type: string + type: array + notes: + items: + $ref: '#/components/schemas/Note' + type: array + pinnedEventIds: + items: + type: string + type: array + pinnedEventsSaveObject: + items: + $ref: '#/components/schemas/PinnedEvent' + type: array + savedObjectId: + type: string + version: + type: string + required: + - savedObjectId + - version + TimelineStatus: + description: >- + The status of the timeline. Valid values are `active`, `draft`, and + `immutable`. + enum: + - active + - draft + - immutable + type: string + TimelineType: + description: >- + The type of timeline to create. Valid values are `default` and + `template`. + enum: + - default + - template + type: string + securitySchemes: + BasicAuth: + scheme: basic + type: http +security: + - BasicAuth: [] diff --git a/x-pack/plugins/security_solution/docs/openapi/serverless/security_solution_timeline_api_2023_10_31.bundled.schema.yaml b/x-pack/plugins/security_solution/docs/openapi/serverless/security_solution_timeline_api_2023_10_31.bundled.schema.yaml new file mode 100644 index 0000000000000..169029d2ff88b --- /dev/null +++ b/x-pack/plugins/security_solution/docs/openapi/serverless/security_solution_timeline_api_2023_10_31.bundled.schema.yaml @@ -0,0 +1,1472 @@ +openapi: 3.0.3 +info: + title: Bundled OpenAPI specs + version: '2023-10-31' +servers: + - url: 'http://{kibana_host}:{port}' + variables: + kibana_host: + default: localhost + port: + default: '5601' +paths: + /api/note: + delete: + operationId: DeleteNote + requestBody: + content: + application/json: + schema: + oneOf: + - nullable: true + type: object + properties: + noteId: + type: string + required: + - noteId + - type: object + properties: + noteIds: + items: + type: string + nullable: true + type: array + required: + - noteIds + description: The id of the note to delete. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + description: Indicates the note was successfully deleted. + summary: Deletes a note from a timeline. + tags: + - 'access:securitySolution' + get: + description: Gets notes + operationId: GetNotes + parameters: + - in: query + name: documentIds + required: true + schema: + $ref: '#/components/schemas/DocumentIds' + - in: query + name: page + schema: + nullable: true + type: number + - in: query + name: perPage + schema: + nullable: true + type: number + - in: query + name: search + schema: + nullable: true + type: string + - in: query + name: sortField + schema: + nullable: true + type: string + - in: query + name: sortOrder + schema: + nullable: true + type: string + - in: query + name: filter + schema: + nullable: true + type: string + responses: + '200': + description: Indicates the requested notes were returned. + summary: Get all notes for a given document. + tags: + - 'access:securitySolution' + patch: + operationId: PersistNoteRoute + requestBody: + content: + application/json: + schema: + type: object + properties: + eventDataView: + nullable: true + type: string + eventIngested: + nullable: true + type: string + eventTimestamp: + nullable: true + type: string + note: + $ref: '#/components/schemas/BareNote' + noteId: + nullable: true + type: string + overrideOwner: + nullable: true + type: boolean + version: + nullable: true + type: string + required: + - note + description: The note to persist or update along with additional metadata. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistNote: + type: object + properties: + code: + type: number + message: + type: string + note: + $ref: '#/components/schemas/Note' + required: + - code + - message + - note + required: + - persistNote + required: + - data + description: Indicates the note was successfully created. + summary: Persists a note to a timeline. + tags: + - 'access:securitySolution' + /api/pinned_event: + patch: + operationId: PersistPinnedEventRoute + requestBody: + content: + application/json: + schema: + type: object + properties: + eventId: + type: string + pinnedEventId: + nullable: true + type: string + timelineId: + type: string + required: + - eventId + - timelineId + description: The pinned event to persist or update along with additional metadata. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistPinnedEventOnTimeline: + allOf: + - $ref: '#/components/schemas/PinnedEvent' + - type: object + properties: + code: + type: number + message: + type: string + required: + - persistPinnedEventOnTimeline + required: + - data + description: Indicate the event was successfully pinned in the timeline. + summary: Persists a pinned event to a timeline. + tags: + - 'access:securitySolution' + /api/timeline: + delete: + operationId: DeleteTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + savedObjectIds: + items: + type: string + type: array + searchIds: + description: >- + Saved search ids that should be deleted alongside the + timelines + items: + type: string + type: array + required: + - savedObjectIds + description: The ids of the timelines or timeline templates to delete. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + deleteTimeline: + type: boolean + required: + - deleteTimeline + required: + - data + description: Indicates the timeline was successfully deleted. + summary: Deletes one or more timelines or timeline templates. + tags: + - 'access:securitySolution' + get: + operationId: GetTimeline + parameters: + - description: The ID of the template timeline to retrieve + in: query + name: template_timeline_id + schema: + type: string + - description: The ID of the timeline to retrieve + in: query + name: id + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + getOneTimeline: + $ref: '#/components/schemas/TimelineResponse' + nullable: true + required: + - getOneTimeline + required: + - data + description: Indicates that the (template) timeline was found and returned. + summary: >- + Get an existing saved timeline or timeline template. This API is used to + retrieve an existing saved timeline or timeline template. + tags: + - 'access:securitySolution' + patch: + description: >- + Updates an existing timeline. This API is used to update the title, + description, date range, pinned events, pinned queries, and/or pinned + saved queries of an existing timeline. + operationId: PatchTimeline + requestBody: + content: + application/json: + schema: + type: object + properties: + timeline: + $ref: '#/components/schemas/SavedTimeline' + timelineId: + nullable: true + type: string + version: + nullable: true + type: string + required: + - timelineId + - version + - timeline + description: The timeline updates along with the timeline ID and version. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistTimeline: + type: object + properties: + timeline: + $ref: '#/components/schemas/TimelineResponse' + required: + - timeline + required: + - persistTimeline + required: + - data + description: >- + Indicates that the draft timeline was successfully created. In the + event the user already has a draft timeline, the existing draft + timeline is cleared and returned. + '405': + content: + application/json: + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: >- + Indicates that the user does not have the required access to create + a draft timeline. + summary: Updates an existing timeline. + tags: + - 'access:securitySolution' + post: + operationId: CreateTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + status: + $ref: '#/components/schemas/TimelineStatus' + nullable: true + templateTimelineId: + nullable: true + type: string + templateTimelineVersion: + nullable: true + type: number + timeline: + $ref: '#/components/schemas/SavedTimeline' + timelineId: + nullable: true + type: string + timelineType: + $ref: '#/components/schemas/TimelineType' + nullable: true + version: + nullable: true + type: string + required: + - timeline + description: >- + The required timeline fields used to create a new timeline along with + optional fields that will be created if not provided. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistTimeline: + type: object + properties: + timeline: + $ref: '#/components/schemas/TimelineResponse' + required: + - persistTimeline + required: + - data + description: Indicates the timeline was successfully created. + '405': + content: + application/json: + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: Indicates that there was an error in the timeline creation. + summary: Creates a new timeline. + tags: + - 'access:securitySolution' + /api/timeline/_draft: + get: + operationId: GetDraftTimelines + parameters: + - in: query + name: timelineType + required: true + schema: + $ref: '#/components/schemas/TimelineType' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistTimeline: + type: object + properties: + timeline: + $ref: '#/components/schemas/TimelineResponse' + required: + - timeline + required: + - persistTimeline + required: + - data + description: Indicates that the draft timeline was successfully retrieved. + '403': + content: + 'application:json': + schema: + type: object + properties: + message: + type: string + status_code: + type: number + description: >- + If a draft timeline was not found and we attempted to create one, it + indicates that the user does not have the required permissions to + create a draft timeline. + '409': + content: + 'application:json': + schema: + type: object + properties: + message: + type: string + status_code: + type: number + description: >- + This should never happen, but if a draft timeline was not found and + we attempted to create one, it indicates that there is already a + draft timeline with the given timelineId. + summary: >- + Retrieves the draft timeline for the current user. If the user does not + have a draft timeline, an empty timeline is returned. + tags: + - 'access:securitySolution' + post: + description: > + Retrieves a clean draft timeline. If a draft timeline does not exist, it + is created and returned. + operationId: CleanDraftTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + timelineType: + $ref: '#/components/schemas/TimelineType' + required: + - timelineType + description: >- + The type of timeline to create. Valid values are `default` and + `template`. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistTimeline: + type: object + properties: + timeline: + $ref: '#/components/schemas/TimelineResponse' + required: + - timeline + required: + - persistTimeline + required: + - data + description: >- + Indicates that the draft timeline was successfully created. In the + event the user already has a draft timeline, the existing draft + timeline is cleared and returned. + '403': + content: + 'application:json': + schema: + type: object + properties: + message: + type: string + status_code: + type: number + description: >- + Indicates that the user does not have the required permissions to + create a draft timeline. + '409': + content: + 'application:json': + schema: + type: object + properties: + message: + type: string + status_code: + type: number + description: >- + Indicates that there is already a draft timeline with the given + timelineId. + summary: Retrieves a draft timeline or timeline template. + tags: + - 'access:securitySolution' + /api/timeline/_export: + post: + operationId: ExportTimelines + parameters: + - description: The name of the file to export + in: query + name: file_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + ids: + items: + type: string + nullable: true + type: array + description: The ids of the timelines to export + required: true + responses: + '200': + content: + application/ndjson: + schema: + description: NDJSON of the exported timelines + type: string + description: Indicates the timelines were successfully exported + '400': + content: + application/ndjson: + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: Indicates that the export size limit was exceeded + summary: Exports timelines as an NDJSON file + tags: + - 'access:securitySolution' + /api/timeline/_favorite: + patch: + operationId: PersistFavoriteRoute + requestBody: + content: + application/json: + schema: + type: object + properties: + templateTimelineId: + nullable: true + type: string + templateTimelineVersion: + nullable: true + type: number + timelineId: + nullable: true + type: string + timelineType: + $ref: '#/components/schemas/TimelineType' + nullable: true + required: + - timelineId + - templateTimelineId + - templateTimelineVersion + - timelineType + description: The required fields used to favorite a (template) timeline. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + persistFavorite: + $ref: '#/components/schemas/FavoriteTimelineResponse' + required: + - persistFavorite + required: + - data + description: Indicates the favorite status was successfully updated. + '403': + content: + 'application:json': + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: >- + Indicates the user does not have the required permissions to persist + the favorite status. + summary: Persists a given users favorite status of a timeline. + tags: + - 'access:securitySolution' + /api/timeline/_import: + post: + operationId: ImportTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + file: + allOf: + - $ref: '#/components/schemas/Readable' + - type: object + properties: + hapi: + type: object + properties: + filename: + type: string + headers: + type: object + isImmutable: + enum: + - 'true' + - 'false' + type: string + required: + - filename + - headers + required: + - hapi + description: The timelines to import as a readable stream. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/ImportTimelineResult' + required: + - data + description: Indicates the import of timelines was successful. + '400': + content: + application/json: + schema: + type: object + properties: + body: + type: string + id: + type: string + statusCode: + type: number + description: >- + Indicates the import of timelines was unsuccessful because of an + invalid file extension. + '404': + content: + application/json: + schema: + type: object + properties: + id: + type: string + statusCode: + type: number + description: >- + Indicates that we were unable to locate the saved object client + necessary to handle the import. + '409': + content: + application/json: + schema: + type: object + properties: + body: + type: string + id: + type: string + statusCode: + type: number + description: Indicates the import of timelines was unsuccessful. + summary: Imports timelines. + tags: + - 'access:securitySolution' + /api/timeline/_prepackaged: + post: + operationId: InstallPrepackedTimelines + requestBody: + content: + application/json: + schema: + type: object + properties: + prepackagedTimelines: + items: + $ref: '#/components/schemas/SavedTimeline' + type: array + timelinesToInstall: + items: + $ref: '#/components/schemas/ImportTimelines' + nullable: true + type: array + timelinesToUpdate: + items: + $ref: '#/components/schemas/ImportTimelines' + nullable: true + type: array + required: + - timelinesToInstall + - timelinesToUpdate + - prepackagedTimelines + description: The timelines to install or update. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/ImportTimelineResult' + required: + - data + description: Indicates the installation of prepackaged timelines was successful. + '500': + content: + 'application:json': + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: >- + Indicates the installation of prepackaged timelines was + unsuccessful. + summary: Installs prepackaged timelines. + tags: + - 'access:securitySolution' + /api/timeline/resolve: + get: + operationId: ResolveTimeline + parameters: + - description: The ID of the template timeline to resolve + in: query + name: template_timeline_id + schema: + type: string + - description: The ID of the timeline to resolve + in: query + name: id + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + getOneTimeline: + $ref: '#/components/schemas/TimelineResponse' + nullable: true + required: + - getOneTimeline + required: + - data + description: The (template) timeline has been found + '400': + description: The request is missing parameters + '404': + description: The (template) timeline was not found + summary: Get an existing saved timeline or timeline template. + tags: + - 'access:securitySolution' + /api/timelines: + get: + operationId: GetTimelines + parameters: + - description: >- + If true, only timelines that are marked as favorites by the user are + returned. + in: query + name: only_user_favorite + schema: + enum: + - 'true' + - 'false' + nullable: true + type: string + - in: query + name: timeline_type + schema: + $ref: '#/components/schemas/TimelineType' + nullable: true + - in: query + name: sort_field + schema: + $ref: '#/components/schemas/SortFieldTimeline' + - in: query + name: sort_order + schema: + enum: + - asc + - desc + type: string + - in: query + name: page_size + schema: + nullable: true + type: string + - in: query + name: page_index + schema: + nullable: true + type: string + - in: query + name: search + schema: + nullable: true + type: string + - in: query + name: status + schema: + $ref: '#/components/schemas/TimelineStatus' + nullable: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + customTemplateTimelineCount: + type: number + defaultTimelineCount: + type: number + elasticTemplateTimelineCount: + type: number + favoriteCount: + type: number + templateTimelineCount: + type: number + timelines: + items: + $ref: '#/components/schemas/TimelineResponse' + type: array + totalCount: + type: number + required: + - timelines + - totalCount + - defaultTimelineCount + - templateTimelineCount + - favoriteCount + - elasticTemplateTimelineCount + - customTemplateTimelineCount + required: + - data + description: Indicates that the (template) timelines were found and returned. + '400': + content: + 'application:json': + schema: + type: object + properties: + body: + type: string + statusCode: + type: number + description: Bad request. The user supplied invalid data. + summary: >- + This API is used to retrieve a list of existing saved timelines or + timeline templates. + tags: + - 'access:securitySolution' +components: + schemas: + BareNote: + type: object + properties: + created: + nullable: true + type: number + createdBy: + nullable: true + type: string + eventId: + nullable: true + type: string + note: + nullable: true + type: string + timelineId: + nullable: true + type: string + updated: + nullable: true + type: number + updatedBy: + nullable: true + type: string + required: + - timelineId + ColumnHeaderResult: + type: object + properties: + aggregatable: + type: boolean + category: + type: string + columnHeaderType: + type: string + description: + type: string + example: + oneOf: + - type: string + - type: number + id: + type: string + indexes: + items: + type: string + type: array + name: + type: string + placeholder: + type: string + searchable: + type: boolean + type: + type: string + DataProviderResult: + type: object + properties: + and: + items: + $ref: '#/components/schemas/DataProviderResult' + type: array + enabled: + type: boolean + excluded: + type: boolean + id: + type: string + kqlQuery: + type: string + name: + type: string + queryMatch: + $ref: '#/components/schemas/QueryMatchResult' + type: + $ref: '#/components/schemas/DataProviderType' + DataProviderType: + description: >- + The type of data provider to create. Valid values are `default` and + `template`. + enum: + - default + - template + type: string + DocumentIds: + oneOf: + - items: + type: string + type: array + - type: string + FavoriteTimelineResponse: + type: object + properties: + code: + nullable: true + type: number + favorite: + items: + $ref: '#/components/schemas/FavoriteTimelineResult' + type: array + message: + nullable: true + type: string + savedObjectId: + type: string + templateTimelineId: + nullable: true + type: string + templateTimelineVersion: + nullable: true + type: number + timelineType: + $ref: '#/components/schemas/TimelineType' + version: + type: string + required: + - savedObjectId + - version + FavoriteTimelineResult: + type: object + properties: + favoriteDate: + nullable: true + type: number + fullName: + nullable: true + type: string + userName: + nullable: true + type: string + FilterTimelineResult: + type: object + properties: + exists: + type: boolean + match_all: + type: string + meta: + type: object + properties: + alias: + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + formattedValue: + type: string + index: + type: string + key: + type: string + negate: + type: boolean + params: + type: string + type: + type: string + value: + type: string + missing: + type: string + query: + type: string + range: + type: string + script: + type: string + ImportTimelineResult: + type: object + properties: + errors: + items: + type: object + properties: + error: + type: object + properties: + message: + type: string + status_code: + type: number + id: + type: string + type: array + success: + type: boolean + success_count: + type: number + timelines_installed: + type: number + timelines_updated: + type: number + ImportTimelines: + allOf: + - $ref: '#/components/schemas/SavedTimeline' + - type: object + properties: + eventNotes: + items: + $ref: '#/components/schemas/BareNote' + nullable: true + type: array + globalNotes: + items: + $ref: '#/components/schemas/BareNote' + nullable: true + type: array + pinnedEventIds: + items: + type: string + nullable: true + type: array + savedObjectId: + nullable: true + type: string + version: + nullable: true + type: string + Note: + allOf: + - $ref: '#/components/schemas/BareNote' + - type: object + properties: + noteId: + type: string + version: + type: string + PinnedEvent: + type: object + properties: + created: + nullable: true + type: number + createdBy: + nullable: true + type: string + eventId: + type: string + pinnedEventId: + type: string + timelineId: + type: string + updated: + nullable: true + type: number + updatedBy: + nullable: true + type: string + version: + type: string + required: + - eventId + - pinnedEventId + - timelineId + - version + QueryMatchResult: + type: object + properties: + displayField: + type: string + displayValue: + type: string + field: + type: string + operator: + type: string + value: + type: string + Readable: + type: object + properties: + _data: + additionalProperties: true + type: object + _encoding: + type: string + _events: + additionalProperties: true + type: object + _eventsCount: + type: number + _maxListeners: + additionalProperties: true + type: object + _position: + type: number + _read: + additionalProperties: true + type: object + _readableState: + additionalProperties: true + type: object + readable: + type: boolean + RowRendererId: + enum: + - alert + - alerts + - auditd + - auditd_file + - library + - netflow + - plain + - registry + - suricata + - system + - system_dns + - system_endgame_process + - system_file + - system_fim + - system_security_event + - system_socket + - threat_match + - zeek + type: string + SavedTimeline: + type: object + properties: + columns: + $ref: '#/components/schemas/ColumnHeaderResult' + nullable: true + created: + nullable: true + type: number + createdBy: + nullable: true + type: string + dataProviders: + items: + $ref: '#/components/schemas/DataProviderResult' + nullable: true + type: array + dataViewId: + nullable: true + type: string + dateRange: + nullable: true + type: object + properties: + end: + oneOf: + - type: string + - type: number + start: + oneOf: + - type: string + - type: number + description: + nullable: true + type: string + eqlOptions: + nullable: true + type: object + properties: + eventCategoryField: + type: string + tiebreakerField: + type: string + timestampField: + type: string + eventType: + nullable: true + type: string + excludedRowRendererIds: + items: + $ref: '#/components/schemas/RowRendererId' + nullable: true + type: array + favorite: + items: + $ref: '#/components/schemas/FavoriteTimelineResult' + nullable: true + type: array + filters: + items: + $ref: '#/components/schemas/FilterTimelineResult' + nullable: true + type: array + indexNames: + items: + type: string + nullable: true + type: array + kqlMode: + nullable: true + type: string + kqlQuery: + $ref: '#/components/schemas/SerializedFilterQueryResult' + nullable: true + savedQueryId: + nullable: true + type: string + savedSearchId: + nullable: true + type: string + sort: + $ref: '#/components/schemas/Sort' + nullable: true + status: + enum: + - active + - draft + - immutable + nullable: true + type: string + templateTimelineId: + nullable: true + type: string + templateTimelineVersion: + nullable: true + type: number + timelineType: + $ref: '#/components/schemas/TimelineType' + nullable: true + title: + nullable: true + type: string + updated: + nullable: true + type: number + updatedBy: + nullable: true + type: string + SerializedFilterQueryResult: + type: object + properties: + filterQuery: + type: object + properties: + kuery: + type: object + properties: + expression: + type: string + kind: + type: string + serializedQuery: + type: string + Sort: + type: object + properties: + columnId: + nullable: true + type: string + columnType: + nullable: true + type: string + sortDirection: + nullable: true + type: string + SortFieldTimeline: + description: The field to sort the timelines by. + enum: + - title + - description + - updated + - created + type: string + TimelineResponse: + allOf: + - $ref: '#/components/schemas/SavedTimeline' + - type: object + properties: + eventIdToNoteIds: + items: + $ref: '#/components/schemas/Note' + type: array + noteIds: + items: + type: string + type: array + notes: + items: + $ref: '#/components/schemas/Note' + type: array + pinnedEventIds: + items: + type: string + type: array + pinnedEventsSaveObject: + items: + $ref: '#/components/schemas/PinnedEvent' + type: array + savedObjectId: + type: string + version: + type: string + required: + - savedObjectId + - version + TimelineStatus: + description: >- + The status of the timeline. Valid values are `active`, `draft`, and + `immutable`. + enum: + - active + - draft + - immutable + type: string + TimelineType: + description: >- + The type of timeline to create. Valid values are `default` and + `template`. + enum: + - default + - template + type: string + securitySchemes: + BasicAuth: + scheme: basic + type: http +security: + - BasicAuth: [] diff --git a/x-pack/plugins/security_solution/package.json b/x-pack/plugins/security_solution/package.json index 7df47aba441e3..98575c1f48c26 100644 --- a/x-pack/plugins/security_solution/package.json +++ b/x-pack/plugins/security_solution/package.json @@ -31,7 +31,8 @@ "openapi:generate": "node scripts/openapi/generate", "openapi:generate:debug": "node --inspect-brk scripts/openapi/generate", "openapi:bundle:detections": "node scripts/openapi/bundle_detections", + "openapi:bundle:timeline": "node scripts/openapi/bundle_timeline", "openapi:bundle:entity-analytics": "node scripts/openapi/bundle_entity_analytics", "openapi:bundle:endpoint-management": "node scripts/openapi/bundle_endpoint_management" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/columns.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/columns.test.tsx deleted file mode 100644 index 52b6493a25c21..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/columns.test.tsx +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import type { ReactWrapper } from 'enzyme'; -import React from 'react'; -import { getColumns } from './columns'; -import { TestProviders } from '../../mock'; -import { useMountAppended } from '../../utils/use_mount_appended'; -import { mockBrowserFields } from '../../containers/source/mock'; -import type { EventFieldsData } from './types'; - -jest.mock('../../lib/kibana'); - -jest.mock('@kbn/cell-actions/src/hooks/use_load_actions', () => { - const actual = jest.requireActual('@kbn/cell-actions/src/hooks/use_load_actions'); - return { - ...actual, - useLoadActions: jest.fn().mockImplementation(() => ({ - value: [], - error: undefined, - loading: false, - })), - }; -}); - -jest.mock('../../hooks/use_get_field_spec'); - -interface Column { - field: string; - name: string | JSX.Element; - sortable: boolean; - render: (field: string, data: EventFieldsData) => JSX.Element; -} - -describe('getColumns', () => { - const mount = useMountAppended(); - const defaultProps = { - browserFields: mockBrowserFields, - columnHeaders: [], - contextId: 'some-context', - eventId: 'some-event', - getLinkValue: jest.fn(), - onUpdateColumns: jest.fn(), - scopeId: 'some-timeline', - toggleColumn: jest.fn(), - }; - - test('should have expected fields', () => { - const columns = getColumns(defaultProps); - columns.forEach((column) => { - expect(column).toHaveProperty('field'); - expect(column).toHaveProperty('name'); - expect(column).toHaveProperty('render'); - expect(column).toHaveProperty('sortable'); - }); - }); - - describe('column actions', () => { - let actionsColumn: Column; - const mockDataToUse = mockBrowserFields.agent.fields; - const testValue = 'testValue'; - const testData = { - type: 'someType', - category: 'agent', - field: 'agent.id', - ...mockDataToUse, - } as EventFieldsData; - - beforeEach(() => { - actionsColumn = getColumns(defaultProps)[0] as Column; - }); - - test('it renders inline actions', () => { - const wrapper = mount( - {actionsColumn.render(testValue, testData)} - ) as ReactWrapper; - - expect(wrapper.find('[data-test-subj="inlineActions"]').exists()).toBeTruthy(); - }); - - test('it does not render inline actions when readOnly prop is passed', () => { - actionsColumn = getColumns({ ...defaultProps, isReadOnly: true })[0] as Column; - const wrapper = mount( - {actionsColumn.render(testValue, testData)} - ) as ReactWrapper; - - expect(wrapper.find('[data-test-subj="inlineActions"]').exists()).toBeFalsy(); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx deleted file mode 100644 index 5ec5cf8ce892c..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiPanel, EuiText } from '@elastic/eui'; -import memoizeOne from 'memoize-one'; -import React from 'react'; -import styled from 'styled-components'; -import { getCategory } from '@kbn/triggers-actions-ui-plugin/public'; -import { SecurityCellActions, CellActionsMode, SecurityCellActionsTrigger } from '../cell_actions'; -import type { BrowserFields } from '../../containers/source'; -import * as i18n from './translations'; -import type { EventFieldsData } from './types'; -import type { BrowserField } from '../../../../common/search_strategy'; -import { FieldValueCell } from './table/field_value_cell'; -import { FieldNameCell } from './table/field_name_cell'; -import { getSourcererScopeId } from '../../../helpers'; -import type { ColumnsProvider } from './event_fields_browser'; - -const HoverActionsContainer = styled(EuiPanel)` - align-items: center; - display: flex; - flex-direction: row; - height: 25px; - justify-content: center; - left: 5px; - position: absolute; - top: -10px; - width: 30px; -`; - -HoverActionsContainer.displayName = 'HoverActionsContainer'; - -export const getFieldFromBrowserField = memoizeOne( - (field: string, browserFields: BrowserFields): BrowserField | undefined => { - const category = getCategory(field); - - return browserFields[category]?.fields?.[field] as BrowserField; - }, - (newArgs, lastArgs) => newArgs[0] === lastArgs[0] -); - -export const getColumns: ColumnsProvider = ({ - browserFields, - eventId, - contextId, - scopeId, - getLinkValue, - isDraggable, - isReadOnly, -}) => [ - ...(!isReadOnly - ? ([ - { - field: 'values', - name: ( - - {i18n.ACTIONS} - - ), - sortable: false, - truncateText: false, - width: '132px', - render: (values, data) => { - return ( - - ); - }, - }, - ] as ReturnType) - : []), - { - field: 'field', - className: 'eventFieldsTable__fieldNameCell', - name: ( - - {i18n.FIELD} - - ), - sortable: true, - truncateText: false, - render: (field, data) => { - return ( - - ); - }, - }, - { - field: 'values', - className: 'eventFieldsTable__fieldValueCell', - name: ( - - {i18n.VALUE} - - ), - sortable: true, - truncateText: false, - render: (values, data) => { - const fieldFromBrowserField = getFieldFromBrowserField(data.field, browserFields); - return ( - - ); - }, - }, -]; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.tsx deleted file mode 100644 index da9b26ddc4e4a..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.tsx +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import React from 'react'; -import styled from 'styled-components'; -import type { EuiBasicTableColumn } from '@elastic/eui'; -import { - EuiAccordion, - EuiFlexGroup, - EuiFlexItem, - EuiLink, - EuiSpacer, - EuiToolTip, -} from '@elastic/eui'; - -import type { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; -import type { ThreatDetailsRow } from './helpers'; -import { - getEnrichmentIdentifiers, - isInvestigationTimeEnrichment, - getFirstSeen, - buildThreatDetailsItems, -} from './helpers'; -import { EnrichmentButtonContent } from './enrichment_button_content'; -import { ThreatSummaryTitle } from './threat_summary_title'; -import { InspectButton } from '../../inspect'; -import { QUERY_ID } from '../../../containers/cti/event_enrichment'; -import * as i18n from './translations'; -import { ThreatSummaryTable } from './threat_summary_table'; -import { REFERENCE } from '../../../../../common/cti/constants'; - -const StyledEuiAccordion = styled(EuiAccordion)` - .euiAccordion__triggerWrapper { - background: ${({ theme }) => theme.eui.euiColorLightestShade}; - border-radius: ${({ theme }) => theme.eui.euiSizeXS}; - height: ${({ theme }) => theme.eui.euiSizeXL}; - margin-bottom: ${({ theme }) => theme.eui.euiSizeS}; - padding-left: ${({ theme }) => theme.eui.euiSizeS}; - } -`; - -const ThreatDetailsDescription: React.FC = ({ - fieldName, - value, -}) => { - const tooltipChild = fieldName.match(REFERENCE) ? ( - - {value} - - ) : ( - {value} - ); - return ( - - - {fieldName} - - - } - > - {tooltipChild} - - ); -}; - -const columns: Array> = [ - { - field: 'title', - truncateText: false, - render: ThreatSummaryTitle, - width: '220px', - name: '', - }, - { - field: 'description', - truncateText: false, - render: ThreatDetailsDescription, - name: '', - }, -]; - -const EnrichmentAccordion: React.FC<{ - enrichment: CtiEnrichment; - index: number; -}> = ({ enrichment, index }) => { - const { - id = `threat-details-item`, - field, - feedName, - type, - value, - } = getEnrichmentIdentifiers(enrichment); - const accordionId = `${id}${field}`; - return ( - } - extraAction={ - isInvestigationTimeEnrichment(type) && ( - - - - ) - } - > - - - ); -}; - -export const EnrichmentAccordionGroup: React.FC<{ enrichments: CtiEnrichment[] }> = ({ - enrichments, -}) => ( - <> - {enrichments - .sort((a, b) => getFirstSeen(b) - getFirstSeen(a)) - .map((enrichment, index) => ( - - - {index < enrichments.length - 1 && } - - ))} - -); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_button_content.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_button_content.test.tsx deleted file mode 100644 index 2be7bdf76fcbf..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_button_content.test.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { mount } from 'enzyme'; -import { EnrichmentButtonContent } from './enrichment_button_content'; - -describe('EnrichmentButtonContent', () => { - it('renders string with feedName if feedName is present', () => { - const wrapper = mount( - - ); - expect(wrapper.find('[data-test-subj="enrichment-button-content"]').hostNodes().text()).toEqual( - 'source.ip 127.0.0.1 from eceintel' - ); - }); - - it('renders string without feedName if feedName is not present', () => { - const wrapper = mount(); - expect(wrapper.find('[data-test-subj="enrichment-button-content"]').hostNodes().text()).toEqual( - 'source.ip 127.0.0.1' - ); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_button_content.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_button_content.tsx deleted file mode 100644 index b03e2f4a2d21a..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_button_content.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import React from 'react'; -import styled from 'styled-components'; -import { EuiToolTip } from '@elastic/eui'; -import * as i18n from './translations'; - -const OverflowParent = styled.div` - display: inline-grid; -`; - -const OverflowContainer = styled.div` - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - font-weight: bold; -`; - -export const EnrichmentButtonContent: React.FC<{ - field?: string; - feedName?: string; - value?: string; -}> = ({ field = '', feedName = '', value = '' }) => { - const title = `${field} ${value}${feedName ? ` ${i18n.FEED_NAME_PREPOSITION} ${feedName}` : ''}`; - return ( - - - {title} - - - ); -}; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_icon.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_icon.tsx deleted file mode 100644 index 9e6d876b2bcd3..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_icon.tsx +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { EuiIcon, EuiToolTip } from '@elastic/eui'; - -import * as i18n from './translations'; -import { isInvestigationTimeEnrichment } from './helpers'; - -export const getTooltipTitle = (type: string | undefined) => - isInvestigationTimeEnrichment(type) - ? i18n.INVESTIGATION_ENRICHMENT_TITLE - : i18n.INDICATOR_ENRICHMENT_TITLE; - -export const getTooltipContent = (type: string | undefined) => - isInvestigationTimeEnrichment(type) - ? i18n.INVESTIGATION_TOOLTIP_CONTENT - : i18n.INDICATOR_TOOLTIP_CONTENT; - -export const EnrichmentIcon: React.FC<{ type: string | undefined }> = ({ type }) => { - return ( - - - - ); -}; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_no_data.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_no_data.tsx deleted file mode 100644 index 8241054ecc940..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_no_data.tsx +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import React from 'react'; -import styled from 'styled-components'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiLink } from '@elastic/eui'; -import * as i18n from './translations'; -import { ENRICHMENT_TYPES } from '../../../../../common/cti/constants'; - -const InlineBlock = styled.div` - display: inline-block; - line-height: 1.7em; -`; - -export const EnrichmentNoData: React.FC<{ type?: ENRICHMENT_TYPES }> = ({ type }) => { - if (!type) return null; - return ( - - {type === ENRICHMENT_TYPES.IndicatorMatchRule ? ( - i18n.NO_ENRICHMENTS_FOUND_DESCRIPTION - ) : ( - - - - ), - }} - /> - )} - - ); -}; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.test.tsx deleted file mode 100644 index 2b1e73c1141c4..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.test.tsx +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { mount } from 'enzyme'; - -import { TestProviders } from '../../../mock'; -import { buildEventEnrichmentMock } from '../../../../../common/search_strategy/security_solution/cti/index.mock'; -import { ThreatDetailsView } from './threat_details_view'; - -describe('ThreatDetailsView', () => { - it('renders a detail view for each enrichment', () => { - const enrichments = [ - buildEventEnrichmentMock(), - buildEventEnrichmentMock({ 'matched.id': ['other.id'], 'matched.field': ['other.field'] }), - ]; - - const wrapper = mount( - - - - ); - - expect(wrapper.find('[data-test-subj^="threat-details-view"]').hostNodes()).toHaveLength( - enrichments.length - ); - }); - - it('renders an anchor link for indicator.reference', () => { - const enrichments = [ - buildEventEnrichmentMock({ - 'threat.indicator.reference': ['http://foo.baz'], - }), - ]; - const wrapper = mount( - - - - ); - expect(wrapper.find('a').length).toEqual(1); - }); - - it('sorts same type of enrichments by first_seen descending', () => { - const mostRecentDate = '2021-04-25T18:17:00.000Z'; - const olderDate = '2021-03-25T18:17:00.000Z'; - // this simulates a legacy enrichment from the old indicator match rule, - // where first_seen is available at the top level - const existingEnrichment = buildEventEnrichmentMock({ - 'indicator.first_seen': [mostRecentDate], - }); - delete existingEnrichment['threat.indicator.first_seen']; - const newEnrichment = buildEventEnrichmentMock({ - 'matched.id': ['other.id'], - 'threat.indicator.first_seen': [olderDate], - }); - const enrichments = [existingEnrichment, newEnrichment]; - - const wrapper = mount( - - - - ); - - const firstSeenRows = wrapper - .find('.euiTableRow') - .hostNodes() - .filterWhere((node) => node.text().includes('first_seen')); - expect(firstSeenRows.map((node) => node.text())).toEqual([ - `indicator.first_seen${mostRecentDate}`, - `indicator.first_seen${olderDate}`, - ]); - }); - - it('groups enrichments by matched type', () => { - const indicatorMatch = buildEventEnrichmentMock({ - 'matched.type': ['indicator_match_rule'], - }); - const investigationEnrichment = buildEventEnrichmentMock({ - 'matched.type': ['investigation_time'], - }); - const enrichments = [indicatorMatch, investigationEnrichment]; - - const wrapper = mount( - - - - ); - - expect(wrapper.exists('[data-test-subj="threat-match-detected"]')).toEqual(true); - expect(wrapper.exists('[data-test-subj="enriched-with-threat-intel"]')).toEqual(true); - }); - - it('renders no data views', () => { - const wrapper = mount( - - - - ); - - expect( - wrapper.exists( - '[data-test-subj="threat-match-detected"] [data-test-subj="no-enrichments-found"]' - ) - ).toEqual(true); - expect( - wrapper.exists( - '[data-test-subj="enriched-with-threat-intel"] [data-test-subj="no-enrichments-found"]' - ) - ).toEqual(true); - }); - - it('renders loading state', () => { - const wrapper = mount( - - - - ); - - expect(wrapper.exists('[data-test-subj="loading-enrichments"]')).toEqual(true); - }); - - it('can hide investigation time enrichments', () => { - const investigationEnrichment = buildEventEnrichmentMock({ - 'matched.type': ['investigation_time'], - }); - - const wrapper = mount( - - - - ); - - expect(wrapper.exists('[data-test-subj="enriched-with-threat-intel"]')).toEqual(false); - }); - - it('renders children as a part of investigation time enrichment section', () => { - const wrapper = mount( - - -
- - - ); - - expect(wrapper.exists('.test-div')).toEqual(true); - }); - - it('does not render children id investigation time enrichment section is not showing', () => { - const wrapper = mount( - - -
- - - ); - - expect(wrapper.exists('.test-div')).toEqual(false); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.tsx deleted file mode 100644 index d3a2785709802..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.tsx +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { - EuiFlexGroup, - EuiFlexItem, - EuiHorizontalRule, - EuiSkeletonText, - EuiSpacer, - EuiTitle, -} from '@elastic/eui'; -import React from 'react'; -import { groupBy } from 'lodash'; - -import { ENRICHMENT_TYPES } from '../../../../../common/cti/constants'; -import type { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; -import * as i18n from './translations'; -import { EnrichmentIcon } from './enrichment_icon'; -import { EnrichmentAccordionGroup } from './enrichment_accordion_group'; -import { EnrichmentNoData } from './enrichment_no_data'; - -const EnrichmentSectionHeader: React.FC<{ type?: ENRICHMENT_TYPES }> = ({ type }) => { - return type ? ( - <> - - - -

- {type === ENRICHMENT_TYPES.IndicatorMatchRule - ? i18n.INDICATOR_ENRICHMENT_TITLE - : i18n.INVESTIGATION_ENRICHMENT_TITLE} -

-
-
- - - -
- - - ) : null; -}; - -const EnrichmentSection: React.FC<{ - enrichments: CtiEnrichment[]; - type?: ENRICHMENT_TYPES; - loading?: boolean; - dataTestSubj: string; - children?: React.ReactNode; -}> = ({ enrichments, type, loading, dataTestSubj, children }) => { - return ( -
- - {children} - {Array.isArray(enrichments) ? ( - - ) : ( - <> - - {loading && ( - <> - - - - )} - - )} -
- ); -}; - -// TODO: MOVE TO FLYOUT FOLDER - https://github.com/elastic/security-team/issues/7462 -const ThreatDetailsViewComponent: React.FC<{ - enrichments: CtiEnrichment[]; - showInvestigationTimeEnrichments: boolean; - loading: boolean; - /** - * Slot to render something before the beforeHeader. - * NOTE: this was introduced to avoid alterting existing flyout and will be removed after - * new flyout implementation is ready (Expandable Flyout owned by the Investigations Team) - */ - before?: React.ReactNode; - children?: React.ReactNode; -}> = ({ enrichments, before = null, showInvestigationTimeEnrichments, loading, children }) => { - const { - [ENRICHMENT_TYPES.IndicatorMatchRule]: indicatorMatches, - [ENRICHMENT_TYPES.InvestigationTime]: threatIntelEnrichments, - undefined: matchesWithNoType, - } = groupBy(enrichments, 'matched.type'); - - return ( - <> - {before} - - {showInvestigationTimeEnrichments && ( - <> - - - {children} - - - )} - {matchesWithNoType && ( - <> - - {indicatorMatches && } - - - )} - - ); -}; - -export const ThreatDetailsView = React.memo(ThreatDetailsViewComponent); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_table.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_table.tsx deleted file mode 100644 index 91a0a0397602f..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_table.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { AnyStyledComponent } from 'styled-components'; -import styled from 'styled-components'; -import { EuiInMemoryTable } from '@elastic/eui'; - -export const ThreatSummaryTable = styled(EuiInMemoryTable as unknown as AnyStyledComponent)` - .euiTableHeaderCell, - .euiTableRowCell { - border: none; - } - .euiTableHeaderCell .euiTableCellContent { - padding: 0; - } -`; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_title.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_title.tsx deleted file mode 100644 index 71541c9d9ac1e..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_title.tsx +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import styled from 'styled-components'; -import React from 'react'; -import { EuiTitle } from '@elastic/eui'; - -const StyledH5 = styled.h5` - line-height: 1.7rem; -`; - -export const ThreatSummaryTitle = (title: string) => ( - - {title} - -); -ThreatSummaryTitle.displayName = 'ThreatSummaryTitle'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/translations.ts b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/translations.ts deleted file mode 100644 index b1d84eadc8c22..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/translations.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -export * from '../../../../entity_analytics/components/risk_score/translations'; - -export const FEED_NAME_PREPOSITION = i18n.translate( - 'xpack.securitySolution.eventDetails.ctiSummary.feedNamePreposition', - { - defaultMessage: 'from', - } -); - -export const INDICATOR_ENRICHMENT_TITLE = i18n.translate( - 'xpack.securitySolution.eventDetails.ctiSummary.indicatorEnrichmentTitle', - { - defaultMessage: 'Threat match detected', - } -); - -export const INVESTIGATION_ENRICHMENT_TITLE = i18n.translate( - 'xpack.securitySolution.eventDetails.ctiSummary.investigationEnrichmentTitle', - { - defaultMessage: 'Enriched with threat intelligence', - } -); - -export const INDICATOR_TOOLTIP_CONTENT = i18n.translate( - 'xpack.securitySolution.eventDetails.ctiSummary.indicatorEnrichmentTooltipContent', - { - defaultMessage: 'Shows available threat indicator matches.', - } -); - -export const INVESTIGATION_TOOLTIP_CONTENT = i18n.translate( - 'xpack.securitySolution.eventDetails.ctiSummary.investigationEnrichmentTooltipContent', - { - defaultMessage: - 'Shows additional threat intelligence for the alert. The past 30 days were queried by default.', - } -); - -export const NO_ENRICHMENTS_FOUND_DESCRIPTION = i18n.translate( - 'xpack.securitySolution.alertDetails.noEnrichmentsFoundDescription', - { - defaultMessage: 'This alert does not have threat intelligence.', - } -); - -export const INVESTIGATION_QUERY_TITLE = i18n.translate( - 'xpack.securitySolution.alertDetails.investigationTimeQueryTitle', - { - defaultMessage: 'Enrichment with Threat Intelligence', - } -); - -export const ENRICHMENT_LOOKBACK_START_DATE = i18n.translate( - 'xpack.securitySolution.alertDetails.enrichmentQueryStartDate', - { - defaultMessage: 'Start date', - } -); - -export const ENRICHMENT_LOOKBACK_END_DATE = i18n.translate( - 'xpack.securitySolution.alertDetails.enrichmentQueryEndDate', - { - defaultMessage: 'End date', - } -); - -export const REFRESH = i18n.translate('xpack.securitySolution.alertDetails.refresh', { - defaultMessage: 'Refresh', -}); - -export const NESTED_OBJECT_VALUES_NOT_RENDERED = i18n.translate( - 'xpack.securitySolution.eventDetails.ctiSummary.investigationEnrichmentObjectValuesNotRendered', - { - defaultMessage: - 'This field contains nested object values, which are not rendered here. See the full document for all fields/values', - } -); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.test.tsx deleted file mode 100644 index 1ddc73207725a..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.test.tsx +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { mockDetailItemData, mockDetailItemDataId } from '../../mock/mock_detail_item'; -import { TestProviders } from '../../mock/test_providers'; -import { EventFieldsBrowser } from './event_fields_browser'; -import { mockBrowserFields } from '../../containers/source/mock'; -import { useMountAppended } from '../../utils/use_mount_appended'; -import { TimelineTabs } from '../../../../common/types/timeline'; - -jest.mock('../../lib/kibana'); - -jest.mock('../../hooks/use_get_field_spec'); - -jest.mock('@kbn/cell-actions/src/hooks/use_load_actions', () => { - const actual = jest.requireActual('@kbn/cell-actions/src/hooks/use_load_actions'); - return { - ...actual, - useLoadActions: jest.fn().mockImplementation(() => ({ - value: [], - error: undefined, - loading: false, - })), - }; -}); - -jest.mock('../link_to'); - -const mockDispatch = jest.fn(); -jest.mock('react-redux', () => { - const original = jest.requireActual('react-redux'); - - return { - ...original, - useDispatch: () => mockDispatch, - }; -}); - -describe('EventFieldsBrowser', () => { - const mount = useMountAppended(); - - describe('column headers', () => { - ['Actions', 'Field', 'Value'].forEach((header) => { - test(`it renders the ${header} column header`, () => { - const wrapper = mount( - - - - ); - - expect(wrapper.find('thead').contains(header)).toBeTruthy(); - }); - }); - }); - - describe('filter input', () => { - test('it renders a filter input with the expected placeholder', () => { - const wrapper = mount( - - - - ); - - expect(wrapper.find('input[type="search"]').props().placeholder).toEqual( - 'Filter by Field, Value, or Description...' - ); - }); - }); - - describe('Hover Actions', () => { - const eventId = 'pEMaMmkBUV60JmNWmWVi'; - - test('it renders inline actions', () => { - const wrapper = mount( - - - - ); - expect(wrapper.find('[data-test-subj="inlineActions"]').exists()).toBeTruthy(); - }); - }); - - describe('field type icon', () => { - test('it renders the expected icon type for the data provided', () => { - const wrapper = mount( - - - - ); - - expect( - wrapper - .find('tr.euiTableRow') - .find('td.euiTableRowCell') - .at(1) - .find('[data-euiicon-type]') - .exists() - ).toEqual(true); - }); - }); - - describe('field', () => { - test('it renders the field name for the data provided', () => { - const wrapper = mount( - - - - ); - expect(wrapper.find('[data-test-subj="field-name"]').at(0).text()).toEqual('@timestamp'); - }); - - test('it renders the expected icon for description', () => { - const wrapper = mount( - - - - ); - expect( - wrapper - .find('tr.euiTableRow') - .find('td.euiTableRowCell') - .at(1) - .find('[data-euiicon-type]') - .last() - .prop('data-euiicon-type') - ).toEqual('tokenDate'); - }); - }); - - describe('value', () => { - test('it renders the expected value for the data provided', () => { - const wrapper = mount( - - - - ); - expect(wrapper.find('[data-test-subj="localized-date-tool-tip"]').at(0).text()).toEqual( - 'Feb 28, 2019 @ 16:50:54.621' - ); - }); - }); - - describe('description', () => { - test('it renders the expected field description the data provided', () => { - const wrapper = mount( - - - - ); - - expect( - wrapper.find('[data-test-subj="field-name-cell"]').at(0).find('EuiToolTip').prop('content') - ).toContain('Date/time when the event originated.'); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx deleted file mode 100644 index 0a8bef2fb8851..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx +++ /dev/null @@ -1,308 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { getOr, noop, sortBy } from 'lodash/fp'; -import type { EuiBasicTableColumn } from '@elastic/eui'; -import { EuiInMemoryTable } from '@elastic/eui'; -import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { rgba } from 'polished'; -import styled from 'styled-components'; -import { - arrayIndexToAriaIndex, - DATA_COLINDEX_ATTRIBUTE, - DATA_ROWINDEX_ATTRIBUTE, - isTab, - onKeyDownFocusHandler, -} from '@kbn/timelines-plugin/public'; -import { dataTableSelectors, tableDefaults } from '@kbn/securitysolution-data-table'; -import { isInTableScope, isTimelineScope } from '../../../helpers'; -import { timelineSelectors } from '../../../timelines/store'; -import type { BrowserFields } from '../../containers/source'; -import { getAllFieldsByName } from '../../containers/source'; -import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy/timeline'; -import { getColumnHeaders } from '../../../timelines/components/timeline/body/column_headers/helpers'; -import { timelineDefaults } from '../../../timelines/store/defaults'; -import { getColumns } from './columns'; -import { EVENT_FIELDS_TABLE_CLASS_NAME, onEventDetailsTabKeyPressed, search } from './helpers'; -import { useDeepEqualSelector } from '../../hooks/use_selector'; -import type { TimelineTabs } from '../../../../common/types/timeline'; - -export type ColumnsProvider = (providerOptions: { - browserFields: BrowserFields; - eventId: string; - contextId: string; - scopeId: string; - getLinkValue: (field: string) => string | null; - isDraggable?: boolean; - isReadOnly?: boolean; -}) => Array>; - -interface Props { - browserFields: BrowserFields; - data: TimelineEventsDetailsItem[]; - eventId: string; - isDraggable?: boolean; - scopeId: string; - timelineTabType: TimelineTabs | 'flyout'; - isReadOnly?: boolean; - columnsProvider?: ColumnsProvider; -} - -const TableWrapper = styled.div` - display: flex; - flex: 1; - overflow: hidden; - > div { - display: flex; - flex-direction: column; - flex: 1; - overflow: hidden; - > .euiFlexGroup:first-of-type { - flex: 0; - } - } -`; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const StyledEuiInMemoryTable = styled(EuiInMemoryTable as any)` - flex: 1; - overflow: auto; - overflow-x: hidden; - &::-webkit-scrollbar { - height: ${({ theme }) => theme.eui.euiScrollBar}; - width: ${({ theme }) => theme.eui.euiScrollBar}; - } - &::-webkit-scrollbar-thumb { - background-clip: content-box; - background-color: ${({ theme }) => rgba(theme.eui.euiColorDarkShade, 0.5)}; - border: ${({ theme }) => theme.eui.euiScrollBarCorner} solid transparent; - } - &::-webkit-scrollbar-corner, - &::-webkit-scrollbar-track { - background-color: transparent; - } - - .eventFieldsTable__fieldIcon { - padding-top: ${({ theme }) => parseFloat(theme.eui.euiSizeXS) * 1.5}px; - } - - .eventFieldsTable__fieldName { - line-height: ${({ theme }) => theme.eui.euiLineHeight}; - padding: ${({ theme }) => theme.eui.euiSizeXS}; - } - - // TODO: Use this logic from discover - /* .eventFieldsTable__multiFieldBadge { - font: ${({ theme }) => theme.eui.euiFont}; - } */ - - .inlineActions { - opacity: 0; - } - - .eventFieldsTable__tableRow { - font-size: ${({ theme }) => theme.eui.euiFontSizeXS}; - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; - - .inlineActions-popoverOpen { - opacity: 1; - } - - &:hover { - .inlineActions { - opacity: 1; - } - } - } - - .eventFieldsTable__actionCell, - .eventFieldsTable__fieldNameCell { - align-items: flex-start; - padding: ${({ theme }) => theme.eui.euiSizeXS}; - } - - .eventFieldsTable__fieldValue { - display: inline-block; - word-break: break-all; - word-wrap: break-word; - white-space: pre-wrap; - line-height: ${({ theme }) => theme.eui.euiLineHeight}; - color: ${({ theme }) => theme.eui.euiColorFullShade}; - vertical-align: top; - } -`; - -// Match structure in discover -const COUNT_PER_PAGE_OPTIONS = [25, 50, 100]; - -// Encapsulating the pagination logic for the table. -const useFieldBrowserPagination = () => { - const [pagination, setPagination] = useState<{ pageIndex: number }>({ - pageIndex: 0, - }); - - const onTableChange = useCallback(({ page: { index } }: { page: { index: number } }) => { - setPagination({ pageIndex: index }); - }, []); - const paginationTableProp = useMemo( - () => ({ - ...pagination, - pageSizeOptions: COUNT_PER_PAGE_OPTIONS, - }), - [pagination] - ); - - return { - onTableChange, - paginationTableProp, - }; -}; - -/** - * This callback, invoked via `EuiInMemoryTable`'s `rowProps, assigns - * attributes to every ``. - */ -/** Renders a table view or JSON view of the `ECS` `data` */ -// TODO: MOVE TO FLYOUT FOLDER - https://github.com/elastic/security-team/issues/7462 -export const EventFieldsBrowser = React.memo( - ({ - browserFields, - data, - eventId, - isDraggable, - timelineTabType, - scopeId, - isReadOnly, - columnsProvider = getColumns, - }) => { - const containerElement = useRef(null); - const getScope = useMemo(() => { - if (isTimelineScope(scopeId)) { - return timelineSelectors.getTimelineByIdSelector(); - } else if (isInTableScope(scopeId)) { - return dataTableSelectors.getTableByIdSelector(); - } - }, [scopeId]); - const defaults = isTimelineScope(scopeId) ? timelineDefaults : tableDefaults; - const columnHeaders = useDeepEqualSelector((state) => { - const { columns } = (getScope && getScope(state, scopeId)) ?? defaults; - return getColumnHeaders(columns, browserFields); - }); - - const fieldsByName = useMemo(() => getAllFieldsByName(browserFields), [browserFields]); - const items = useMemo( - () => - sortBy(['field'], data).map((item, i) => ({ - ...item, - ...fieldsByName[item.field], - valuesConcatenated: item.values != null ? item.values.join() : '', - ariaRowindex: arrayIndexToAriaIndex(i), - })), - [data, fieldsByName] - ); - - const getLinkValue = useCallback( - (field: string) => { - const linkField = (columnHeaders.find((col) => col.id === field) ?? {}).linkField; - if (!linkField) { - return null; - } - const linkFieldData = (data ?? []).find((d) => d.field === linkField); - const linkFieldValue = getOr(null, 'originalValue', linkFieldData); - return Array.isArray(linkFieldValue) ? linkFieldValue[0] : linkFieldValue; - }, - [data, columnHeaders] - ); - - const onSetRowProps = useCallback(({ ariaRowindex, field }: TimelineEventsDetailsItem) => { - const rowIndex = ariaRowindex != null ? { 'data-rowindex': ariaRowindex } : {}; - return { - ...rowIndex, - className: 'eventFieldsTable__tableRow', - 'data-test-subj': `event-fields-table-row-${field}`, - }; - }, []); - - const columns = useMemo( - () => - columnsProvider({ - browserFields, - eventId, - contextId: `event-fields-browser-for-${scopeId}-${timelineTabType}`, - scopeId, - getLinkValue, - isDraggable, - isReadOnly, - }), - [ - browserFields, - eventId, - scopeId, - columnsProvider, - timelineTabType, - getLinkValue, - isDraggable, - isReadOnly, - ] - ); - - const focusSearchInput = useCallback(() => { - // the selector below is used to focus the input because EuiInMemoryTable does not expose a ref to its built-in search input - containerElement.current?.querySelector('input[type="search"]')?.focus(); - }, []); - - const onKeyDown = useCallback( - (keyboardEvent: React.KeyboardEvent) => { - if (isTab(keyboardEvent)) { - onEventDetailsTabKeyPressed({ - containerElement: containerElement.current, - keyboardEvent, - onSkipFocusBeforeEventsTable: focusSearchInput, - onSkipFocusAfterEventsTable: noop, - }); - } else { - onKeyDownFocusHandler({ - colindexAttribute: DATA_COLINDEX_ATTRIBUTE, - containerElement: containerElement?.current, - event: keyboardEvent, - maxAriaColindex: 3, - maxAriaRowindex: data.length, - onColumnFocused: noop, - rowindexAttribute: DATA_ROWINDEX_ATTRIBUTE, - }); - } - }, - [data, focusSearchInput] - ); - - useEffect(() => { - focusSearchInput(); - }, [focusSearchInput]); - - // Pagination - const { onTableChange, paginationTableProp } = useFieldBrowserPagination(); - - return ( - - - - ); - } -); - -EventFieldsBrowser.displayName = 'EventFieldsBrowser'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx index fca824c2269ae..86bdbb3297530 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx @@ -18,25 +18,12 @@ import type { BrowserFields } from '../../containers/source'; import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy/timeline'; import type { EnrichedFieldInfo, EventSummaryField } from './types'; -import * as i18n from './translations'; import { AGENT_STATUS_FIELD_NAME, QUARANTINED_PATH_FIELD_NAME, } from '../../../timelines/components/timeline/body/renderers/constants'; import { RESPONSE_ACTIONS_ALERT_AGENT_ID_FIELD } from '../../../../common/endpoint/service/response_actions/constants'; -/** - * Defines the behavior of the search input that appears above the table of data - */ -export const search = { - box: { - incremental: true, - placeholder: i18n.PLACEHOLDER, - schema: true, - 'data-test-subj': 'search-input', - }, -}; - /** * An item rendered in the table */ diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx deleted file mode 100644 index 3ca3ae7a2b0c7..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiBadge, EuiText, EuiToolTip } from '@elastic/eui'; -import { isEmpty } from 'lodash'; -import { FieldIcon } from '@kbn/react-field'; -import type { DataViewField } from '@kbn/data-views-plugin/common'; -import { EcsFlat } from '@elastic/ecs'; -import * as i18n from '../translations'; -import { getExampleText } from '../helpers'; -import type { EventFieldsData } from '../types'; -import { getFieldTypeName } from './get_field_type_name'; - -const getEcsField = (field: string): { example?: string; description?: string } | undefined => { - return EcsFlat[field as keyof typeof EcsFlat] as - | { - example?: string; - description?: string; - } - | undefined; -}; - -export interface FieldNameCellProps { - data: EventFieldsData; - field: string; - fieldMapping?: DataViewField; - scripted?: boolean; -} -export const FieldNameCell = React.memo( - ({ data, field, fieldMapping, scripted }: FieldNameCellProps) => { - const ecsField = getEcsField(field); - const typeName = getFieldTypeName(data.type); - // TODO: We don't have fieldMapping or isMultiField until kibana indexPatterns is implemented. Will default to field for now - const displayName = fieldMapping && fieldMapping.displayName ? fieldMapping.displayName : field; - const defaultTooltip = displayName !== field ? `${field} (${displayName})` : field; - const isMultiField = fieldMapping?.isSubtypeMulti(); - return ( - <> - - - - - - - - {field} - - - - {isMultiField && ( - - - {i18n.MULTI_FIELD_BADGE} - - - )} - - - ); - } -); - -FieldNameCell.displayName = 'FieldNameCell'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx deleted file mode 100644 index b62a8a9b8cca5..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { CSSProperties } from 'react'; -import React from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; -import type { BrowserField } from '../../../containers/source'; -import { OverflowField } from '../../tables/helpers'; -import { FormattedFieldValue } from '../../../../timelines/components/timeline/body/renderers/formatted_field'; -import { MESSAGE_FIELD_NAME } from '../../../../timelines/components/timeline/body/renderers/constants'; -import type { EventFieldsData, FieldsData } from '../types'; -import { getFieldFormat } from '../get_field_format'; - -export interface FieldValueCellProps { - contextId: string; - data: EventFieldsData | FieldsData; - eventId: string; - fieldFromBrowserField?: Partial; - getLinkValue?: (field: string) => string | null; - isDraggable?: boolean; - linkValue?: string | null | undefined; - style?: CSSProperties | undefined; - values: string[] | null | undefined; -} - -export const FieldValueCell = React.memo( - ({ - contextId, - data, - eventId, - fieldFromBrowserField, - getLinkValue, - isDraggable = false, - linkValue, - style, - values, - }: FieldValueCellProps) => { - return ( - - {values != null && - values.map((value, i) => { - if (fieldFromBrowserField == null) { - return ( - - - {value} - - - ); - } - return ( - - {data.field === MESSAGE_FIELD_NAME ? ( - - ) : ( - - )} - - ); - })} - - ); - } -); - -FieldValueCell.displayName = 'FieldValueCell'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/get_field_type_name.ts b/x-pack/plugins/security_solution/public/common/components/event_details/table/get_field_type_name.ts deleted file mode 100644 index cd753b7e76e95..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/get_field_type_name.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; - -export function getFieldTypeName(type: string) { - switch (type) { - case 'boolean': - return i18n.translate('xpack.securitySolution.fieldNameIcons.booleanAriaLabel', { - defaultMessage: 'Boolean field', - }); - case 'conflict': - return i18n.translate('xpack.securitySolution.fieldNameIcons.conflictFieldAriaLabel', { - defaultMessage: 'Conflicting field', - }); - case 'date': - return i18n.translate('xpack.securitySolution.fieldNameIcons.dateFieldAriaLabel', { - defaultMessage: 'Date field', - }); - case 'geo_point': - return i18n.translate('xpack.securitySolution.fieldNameIcons.geoPointFieldAriaLabel', { - defaultMessage: 'Geo point field', - }); - case 'geo_shape': - return i18n.translate('xpack.securitySolution.fieldNameIcons.geoShapeFieldAriaLabel', { - defaultMessage: 'Geo shape field', - }); - case 'ip': - return i18n.translate('xpack.securitySolution.fieldNameIcons.ipAddressFieldAriaLabel', { - defaultMessage: 'IP address field', - }); - case 'murmur3': - return i18n.translate('xpack.securitySolution.fieldNameIcons.murmur3FieldAriaLabel', { - defaultMessage: 'Murmur3 field', - }); - case 'number': - return i18n.translate('xpack.securitySolution.fieldNameIcons.numberFieldAriaLabel', { - defaultMessage: 'Number field', - }); - case 'source': - // Note that this type is currently not provided, type for _source is undefined - return i18n.translate('xpack.securitySolution.fieldNameIcons.sourceFieldAriaLabel', { - defaultMessage: 'Source field', - }); - case 'string': - return i18n.translate('xpack.securitySolution.fieldNameIcons.stringFieldAriaLabel', { - defaultMessage: 'String field', - }); - case 'nested': - return i18n.translate('xpack.securitySolution.fieldNameIcons.nestedFieldAriaLabel', { - defaultMessage: 'Nested field', - }); - default: - return i18n.translate('xpack.securitySolution.fieldNameIcons.unknownFieldAriaLabel', { - defaultMessage: 'Unknown field', - }); - } -} diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx deleted file mode 100644 index 9fa265a60e16c..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { render, screen } from '@testing-library/react'; -import React from 'react'; - -import type { BrowserField } from '../../../containers/source'; -import { PrevalenceCellRenderer } from './prevalence_cell'; -import { TestProviders } from '../../../mock'; -import type { EventFieldsData } from '../types'; -import { TimelineId } from '../../../../../common/types'; -import type { AlertSummaryRow } from '../helpers'; -import { useAlertPrevalence } from '../../../containers/alerts/use_alert_prevalence'; -import { getEmptyValue } from '../../empty_value'; - -jest.mock('../../../lib/kibana'); -jest.mock('../../../containers/alerts/use_alert_prevalence', () => ({ - useAlertPrevalence: jest.fn(), -})); -const mockUseAlertPrevalence = useAlertPrevalence as jest.Mock; - -const eventId = 'TUWyf3wBFCFU0qRJTauW'; -const hostIpValues = ['127.0.0.1', '::1', '10.1.2.3', '2001:0DB8:AC10:FE01::']; -const hostIpFieldFromBrowserField: BrowserField = { - aggregatable: true, - name: 'host.ip', - readFromDocValues: false, - searchable: true, - type: 'ip', -}; -const hostIpData: EventFieldsData = { - ...hostIpFieldFromBrowserField, - ariaRowindex: 35, - field: 'host.ip', - isObjectArray: false, - originalValue: [...hostIpValues], - values: [...hostIpValues], -}; - -const enrichedHostIpData: AlertSummaryRow['description'] = { - data: { ...hostIpData }, - eventId, - fieldFromBrowserField: { ...hostIpFieldFromBrowserField }, - isDraggable: false, - scopeId: TimelineId.test, - values: [...hostIpValues], -}; - -describe('PrevalenceCellRenderer', () => { - describe('When data is loading', () => { - test('it should show the loading spinner', async () => { - mockUseAlertPrevalence.mockImplementation(() => ({ - loading: true, - count: 123, - error: true, - })); - const { container } = render( - - - - ); - expect(container.getElementsByClassName('euiLoadingSpinner')).toHaveLength(1); - }); - }); - - describe('When an error was returned', () => { - test('it should return empty value placeholder', async () => { - mockUseAlertPrevalence.mockImplementation(() => ({ - loading: false, - count: undefined, - error: true, - })); - const { container } = render( - - - - ); - expect(container.getElementsByClassName('euiLoadingSpinner')).toHaveLength(0); - expect(screen.queryByText('123')).toBeNull(); - expect(screen.queryByText(getEmptyValue())).toBeTruthy(); - }); - }); - - describe('When an actual count is returned', () => { - test('it should show the count', async () => { - mockUseAlertPrevalence.mockImplementation(() => ({ - loading: false, - count: 123, - error: false, - })); - const { container } = render( - - - - ); - expect(container.getElementsByClassName('euiLoadingSpinner')).toHaveLength(0); - expect(screen.queryByText('123')).toBeInTheDocument(); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx deleted file mode 100644 index 3f2aebb81e9f2..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { EuiLoadingSpinner } from '@elastic/eui'; - -import { TimelineId } from '../../../../../common/types'; -import type { AlertSummaryRow } from '../helpers'; -import { getEmptyTagValue } from '../../empty_value'; -import { InvestigateInTimelineButton } from './investigate_in_timeline_button'; -import { useActionCellDataProvider } from './use_action_cell_data_provider'; -import { useAlertPrevalence } from '../../../containers/alerts/use_alert_prevalence'; -import { getFieldFormat } from '../get_field_format'; - -/** - * Renders a Prevalence cell based on a regular alert prevalence query - */ -const PrevalenceCell: React.FC = ({ - data, - eventId, - fieldFromBrowserField, - linkValue, - scopeId, - values, -}) => { - const { loading, count } = useAlertPrevalence({ - field: data.field, - isActiveTimelines: scopeId === TimelineId.active, - value: values, - signalIndexName: null, - }); - - const cellDataProviders = useActionCellDataProvider({ - contextId: scopeId, - eventId, - field: data.field, - fieldFormat: getFieldFormat(data), - fieldFromBrowserField, - fieldType: data.type, - isObjectArray: data.isObjectArray, - linkValue, - values, - }); - - if (loading) { - return ; - } else if ( - typeof count === 'number' && - cellDataProviders?.dataProviders && - cellDataProviders?.dataProviders.length - ) { - return ( - - {count} - - ); - } else { - return getEmptyTagValue(); - } -}; - -PrevalenceCell.displayName = 'PrevalenceCell'; - -export const PrevalenceCellRenderer = (data: AlertSummaryRow['description']) => ( - -); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.test.tsx deleted file mode 100644 index 589384c793884..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.test.tsx +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { act, render, screen } from '@testing-library/react'; -import React from 'react'; - -import type { BrowserField } from '../../../containers/source'; -import { SummaryValueCell } from './summary_value_cell'; -import { TestProviders } from '../../../mock'; -import type { EventFieldsData } from '../types'; -import type { AlertSummaryRow } from '../helpers'; -import { TimelineId } from '../../../../../common/types'; -import { AGENT_STATUS_FIELD_NAME } from '../../../../timelines/components/timeline/body/renderers/constants'; - -jest.mock('../../../lib/kibana'); - -jest.mock('../../../hooks/use_get_field_spec'); - -const eventId = 'TUWyf3wBFCFU0qRJTauW'; -const hostIpValues = ['127.0.0.1', '::1', '10.1.2.3', '2001:0DB8:AC10:FE01::']; -const hostIpFieldFromBrowserField: BrowserField = { - aggregatable: true, - name: 'host.ip', - readFromDocValues: false, - searchable: true, - type: 'ip', -}; -const hostIpData: EventFieldsData = { - ...hostIpFieldFromBrowserField, - ariaRowindex: 35, - field: 'host.ip', - isObjectArray: false, - originalValue: [...hostIpValues], - values: [...hostIpValues], -}; - -const enrichedHostIpData: AlertSummaryRow['description'] = { - data: { ...hostIpData }, - eventId, - fieldFromBrowserField: { ...hostIpFieldFromBrowserField }, - isDraggable: false, - scopeId: TimelineId.test, - values: [...hostIpValues], -}; - -const enrichedAgentStatusData: AlertSummaryRow['description'] = { - data: { - field: AGENT_STATUS_FIELD_NAME, - format: '', - type: '', - aggregatable: false, - name: AGENT_STATUS_FIELD_NAME, - searchable: false, - readFromDocValues: false, - isObjectArray: false, - }, - eventId, - values: [], - scopeId: TimelineId.test, -}; - -describe('SummaryValueCell', () => { - test('it should render', async () => { - await act(async () => { - render( - - - - ); - }); - - hostIpValues.forEach((ipValue) => expect(screen.getByText(ipValue)).toBeInTheDocument()); - expect(screen.getByTestId('inlineActions')).toBeInTheDocument(); - }); - - describe('Without hover actions', () => { - test('When in the timeline flyout with timelineId active', async () => { - await act(async () => { - render( - - - - ); - }); - - hostIpValues.forEach((ipValue) => expect(screen.getByText(ipValue)).toBeInTheDocument()); - expect(screen.queryByTestId('inlineActions')).not.toBeInTheDocument(); - }); - - test('When rendering the host status field', async () => { - await act(async () => { - render( - - - - ); - }); - - expect(screen.getByTestId('event-field-agent.status')).toBeInTheDocument(); - expect(screen.queryByTestId('inlineActions')).not.toBeInTheDocument(); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.tsx deleted file mode 100644 index e90367b0f7af1..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.tsx +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { - SecurityCellActions, - CellActionsMode, - SecurityCellActionsTrigger, -} from '../../cell_actions'; -import { FieldValueCell } from './field_value_cell'; -import type { AlertSummaryRow } from '../helpers'; -import { hasHoverOrRowActions } from '../helpers'; -import { TimelineId } from '../../../../../common/types'; -import { getSourcererScopeId } from '../../../../helpers'; - -const style = { flexGrow: 0 }; - -export const SummaryValueCell: React.FC = ({ - data, - eventId, - fieldFromBrowserField, - isDraggable, - linkValue, - scopeId, - values, - isReadOnly, -}) => { - const hoverActionsEnabled = hasHoverOrRowActions(data.field); - - return ( - <> - - {scopeId !== TimelineId.active && !isReadOnly && hoverActionsEnabled && ( - - )} - - ); -}; - -SummaryValueCell.displayName = 'SummaryValueCell'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/translations.ts b/x-pack/plugins/security_solution/public/common/components/event_details/translations.ts index 7ebeee21fd1ed..d4d129f57ae3a 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/event_details/translations.ts @@ -29,25 +29,10 @@ export const RESPONSE_ACTIONS_VIEW = i18n.translate( } ); -export const FIELD = i18n.translate('xpack.securitySolution.eventDetails.field', { - defaultMessage: 'Field', -}); - -export const VALUE = i18n.translate('xpack.securitySolution.eventDetails.value', { - defaultMessage: 'Value', -}); - export const DESCRIPTION = i18n.translate('xpack.securitySolution.eventDetails.description', { defaultMessage: 'Description', }); -export const PLACEHOLDER = i18n.translate( - 'xpack.securitySolution.eventDetails.filter.placeholder', - { - defaultMessage: 'Filter by Field, Value, or Description...', - } -); - export const AGENT_STATUS = i18n.translate('xpack.securitySolution.detections.alerts.agentStatus', { defaultMessage: 'Agent status', }); diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.test.tsx b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.test.tsx index c31b6a01f3372..feb77b0e64ab3 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.test.tsx @@ -88,6 +88,13 @@ describe('OnboardingComponent', () => { }); describe('AVC 2024 Results banner', () => { + beforeEach(() => { + (useKibana().services.storage.get as jest.Mock).mockReturnValue(true); + }); + afterEach(() => { + jest.clearAllMocks(); + jest.useRealTimers(); + }); it('should render on the page', () => { render(); expect(renderResult.getByTestId('avcResultsBanner')).toBeTruthy(); @@ -97,7 +104,7 @@ describe('OnboardingComponent', () => { render(); expect(renderResult.getByTestId('avcReadTheBlog')).toHaveAttribute( 'href', - 'https://www.elastic.co/blog/elastic-security-malware-protection-test-av-comparatives' + 'https://www.elastic.co/blog/elastic-av-comparatives-business-security-test' ); }); @@ -110,10 +117,23 @@ describe('OnboardingComponent', () => { false ); }); + it('should stay dismissed if it has been closed once', () => { - (useKibana().services.storage.get as jest.Mock).mockReturnValue(false); + (useKibana().services.storage.get as jest.Mock).mockReturnValueOnce(false); render(); expect(renderResult.queryByTestId('avcResultsBanner')).toBeNull(); }); + + it('should not be shown if the current date is January 1, 2025', () => { + jest.useFakeTimers().setSystemTime(new Date('2025-01-01T05:00:00.000Z')); + render(); + expect(renderResult.queryByTestId('avcResultsBanner')).toBeNull(); + jest.useRealTimers(); + }); + it('should be shown if the current date is before January 1, 2025', () => { + jest.useFakeTimers().setSystemTime(new Date('2024-12-31T05:00:00.000Z')); + render(); + expect(renderResult.queryByTestId('avcResultsBanner')).toBeTruthy(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.tsx b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.tsx index 35754cda785cd..b5ec40b703895 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.tsx +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.tsx @@ -6,7 +6,7 @@ */ import React, { useCallback, useMemo, useState } from 'react'; -import { AVCResultsBanner2024 } from '@kbn/avc-banner'; +import { AVCResultsBanner2024, useIsStillYear2024 } from '@kbn/avc-banner'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; import { TogglePanel } from './toggle_panel'; @@ -91,7 +91,7 @@ export const OnboardingComponent: React.FC = ({ return (
- {showAVCBanner && ( + {useIsStillYear2024() && showAVCBanner && ( diff --git a/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx index a2cbc508da56e..19e783064b763 100644 --- a/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx @@ -103,12 +103,15 @@ describe('SIEM Super Date Picker', () => { ); wrapper - .find('[data-test-subj="superDatePickerToggleQuickMenuButton"]') + .find('button[data-test-subj="superDatePickerToggleQuickMenuButton"]') .first() .simulate('click'); wrapper.update(); - wrapper.find('button.euiQuickSelect__applyButton').first().simulate('click'); + wrapper + .find('button[data-test-subj="superDatePickerQuickSelectApplyButton"]') + .first() + .simulate('click'); wrapper.update(); }); @@ -123,15 +126,14 @@ describe('SIEM Super Date Picker', () => { test('Make Sure it is Today date is an absolute date', () => { wrapper - .find('[data-test-subj="superDatePickerToggleQuickMenuButton"]') + .find('button[data-test-subj="superDatePickerToggleQuickMenuButton"]') .first() .simulate('click'); wrapper.update(); wrapper - .find('[data-test-subj="superDatePickerCommonlyUsed_Today"]') + .find('button[data-test-subj="superDatePickerCommonlyUsed_Today"]') .first() - .find('button') .simulate('click'); wrapper.update(); expect(store.getState().inputs.global.timerange.kind).toBe('absolute'); @@ -139,7 +141,7 @@ describe('SIEM Super Date Picker', () => { test('Make Sure it is This Week date is an absolute date', () => { wrapper - .find('[data-test-subj="superDatePickerToggleQuickMenuButton"]') + .find('button[data-test-subj="superDatePickerToggleQuickMenuButton"]') .first() .simulate('click'); wrapper.update(); @@ -173,53 +175,57 @@ describe('SIEM Super Date Picker', () => { ); wrapper - .find('[data-test-subj="superDatePickerToggleQuickMenuButton"]') + .find('button[data-test-subj="superDatePickerToggleQuickMenuButton"]') .first() .simulate('click'); wrapper.update(); wrapper - .find('[data-test-subj="superDatePickerCommonlyUsed_Today"]') + .find('button[data-test-subj="superDatePickerCommonlyUsed_Today"]') .first() - .find('button') .simulate('click'); wrapper.update(); }); test('Today is in Recently used date ranges', () => { - expect(wrapper.find('div.euiQuickSelectPopover__section').at(1).text()).toBe('Today'); + expect( + wrapper.find('div[className*="euiQuickSelectPanel__section"]').at(1).text() + ).toContain('Today'); }); test('Today and "Last ${x} hours" where ${x} is in hours are in Recently used date ranges', () => { wrapper - .find('[data-test-subj="superDatePickerToggleQuickMenuButton"]') + .find('button[data-test-subj="superDatePickerToggleQuickMenuButton"]') .first() .simulate('click'); wrapper.update(); - wrapper.find('button.euiQuickSelect__applyButton').first().simulate('click'); + wrapper + .find('button[data-test-subj="superDatePickerQuickSelectApplyButton"]') + .first() + .simulate('click'); wrapper.update(); - expect(wrapper.find('div.euiQuickSelectPopover__section').at(1).text()).toMatch( - /^Last\s[0-9]+\s(.)+Today/ - ); + const ranges = wrapper.find('div[className*="euiQuickSelectPanel__section"]').at(1).text(); + expect(ranges).toContain('Today'); + expect(ranges).toContain('Last 24 hours'); }); test('Make sure that it does not add any duplicate if you click again on today', () => { wrapper - .find('[data-test-subj="superDatePickerToggleQuickMenuButton"]') + .find('button[data-test-subj="superDatePickerToggleQuickMenuButton"]') .first() .simulate('click'); wrapper.update(); wrapper - .find('[data-test-subj="superDatePickerCommonlyUsed_Today"]') + .find('button[data-test-subj="superDatePickerCommonlyUsed_Today"]') .first() - .find('button') .simulate('click'); wrapper.update(); - expect(wrapper.find('div.euiQuickSelectPopover__section').at(1).text()).toBe('Today'); + const text = wrapper.find('div[className*="euiQuickSelectPanel__section"]').at(1).text(); + expect(text.match(/Today/g)).toHaveLength(1); }); }); @@ -236,15 +242,14 @@ describe('SIEM Super Date Picker', () => { ); wrapper - .find('[data-test-subj="superDatePickerToggleQuickMenuButton"]') + .find('button[data-test-subj="superDatePickerToggleQuickMenuButton"]') .first() .simulate('click'); wrapper.update(); wrapper - .find('[data-test-subj="superDatePickerToggleRefreshButton"]') + .find('button[data-test-subj="superDatePickerToggleRefreshButton"]') .first() - .find('button') .simulate('click'); wrapper.update(); @@ -266,15 +271,14 @@ describe('SIEM Super Date Picker', () => { test('Make sure we can stop the stream live', () => { wrapper - .find('[data-test-subj="superDatePickerToggleQuickMenuButton"]') + .find('button[data-test-subj="superDatePickerToggleQuickMenuButton"]') .first() .simulate('click'); wrapper.update(); wrapper - .find('[data-test-subj="superDatePickerToggleRefreshButton"]') + .find('button[data-test-subj="superDatePickerToggleRefreshButton"]') .first() - .find('button') .simulate('click'); wrapper.update(); diff --git a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_event_enrichment.ts b/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_event_enrichment.ts deleted file mode 100644 index b8565f9d3e13e..0000000000000 --- a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_event_enrichment.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { useObservable, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; - -import { getEventEnrichmentComplete } from './api'; - -const getEventEnrichmentCompleteWithOptionalSignal = withOptionalSignal(getEventEnrichmentComplete); - -export const useEventEnrichmentComplete = () => - useObservable(getEventEnrichmentCompleteWithOptionalSignal); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/alerts_by_rule.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/alerts_by_rule.test.tsx new file mode 100644 index 0000000000000..a07ba04cefcbd --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/alerts_by_rule.test.tsx @@ -0,0 +1,62 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { act, render } from '@testing-library/react'; +import React from 'react'; +import { TestProviders } from '../../../../common/mock'; +import { AlertsByRule } from './alerts_by_rule'; +import { parsedAlerts } from './mock_rule_data'; + +jest.mock('../../../../common/lib/kibana'); + +jest.mock('react-router-dom', () => { + const actual = jest.requireActual('react-router-dom'); + return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; +}); + +describe('Alert by rule chart', () => { + const defaultProps = { + data: [], + isLoading: false, + }; + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('renders table correctly without data', () => { + act(() => { + const { container } = render( + + + + ); + expect( + container.querySelector('[data-test-subj="alerts-by-rule-table"]') + ).toBeInTheDocument(); + expect( + container.querySelector('[data-test-subj="alerts-by-rule-table"] tbody')?.textContent + ).toEqual('No items found'); + }); + }); + + test('renders table correctly with data', () => { + act(() => { + const { queryAllByRole } = render( + + + + ); + + parsedAlerts.forEach((_, i) => { + expect(queryAllByRole('row')[i + 1].textContent).toContain(parsedAlerts[i].rule); + expect(queryAllByRole('row')[i + 1].textContent).toContain( + parsedAlerts[i].value.toString() + ); + }); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/alerts_by_rule.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/alerts_by_rule.tsx new file mode 100644 index 0000000000000..d213f3026f4e7 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/alerts_by_rule.tsx @@ -0,0 +1,100 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiInMemoryTable, EuiSpacer, EuiText } from '@elastic/eui'; +import React from 'react'; +import styled from 'styled-components'; +import type { SortOrder } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { ALERT_RULE_NAME } from '@kbn/rule-data-utils'; +import { TableId } from '@kbn/securitysolution-data-table'; +import type { AlertsByRuleData } from './types'; +import { FormattedCount } from '../../../../common/components/formatted_number'; +import { DefaultDraggable } from '../../../../common/components/draggables'; +import { ALERTS_HEADERS_RULE_NAME } from '../../alerts_table/translations'; +import { COUNT_TABLE_TITLE } from '../alerts_count_panel/translations'; + +const Wrapper = styled.div` + margin-top: -${({ theme }) => theme.eui.euiSizeM}; +`; +const TableWrapper = styled.div` + height: 178px; +`; + +export interface AlertsByRuleProps { + data: AlertsByRuleData[]; + isLoading: boolean; +} + +const COLUMNS: Array> = [ + { + field: 'rule', + name: ALERTS_HEADERS_RULE_NAME, + 'data-test-subj': 'alert-by-rule-table-rule-name', + truncateText: true, + render: (rule: string) => ( + + + + ), + }, + { + field: 'value', + name: COUNT_TABLE_TITLE, + dataType: 'number', + sortable: true, + 'data-test-subj': 'alert-by-rule-table-count', + render: (count: number) => ( + + + + ), + width: '22%', + }, +]; + +const SORTING: { sort: { field: keyof AlertsByRuleData; direction: SortOrder } } = { + sort: { + field: 'value', + direction: 'desc', + }, +}; + +const PAGINATION: {} = { + pageSize: 25, + showPerPageOptions: false, +}; + +export const AlertsByRule: React.FC = ({ data, isLoading }) => { + return ( + + + + + + + ); +}; + +AlertsByRule.displayName = 'AlertsByRule'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/helpers.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/helpers.test.tsx new file mode 100644 index 0000000000000..00ba5b3edb360 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/helpers.test.tsx @@ -0,0 +1,50 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { parseAlertsRuleData, getIsAlertsByRuleData, getIsAlertsByRuleAgg } from './helpers'; +import * as mockRule from './mock_rule_data'; +import type { AlertsByRuleAgg } from './types'; +import type { AlertSearchResponse } from '../../../containers/detection_engine/alerts/types'; + +describe('parse alerts by rule data', () => { + test('parse alerts with data', () => { + const res = parseAlertsRuleData( + mockRule.mockAlertsData as AlertSearchResponse<{}, AlertsByRuleAgg> + ); + expect(res).toEqual(mockRule.parsedAlerts); + }); + + test('parse alerts without data', () => { + const res = parseAlertsRuleData( + mockRule.mockAlertsEmptyData as AlertSearchResponse<{}, AlertsByRuleAgg> + ); + expect(res).toEqual([]); + }); +}); + +describe('get is alerts by rule data', () => { + test('should return true for rule data', () => { + expect(getIsAlertsByRuleData(mockRule.parsedAlerts)).toBe(true); + }); + + test('should return false for non rule data', () => { + expect(getIsAlertsByRuleData([{ key: 'low', value: 1 }])).toBe(false); + }); + + test('should return false for empty array', () => { + expect(getIsAlertsByRuleData([])).toBe(false); + }); +}); + +describe('get is alerts by rule agg', () => { + test('return true for rule aggregation query', () => { + expect(getIsAlertsByRuleAgg(mockRule.mockAlertsData)).toBe(true); + }); + + test('return false for queries without alertByRule key', () => { + expect(getIsAlertsByRuleAgg({ ...mockRule.mockAlertsEmptyData, aggregations: {} })).toBe(false); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/helpers.tsx new file mode 100644 index 0000000000000..c2c6d8e95d49f --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/helpers.tsx @@ -0,0 +1,35 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { has } from 'lodash'; +import type { AlertsByRuleData, AlertsByRuleAgg } from './types'; +import type { AlertSearchResponse } from '../../../containers/detection_engine/alerts/types'; +import type { SummaryChartsData, SummaryChartsAgg } from '../alerts_summary_charts_panel/types'; + +export const parseAlertsRuleData = ( + response: AlertSearchResponse<{}, AlertsByRuleAgg> +): AlertsByRuleData[] => { + const rulesBuckets = response?.aggregations?.alertsByRule?.buckets ?? []; + + return rulesBuckets.length === 0 + ? [] + : rulesBuckets.map((rule) => { + return { + rule: rule.key, + value: rule.doc_count, + }; + }); +}; + +export const getIsAlertsByRuleData = (data: SummaryChartsData[]): data is AlertsByRuleData[] => { + return data.length > 0 && data.every((x) => has(x, 'rule')); +}; + +export const getIsAlertsByRuleAgg = ( + data: AlertSearchResponse<{}, SummaryChartsAgg> +): data is AlertSearchResponse<{}, AlertsByRuleAgg> => { + return has(data, 'aggregations.alertsByRule'); +}; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/index.test.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/index.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/index.test.tsx index 9dbfcfa23af03..387df74772f02 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/index.test.tsx @@ -7,7 +7,7 @@ import { act, render } from '@testing-library/react'; import React from 'react'; import { TestProviders } from '../../../../common/mock'; -import { AlertsByTypePanel } from '.'; +import { AlertsByRulePanel } from '.'; jest.mock('../../../../common/lib/kibana'); @@ -16,7 +16,7 @@ jest.mock('react-router-dom', () => { return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; }); -describe('Alert by type panel', () => { +describe('Alert by rule panel', () => { const defaultProps = { signalIndexName: 'signalIndexName', skip: false, @@ -30,11 +30,11 @@ describe('Alert by type panel', () => { await act(async () => { const { container } = render( - + ); expect( - container.querySelector('[data-test-subj="alerts-by-type-panel"]') + container.querySelector('[data-test-subj="alerts-by-rule-panel"]') ).toBeInTheDocument(); }); }); @@ -43,7 +43,7 @@ describe('Alert by type panel', () => { await act(async () => { const { container } = render( - + ); expect(container.querySelector(`[data-test-subj="header-section"]`)).toBeInTheDocument(); @@ -54,21 +54,21 @@ describe('Alert by type panel', () => { await act(async () => { const { container } = render( - + ); expect(container.querySelector('[data-test-subj="inspect-icon-button"]')).toBeInTheDocument(); }); }); - test('renders alert by type chart', async () => { + test('renders alert by rule chart', async () => { await act(async () => { const { container } = render( - + ); - expect(container.querySelector('[data-test-subj="alerts-by-type"]')).toBeInTheDocument(); + expect(container.querySelector('[data-test-subj="alerts-by-rule"]')).toBeInTheDocument(); }); }); }); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/index.tsx similarity index 60% rename from x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/index.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/index.tsx index 92d88d28ec419..98e98698f6083 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/index.tsx @@ -9,32 +9,27 @@ import { EuiPanel } from '@elastic/eui'; import React, { useMemo } from 'react'; import { v4 as uuid } from 'uuid'; import type { ChartsPanelProps } from '../alerts_summary_charts_panel/types'; -import { AlertsByType } from './alerts_by_type'; +import { AlertsByRule } from './alerts_by_rule'; import { HeaderSection } from '../../../../common/components/header_section'; import { InspectButtonContainer } from '../../../../common/components/inspect'; import { useSummaryChartData } from '../alerts_summary_charts_panel/use_summary_chart_data'; -import { - alertTypeAggregations, - alertRuleAggregations, -} from '../alerts_summary_charts_panel/aggregations'; -import { getIsAlertsTypeData } from './helpers'; +import { alertRuleAggregations } from '../alerts_summary_charts_panel/aggregations'; +import { getIsAlertsByRuleData } from './helpers'; import * as i18n from './translations'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; const ALERTS_BY_TYPE_CHART_ID = 'alerts-summary-alert_by_type'; -export const AlertsByTypePanel: React.FC = ({ +export const AlertsByRulePanel: React.FC = ({ filters, query, signalIndexName, runtimeMappings, skip, }) => { - const isAlertTypeEnabled = useIsExperimentalFeatureEnabled('alertTypeEnabled'); const uniqueQueryId = useMemo(() => `${ALERTS_BY_TYPE_CHART_ID}-${uuid()}`, []); const { items, isLoading } = useSummaryChartData({ - aggregations: isAlertTypeEnabled ? alertTypeAggregations : alertRuleAggregations, + aggregations: alertRuleAggregations, filters, query, signalIndexName, @@ -42,23 +37,23 @@ export const AlertsByTypePanel: React.FC = ({ skip, uniqueQueryId, }); - const data = useMemo(() => (getIsAlertsTypeData(items) ? items : []), [items]); + const data = useMemo(() => (getIsAlertsByRuleData(items) ? items : []), [items]); return ( - + - + ); }; -AlertsByTypePanel.displayName = 'AlertsByTypePanel'; +AlertsByRulePanel.displayName = 'AlertsByRulePanel'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/mock_rule_data.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/mock_rule_data.ts similarity index 85% rename from x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/mock_rule_data.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/mock_rule_data.ts index 62dc3f3f885f1..42d743004bec9 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/mock_rule_data.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/mock_rule_data.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { AlertsTypeData } from './types'; +import type { AlertsByRuleData } from './types'; const from = '2022-04-05T12:00:00.000Z'; const to = '2022-04-08T12:00:00.000Z'; @@ -102,8 +102,8 @@ export const query = { runtime_mappings: undefined, }; -export const parsedAlerts: AlertsTypeData[] = [ - { rule: 'Test rule 1', type: 'Detection', value: 537, color: '#D36086' }, - { rule: 'Test rule 2', type: 'Detection', value: 27, color: '#D36086' }, - { rule: 'Test rule 3', type: 'Detection', value: 25, color: '#D36086' }, +export const parsedAlerts: AlertsByRuleData[] = [ + { rule: 'Test rule 1', value: 537 }, + { rule: 'Test rule 2', value: 27 }, + { rule: 'Test rule 3', value: 25 }, ]; diff --git a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/translations.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/translations.ts similarity index 58% rename from x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/translations.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/translations.ts index ff9130b288fa8..5664f01691821 100644 --- a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/translations.ts @@ -4,12 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import { i18n } from '@kbn/i18n'; -export const INVESTIGATION_ENRICHMENT_REQUEST_ERROR = i18n.translate( - 'xpack.securitySolution.investigationEnrichment.requestError', +export const ALERTS_RULE_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.alerts.alertsByType.alertRuleChartTitle', { - defaultMessage: `An error occurred while requesting threat intelligence`, + defaultMessage: 'Alerts by name', } ); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/types.ts similarity index 51% rename from x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/types.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/types.ts index 3f1a97096cca7..7cda2fa27df26 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_rule_panel/types.ts @@ -6,16 +6,6 @@ */ import type { BucketItem } from '../../../../../common/search_strategy/security_solution/cti'; -export type AlertType = 'Detection' | 'Prevention'; - -export interface AlertsByTypeAgg { - alertsByType: { - doc_count_error_upper_bound: number; - sum_other_doc_count: number; - buckets: RuleBucket[]; - }; -} - export interface AlertsByRuleAgg { alertsByRule: { doc_count_error_upper_bound: number; @@ -24,21 +14,7 @@ export interface AlertsByRuleAgg { }; } -interface RuleBucket { - key: string; - doc_count: number; - ruleByEventType?: RuleByEventType; -} - -interface RuleByEventType { - doc_count_error_upper_bound: number; - sum_other_doc_count: number; - buckets: BucketItem[]; -} - -export interface AlertsTypeData { +export interface AlertsByRuleData { rule: string; - type: AlertType; value: number; - color: string; } diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/alerts_by_type.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/alerts_by_type.test.tsx deleted file mode 100644 index 59ceb50ec227e..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/alerts_by_type.test.tsx +++ /dev/null @@ -1,172 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { act, render } from '@testing-library/react'; -import React from 'react'; -import { TestProviders } from '../../../../common/mock'; -import { AlertsByType } from './alerts_by_type'; -import { parsedAlerts } from './mock_type_data'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; - -const display = 'alerts-by-type-palette-display'; - -jest.mock('../../../../common/lib/kibana'); - -jest.mock('react-router-dom', () => { - const actual = jest.requireActual('react-router-dom'); - return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; -}); - -const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; -jest.mock('../../../../common/hooks/use_experimental_features'); - -describe('Alert by type chart', () => { - const defaultProps = { - data: [], - isLoading: false, - }; - - afterEach(() => { - jest.clearAllMocks(); - }); - - describe('isAlertTypeEnabled flag is true', () => { - beforeEach(() => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); - }); - - test('renders health and pallette display correctly without data', () => { - act(() => { - const { container } = render( - - - - ); - expect(container.querySelector(`[data-test-subj="${display}"]`)).toBeInTheDocument(); - expect(container.querySelector(`[data-test-subj="${display}"]`)?.textContent).toContain( - 'Detection:0' - ); - expect(container.querySelector(`[data-test-subj="${display}"]`)?.textContent).toContain( - 'Prevention:0' - ); - }); - }); - - test('renders table correctly without data', () => { - act(() => { - const { container } = render( - - - - ); - expect( - container.querySelector('[data-test-subj="alerts-by-type-table"]') - ).toBeInTheDocument(); - expect( - container.querySelector('[data-test-subj="alerts-by-type-table"] tbody')?.textContent - ).toEqual('No items found'); - }); - }); - - test('renders health and pallette display correctly with data', () => { - act(() => { - const { container } = render( - - - - ); - expect(container.querySelector(`[data-test-subj="${display}"]`)).toBeInTheDocument(); - expect(container.querySelector(`[data-test-subj="${display}"]`)?.textContent).toContain( - 'Detection:583' - ); - expect(container.querySelector(`[data-test-subj="${display}"]`)?.textContent).toContain( - 'Prevention:6' - ); - }); - }); - - test('renders table correctly with data', () => { - act(() => { - const { queryAllByRole } = render( - - - - ); - - parsedAlerts.forEach((_, i) => { - expect(queryAllByRole('row')[i + 1].textContent).toContain(parsedAlerts[i].rule); - expect(queryAllByRole('row')[i + 1].textContent).toContain(parsedAlerts[i].type); - expect(queryAllByRole('row')[i + 1].textContent).toContain( - parsedAlerts[i].value.toString() - ); - }); - }); - }); - }); - - describe('isAlertTypeEnabled flag is false', () => { - beforeEach(() => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); - }); - - test('do not renders health and pallette display correctly without data', () => { - act(() => { - const { container } = render( - - - - ); - expect(container.querySelector(`[data-test-subj="${display}"]`)).not.toBeInTheDocument(); - }); - }); - - test('renders table correctly without data', () => { - act(() => { - const { container } = render( - - - - ); - expect( - container.querySelector('[data-test-subj="alerts-by-type-table"]') - ).toBeInTheDocument(); - expect( - container.querySelector('[data-test-subj="alerts-by-type-table"] tbody')?.textContent - ).toEqual('No items found'); - }); - }); - - test('do not renders health and pallette display correctly with data', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); - act(() => { - const { container } = render( - - - - ); - expect(container.querySelector(`[data-test-subj="${display}"]`)).not.toBeInTheDocument(); - }); - }); - - test('renders table correctly with data', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); - act(() => { - const { queryAllByRole } = render( - - - - ); - - parsedAlerts.forEach((_, i) => { - expect(queryAllByRole('row')[i + 1].textContent).toContain(parsedAlerts[i].rule); - expect(queryAllByRole('row')[i + 1].textContent).toContain( - parsedAlerts[i].value.toString() - ); - }); - }); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/alerts_by_type.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/alerts_by_type.tsx deleted file mode 100644 index 5208e74470fa8..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/alerts_by_type.tsx +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { - EuiFlexItem, - EuiInMemoryTable, - EuiColorPaletteDisplay, - EuiSpacer, - EuiFlexGroup, - EuiHealth, - EuiText, -} from '@elastic/eui'; -import React, { useMemo } from 'react'; -import styled from 'styled-components'; -import type { SortOrder } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import type { AlertsTypeData, AlertType } from './types'; -import { FormattedCount } from '../../../../common/components/formatted_number'; -import { getAlertsTypeTableColumns } from './columns'; -import { ALERT_TYPE_COLOR } from './helpers'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; - -const Wrapper = styled.div` - margin-top: -${({ theme }) => theme.eui.euiSizeM}; -`; -const TableWrapper = styled.div` - height: 178px; -`; -const StyledEuiColorPaletteDisplay = styled(EuiColorPaletteDisplay)` - border: none; - border-radius: 0; -`; -interface PalletteObject { - stop: number; - color: string; -} - -export interface AlertsByTypeProps { - data: AlertsTypeData[]; - isLoading: boolean; -} - -export const AlertsByType: React.FC = ({ data, isLoading }) => { - const isAlertTypeEnabled = useIsExperimentalFeatureEnabled('alertTypeEnabled'); - const columns = useMemo( - () => getAlertsTypeTableColumns(isAlertTypeEnabled), - [isAlertTypeEnabled] - ); - - const subtotals = useMemo( - () => - data.reduce( - (acc: { Detection: number; Prevention: number }, item: AlertsTypeData) => { - if (item.type === 'Detection') { - acc.Detection += item.value; - } - if (item.type === 'Prevention') { - acc.Prevention += item.value; - } - return acc; - }, - { Detection: 0, Prevention: 0 } - ), - [data] - ); - - const palette: PalletteObject[] = useMemo( - () => - (Object.keys(subtotals) as AlertType[]).reduce((acc: PalletteObject[], type: AlertType) => { - const previousStop = acc.length > 0 ? acc[acc.length - 1].stop : 0; - if (subtotals[type]) { - const newEntry: PalletteObject = { - stop: previousStop + (subtotals[type] || 0), - color: ALERT_TYPE_COLOR[type], - }; - acc.push(newEntry); - } - return acc; - }, [] as PalletteObject[]), - [subtotals] - ); - - const sorting: { sort: { field: keyof AlertsTypeData; direction: SortOrder } } = { - sort: { - field: 'value', - direction: 'desc', - }, - }; - - const pagination: {} = { - pageSize: 25, - showPerPageOptions: false, - }; - - return ( - - {isAlertTypeEnabled && ( - <> - - {(Object.keys(subtotals) as AlertType[]).map((type) => ( - - - - - -

{`${type}:`}

-
-
-
- - - - - -
-
- ))} - -
- - - - )} - - - - -
- ); -}; - -AlertsByType.displayName = 'AlertsByType'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/columns.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/columns.tsx deleted file mode 100644 index 24dc0cc6690aa..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/columns.tsx +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import React from 'react'; -import { EuiHealth, EuiText } from '@elastic/eui'; -import { ALERT_RULE_NAME } from '@kbn/rule-data-utils'; -import type { EuiBasicTableColumn } from '@elastic/eui'; -import { TableId } from '@kbn/securitysolution-data-table'; -import { - SecurityCellActions, - CellActionsMode, - SecurityCellActionsTrigger, -} from '../../../../common/components/cell_actions'; -import type { AlertsTypeData, AlertType } from './types'; -import { DefaultDraggable } from '../../../../common/components/draggables'; -import { FormattedCount } from '../../../../common/components/formatted_number'; -import { ALERTS_HEADERS_RULE_NAME } from '../../alerts_table/translations'; -import { ALERT_TYPE_COLOR, ALERT_TYPE_LABEL } from './helpers'; -import { COUNT_TABLE_TITLE } from '../alerts_count_panel/translations'; -import * as i18n from './translations'; -import { SourcererScopeName } from '../../../../sourcerer/store/model'; - -export const getAlertsTypeTableColumns = ( - isAlertTypeEnabled: boolean -): Array> => [ - { - field: 'rule', - name: ALERTS_HEADERS_RULE_NAME, - 'data-test-subj': 'detectionsTable-rule', - truncateText: true, - render: (rule: string) => ( - - - - ), - }, - ...(isAlertTypeEnabled - ? [ - { - field: 'type', - name: i18n.ALERTS_TYPE_COLUMN_TITLE, - 'data-test-subj': 'detectionsTable-type', - truncateText: true, - render: (type: string) => { - return ( - - - - {ALERT_TYPE_LABEL[type as AlertType]} - - - - ); - }, - width: '30%', - }, - ] - : []), - { - field: 'value', - name: COUNT_TABLE_TITLE, - dataType: 'number', - sortable: true, - 'data-test-subj': 'detectionsTable-count', - render: (count: number) => ( - - - - ), - width: '22%', - }, -]; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/helpers.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/helpers.test.tsx deleted file mode 100644 index e0118b349e6b1..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/helpers.test.tsx +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { parseAlertsTypeData, parseAlertsRuleData } from './helpers'; -import * as mockType from './mock_type_data'; -import * as mockRule from './mock_rule_data'; -import type { AlertsByTypeAgg, AlertsByRuleAgg } from './types'; -import type { AlertSearchResponse } from '../../../containers/detection_engine/alerts/types'; - -describe('parse alerts by type data', () => { - test('parse alerts with data', () => { - const res = parseAlertsTypeData( - mockType.mockAlertsData as AlertSearchResponse<{}, AlertsByTypeAgg> - ); - expect(res).toEqual(mockType.parsedAlerts); - }); - - test('parse alerts without data', () => { - const res = parseAlertsTypeData( - mockType.mockAlertsEmptyData as AlertSearchResponse<{}, AlertsByTypeAgg> - ); - expect(res).toEqual([]); - }); -}); - -describe('parse alerts by rule data', () => { - test('parse alerts with data', () => { - const res = parseAlertsRuleData( - mockRule.mockAlertsData as AlertSearchResponse<{}, AlertsByRuleAgg> - ); - expect(res).toEqual(mockRule.parsedAlerts); - }); - - test('parse alerts without data', () => { - const res = parseAlertsRuleData( - mockRule.mockAlertsEmptyData as AlertSearchResponse<{}, AlertsByRuleAgg> - ); - expect(res).toEqual([]); - }); -}); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/helpers.tsx deleted file mode 100644 index 5ad677bea154a..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/helpers.tsx +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { has } from 'lodash'; -import type { AlertType, AlertsByTypeAgg, AlertsTypeData, AlertsByRuleAgg } from './types'; -import type { AlertSearchResponse } from '../../../containers/detection_engine/alerts/types'; -import type { SummaryChartsData, SummaryChartsAgg } from '../alerts_summary_charts_panel/types'; -import { DETECTION, PREVENTION } from './translations'; - -export const ALERT_TYPE_COLOR = { - Detection: '#D36086', - Prevention: '#54B399', -}; -export const ALERT_TYPE_LABEL = { - Detection: DETECTION, - Prevention: PREVENTION, -}; - -export const parseAlertsRuleData = ( - response: AlertSearchResponse<{}, AlertsByRuleAgg> -): AlertsTypeData[] => { - const rulesBuckets = response?.aggregations?.alertsByRule?.buckets ?? []; - - return rulesBuckets.length === 0 - ? [] - : rulesBuckets.map((rule) => { - return { - rule: rule.key, - type: 'Detection' as AlertType, - value: rule.doc_count, - color: ALERT_TYPE_COLOR.Detection, - }; - }); -}; - -export const parseAlertsTypeData = ( - response: AlertSearchResponse<{}, AlertsByTypeAgg> -): AlertsTypeData[] => { - const rulesBuckets = response?.aggregations?.alertsByType?.buckets ?? []; - return rulesBuckets.length === 0 - ? [] - : rulesBuckets.flatMap((rule) => { - const events = rule.ruleByEventType?.buckets ?? []; - return getAlertType(rule.key, rule.doc_count, events); - }); -}; - -const getAlertType = ( - ruleName: string, - ruleCount: number, - ruleEvents: Array<{ key: string; doc_count: number }> -): AlertsTypeData[] => { - const preventions = ruleEvents.find((bucket) => bucket.key === 'denied'); - if (!preventions) { - return [ - { - rule: ruleName, - type: 'Detection' as AlertType, - value: ruleCount, - color: ALERT_TYPE_COLOR.Detection, - }, - ]; - } - - const ret = []; - if (preventions.doc_count < ruleCount) { - ret.push({ - rule: ruleName, - type: 'Detection' as AlertType, - value: ruleCount - preventions.doc_count, - color: ALERT_TYPE_COLOR.Detection, - }); - } - - ret.push({ - rule: ruleName, - type: 'Prevention' as AlertType, - value: preventions.doc_count, - color: ALERT_TYPE_COLOR.Prevention, - }); - - return ret; -}; - -export const getIsAlertsTypeData = (data: SummaryChartsData[]): data is AlertsTypeData[] => { - return data?.every((x) => has(x, 'type')); -}; - -export const getIsAlertsByTypeAgg = ( - data: AlertSearchResponse<{}, SummaryChartsAgg> -): data is AlertSearchResponse<{}, AlertsByTypeAgg> => { - return has(data, 'aggregations.alertsByType'); -}; - -export const getIsAlertsByRuleAgg = ( - data: AlertSearchResponse<{}, SummaryChartsAgg> -): data is AlertSearchResponse<{}, AlertsByRuleAgg> => { - return has(data, 'aggregations.alertsByRule'); -}; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/mock_type_data.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/mock_type_data.ts deleted file mode 100644 index 4c9cea8e63206..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/mock_type_data.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import type { AlertsTypeData } from './types'; - -const from = '2022-04-05T12:00:00.000Z'; -const to = '2022-04-08T12:00:00.000Z'; - -export const mockAlertsData = { - took: 0, - timeout: false, - _shards: { - total: 1, - successful: 1, - skipped: 0, - failed: 0, - }, - hits: { - total: { - value: 589, - relation: 'eq', - }, - max_score: null, - hits: [], - }, - aggregations: { - alertsByType: { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [ - { - key: 'Test rule 1', - doc_count: 537, - ruleByEventType: { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [ - { - key: 'info', - doc_count: 406, - }, - { - key: 'creation', - doc_count: 131, - }, - ], - }, - }, - { - key: 'Test rule 2', - doc_count: 27, - ruleByEventType: { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [ - { - key: 'info', - doc_count: 19, - }, - { - key: 'creation', - doc_count: 8, - }, - ], - }, - }, - { - key: 'Test rule 3', - doc_count: 25, - ruleByEventType: { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [ - { - key: 'info', - doc_count: 19, - }, - { - key: 'denied', - doc_count: 6, - }, - ], - }, - }, - ], - }, - }, -}; - -export const mockAlertsEmptyData = { - took: 0, - timeout: false, - _shards: { - total: 1, - successful: 1, - skipped: 0, - failed: 0, - }, - hits: { - total: { - value: 0, - relation: 'eq', - }, - max_score: null, - hits: [], - }, - aggregations: { - alertsByType: { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [], - }, - }, -}; - -export const query = { - size: 0, - query: { - bool: { - filter: [ - { - bool: { - filter: [], - must: [], - must_not: [], - should: [], - }, - }, - { range: { '@timestamp': { gte: from, lte: to } } }, - ], - }, - }, - aggs: { - alertsByType: { - terms: { - field: 'kibana.alert.rule.name', - size: 1000, - }, - aggs: { - ruleByEventType: { - terms: { - field: 'event.type', - size: 1000, - }, - }, - }, - }, - }, - runtime_mappings: undefined, -}; - -export const parsedAlerts: AlertsTypeData[] = [ - { rule: 'Test rule 1', type: 'Detection', value: 537, color: '#D36086' }, - { rule: 'Test rule 2', type: 'Detection', value: 27, color: '#D36086' }, - { rule: 'Test rule 3', type: 'Detection', value: 19, color: '#D36086' }, - { rule: 'Test rule 3', type: 'Prevention', value: 6, color: '#54B399' }, -]; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/translations.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/translations.ts deleted file mode 100644 index 66fa31c29a448..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/translations.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { i18n } from '@kbn/i18n'; - -export const ALERTS_TYPE_TITLE = i18n.translate( - 'xpack.securitySolution.detectionEngine.alerts.alertsByType.alertTypeChartTitle', - { - defaultMessage: 'Alerts by type', - } -); - -export const ALERTS_RULE_TITLE = i18n.translate( - 'xpack.securitySolution.detectionEngine.alerts.alertsByType.alertRuleChartTitle', - { - defaultMessage: 'Alerts by name', - } -); - -export const ALERTS_TYPE_COLUMN_TITLE = i18n.translate( - 'xpack.securitySolution.detectionEngine.alerts.alertsByType.typeColumn', - { - defaultMessage: 'Type', - } -); - -export const PREVENTIONS = i18n.translate( - 'xpack.securitySolution.detectionEngine.alerts.alertsByType.preventions', - { - defaultMessage: 'Preventions', - } -); - -export const DETECTIONS = i18n.translate( - 'xpack.securitySolution.detectionEngine.alerts.alertsByType.detections', - { - defaultMessage: 'Detections', - } -); - -export const PREVENTION = i18n.translate( - 'xpack.securitySolution.detectionEngine.alerts.alertsByType.prevention', - { - defaultMessage: 'Prevention', - } -); - -export const DETECTION = i18n.translate( - 'xpack.securitySolution.detectionEngine.alerts.alertsByType.detection', - { - defaultMessage: 'Detection', - } -); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.test.tsx index 18d44abca441a..806be83a738d3 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.test.tsx @@ -12,15 +12,11 @@ import type { Action } from '@kbn/ui-actions-plugin/public'; import { AlertsCountPanel } from '.'; import type { Status } from '../../../../../common/api/detection_engine'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../common/config'; import { TestProviders } from '../../../../common/mock'; import { ChartContextMenu } from '../chart_panels/chart_context_menu'; -import { TABLE } from '../chart_panels/chart_select/translations'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; +import { COUNTS } from '../chart_panels/chart_select/translations'; import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable'; -import type { ExperimentalFeatures } from '../../../../../common/experimental_features'; -import { allowedExperimentalValues } from '../../../../../common/experimental_features'; const from = '2022-07-28T08:20:18.966Z'; const to = '2022-07-28T08:20:18.966Z'; @@ -40,7 +36,6 @@ jest.mock('react-router-dom', () => { return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; }); -jest.mock('../../../../common/hooks/use_experimental_features'); jest.mock('../../../../common/components/page/use_refetch_by_session'); jest.mock('../../../../common/components/visualization_actions/visualization_embeddable'); jest.mock('../../../../common/components/page/use_refetch_by_session'); @@ -48,38 +43,26 @@ jest.mock('../common/hooks', () => ({ useInspectButton: jest.fn(), useStackByFields: jest.fn().mockReturnValue(() => []), })); -const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; -const getMockUseIsExperimentalFeatureEnabled = - (mockMapping?: Partial) => (flag: keyof typeof allowedExperimentalValues) => - mockMapping ? mockMapping?.[flag] : allowedExperimentalValues?.[flag]; -jest.mock('../../../../common/hooks/use_experimental_features'); +const mockSetIsExpanded = jest.fn(); const defaultProps = { - inspectTitle: TABLE, + inspectTitle: COUNTS, signalIndexName: 'signalIndexName', stackByField0: DEFAULT_STACK_BY_FIELD, stackByField1: DEFAULT_STACK_BY_FIELD1, setStackByField0: jest.fn(), setStackByField1: jest.fn(), isExpanded: true, - setIsExpanded: jest.fn(), + setIsExpanded: mockSetIsExpanded, showBuildingBlockAlerts: false, showOnlyThreatIndicatorAlerts: false, status: 'open' as Status, extraActions: [{ id: 'resetGroupByFields' }] as Action[], }; -const mockSetToggle = jest.fn(); -const mockUseQueryToggle = useQueryToggle as jest.Mock; describe('AlertsCountPanel', () => { beforeEach(() => { jest.clearAllMocks(); - mockUseQueryToggle.mockReturnValue({ toggleStatus: true, setToggleStatus: mockSetToggle }); - mockUseIsExperimentalFeatureEnabled.mockImplementation( - getMockUseIsExperimentalFeatureEnabled({ - alertsPageChartsEnabled: false, - }) - ); }); it('renders correctly', async () => { @@ -155,37 +138,11 @@ describe('AlertsCountPanel', () => { ); wrapper.find('[data-test-subj="query-toggle-header"]').first().simulate('click'); - expect(mockSetToggle).toBeCalledWith(false); - }); - }); - it('alertsPageChartsEnabled is false and toggleStatus=true, render', async () => { - await act(async () => { - const wrapper = mount( - - - - ); - expect(wrapper.find('[data-test-subj="visualization-embeddable"]').exists()).toEqual(true); - }); - }); - it('alertsPageChartsEnabled is false and toggleStatus=false, hide', async () => { - mockUseQueryToggle.mockReturnValue({ toggleStatus: false, setToggleStatus: mockSetToggle }); - await act(async () => { - const wrapper = mount( - - - - ); - expect(wrapper.find('[data-test-subj="visualization-embeddable"]').exists()).toEqual(false); + expect(mockSetIsExpanded).toBeCalledWith(false); }); }); - it('alertsPageChartsEnabled is true and isExpanded=true, render', async () => { - mockUseIsExperimentalFeatureEnabled.mockImplementation( - getMockUseIsExperimentalFeatureEnabled({ - alertsPageChartsEnabled: true, - }) - ); + it('when isExpanded is true, render counts panel', async () => { await act(async () => { const wrapper = mount( @@ -195,12 +152,7 @@ describe('AlertsCountPanel', () => { expect(wrapper.find('[data-test-subj="visualization-embeddable"]').exists()).toEqual(true); }); }); - it('alertsPageChartsEnabled is true and isExpanded=false, hide', async () => { - mockUseIsExperimentalFeatureEnabled.mockImplementation( - getMockUseIsExperimentalFeatureEnabled({ - alertsPageChartsEnabled: true, - }) - ); + it('when isExpanded is false, hide counts panel', async () => { await act(async () => { const wrapper = mount( diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx index 2ebbf29692f3d..18ba80752c398 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx @@ -7,7 +7,7 @@ import type { EuiComboBox } from '@elastic/eui'; import type { Action } from '@kbn/ui-actions-plugin/public'; -import React, { memo, useMemo, useCallback } from 'react'; +import React, { memo, useMemo } from 'react'; import { v4 as uuidv4 } from 'uuid'; import type { Filter } from '@kbn/es-query'; @@ -18,9 +18,7 @@ import { InspectButtonContainer } from '../../../../common/components/inspect'; import * as i18n from './translations'; import { KpiPanel } from '../common/components'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { FieldSelection } from '../../../../common/components/field_selection'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { getAlertsTableLensAttributes as getLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/common/alerts/alerts_table'; import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable'; @@ -44,8 +42,8 @@ interface AlertsCountPanelProps { stackByField1ComboboxRef?: React.RefObject>; stackByWidth?: number; title?: React.ReactNode; - isExpanded?: boolean; - setIsExpanded?: (status: boolean) => void; + isExpanded: boolean; + setIsExpanded: (status: boolean) => void; } const CHART_HEIGHT = 218; // px @@ -71,22 +69,8 @@ export const AlertsCountPanel = memo( setIsExpanded, }) => { const { to, from } = useGlobalTime(); - const isAlertsPageChartsEnabled = useIsExperimentalFeatureEnabled('alertsPageChartsEnabled'); // create a unique, but stable (across re-renders) query id const uniqueQueryId = useMemo(() => `${DETECTIONS_ALERTS_COUNT_ID}-${uuidv4()}`, []); - - const { toggleStatus, setToggleStatus } = useQueryToggle(DETECTIONS_ALERTS_COUNT_ID); - const toggleQuery = useCallback( - (newToggleStatus: boolean) => { - if (isAlertsPageChartsEnabled && setIsExpanded) { - setIsExpanded(newToggleStatus); - } else { - setToggleStatus(newToggleStatus); - } - }, - [setToggleStatus, setIsExpanded, isAlertsPageChartsEnabled] - ); - const timerange = useMemo(() => ({ from, to }), [from, to]); const extraVisualizationOptions = useMemo( @@ -97,19 +81,10 @@ export const AlertsCountPanel = memo( [filters, stackByField1] ); - const showCount = useMemo(() => { - if (isAlertsPageChartsEnabled) { - return isExpanded; - } - return toggleStatus; - }, [isAlertsPageChartsEnabled, toggleStatus, isExpanded]); - return ( - + ( titleSize="s" hideSubtitle showInspectButton={chartOptionsContextMenu == null} - toggleStatus={isAlertsPageChartsEnabled ? isExpanded : toggleStatus} - toggleQuery={toggleQuery} + toggleStatus={isExpanded} + toggleQuery={setIsExpanded} > ( useLensCompatibleFields={true} /> - {showCount && ( + {isExpanded && ( { }; }); -const mockUseIsExperimentalFeatureEnabled = jest.fn((feature: keyof ExperimentalFeatures) => { - if (feature === 'alertsPageChartsEnabled') return false; - return allowedExperimentalValues[feature]; -}); - -jest.mock('../../../../common/hooks/use_experimental_features'); jest.mock('../../../hooks/alerts_visualization/use_alert_histogram_count', () => ({ useAlertHistogramCount: jest.fn().mockReturnValue(999), })); @@ -120,6 +111,7 @@ jest.mock('../../../../common/components/visualization_actions/use_visualization }), })); +const mockSetIsExpanded = jest.fn(); const defaultProps = { setQuery: jest.fn(), showBuildingBlockAlerts: false, @@ -127,6 +119,8 @@ const defaultProps = { showTotalAlertsCount: true, signalIndexName: 'signalIndexName', updateDateRange: jest.fn(), + isExpanded: true, + setIsExpanded: mockSetIsExpanded, }; const mockSetToggle = jest.fn(); const mockUseQueryToggle = useQueryToggle as jest.Mock; @@ -136,10 +130,6 @@ describe('AlertsHistogramPanel', () => { beforeEach(() => { jest.clearAllMocks(); mockUseQueryToggle.mockReturnValue({ toggleStatus: true, setToggleStatus: mockSetToggle }); - - (useIsExperimentalFeatureEnabled as jest.Mock).mockImplementation( - mockUseIsExperimentalFeatureEnabled - ); }); test('renders correctly', () => { @@ -448,45 +438,40 @@ describe('AlertsHistogramPanel', () => { }); }); - describe('toggleQuery', () => { - it('toggles', async () => { - await act(async () => { - const wrapper = mount( - - - - ); - wrapper.find('[data-test-subj="query-toggle-header"]').first().simulate('click'); - expect(mockSetToggle).toBeCalledWith(false); - }); - }); - - describe('when alertsPageChartsEnabled = false', () => { - beforeEach(() => { - jest.clearAllMocks(); - mockUseIsExperimentalFeatureEnabled.mockReturnValueOnce(false); // for alertsPageChartsEnabled flag - }); - - it('toggleStatus=true, render', async () => { + describe('toggle button', () => { + describe('When setIsExpanded is available', () => { + it('toggles', async () => { await act(async () => { const wrapper = mount( ); + wrapper.find('[data-test-subj="query-toggle-header"]').first().simulate('click'); + expect(mockSetIsExpanded).toBeCalledWith(false); + expect(mockSetToggle).not.toBeCalled(); + }); + }); + it('when isExpanded is true, render histogram panel', async () => { + await act(async () => { + const wrapper = mount( + + + + ); expect(wrapper.find('[data-test-subj="panelFlexGroup"]').exists()).toEqual(true); expect(wrapper.find('[data-test-subj="embeddable-matrix-histogram"]').exists()).toEqual( true ); }); }); - it('toggleStatus=false, hide', async () => { - mockUseQueryToggle.mockReturnValue({ toggleStatus: false, setToggleStatus: mockSetToggle }); + + it('when isExpanded is false, hide histogram panel', async () => { await act(async () => { const wrapper = mount( - + ); expect(wrapper.find('[data-test-subj="panelFlexGroup"]').exists()).toEqual(false); @@ -497,43 +482,29 @@ describe('AlertsHistogramPanel', () => { }); }); - describe('when alertsPageChartsEnabled = true', () => { + describe('When setIsExpanded is not available, use toggleQuery', () => { beforeEach(() => { - jest.clearAllMocks(); - mockUseIsExperimentalFeatureEnabled.mockReturnValueOnce(true); // for alertsPageChartsEnabled flag + mockUseQueryToggle.mockReturnValue({ toggleStatus: true, setToggleStatus: mockSetToggle }); }); + const props = { ...defaultProps, setIsExpanded: undefined }; - it('isExpanded=true, render', async () => { + it('toggles', async () => { await act(async () => { const wrapper = mount( - + ); - expect(wrapper.find('[data-test-subj="panelFlexGroup"]').exists()).toEqual(true); - expect(wrapper.find('[data-test-subj="embeddable-matrix-histogram"]').exists()).toEqual( - true - ); + wrapper.find('[data-test-subj="query-toggle-header"]').first().simulate('click'); + expect(mockSetToggle).toBeCalledWith(false); }); }); - it('isExpanded=false, hide', async () => { - await act(async () => { - const wrapper = mount( - - - - ); - expect(wrapper.find('[data-test-subj="panelFlexGroup"]').exists()).toEqual(false); - expect(wrapper.find('[data-test-subj="embeddable-matrix-histogram"]').exists()).toEqual( - false - ); - }); - }); - it('isExpanded is not passed in and toggleStatus =true, render', async () => { + + it('when toggleStatus is true, render', async () => { await act(async () => { const wrapper = mount( - + ); expect(wrapper.find('[data-test-subj="panelFlexGroup"]').exists()).toEqual(true); @@ -542,12 +513,13 @@ describe('AlertsHistogramPanel', () => { ); }); }); - it('isExpanded is not passed in and toggleStatus =false, hide', async () => { + + it('when toggleStatus is false, hide', async () => { mockUseQueryToggle.mockReturnValue({ toggleStatus: false, setToggleStatus: mockSetToggle }); await act(async () => { const wrapper = mount( - + ); expect(wrapper.find('[data-test-subj="panelFlexGroup"]').exists()).toEqual(false); @@ -562,8 +534,6 @@ describe('AlertsHistogramPanel', () => { describe('VisualizationEmbeddable', () => { beforeEach(() => { jest.clearAllMocks(); - mockUseQueryToggle.mockReturnValue({ toggleStatus: true, setToggleStatus: mockSetToggle }); - mockUseIsExperimentalFeatureEnabled.mockReturnValueOnce(false); // for alertsPageChartsEnabled flag }); test('it renders the header with alerts count', () => { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx index c61e3b51521d6..c2f25b4b5c80c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx @@ -36,7 +36,6 @@ import { KpiPanel, StackByComboBox } from '../common/components'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { GROUP_BY_TOP_LABEL } from '../common/translations'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { getAlertsHistogramLensAttributes as getLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/common/alerts/alerts_histogram'; import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable'; @@ -118,7 +117,6 @@ export const AlertsHistogramPanel = memo( const [selectedStackByOption, setSelectedStackByOption] = useState( onlyField == null ? defaultStackByOption : onlyField ); - const isAlertsPageChartsEnabled = useIsExperimentalFeatureEnabled('alertsPageChartsEnabled'); const onSelect = useCallback( (field: string) => { @@ -136,15 +134,17 @@ export const AlertsHistogramPanel = memo( const { toggleStatus, setToggleStatus } = useQueryToggle(DETECTIONS_HISTOGRAM_ID); + // alerts page uses isExpanded from kpi panel + // rules detail page and overview uses the toggle query const toggleQuery = useCallback( - (newToggleStatus: boolean) => { - if (isAlertsPageChartsEnabled && setIsExpanded !== undefined) { - setIsExpanded(newToggleStatus); - } else { - setToggleStatus(newToggleStatus); - } - }, - [setToggleStatus, setIsExpanded, isAlertsPageChartsEnabled] + (newToggleStatus: boolean) => + setIsExpanded ? setIsExpanded(newToggleStatus) : setToggleStatus(newToggleStatus), + [setToggleStatus, setIsExpanded] + ); + + const showHistogram = useMemo( + () => (setIsExpanded ? Boolean(isExpanded) : toggleStatus), + [setIsExpanded, isExpanded, toggleStatus] ); const timerange = useMemo(() => ({ from, to }), [from, to]); @@ -202,20 +202,6 @@ export const AlertsHistogramPanel = memo( [onlyField, title] ); - const showHistogram = useMemo(() => { - if (isAlertsPageChartsEnabled) { - if (isExpanded !== undefined) { - // alerts page - return isExpanded; - } else { - // rule details page and overview page - return toggleStatus; - } - } else { - return toggleStatus; - } - }, [isAlertsPageChartsEnabled, isExpanded, toggleStatus]); - const { responses, loading } = useVisualizationResponse({ visualizationId, }); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/aggregations.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/aggregations.ts index dd646a20931f6..2cf83768e510d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/aggregations.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/aggregations.ts @@ -17,23 +17,6 @@ export const severityAggregations = { }, }; -export const alertTypeAggregations = { - alertsByType: { - terms: { - field: ALERT_RULE_NAME, - size: DEFAULT_QUERY_SIZE, - }, - aggs: { - ruleByEventType: { - terms: { - field: 'event.type', - size: DEFAULT_QUERY_SIZE, - }, - }, - }, - }, -}; - export const alertRuleAggregations = { alertsByRule: { terms: { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.test.tsx index 7ff8c949e0624..3f8df968204e4 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.test.tsx @@ -6,8 +6,7 @@ */ import { parseData } from './helpers'; import * as severityMock from '../severity_level_panel/mock_data'; -import * as alertsTypeMock from '../alerts_by_type_panel/mock_type_data'; -import * as alertsRuleMock from '../alerts_by_type_panel/mock_rule_data'; +import * as alertsRuleMock from '../alerts_by_rule_panel/mock_rule_data'; import * as alertsGroupingMock from '../alerts_progress_bar_panel/mock_data'; import type { SummaryChartsAgg } from './types'; import type { AlertSearchResponse } from '../../../containers/detection_engine/alerts/types'; @@ -18,12 +17,7 @@ describe('parse data by aggregation type', () => { expect(res).toEqual(severityMock.parsedAlerts); }); - test('parse alert type data', () => { - const resType = parseData( - alertsTypeMock.mockAlertsData as AlertSearchResponse<{}, SummaryChartsAgg> - ); - expect(resType).toEqual(alertsTypeMock.parsedAlerts); - + test('parse alert by rule data', () => { const resRule = parseData( alertsRuleMock.mockAlertsData as AlertSearchResponse<{}, SummaryChartsAgg> ); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.tsx index 7e530ba26011f..1f43e1cb7367a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.tsx @@ -7,12 +7,7 @@ import type { SummaryChartsAgg } from './types'; import type { AlertSearchResponse } from '../../../containers/detection_engine/alerts/types'; import { parseSeverityData, getIsAlertsBySeverityAgg } from '../severity_level_panel/helpers'; -import { - parseAlertsTypeData, - getIsAlertsByTypeAgg, - parseAlertsRuleData, - getIsAlertsByRuleAgg, -} from '../alerts_by_type_panel/helpers'; +import { parseAlertsRuleData, getIsAlertsByRuleAgg } from '../alerts_by_rule_panel/helpers'; import { parseAlertsGroupingData, getIsAlertsByGroupingAgg, @@ -26,9 +21,6 @@ export const parseData = (data: AlertSearchResponse<{}, SummaryChartsAgg>) => { if (getIsAlertsBySeverityAgg(data)) { return parseSeverityData(data); } - if (getIsAlertsByTypeAgg(data)) { - return parseAlertsTypeData(data); - } if (getIsAlertsByRuleAgg(data)) { return parseAlertsRuleData(data); } diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/index.test.tsx index f02043f3d7c55..4513a0591803a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/index.test.tsx @@ -6,10 +6,8 @@ */ import { act, render, fireEvent, waitFor } from '@testing-library/react'; import React from 'react'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { TestProviders } from '../../../../common/mock'; import { AlertsSummaryChartsPanel } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import type { GroupBySelection } from '../alerts_progress_bar_panel/types'; jest.mock('../../../../common/lib/kibana'); @@ -20,23 +18,15 @@ jest.mock('react-router-dom', () => { return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; }); -const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; -jest.mock('../../../../common/hooks/use_experimental_features'); - describe('AlertsSummaryChartsPanel', () => { + const mockSetIsExpanded = jest.fn(); const defaultProps = { signalIndexName: 'signalIndexName', isExpanded: true, - setIsExpanded: jest.fn(), + setIsExpanded: mockSetIsExpanded, groupBySelection: 'host.name' as GroupBySelection, setGroupBySelection: jest.fn(), }; - const mockSetToggle = jest.fn(); - const mockUseQueryToggle = useQueryToggle as jest.Mock; - beforeEach(() => { - mockUseQueryToggle.mockReturnValue({ toggleStatus: true, setToggleStatus: mockSetToggle }); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); - }); test('renders correctly', async () => { await act(async () => { @@ -95,11 +85,11 @@ describe('AlertsSummaryChartsPanel', () => { if (element) { fireEvent.click(element); } - expect(mockSetToggle).toBeCalledWith(false); + expect(mockSetIsExpanded).toBeCalledWith(false); }); }); - it('alertsPageChartsEnabled is false and toggleStatus=true, render', async () => { + it('when isExpanded is true, render summary chart', async () => { await act(async () => { const { container } = render( @@ -112,35 +102,7 @@ describe('AlertsSummaryChartsPanel', () => { }); }); - it('alertsPageChartsEnabled is false and toggleStatus=false, hide', async () => { - mockUseQueryToggle.mockReturnValue({ toggleStatus: false, setToggleStatus: mockSetToggle }); - await act(async () => { - const { container } = render( - - - - ); - expect( - container.querySelector('[data-test-subj="alerts-charts-container"]') - ).not.toBeInTheDocument(); - }); - }); - - it('alertsPageChartsEnabled is true and isExpanded=true, render', async () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); - await act(async () => { - const { container } = render( - - - - ); - expect( - container.querySelector('[data-test-subj="alerts-charts-container"]') - ).toBeInTheDocument(); - }); - }); - it('alertsPageChartsEnabled is true and isExpanded=false, hide', async () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); + it('when isExpanded is false, hide summary chart', async () => { await act(async () => { const { container } = render( diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/index.tsx index ff1597a0246af..2cc5cda85436b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback } from 'react'; import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/types'; import type { Filter, Query } from '@kbn/es-query'; import styled from 'styled-components'; @@ -13,10 +13,8 @@ import * as i18n from './translations'; import { KpiPanel } from '../common/components'; import { HeaderSection } from '../../../../common/components/header_section'; import { SeverityLevelPanel } from '../severity_level_panel'; -import { AlertsByTypePanel } from '../alerts_by_type_panel'; +import { AlertsByRulePanel } from '../alerts_by_rule_panel'; import { AlertsProgressBarPanel } from '../alerts_progress_bar_panel'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import type { GroupBySelection } from '../alerts_progress_bar_panel/types'; import type { AddFilterProps } from '../common/types'; @@ -28,8 +26,6 @@ const StyledFlexItem = styled(EuiFlexItem)` min-width: 355px; `; -const DETECTIONS_ALERTS_CHARTS_ID = 'detections-alerts-charts'; - interface Props { alignHeader?: 'center' | 'baseline' | 'stretch' | 'flexStart' | 'flexEnd'; filters?: Filter[]; @@ -39,8 +35,8 @@ interface Props { signalIndexName: string | null; title?: React.ReactNode; runtimeMappings?: MappingRuntimeFields; - isExpanded?: boolean; - setIsExpanded?: (status: boolean) => void; + isExpanded: boolean; + setIsExpanded: (status: boolean) => void; groupBySelection: GroupBySelection; setGroupBySelection: (groupBySelection: GroupBySelection) => void; } @@ -59,40 +55,16 @@ export const AlertsSummaryChartsPanel: React.FC = ({ groupBySelection, setGroupBySelection, }: Props) => { - const isAlertsPageChartsEnabled = useIsExperimentalFeatureEnabled('alertsPageChartsEnabled'); - - const { toggleStatus, setToggleStatus } = useQueryToggle(DETECTIONS_ALERTS_CHARTS_ID); const toggleQuery = useCallback( (status: boolean) => { - if (isAlertsPageChartsEnabled && setIsExpanded) { - setIsExpanded(status); - } else { - setToggleStatus(status); - } + setIsExpanded(status); }, - [setToggleStatus, setIsExpanded, isAlertsPageChartsEnabled] + [setIsExpanded] ); - const querySkip = useMemo( - () => (isAlertsPageChartsEnabled ? !isExpanded : !toggleStatus), - [isAlertsPageChartsEnabled, isExpanded, toggleStatus] - ); - - const status: boolean = useMemo(() => { - if (isAlertsPageChartsEnabled && isExpanded) { - return true; - } - if (!isAlertsPageChartsEnabled && toggleStatus) { - return true; - } - return false; - }, [isAlertsPageChartsEnabled, isExpanded, toggleStatus]); - return ( = ({ titleSize="s" hideSubtitle showInspectButton={false} - toggleStatus={isAlertsPageChartsEnabled ? isExpanded : toggleStatus} + toggleStatus={isExpanded} toggleQuery={toggleQuery} /> - {status && ( + {isExpanded && ( = ({ query={query} signalIndexName={signalIndexName} runtimeMappings={runtimeMappings} - skip={querySkip} + skip={!isExpanded} addFilter={addFilter} /> - @@ -139,7 +111,7 @@ export const AlertsSummaryChartsPanel: React.FC = ({ query={query} signalIndexName={signalIndexName} runtimeMappings={runtimeMappings} - skip={querySkip} + skip={!isExpanded} groupBySelection={groupBySelection} setGroupBySelection={setGroupBySelection} addFilter={addFilter} diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/types.ts index 9ed251fc5f713..6067bad447623 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/types.ts @@ -8,11 +8,7 @@ import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/types' import type { Filter, Query } from '@kbn/es-query'; import type { SeverityBuckets as SeverityData } from '../../../../overview/components/detection_response/alerts_by_status/types'; import type { AlertsBySeverityAgg } from '../severity_level_panel/types'; -import type { - AlertsByTypeAgg, - AlertsTypeData, - AlertsByRuleAgg, -} from '../alerts_by_type_panel/types'; +import type { AlertsByRuleAgg, AlertsByRuleData } from '../alerts_by_rule_panel/types'; import type { AlertsByGroupingAgg, AlertsProgressBarData, @@ -20,12 +16,12 @@ import type { import type { ChartCollapseAgg, ChartCollapseData } from '../chart_panels/chart_collapse/types'; export type SummaryChartsAgg = Partial< - AlertsBySeverityAgg | AlertsByTypeAgg | AlertsByGroupingAgg | ChartCollapseAgg | AlertsByRuleAgg + AlertsBySeverityAgg | AlertsByRuleAgg | AlertsByGroupingAgg | ChartCollapseAgg >; export type SummaryChartsData = | SeverityData - | AlertsTypeData + | AlertsByRuleData | AlertsProgressBarData | ChartCollapseData; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data.test.tsx index 7719fd47ea606..4949fa9a2855f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data.test.tsx @@ -12,8 +12,7 @@ import type { UseAlerts, UseAlertsQueryProps } from './use_summary_chart_data'; import { useSummaryChartData, getAlertsQuery } from './use_summary_chart_data'; import * as aggregations from './aggregations'; import * as severityMock from '../severity_level_panel/mock_data'; -import * as alertTypeMock from '../alerts_by_type_panel/mock_type_data'; -import * as alertRuleMock from '../alerts_by_type_panel/mock_rule_data'; +import * as alertRuleMock from '../alerts_by_rule_panel/mock_rule_data'; import * as alertsGroupingMock from '../alerts_progress_bar_panel/mock_data'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; @@ -66,25 +65,6 @@ describe('getAlertsQuery', () => { ).toEqual(severityMock.query); }); - test('it returns the expected alerts by type query', () => { - expect( - getAlertsQuery({ - from, - to, - additionalFilters, - aggregations: aggregations.alertTypeAggregations, - }) - ).toEqual(alertTypeMock.query); - expect( - getAlertsQuery({ - from, - to, - additionalFilters, - aggregations: aggregations.alertRuleAggregations, - }) - ).toEqual(alertRuleMock.query); - }); - test('it returns the expected alerts by grouping query', () => { expect( getAlertsQuery({ @@ -192,28 +172,9 @@ describe('get summary charts data', () => { jest.clearAllMocks(); mockDateNow.mockReturnValue(dateNow); mockUseQueryAlerts.mockReturnValue(defaultUseQueryAlertsReturn); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); - }); - it('should return correct default values when alertsTypeChartsEnabled is true', () => { - const { result } = renderUseSummaryChartData({ - aggregations: aggregations.alertTypeAggregations, - }); - - expect(result.current).toEqual({ - items: [], - isLoading: false, - updatedAt: dateNow, - }); - - expect(mockUseQueryAlerts).toBeCalledWith({ - query: alertTypeMock.query, - indexName: 'signal-alerts', - skip: false, - queryName: ALERTS_QUERY_NAMES.COUNT, - }); }); - it('should return correct default values when alertsTypeChartsEnabled is false', () => { + it('should return correct default values', () => { mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); const { result } = renderUseSummaryChartData({ aggregations: aggregations.alertRuleAggregations, @@ -233,23 +194,7 @@ describe('get summary charts data', () => { }); }); - it('should return parsed alerts by type items when alertsTypeChartsEnabled is true', () => { - mockUseQueryAlerts.mockReturnValue({ - ...defaultUseQueryAlertsReturn, - data: alertTypeMock.mockAlertsData, - }); - - const { result } = renderUseSummaryChartData({ - aggregations: aggregations.alertTypeAggregations, - }); - expect(result.current).toEqual({ - items: alertTypeMock.parsedAlerts, - isLoading: false, - updatedAt: dateNow, - }); - }); - - it('should return parsed alerts by type items when alertsTypeChartsEnabled is false', () => { + it('should return parsed alerts by type items', () => { mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); mockUseQueryAlerts.mockReturnValue({ ...defaultUseQueryAlertsReturn, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.test.tsx index 8145fcf698704..6fd125dd24092 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.test.tsx @@ -20,27 +20,7 @@ describe('useAlertsLocalStorage', () => { {children} ); - test('it returns the expected defaults when isAlertsPageCharts is disabled', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); - const { result } = renderHook(() => useAlertsLocalStorage(), { wrapper }); - - const defaults = Object.fromEntries( - Object.entries(result.current).filter((x) => typeof x[1] !== 'function') - ); - - expect(defaults).toEqual({ - alertViewSelection: 'trend', // default to the trend chart - countTableStackBy0: 'kibana.alert.rule.name', - countTableStackBy1: 'host.name', - groupBySelection: 'host.name', - isTreemapPanelExpanded: true, - riskChartStackBy0: 'kibana.alert.rule.name', - riskChartStackBy1: 'host.name', - trendChartStackBy: 'kibana.alert.rule.name', - }); - }); - - test('it returns the expected defaults when isAlertsPageCharts is enaabled', () => { + test('it returns the expected defaults', () => { mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); const { result } = renderHook(() => useAlertsLocalStorage(), { wrapper }); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.tsx index a7c795037df86..f4aac7a42cedd 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.tsx @@ -27,14 +27,12 @@ import { import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../../common/config'; import type { AlertsSettings } from './types'; import type { AlertViewSelection } from '../chart_select/helpers'; -import { CHARTS_ID, TREND_ID } from '../chart_select/helpers'; +import { CHARTS_ID } from '../chart_select/helpers'; import type { GroupBySelection } from '../../alerts_progress_bar_panel/types'; -import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; export const useAlertsLocalStorage = (): AlertsSettings => { - const isAlertsPageChartsEnabled = useIsExperimentalFeatureEnabled('alertsPageChartsEnabled'); const [alertViewSelection, setAlertViewSelection] = useLocalStorage({ - defaultValue: isAlertsPageChartsEnabled ? CHARTS_ID : TREND_ID, + defaultValue: CHARTS_ID, key: getSettingKey({ category: VIEW_CATEGORY, page: ALERTS_PAGE, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.test.ts index e842f998bd5c1..11e58253c94f0 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.test.ts @@ -5,102 +5,12 @@ * 2.0. */ -import type { AlertViewSelection } from './helpers'; -import { - getButtonProperties, - getContextMenuPanels, - getOptionProperties, - TABLE_ID, - TREEMAP_ID, - TREND_ID, - CHARTS_ID, -} from './helpers'; +import { getOptionProperties, TABLE_ID, TREEMAP_ID, TREND_ID, CHARTS_ID } from './helpers'; import * as i18n from './translations'; describe('helpers', () => { beforeEach(() => jest.clearAllMocks()); - describe('getButtonProperties', () => { - test('it returns the expected properties when alertViewSelection is Trend', () => { - expect(getButtonProperties(TREND_ID)).toEqual({ - 'data-test-subj': TREND_ID, - icon: 'visBarVerticalStacked', - name: i18n.TREND, - }); - }); - - test('it returns the expected properties when alertViewSelection is Table', () => { - expect(getButtonProperties(TABLE_ID)).toEqual({ - 'data-test-subj': TABLE_ID, - icon: 'visTable', - name: i18n.TABLE, - }); - }); - - test('it returns the expected properties when alertViewSelection is Treemap', () => { - expect(getButtonProperties(TREEMAP_ID)).toEqual({ - 'data-test-subj': TREEMAP_ID, - icon: 'grid', - name: i18n.TREEMAP, - }); - }); - - test('it returns the expected properties when alertViewSelection is charts', () => { - expect(getButtonProperties(CHARTS_ID)).toEqual({ - 'data-test-subj': CHARTS_ID, - icon: 'visPie', - name: i18n.CHARTS, - }); - }); - }); - - describe('getContextMenuPanels', () => { - const alertViewSelections: AlertViewSelection[] = ['trend', 'table', 'treemap', 'charts']; - const closePopover = jest.fn(); - const setAlertViewSelection = jest.fn(); - - alertViewSelections.forEach((alertViewSelection) => { - test(`it returns the expected panel id when alertViewSelection is '${alertViewSelection}'`, () => { - const panels = getContextMenuPanels({ - alertViewSelection, - closePopover, - setAlertViewSelection, - isAlertsPageChartsEnabled: true, // remove after charts is implemented - }); - - expect(panels[0].id).toEqual(0); - }); - - test(`onClick invokes setAlertViewSelection with '${alertViewSelection}' item when alertViewSelection is '${alertViewSelection}'`, () => { - const panels = getContextMenuPanels({ - alertViewSelection, - closePopover, - setAlertViewSelection, - isAlertsPageChartsEnabled: true, // remove after charts is implemented - }); - - const item = panels[0].items?.find((x) => x['data-test-subj'] === alertViewSelection); - (item?.onClick as () => void)(); - - expect(setAlertViewSelection).toBeCalledWith(alertViewSelection); - }); - - test(`onClick invokes closePopover when alertViewSelection is '${alertViewSelection}'`, () => { - const panels = getContextMenuPanels({ - alertViewSelection, - closePopover, - setAlertViewSelection, - isAlertsPageChartsEnabled: true, // remove after charts is implemented - }); - - const item = panels[0].items?.find((x) => x['data-test-subj'] === alertViewSelection); - (item?.onClick as () => void)(); - - expect(closePopover).toBeCalled(); - }); - }); - }); - describe('getOptionProperties', () => { test('it returns the expected properties when alertViewSelection is Trend', () => { expect(getOptionProperties(TREND_ID)).toEqual({ diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.ts index bc0deb426fe59..b47b8ea63bc82 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { EuiContextMenuPanelDescriptor, EuiButtonGroupOptionProps } from '@elastic/eui'; +import type { EuiButtonGroupOptionProps } from '@elastic/eui'; import * as i18n from './translations'; @@ -22,77 +22,6 @@ export interface ButtonProperties { name: string; } -export const getButtonProperties = (alertViewSelection: AlertViewSelection): ButtonProperties => { - const table = { 'data-test-subj': alertViewSelection, icon: 'visTable', name: i18n.TABLE }; - - switch (alertViewSelection) { - case TABLE_ID: - return table; - case TREND_ID: - return { - 'data-test-subj': alertViewSelection, - icon: 'visBarVerticalStacked', - name: i18n.TREND, - }; - case TREEMAP_ID: - return { 'data-test-subj': alertViewSelection, icon: 'grid', name: i18n.TREEMAP }; - case CHARTS_ID: - return { 'data-test-subj': alertViewSelection, icon: 'visPie', name: i18n.CHARTS }; - default: - return table; - } -}; - -export const getContextMenuPanels = ({ - alertViewSelection, - closePopover, - setAlertViewSelection, - isAlertsPageChartsEnabled, -}: { - alertViewSelection: AlertViewSelection; - closePopover: () => void; - setAlertViewSelection: (alertViewSelection: AlertViewSelection) => void; - isAlertsPageChartsEnabled: boolean; -}): EuiContextMenuPanelDescriptor[] => [ - { - id: 0, - items: [ - { - ...getButtonProperties('table'), - onClick: () => { - closePopover(); - setAlertViewSelection('table'); - }, - }, - { - ...getButtonProperties('trend'), - onClick: () => { - closePopover(); - setAlertViewSelection('trend'); - }, - }, - { - ...getButtonProperties('treemap'), - onClick: () => { - closePopover(); - setAlertViewSelection('treemap'); - }, - }, - ...(isAlertsPageChartsEnabled - ? [ - { - ...getButtonProperties('charts'), - onClick: () => { - closePopover(); - setAlertViewSelection('charts'); - }, - }, - ] - : []), - ], - }, -]; - export const getOptionProperties = ( alertViewSelection: AlertViewSelection ): EuiButtonGroupOptionProps => { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.test.tsx index 4d7798a4fcbe6..6801bae62f3fe 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.test.tsx @@ -5,56 +5,16 @@ * 2.0. */ import { render, screen, fireEvent } from '@testing-library/react'; -import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; import React from 'react'; - import { TestProviders } from '../../../../../common/mock'; -import * as i18n from './translations'; import { ChartSelect } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; - -const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; -jest.mock('../../../../../common/hooks/use_experimental_features'); describe('ChartSelect', () => { beforeEach(() => { jest.clearAllMocks(); }); - test('it renders the chart select button when alertsPageChartsEnabled is false', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); - render( - - - - ); - - expect( - screen.getByRole('button', { name: i18n.SELECT_A_CHART_ARIA_LABEL }) - ).toBeInTheDocument(); - }); - - test('it invokes `setAlertViewSelection` with the expected value when a chart is selected and alertsPageChartsEnabled is false', async () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); - const setAlertViewSelection = jest.fn(); - render( - - - - ); - - const selectButton = screen.getByRole('button', { name: i18n.SELECT_A_CHART_ARIA_LABEL }); - selectButton.click(); - await waitForEuiPopoverOpen(); - - const treemapMenuItem = screen.getByRole('button', { name: i18n.TREEMAP }); - treemapMenuItem.click(); - - expect(setAlertViewSelection).toBeCalledWith('treemap'); - }); - - test('it renders the chart select tabs when alertsPageChartsEnabled is true', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); + test('it renders the chart select tabs', () => { render( @@ -65,8 +25,7 @@ describe('ChartSelect', () => { expect(screen.getByTitle('Trend')).toHaveAttribute('aria-pressed', 'true'); }); - test('changing selection render correctly when alertsPageChartsEnabled is true', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); + test('changing selection render correctly', () => { const setAlertViewSelection = jest.fn(); const { rerender } = render( diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.tsx index c31e04afeb301..58f3c4f6fe284 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.tsx @@ -5,95 +5,39 @@ * 2.0. */ -import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; -import { EuiButton, EuiContextMenu, EuiIcon, EuiPopover, EuiButtonGroup } from '@elastic/eui'; -import React, { useCallback, useMemo, useState } from 'react'; -import styled from 'styled-components'; - +import { EuiButtonGroup } from '@elastic/eui'; +import React, { useMemo } from 'react'; import type { AlertViewSelection } from './helpers'; -import { getButtonProperties, getContextMenuPanels, getOptionProperties } from './helpers'; +import { getOptionProperties } from './helpers'; import * as i18n from './translations'; -import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; + interface Props { alertViewSelection: AlertViewSelection; setAlertViewSelection: (alertViewSelection: AlertViewSelection) => void; } -const ChartTypeIcon = styled(EuiIcon)` - margin-right: ${({ theme }) => theme.eui.euiSizeS}; -`; const AlertViewOptions: AlertViewSelection[] = ['charts', 'trend', 'table', 'treemap']; -const ChartSelectComponent: React.FC = ({ +export const ChartSelect: React.FC = ({ alertViewSelection, setAlertViewSelection, }: Props) => { - const [isPopoverOpen, setIsPopoverOpen] = useState(false); - const closePopover = useCallback(() => setIsPopoverOpen(false), []); - const onButtonClick = useCallback(() => setIsPopoverOpen((currentVal) => !currentVal), []); - - const button = useMemo(() => { - const buttonProperties = getButtonProperties(alertViewSelection); - - return ( - - - {buttonProperties.name} - - ); - }, [alertViewSelection, onButtonClick]); - const isAlertsPageChartsEnabled = useIsExperimentalFeatureEnabled('alertsPageChartsEnabled'); const options = useMemo(() => { return AlertViewOptions.map((option: AlertViewSelection) => getOptionProperties(option)); }, []); - const panels: EuiContextMenuPanelDescriptor[] = useMemo( - () => - getContextMenuPanels({ - alertViewSelection, - closePopover, - setAlertViewSelection, - isAlertsPageChartsEnabled, - }), - [alertViewSelection, closePopover, setAlertViewSelection, isAlertsPageChartsEnabled] - ); - return ( - <> - {isAlertsPageChartsEnabled ? ( - setAlertViewSelection(id as AlertViewSelection)} - buttonSize="compressed" - color="primary" - data-test-subj="chart-select-tabs" - /> - ) : ( - - - - )} - + setAlertViewSelection(id as AlertViewSelection)} + buttonSize="compressed" + color="primary" + data-test-subj="chart-select-tabs" + /> ); }; -ChartSelectComponent.displayName = 'ChartSelectComponent'; - -export const ChartSelect = React.memo(ChartSelectComponent); +ChartSelect.displayName = 'ChartSelect'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/translations.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/translations.ts index a18c1b25dc417..2da0abc04ec42 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/translations.ts @@ -7,17 +7,6 @@ import { i18n } from '@kbn/i18n'; -export const SELECT_A_CHART_ARIA_LABEL = i18n.translate( - 'xpack.securitySolution.components.chartSelect.selectAChartAriaLabel', - { - defaultMessage: 'Select a chart', - } -); - -export const TABLE = i18n.translate('xpack.securitySolution.components.chartSelect.tableOption', { - defaultMessage: 'Table', -}); - export const TREND = i18n.translate('xpack.securitySolution.components.chartSelect.trendOption', { defaultMessage: 'Trend', }); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.test.tsx index dea6278dc5db9..2b75252f3d578 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.test.tsx @@ -149,7 +149,6 @@ const resetGroupByFields = () => { describe('ChartPanels', () => { beforeEach(() => { jest.clearAllMocks(); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); mockUseQueryToggle.mockReturnValue({ toggleStatus: true, setToggleStatus: mockSetToggle }); (useSourcererDataView as jest.Mock).mockReturnValue({ @@ -163,19 +162,7 @@ describe('ChartPanels', () => { }); }); - test('it renders the chart selector when alertsPageChartsEnabled is false', async () => { - render( - - - - ); - - await waitFor(() => { - expect(screen.getByTestId('chartSelect')).toBeInTheDocument(); - }); - }); - - test('it renders the chart selector tabs when alertsPageChartsEnabled is true and toggle is true', async () => { + test('when toggle is true, renders the chart selector tabs', async () => { mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); mockUseQueryToggle.mockReturnValue({ toggleStatus: true, setToggleStatus: mockSetToggle }); render( @@ -189,7 +176,7 @@ describe('ChartPanels', () => { }); }); - test('it renders the chart collapse when alertsPageChartsEnabled is true and toggle is false', async () => { + test('when toggle is false, renders the chart collapse', async () => { mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); mockUseQueryToggle.mockReturnValue({ toggleStatus: false, setToggleStatus: mockSetToggle }); render( @@ -465,7 +452,6 @@ describe('ChartPanels', () => { ...defaultAlertSettings, alertViewSelection: 'charts', }); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); render( diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.tsx index edbfe756acfd6..c37c7b0513a51 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.tsx @@ -9,8 +9,6 @@ import type { Filter, Query } from '@kbn/es-query'; import { EuiFlexItem, EuiSkeletonText } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; - -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { useAlertsLocalStorage } from './alerts_local_storage'; import type { AlertsSettings } from './alerts_local_storage/types'; import { ChartContextMenu } from './chart_context_menu'; @@ -65,21 +63,18 @@ const ChartPanelsComponent: React.FC = ({ const { toggleStatus: isExpanded, setToggleStatus: setIsExpanded } = useQueryToggle( DETECTIONS_ALERTS_CHARTS_PANEL_ID ); - const isAlertsPageChartsEnabled = useIsExperimentalFeatureEnabled('alertsPageChartsEnabled'); const { alertViewSelection, countTableStackBy0, countTableStackBy1, groupBySelection, - isTreemapPanelExpanded, riskChartStackBy0, riskChartStackBy1, setAlertViewSelection, setCountTableStackBy0, setCountTableStackBy1, setGroupBySelection, - setIsTreemapPanelExpanded, setRiskChartStackBy0, setRiskChartStackBy1, setTrendChartStackBy, @@ -149,37 +144,25 @@ const ChartPanelsComponent: React.FC = ({ ); const title = useMemo(() => { - if (isAlertsPageChartsEnabled) { - return isExpanded ? ( - - - - ) : ( - + - ); - } else { - return ( - - - - ); - } + + ) : ( + + ); }, [ alertViewSelection, setAlertViewSelection, - isAlertsPageChartsEnabled, isExpanded, groupBySelection, alertsDefaultFilters, @@ -230,7 +213,7 @@ const ChartPanelsComponent: React.FC = ({ chartOptionsContextMenu={chartOptionsContextMenu} extraActions={resetGroupByFieldAction} filters={alertsDefaultFilters} - inspectTitle={isAlertsPageChartsEnabled ? i18n.COUNTS : i18n.TABLE} + inspectTitle={i18n.COUNTS} panelHeight={CHART_PANEL_HEIGHT} setStackByField0={updateCommonStackBy0} setStackByField0ComboboxInputRef={setStackByField0ComboboxInputRef} @@ -259,13 +242,11 @@ const ChartPanelsComponent: React.FC = ({ chartOptionsContextMenu={chartOptionsContextMenu} height={CHART_PANEL_HEIGHT} inspectTitle={i18n.TREEMAP} - isPanelExpanded={isAlertsPageChartsEnabled ? isExpanded : isTreemapPanelExpanded} + isPanelExpanded={isExpanded} filters={alertsDefaultFilters} query={query} riskSubAggregationField="kibana.alert.risk_score" - setIsPanelExpanded={ - isAlertsPageChartsEnabled ? setIsExpanded : setIsTreemapPanelExpanded - } + setIsPanelExpanded={setIsExpanded} setStackByField0={updateCommonStackBy0} setStackByField0ComboboxInputRef={setStackByField0ComboboxInputRef} setStackByField1={updateCommonStackBy1} @@ -281,7 +262,7 @@ const ChartPanelsComponent: React.FC = ({ )} - {isAlertsPageChartsEnabled && alertViewSelection === 'charts' && ( + {alertViewSelection === 'charts' && ( {isLoadingIndexPattern ? ( diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/test_ids.ts b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/test_ids.ts index 95ec61d66fff3..fc940979ae05f 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/test_ids.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/test_ids.ts @@ -61,9 +61,29 @@ export const HOST_DETAILS_INFO_TEST_ID = 'host-overview' as const; /* Threat Intelligence */ -export const THREAT_INTELLIGENCE_DETAILS_ENRICHMENTS_TEST_ID = `threat-match-detected` as const; +const THREAT_INTELLIGENCE_DETAILS_TEST_ID = `${PREFIX}ThreatIntelligenceDetails` as const; +export const THREAT_INTELLIGENCE_DETAILS_ENRICHMENTS_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}ThreatMatchDetected` as const; export const THREAT_INTELLIGENCE_DETAILS_LOADING_TEST_ID = - `${PREFIX}ThreatIntelligenceDetailsLoading` as const; + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}Loading` as const; +export const THREAT_INTELLIGENCE_ENRICHMENTS_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}EnrichedWithThreatIntel` as const; +export const THREAT_INTELLIGENCE_MATCHES_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}MatchesWithNoType` as const; +export const THREAT_INTELLIGENCE_NO_ENRICHMENTS_FOUND_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}NoEnrichmentFound` as const; +export const THREAT_INTELLIGENCE_ENRICHMENTS_TITLE_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}EnrichmentTitle` as const; +export const THREAT_INTELLIGENCE_LOADING_ENRICHMENTS_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}LoadingEnrichment` as const; +export const THREAT_INTELLIGENCE_ENRICHMENTS_BUTTON_CONTENT_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}EnrichmentButtonContent` as const; +export const THREAT_INTELLIGENCE_ENRICHMENTS_ACCORDION_TABLE_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}EnrichmentAccordionTable` as const; +export const THREAT_INTELLIGENCE_ENRICHMENTS_RANGE_PICKER_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}EnrichmentRangePicker` as const; +export const THREAT_INTELLIGENCE_ENRICHMENTS_REFRESH_BUTTON_TEST_ID = + `${THREAT_INTELLIGENCE_DETAILS_TEST_ID}EnrichmentRefreshButton` as const; /* Correlations */ diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion.test.tsx new file mode 100644 index 0000000000000..81d971fa98af8 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion.test.tsx @@ -0,0 +1,28 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { render } from '@testing-library/react'; +import { TestProviders } from '../../../../common/mock'; +import React from 'react'; +import { EnrichmentAccordion } from './threat_details_view_enrichment_accordion'; +import { indicatorWithNestedObjects } from '../mocks/indicator_with_nested_objects'; +import type { CtiEnrichment } from '../../../../../common/search_strategy'; + +describe('EnrichmentAccordion', () => { + it('should render', () => { + render( + + + + ); + + expect(true).toBeTruthy(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion.tsx new file mode 100644 index 0000000000000..85b443682d34e --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion.tsx @@ -0,0 +1,180 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { memo, useMemo } from 'react'; +import styled from '@emotion/styled'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { + EuiAccordion, + EuiFlexGroup, + EuiFlexItem, + EuiLink, + EuiInMemoryTable, + EuiTitle, + EuiToolTip, + useEuiTheme, +} from '@elastic/eui'; +import { css } from '@emotion/react'; +import { i18n } from '@kbn/i18n'; +import { THREAT_INTELLIGENCE_ENRICHMENTS_ACCORDION_TABLE_TEST_ID } from './test_ids'; +import type { CtiEnrichment } from '../../../../../common/search_strategy'; +import { QUERY_ID } from '../../shared/hooks/use_investigation_enrichment'; +import { InspectButton } from '../../../../common/components/inspect'; +import { + getEnrichmentIdentifiers, + buildThreatDetailsItems, + isInvestigationTimeEnrichment, +} from '../../shared/utils/threat_intelligence'; +import { EnrichmentButtonContent } from './threat_details_view_enrichment_button_content'; +import { REFERENCE } from '../../../../../common/cti/constants'; + +const StyledH5 = styled.h5` + line-height: 1.7rem; +`; + +const INVESTIGATION_QUERY_TITLE = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.investigationTimeQueryTitle', + { + defaultMessage: 'Enrichment with Threat Intelligence', + } +); + +/** + * Defines the fields displayed on each row of the table + */ +export interface ThreatDetailsRow { + /** + * Field column showing a field of the enrichment + */ + title: string; + /** + * Description column + */ + description: { + /** + * Field of the enrichment + */ + fieldName: string; + /** + * Value of the enrichment + */ + value: string; + }; +} + +const columns: Array> = [ + { + field: 'title', + truncateText: false, + render: (title: string) => ( + + {title} + + ), + width: '220px', + name: '', + }, + { + field: 'description', + truncateText: false, + render: (description: ThreatDetailsRow['description']) => { + const { fieldName, value } = description; + const tooltipChild = fieldName.match(REFERENCE) ? ( + + {value} + + ) : ( + {value} + ); + return ( + + + {fieldName} + + + } + > + {tooltipChild} + + ); + }, + name: '', + }, +]; + +export interface EnrichmentAccordionProps { + /** + * Enrichment data + */ + enrichment: CtiEnrichment; + /** + * Index used to pass to the table data-test-subj + */ + index: number; +} + +/** + * Displays the enrichment data in an accordion + */ +export const EnrichmentAccordion = memo(({ enrichment, index }: EnrichmentAccordionProps) => { + const { euiTheme } = useEuiTheme(); + const { + id = `threat-details-item`, + field, + feedName, + type, + value, + } = getEnrichmentIdentifiers(enrichment); + const accordionId = `${id}${field}`; + const showInspectButton = useMemo(() => isInvestigationTimeEnrichment(type), [type]); + const items = useMemo(() => buildThreatDetailsItems(enrichment), [enrichment]); + + return ( + } + extraAction={ + showInspectButton && ( + + + + ) + } + css={css` + .euiAccordion__triggerWrapper { + background: ${euiTheme.colors.lightestShade}; + border-radius: ${euiTheme.size.xs}; + height: ${euiTheme.size.xl}; + margin-bottom: ${euiTheme.size.s}; + padding-left: ${euiTheme.size.s}; + `} + > + + + ); +}); + +EnrichmentAccordion.displayName = 'EnrichmentAccordion'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion_group.test.tsx similarity index 66% rename from x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.test.tsx rename to x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion_group.test.tsx index 3462069e0aa16..3022c6aac8a44 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion_group.test.tsx @@ -7,14 +7,15 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { EnrichmentAccordionGroup } from './enrichment_accordion_group'; -import { TestProviders } from '../../../mock'; -import { indicatorWithNestedObjects } from '../__mocks__/indicator_with_nested_objects'; +import { EnrichmentAccordionGroup } from './threat_details_view_enrichment_accordion_group'; import type { CtiEnrichment } from '../../../../../common/search_strategy'; +import { TestProviders } from '../../../../common/mock'; +import { indicatorWithNestedObjects } from '../mocks/indicator_with_nested_objects'; +import { THREAT_INTELLIGENCE_ENRICHMENTS_ACCORDION_TABLE_TEST_ID } from './test_ids'; describe('EnrichmentAccordionGroup', () => { describe('with an indicator with an array of nested objects as a field value', () => { - it('renders the indicator without those fields', () => { + it('should render the indicator without those fields', () => { // @ts-expect-error this indicator intentionally does not conform to the CtiEnrichment type const enrichments = [indicatorWithNestedObjects] as CtiEnrichment[]; @@ -24,8 +25,9 @@ describe('EnrichmentAccordionGroup', () => { ); - const enrichmentView = getByTestId('threat-details-view-0'); - + const enrichmentView = getByTestId( + `${THREAT_INTELLIGENCE_ENRICHMENTS_ACCORDION_TABLE_TEST_ID}-0` + ); expect(enrichmentView).toBeInTheDocument(); expect(enrichmentView).toHaveTextContent('ipv4-addr'); }); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion_group.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion_group.tsx new file mode 100644 index 0000000000000..60f7ad8d739cd --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_accordion_group.tsx @@ -0,0 +1,37 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { memo } from 'react'; +import { EuiSpacer } from '@elastic/eui'; + +import { EnrichmentAccordion } from './threat_details_view_enrichment_accordion'; +import type { CtiEnrichment } from '../../../../../common/search_strategy'; +import { getFirstSeen } from '../../shared/utils/threat_intelligence'; + +export interface EnrichmentAccordionGroupProps { + /** + * Enrichment data + */ + enrichments: CtiEnrichment[]; +} + +/** + * Displays multiple accordions that each show the enrichment data + */ +export const EnrichmentAccordionGroup = memo(({ enrichments }: EnrichmentAccordionGroupProps) => ( + <> + {enrichments + .sort((a, b) => getFirstSeen(b) - getFirstSeen(a)) + .map((enrichment, index) => ( + + + {index < enrichments.length - 1 && } + + ))} + +)); + +EnrichmentAccordionGroup.displayName = 'EnrichmentAccordionGroup'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_button_content.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_button_content.test.tsx new file mode 100644 index 0000000000000..5d9d39f266988 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_button_content.test.tsx @@ -0,0 +1,35 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { mount } from 'enzyme'; +import { EnrichmentButtonContent } from './threat_details_view_enrichment_button_content'; +import { THREAT_INTELLIGENCE_ENRICHMENTS_BUTTON_CONTENT_TEST_ID } from './test_ids'; + +describe('EnrichmentButtonContent', () => { + it('should render string with feedName if feedName is present', () => { + const wrapper = mount( + + ); + expect( + wrapper + .find(`[data-test-subj="${THREAT_INTELLIGENCE_ENRICHMENTS_BUTTON_CONTENT_TEST_ID}"]`) + .hostNodes() + .text() + ).toEqual('source.ip 127.0.0.1 from eceintel'); + }); + + it('should enders string without feedName if feedName is not present', () => { + const wrapper = mount(); + expect( + wrapper + .find(`[data-test-subj="${THREAT_INTELLIGENCE_ENRICHMENTS_BUTTON_CONTENT_TEST_ID}"]`) + .hostNodes() + .text() + ).toEqual('source.ip 127.0.0.1'); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_button_content.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_button_content.tsx new file mode 100644 index 0000000000000..87fb0babbfad4 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_button_content.tsx @@ -0,0 +1,62 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { memo } from 'react'; +import styled from 'styled-components'; +import { EuiToolTip } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { THREAT_INTELLIGENCE_ENRICHMENTS_BUTTON_CONTENT_TEST_ID } from './test_ids'; + +const FEED_NAME_PREPOSITION = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.feedNamePreposition', + { + defaultMessage: 'from', + } +); + +const OverflowParent = styled.div` + display: inline-grid; +`; + +const OverflowContainer = styled.div` + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-weight: bold; +`; + +export interface EnrichmentButtonContentProps { + /** + * The field name of the enrichment (default to an empty string) + */ + field?: string; + /** + * The feed name of the enrichment (default to an empty string) + */ + feedName?: string; + /** + * The value of the enrichment (default to an empty string) + */ + value?: string; +} + +/** + * Displays the content of the button rendered in the accordion + */ +export const EnrichmentButtonContent = memo( + ({ field = '', feedName = '', value = '' }: EnrichmentButtonContentProps) => { + const title = `${field} ${value}${feedName ? ` ${FEED_NAME_PREPOSITION} ${feedName}` : ''}`; + return ( + + + {title} + + + ); + } +); + +EnrichmentButtonContent.displayName = 'EnrichmentButtonContent'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_section.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_section.test.tsx new file mode 100644 index 0000000000000..9670118785bd5 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_section.test.tsx @@ -0,0 +1,93 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { render } from '@testing-library/react'; +import { EnrichmentSection } from './threat_details_view_enrichment_section'; +import { TestProviders } from '../../../../common/mock'; +import { + THREAT_INTELLIGENCE_ENRICHMENTS_TITLE_TEST_ID, + THREAT_INTELLIGENCE_LOADING_ENRICHMENTS_TEST_ID, + THREAT_INTELLIGENCE_NO_ENRICHMENTS_FOUND_TEST_ID, +} from './test_ids'; +import { ENRICHMENT_TYPES } from '../../../../../common/cti/constants'; + +describe('EnrichmentSection', () => { + it('should render no data views for indicator match rule type', () => { + const { getByTestId } = render( + + + + ); + + expect(getByTestId(THREAT_INTELLIGENCE_NO_ENRICHMENTS_FOUND_TEST_ID)).toBeInTheDocument(); + expect(getByTestId(THREAT_INTELLIGENCE_NO_ENRICHMENTS_FOUND_TEST_ID)).toHaveTextContent( + 'This alert does not have threat intelligence.' + ); + }); + + it('should render no data views for other types', () => { + const { getByTestId } = render( + + + + ); + + expect(getByTestId(THREAT_INTELLIGENCE_NO_ENRICHMENTS_FOUND_TEST_ID)).toBeInTheDocument(); + expect(getByTestId(THREAT_INTELLIGENCE_NO_ENRICHMENTS_FOUND_TEST_ID)).toHaveTextContent( + "Additional threat intelligence wasn't found within the selected time frame" + ); + }); + + it('should render title for indicator match rule type', () => { + const { getByTestId } = render( + + + + ); + + expect(getByTestId(THREAT_INTELLIGENCE_ENRICHMENTS_TITLE_TEST_ID)).toBeInTheDocument(); + expect(getByTestId(THREAT_INTELLIGENCE_ENRICHMENTS_TITLE_TEST_ID)).toHaveTextContent( + 'Threat match detected' + ); + }); + + it('should render title for other types', () => { + const { getByTestId } = render( + + + + ); + + expect(getByTestId(THREAT_INTELLIGENCE_ENRICHMENTS_TITLE_TEST_ID)).toBeInTheDocument(); + expect(getByTestId(THREAT_INTELLIGENCE_ENRICHMENTS_TITLE_TEST_ID)).toHaveTextContent( + 'Enriched with threat intelligence' + ); + }); + + it('should render children props', () => { + const { getByTestId } = render( + + +
+ + + ); + + expect(getByTestId('test-child')).toBeInTheDocument(); + }); + + it('should render loading state', () => { + const { getByTestId } = render( + + + + ); + + expect(getByTestId(THREAT_INTELLIGENCE_LOADING_ENRICHMENTS_TEST_ID)).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_section.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_section.tsx new file mode 100644 index 0000000000000..b615ff8fa86d4 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_details_view_enrichment_section.tsx @@ -0,0 +1,193 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { memo, useMemo } from 'react'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiLink, + EuiSkeletonText, + EuiSpacer, + EuiTitle, + EuiToolTip, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import styled from 'styled-components'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { + THREAT_INTELLIGENCE_ENRICHMENTS_TITLE_TEST_ID, + THREAT_INTELLIGENCE_LOADING_ENRICHMENTS_TEST_ID, + THREAT_INTELLIGENCE_NO_ENRICHMENTS_FOUND_TEST_ID, +} from './test_ids'; +import { isInvestigationTimeEnrichment } from '../../shared/utils/threat_intelligence'; +import type { CtiEnrichment } from '../../../../../common/search_strategy'; +import { ENRICHMENT_TYPES } from '../../../../../common/cti/constants'; +import { EnrichmentAccordionGroup } from './threat_details_view_enrichment_accordion_group'; + +const INDICATOR_ENRICHMENT_TITLE = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.indicatorEnrichmentTitle', + { + defaultMessage: 'Threat match detected', + } +); + +const INVESTIGATION_ENRICHMENT_TITLE = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.investigationEnrichmentTitle', + { + defaultMessage: 'Enriched with threat intelligence', + } +); + +const INDICATOR_TOOLTIP_CONTENT = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.indicatorEnrichmentTooltipContent', + { + defaultMessage: 'Shows available threat indicator matches.', + } +); + +const INVESTIGATION_TOOLTIP_CONTENT = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.investigationEnrichmentTooltipContent', + { + defaultMessage: + 'Shows additional threat intelligence for the alert. The past 30 days were queried by default.', + } +); + +const NO_ENRICHMENTS_FOUND_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.noEnrichmentsFoundDescription', + { + defaultMessage: 'This alert does not have threat intelligence.', + } +); + +const InlineBlock = styled.div` + display: inline-block; + line-height: 1.7em; +`; + +export interface EnrichmentSectionProps { + /** + * The enrichments to display + */ + enrichments: CtiEnrichment[] | undefined; + /** + * The type of enrichment (InvestigationTime or IndicatorMatchRule) + */ + type?: ENRICHMENT_TYPES; + /** + * Whether the enrichments are loading + */ + loading?: boolean; + /** + * The data-test-subj to apply to the component + */ + dataTestSubj?: string; + /** + * The children to render + */ + children?: React.ReactNode; +} + +/** + * Displays the enrichments in multiple accordions when data has loaded. + * While data is loading, it renders a skeleton. + * If no data is found, it displays a message. + * Also allows to render a component passed from the parent (currently used to render a range picker). + */ +export const EnrichmentSection = memo( + ({ enrichments, type, loading, dataTestSubj, children }: EnrichmentSectionProps) => { + const tooltip = useMemo( + () => + isInvestigationTimeEnrichment(type) + ? INVESTIGATION_TOOLTIP_CONTENT + : INDICATOR_TOOLTIP_CONTENT, + [type] + ); + + const noEnrichmentDataMessage = useMemo( + () => ( + + {type === ENRICHMENT_TYPES.IndicatorMatchRule ? ( + NO_ENRICHMENTS_FOUND_DESCRIPTION + ) : ( + + + + ), + }} + /> + )} + + ), + [type] + ); + + return ( +
+ {type ? ( + <> + + + +

+ {type === ENRICHMENT_TYPES.IndicatorMatchRule + ? INDICATOR_ENRICHMENT_TITLE + : INVESTIGATION_ENRICHMENT_TITLE} +

+
+
+ + + + + +
+ + + ) : null} + + {children} + + {Array.isArray(enrichments) ? ( + + ) : ( + <> + {type ? noEnrichmentDataMessage : null} + {loading && ( + <> + + + + )} + + )} +
+ ); + } +); + +EnrichmentSection.displayName = 'EnrichmentSection'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_details.test.tsx index c028b9194748f..a4e2ec73018a3 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_details.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_details.test.tsx @@ -16,6 +16,7 @@ import { } from './test_ids'; import { ThreatIntelligenceDetails } from './threat_intelligence_details'; import { useThreatIntelligenceDetails } from '../hooks/use_threat_intelligence_details'; +import { buildEventEnrichmentMock } from '../../../../../common/search_strategy/security_solution/cti/index.mock'; jest.mock('../../../../common/lib/kibana', () => { const originalModule = jest.requireActual('../../../../common/lib/kibana'); @@ -37,7 +38,6 @@ const defaultContextValue = { getFieldsData: () => 'id', } as unknown as DocumentDetailsContext; -// Renders System Under Test const renderThreatIntelligenceDetails = (contextValue: DocumentDetailsContext) => render( @@ -59,12 +59,9 @@ describe('', () => { eventFields: {}, }); - const wrapper = renderThreatIntelligenceDetails(defaultContextValue); - - expect( - wrapper.getByTestId(THREAT_INTELLIGENCE_DETAILS_ENRICHMENTS_TEST_ID) - ).toBeInTheDocument(); + const { getByTestId } = renderThreatIntelligenceDetails(defaultContextValue); + expect(getByTestId(THREAT_INTELLIGENCE_DETAILS_ENRICHMENTS_TEST_ID)).toBeInTheDocument(); expect(useThreatIntelligenceDetails).toHaveBeenCalled(); }); @@ -79,10 +76,32 @@ describe('', () => { eventFields: {}, }); - const wrapper = renderThreatIntelligenceDetails(defaultContextValue); - - expect(wrapper.getByTestId(THREAT_INTELLIGENCE_DETAILS_LOADING_TEST_ID)).toBeInTheDocument(); + const { getByTestId } = renderThreatIntelligenceDetails(defaultContextValue); + expect(getByTestId(THREAT_INTELLIGENCE_DETAILS_LOADING_TEST_ID)).toBeInTheDocument(); expect(useThreatIntelligenceDetails).toHaveBeenCalled(); }); + + it('should render enrichments section', () => { + const enrichments = [ + buildEventEnrichmentMock(), + buildEventEnrichmentMock({ 'matched.id': ['other.id'], 'matched.field': ['other.field'] }), + ]; + + jest.mocked(useThreatIntelligenceDetails).mockReturnValue({ + isLoading: true, + enrichments, + isEventDataLoading: false, + isEnrichmentsLoading: false, + range: { from: '', to: '' }, + setRange: () => {}, + eventFields: { + test: 'test', + }, + }); + + const { getByTestId } = renderThreatIntelligenceDetails(defaultContextValue); + + expect(getByTestId(THREAT_INTELLIGENCE_DETAILS_ENRICHMENTS_TEST_ID)).toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_details.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_details.tsx index 5a8b6984fb3be..f473ae2c3262b 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_details.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_details.tsx @@ -5,13 +5,20 @@ * 2.0. */ -import React from 'react'; -import { EuiSpacer } from '@elastic/eui'; +import React, { memo } from 'react'; +import { EuiHorizontalRule, EuiSpacer } from '@elastic/eui'; import isEmpty from 'lodash/isEmpty'; -import { EnrichmentRangePicker } from '../../../../common/components/event_details/cti_details/enrichment_range_picker'; -import { ThreatDetailsView } from '../../../../common/components/event_details/cti_details/threat_details_view'; +import { groupBy } from 'lodash'; +import { EnrichmentSection } from './threat_details_view_enrichment_section'; +import { ENRICHMENT_TYPES } from '../../../../../common/cti/constants'; +import { EnrichmentRangePicker } from './threat_intelligence_view_enrichment_range_picker'; import { useThreatIntelligenceDetails } from '../hooks/use_threat_intelligence_details'; -import { THREAT_INTELLIGENCE_DETAILS_LOADING_TEST_ID } from './test_ids'; +import { + THREAT_INTELLIGENCE_DETAILS_ENRICHMENTS_TEST_ID, + THREAT_INTELLIGENCE_DETAILS_LOADING_TEST_ID, + THREAT_INTELLIGENCE_ENRICHMENTS_TEST_ID, + THREAT_INTELLIGENCE_MATCHES_TEST_ID, +} from './test_ids'; import { FlyoutLoading } from '../../../shared/components/flyout_loading'; export const THREAT_INTELLIGENCE_TAB_ID = 'threatIntelligence'; @@ -19,7 +26,7 @@ export const THREAT_INTELLIGENCE_TAB_ID = 'threatIntelligence'; /** * Threat intelligence displayed in the document details expandable flyout left section under the Insights tab */ -export const ThreatIntelligenceDetails: React.FC = () => { +export const ThreatIntelligenceDetails = memo(() => { const { enrichments, eventFields, @@ -30,21 +37,54 @@ export const ThreatIntelligenceDetails: React.FC = () => { setRange, } = useThreatIntelligenceDetails(); + const showInvestigationTimeEnrichments = !isEmpty(eventFields); + const { + [ENRICHMENT_TYPES.IndicatorMatchRule]: indicatorMatches, + [ENRICHMENT_TYPES.InvestigationTime]: threatIntelEnrichments, + undefined: matchesWithNoType, + } = groupBy(enrichments, 'matched.type'); + return isEventDataLoading ? ( ) : ( - - <> - - - - + <> + + + {showInvestigationTimeEnrichments ? ( + <> + + + + + + + ) : null} + + {matchesWithNoType ? ( + <> + + {indicatorMatches && } + + + ) : null} + ); -}; +}); ThreatIntelligenceDetails.displayName = 'ThreatIntelligenceDetails'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_range_picker.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_view_enrichment_range_picker.test.tsx similarity index 60% rename from x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_range_picker.test.tsx rename to x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_view_enrichment_range_picker.test.tsx index 867eaf73ef85e..483ef9e4fc597 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_range_picker.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_view_enrichment_range_picker.test.tsx @@ -7,9 +7,12 @@ import React from 'react'; import { mount } from 'enzyme'; - -import { TestProviders } from '../../../mock'; -import { EnrichmentRangePicker } from './enrichment_range_picker'; +import { TestProviders } from '../../../../common/mock'; +import { EnrichmentRangePicker } from './threat_intelligence_view_enrichment_range_picker'; +import { + THREAT_INTELLIGENCE_ENRICHMENTS_RANGE_PICKER_TEST_ID, + THREAT_INTELLIGENCE_ENRICHMENTS_REFRESH_BUTTON_TEST_ID, +} from './test_ids'; describe('EnrichmentRangePicker', () => { const setRangeSpy = jest.fn(); @@ -27,8 +30,12 @@ describe('EnrichmentRangePicker', () => { ); - expect(wrapper.exists('[data-test-subj="enrichment-query-range-picker"]')).toEqual(true); - expect(wrapper.exists('[data-test-subj="enrichment-button"]')).toEqual(true); + expect( + wrapper.exists(`[data-test-subj="${THREAT_INTELLIGENCE_ENRICHMENTS_RANGE_PICKER_TEST_ID}"]`) + ).toEqual(true); + expect( + wrapper.exists(`[data-test-subj="${THREAT_INTELLIGENCE_ENRICHMENTS_REFRESH_BUTTON_TEST_ID}"]`) + ).toEqual(true); }); it('invokes setRange', () => { @@ -42,7 +49,10 @@ describe('EnrichmentRangePicker', () => { .find('input.start-picker') .first() .simulate('change', { target: { value: '08/10/2019 06:29 PM' } }); - wrapper.find('[data-test-subj="enrichment-button"]').hostNodes().simulate('click'); + wrapper + .find(`[data-test-subj="${THREAT_INTELLIGENCE_ENRICHMENTS_REFRESH_BUTTON_TEST_ID}"]`) + .hostNodes() + .simulate('click'); expect(setRangeSpy).toHaveBeenCalled(); }); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_range_picker.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_view_enrichment_range_picker.tsx similarity index 62% rename from x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_range_picker.tsx rename to x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_view_enrichment_range_picker.tsx index 3889823c3fc69..54401fdad1e11 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_range_picker.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/threat_intelligence_view_enrichment_range_picker.tsx @@ -6,7 +6,7 @@ */ import moment from 'moment'; -import React, { useMemo, useState, useCallback } from 'react'; +import React, { memo, useMemo, useState, useCallback } from 'react'; import { EuiDatePicker, EuiDatePickerRange, @@ -15,19 +15,53 @@ import { EuiButton, } from '@elastic/eui'; -import * as i18n from './translations'; +import { i18n } from '@kbn/i18n'; +import { + THREAT_INTELLIGENCE_ENRICHMENTS_RANGE_PICKER_TEST_ID, + THREAT_INTELLIGENCE_ENRICHMENTS_REFRESH_BUTTON_TEST_ID, +} from './test_ids'; import { DEFAULT_EVENT_ENRICHMENT_FROM, DEFAULT_EVENT_ENRICHMENT_TO, } from '../../../../../common/cti/constants'; +const ENRICHMENT_LOOKBACK_START_DATE = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.enrichmentQueryStartDate', + { + defaultMessage: 'Start date', + } +); + +const ENRICHMENT_LOOKBACK_END_DATE = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.enrichmentQueryEndDate', + { + defaultMessage: 'End date', + } +); + +const REFRESH = i18n.translate('xpack.securitySolution.flyout.threatIntelligence.refresh', { + defaultMessage: 'Refresh', +}); + export interface RangePickerProps { + /** + * The range of the picker + */ range: { to: string; from: string }; + /** + * Set the range of the picker + */ setRange: ({ to, from }: { to: string; from: string }) => void; + /** + * Whether the picker is loading + */ loading: boolean; } -export const EnrichmentRangePicker: React.FC = ({ range, setRange, loading }) => { +/** + * A component that allows the user to select a range of dates for enrichment + */ +export const EnrichmentRangePicker = memo(({ range, setRange, loading }: RangePickerProps) => { const [startDate, setStartDate] = useState( range.from === DEFAULT_EVENT_ENRICHMENT_FROM ? moment().subtract(30, 'd') : moment(range.from) ); @@ -50,7 +84,7 @@ export const EnrichmentRangePicker: React.FC = ({ range, setRa = ({ range, setRa startDate={startDate} endDate={endDate} isInvalid={!isValid} - aria-label={i18n.ENRICHMENT_LOOKBACK_START_DATE} + aria-label={ENRICHMENT_LOOKBACK_START_DATE} showTimeSelect /> } @@ -71,7 +105,7 @@ export const EnrichmentRangePicker: React.FC = ({ range, setRa startDate={startDate} endDate={endDate} isInvalid={!isValid} - aria-label={i18n.ENRICHMENT_LOOKBACK_END_DATE} + aria-label={ENRICHMENT_LOOKBACK_END_DATE} showTimeSelect /> } @@ -82,12 +116,14 @@ export const EnrichmentRangePicker: React.FC = ({ range, setRa iconType={'refresh'} onClick={onButtonClick} isLoading={loading} - data-test-subj={'enrichment-button'} + data-test-subj={THREAT_INTELLIGENCE_ENRICHMENTS_REFRESH_BUTTON_TEST_ID} isDisabled={!isValid} > - {i18n.REFRESH} + {REFRESH} ); -}; +}); + +EnrichmentRangePicker.displayName = 'EnrichmentRangePicker'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.test.ts b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.test.ts index ae71c7f74c8d6..e4b067afb0921 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.test.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.test.ts @@ -7,13 +7,12 @@ import { useThreatIntelligenceDetails } from './use_threat_intelligence_details'; import { renderHook } from '@testing-library/react-hooks'; - +import { SecurityPageName } from '@kbn/deeplinks-security'; import { useTimelineEventsDetails } from '../../../../timelines/containers/details'; import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; import { useDocumentDetailsContext } from '../../shared/context'; -import { useInvestigationTimeEnrichment } from '../../../../common/containers/cti/event_enrichment'; -import { SecurityPageName } from '../../../../../common/constants'; +import { useInvestigationTimeEnrichment } from '../../shared/hooks/use_investigation_enrichment'; import type { RouteSpyState } from '../../../../common/utils/route/types'; import { type GetBasicDataFromDetailsData, @@ -25,7 +24,7 @@ jest.mock('../../../../timelines/containers/details'); jest.mock('../../../../sourcerer/containers'); jest.mock('../../../../common/utils/route/use_route_spy'); jest.mock('../../shared/context'); -jest.mock('../../../../common/containers/cti/event_enrichment'); +jest.mock('../../shared/hooks/use_investigation_enrichment'); jest.mock('../../../../timelines/components/side_panel/event_details/helpers'); describe('useThreatIntelligenceDetails', () => { diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts index 04a2bd0ddee47..cba0c25cb25ad 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts @@ -6,6 +6,7 @@ */ import { useMemo } from 'react'; +import { SecurityPageName } from '@kbn/deeplinks-security'; import type { RunTimeMappings } from '../../../../../common/api/search_strategy'; import type { CtiEnrichment, EventFields } from '../../../../../common/search_strategy'; import { useBasicDataFromDetailsData } from '../../../../timelines/components/side_panel/event_details/helpers'; @@ -14,26 +15,42 @@ import { getEnrichmentFields, parseExistingEnrichments, timelineDataToEnrichment, -} from '../../../../common/components/event_details/cti_details/helpers'; -import { SecurityPageName } from '../../../../../common/constants'; +} from '../../shared/utils/threat_intelligence'; import { SourcererScopeName } from '../../../../sourcerer/store/model'; - -import { useInvestigationTimeEnrichment } from '../../../../common/containers/cti/event_enrichment'; +import { useInvestigationTimeEnrichment } from '../../shared/hooks/use_investigation_enrichment'; import { useTimelineEventsDetails } from '../../../../timelines/containers/details'; import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; import { useDocumentDetailsContext } from '../../shared/context'; -export interface ThreatIntelligenceDetailsValue { +export interface ThreatIntelligenceDetailsResult { + /** + * Enrichments extracted from the event data + */ enrichments: CtiEnrichment[]; + /** + * Fields extracted from the event data + */ eventFields: EventFields; + /** + * Whether enrichments are loading + */ isEnrichmentsLoading: boolean; + /** + * Whether event data is loading + */ isEventDataLoading: boolean; + /** + * Whether event or enrichment data is loading + */ isLoading: boolean; - range: { - from: string; - to: string; - }; + /** + * Range on the range picker to fetch enrichments + */ + range: { from: string; to: string }; + /** + * Set the range on the range picker to fetch enrichments + */ setRange: (range: { from: string; to: string }) => void; } @@ -42,7 +59,7 @@ export interface ThreatIntelligenceDetailsValue { * Reusing a bunch of hooks scattered across kibana, it makes it easier to mock the data layer * for component testing. */ -export const useThreatIntelligenceDetails = (): ThreatIntelligenceDetailsValue => { +export const useThreatIntelligenceDetails = (): ThreatIntelligenceDetailsResult => { const { indexName, eventId } = useDocumentDetailsContext(); const [{ pageName }] = useRouteSpy(); const sourcererScope = @@ -68,7 +85,7 @@ export const useThreatIntelligenceDetails = (): ThreatIntelligenceDetailsValue = loading: isEnrichmentsLoading, setRange, range, - } = useInvestigationTimeEnrichment(eventFields); + } = useInvestigationTimeEnrichment({ eventFields }); const existingEnrichments = useMemo( () => diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/__mocks__/indicator_with_nested_objects.ts b/x-pack/plugins/security_solution/public/flyout/document_details/left/mocks/indicator_with_nested_objects.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/event_details/__mocks__/indicator_with_nested_objects.ts rename to x-pack/plugins/security_solution/public/flyout/document_details/left/mocks/indicator_with_nested_objects.ts diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_name_cell.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_name_cell.test.tsx new file mode 100644 index 0000000000000..31a605ef9f2f8 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_name_cell.test.tsx @@ -0,0 +1,42 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { render } from '@testing-library/react'; +import React from 'react'; + +import { TableFieldNameCell } from './table_field_name_cell'; +import { + FLYOUT_TABLE_FIELD_NAME_CELL_ICON_TEST_ID, + FLYOUT_TABLE_FIELD_NAME_CELL_TEXT_TEST_ID, +} from './test_ids'; + +const mockDataType = 'date'; +const mockField = '@timestamp'; + +describe('TableFieldNameCell', () => { + it('should render icon and text', () => { + const { getByTestId } = render( + + ); + + expect(getByTestId(FLYOUT_TABLE_FIELD_NAME_CELL_ICON_TEST_ID)).toBeInTheDocument(); + expect( + getByTestId(FLYOUT_TABLE_FIELD_NAME_CELL_ICON_TEST_ID).querySelector('span') + ).toHaveAttribute('data-euiicon-type', 'tokenDate'); + expect(getByTestId(FLYOUT_TABLE_FIELD_NAME_CELL_TEXT_TEST_ID)).toHaveTextContent(mockField); + }); + + it('should render default icon', () => { + const { getByTestId } = render( + + ); + + expect( + getByTestId(FLYOUT_TABLE_FIELD_NAME_CELL_ICON_TEST_ID).querySelector('span') + ).toHaveAttribute('data-euiicon-type', 'questionInCircle'); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_name_cell.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_name_cell.tsx new file mode 100644 index 0000000000000..81657e3280ec8 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_name_cell.tsx @@ -0,0 +1,81 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { memo } from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiText, EuiToolTip } from '@elastic/eui'; +import { isEmpty } from 'lodash'; +import { FieldIcon } from '@kbn/react-field'; +import { EcsFlat } from '@elastic/ecs'; +import { getFieldTypeName } from '@kbn/field-utils'; +import { + FLYOUT_TABLE_FIELD_NAME_CELL_ICON_TEST_ID, + FLYOUT_TABLE_FIELD_NAME_CELL_TEXT_TEST_ID, +} from './test_ids'; +import { getExampleText } from '../../../../common/components/event_details/helpers'; + +const getEcsField = (field: string): { example?: string; description?: string } | undefined => { + return EcsFlat[field as keyof typeof EcsFlat] as + | { + example?: string; + description?: string; + } + | undefined; +}; + +export interface TableFieldNameCellProps { + /** + * Type used to pick the correct icon + */ + dataType: string; + /** + * Field name + */ + field: string; +} + +/** + * Renders an icon/text couple in the first column of the table + */ +export const TableFieldNameCell = memo(({ dataType, field }: TableFieldNameCellProps) => { + const ecsField = getEcsField(field); + const typeName = getFieldTypeName(dataType); + + return ( + + + + + + + + + + {field} + + + + + + + ); +}); + +TableFieldNameCell.displayName = 'TableFieldNameCell'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.test.tsx similarity index 72% rename from x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.test.tsx rename to x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.test.tsx index 139641f3803c7..6d28b8ddef8ee 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.test.tsx @@ -8,10 +8,10 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import type { BrowserField } from '../../../containers/source'; -import { FieldValueCell } from './field_value_cell'; -import { TestProviders } from '../../../mock'; -import type { EventFieldsData } from '../types'; +import type { BrowserField } from '@kbn/timelines-plugin/common'; +import type { EventFieldsData } from '../../../../common/components/event_details/types'; +import { TableFieldValueCell } from './table_field_value_cell'; +import { TestProviders } from '../../../../common/mock'; const contextId = 'test'; @@ -31,12 +31,12 @@ const hostIpData: EventFieldsData = { }; const hostIpValues = ['127.0.0.1', '::1', '10.1.2.3', 'fe80::4001:aff:fec8:32']; -describe('FieldValueCell', () => { +describe('TableFieldValueCell', () => { describe('common behavior', () => { beforeEach(() => { render( - { ); }); - test('it formats multiple values such that each value is displayed on a single line', () => { + it('should format multiple values such that each value is displayed on a single line', () => { expect(screen.getByTestId(`event-field-${hostIpData.field}`).className).toContain('column'); }); }); @@ -55,7 +55,7 @@ describe('FieldValueCell', () => { beforeEach(() => { render( - { ); }); - test('it renders each of the expected values when `fieldFromBrowserField` is undefined', () => { + it('should render each of the expected values when `fieldFromBrowserField` is undefined', () => { hostIpValues.forEach((value) => { expect(screen.getByText(value)).toBeInTheDocument(); }); }); - - test('it renders values formatted as plain text (without `eventFieldsTable__fieldValue` formatting)', () => { - expect(screen.getByTestId(`event-field-${hostIpData.field}`).firstChild).not.toHaveClass( - 'eventFieldsTable__fieldValue' - ); - }); }); describe('`message` field formatting', () => { @@ -105,7 +99,7 @@ describe('FieldValueCell', () => { beforeEach(() => { render( - { ); }); - test('it renders special formatting for the `message` field', () => { + it('should render special formatting for the `message` field', () => { expect(screen.getByTestId('event-field-message')).toBeInTheDocument(); }); - test('it renders the expected message value', () => { + it('should render the expected message value', () => { messageValues.forEach((value) => { expect(screen.getByText(value)).toBeInTheDocument(); }); @@ -139,7 +133,7 @@ describe('FieldValueCell', () => { beforeEach(() => { render( - { ); }); - test('it renders values formatted with the expected class', () => { - expect(screen.getByTestId(`event-field-${hostIpData.field}`).firstChild).toHaveClass( - 'eventFieldsTable__fieldValue' - ); - }); - - test('it aligns items at the start of the group to prevent content from stretching (by default)', () => { + it('should align items at the start of the group to prevent content from stretching (by default)', () => { expect(screen.getByTestId(`event-field-${hostIpData.field}`).className).toContain( 'flexStart' ); }); - test('it renders link buttons for each of the host ip addresses', () => { + it('should render link buttons for each of the host ip addresses', () => { expect(screen.getAllByRole('button').length).toBe(hostIpValues.length); }); - test('it renders each of the expected values when `fieldFromBrowserField` is provided', () => { + it('should render each of the expected values when `fieldFromBrowserField` is provided', () => { hostIpValues.forEach((value) => { expect(screen.getByText(value)).toBeInTheDocument(); }); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx new file mode 100644 index 0000000000000..5fabcd48b1eca --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx @@ -0,0 +1,105 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { memo } from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; +import type { BrowserField } from '@kbn/timelines-plugin/common'; +import { getFieldFormat } from '../../../../common/components/event_details/get_field_format'; +import type { EventFieldsData } from '../../../../common/components/event_details/types'; +import { OverflowField } from '../../../../common/components/tables/helpers'; +import { FormattedFieldValue } from '../../../../timelines/components/timeline/body/renderers/formatted_field'; +import { MESSAGE_FIELD_NAME } from '../../../../timelines/components/timeline/body/renderers/constants'; + +export interface FieldValueCellProps { + /** + * Value used to create a unique identifier in children components + */ + contextId: string; + /** + * Datq retrieved from the row + */ + data: EventFieldsData; + /** + * Id of the document + */ + eventId: string; + /** + * Field retrieved from the BrowserField + */ + fieldFromBrowserField?: Partial; + /** + * Value of the link field if it exists. Allows to navigate to other pages like host, user, network... + */ + getLinkValue?: (field: string) => string | null; + /** + * Values for the field, to render in the second column of the table + */ + values: string[] | null | undefined; +} + +/** + * Renders the value of a field in the second column of the table + */ +export const TableFieldValueCell = memo( + ({ + contextId, + data, + eventId, + fieldFromBrowserField, + getLinkValue, + values, + }: FieldValueCellProps) => { + if (values == null) { + return null; + } + + return ( + + {values.map((value, i) => { + if (fieldFromBrowserField == null) { + return ( + + + {value} + + + ); + } + + return ( + + {data.field === MESSAGE_FIELD_NAME ? ( + + ) : ( + + )} + + ); + })} + + ); + } +); + +TableFieldValueCell.displayName = 'TableFieldValueCell'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/test_ids.ts b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/test_ids.ts index c68718fcd73dd..f2e4b529da8f1 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/test_ids.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/test_ids.ts @@ -8,6 +8,14 @@ import { PREFIX } from '../../../shared/test_ids'; import { CONTENT_TEST_ID, HEADER_TEST_ID } from './expandable_section'; +/* Table */ + +const FLYOUT_TABLE_TEST_ID = `${PREFIX}Table` as const; +export const FLYOUT_TABLE_FIELD_NAME_CELL_ICON_TEST_ID = + `${FLYOUT_TABLE_TEST_ID}FieldNameCellIcon` as const; +export const FLYOUT_TABLE_FIELD_NAME_CELL_TEXT_TEST_ID = + `${FLYOUT_TABLE_TEST_ID}FieldNameCellText` as const; + /* Header */ const FLYOUT_HEADER_TEST_ID = `${PREFIX}Header` as const; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_fetch_threat_intelligence.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_fetch_threat_intelligence.test.tsx index 8c7dac4829d1a..e778552dff613 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_fetch_threat_intelligence.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_fetch_threat_intelligence.test.tsx @@ -12,9 +12,9 @@ import type { UseThreatIntelligenceResult, } from './use_fetch_threat_intelligence'; import { useFetchThreatIntelligence } from './use_fetch_threat_intelligence'; -import { useInvestigationTimeEnrichment } from '../../../../common/containers/cti/event_enrichment'; +import { useInvestigationTimeEnrichment } from '../../shared/hooks/use_investigation_enrichment'; -jest.mock('../../../../common/containers/cti/event_enrichment'); +jest.mock('../../shared/hooks/use_investigation_enrichment'); const dataFormattedForFieldBrowser = [ { diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_fetch_threat_intelligence.ts b/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_fetch_threat_intelligence.ts index 133fd43392c8a..ac59f6c802a87 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_fetch_threat_intelligence.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_fetch_threat_intelligence.ts @@ -15,8 +15,8 @@ import { getEnrichmentFields, parseExistingEnrichments, timelineDataToEnrichment, -} from '../../../../common/components/event_details/cti_details/helpers'; -import { useInvestigationTimeEnrichment } from '../../../../common/containers/cti/event_enrichment'; +} from '../../shared/utils/threat_intelligence'; +import { useInvestigationTimeEnrichment } from '../../shared/hooks/use_investigation_enrichment'; import { ENRICHMENT_TYPES } from '../../../../../common/cti/constants'; export interface UseThreatIntelligenceParams { @@ -76,7 +76,7 @@ export const useFetchThreatIntelligence = ({ ); // api call to retrieve all documents that match the eventFields - const { result: response, loading } = useInvestigationTimeEnrichment(eventFields); + const { result: response, loading } = useInvestigationTimeEnrichment({ eventFields }); // combine existing enrichment and enrichment from the api response // also removes the investigation-time enrichments if the exact indicator already exists diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.test.tsx index 0f6f3046ee3af..090b4838daa4e 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.test.tsx @@ -7,10 +7,13 @@ import React from 'react'; import { render } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; import { DocumentDetailsContext } from '../../shared/context'; -import { TABLE_TAB_CONTENT_TEST_ID } from './test_ids'; +import { TABLE_TAB_CONTENT_TEST_ID, TABLE_TAB_SEARCH_INPUT_TEST_ID } from './test_ids'; import { TableTab } from './table_tab'; import { TestProviders } from '../../../../common/mock'; +import { mockContextValue } from '../../shared/mocks/mock_context'; +import { FLYOUT_TABLE_FIELD_NAME_CELL_ICON_TEST_ID } from '../components/test_ids'; const mockDispatch = jest.fn(); jest.mock('react-redux', () => { @@ -40,4 +43,35 @@ describe('', () => { expect(getByTestId(TABLE_TAB_CONTENT_TEST_ID)).toBeInTheDocument(); }); + + it('should renders the column headers and a field/value pair', () => { + const { getAllByTestId, getByText } = render( + + + + + + ); + + expect(getByText('Field')).toBeInTheDocument(); + expect(getByText('Value')).toBeInTheDocument(); + expect(getByText('kibana.alert.workflow_status')).toBeInTheDocument(); + expect(getByText('open')).toBeInTheDocument(); + expect(getAllByTestId(FLYOUT_TABLE_FIELD_NAME_CELL_ICON_TEST_ID).length).toBeGreaterThan(0); + }); + + it('should filter the table correctly', () => { + const { getByTestId, queryByTestId, queryByText } = render( + + + + + + ); + + userEvent.type(getByTestId(TABLE_TAB_SEARCH_INPUT_TEST_ID), 'test'); + expect(queryByText('kibana.alert.workflow_status')).not.toBeInTheDocument(); + expect(queryByText('open')).not.toBeInTheDocument(); + expect(queryByTestId(FLYOUT_TABLE_FIELD_NAME_CELL_ICON_TEST_ID)).not.toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx index e47d46fcff1e6..55924fc3fa3a4 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/table_tab.tsx @@ -5,46 +5,104 @@ * 2.0. */ -import React, { memo } from 'react'; -import { EuiText } from '@elastic/eui'; -import { getFieldFromBrowserField } from '../../../../common/components/event_details/columns'; +import React, { memo, useCallback, useMemo, useState } from 'react'; +import { getOr, sortBy } from 'lodash/fp'; +import memoizeOne from 'memoize-one'; +import { css } from '@emotion/react'; +import { type EuiBasicTableColumn, EuiText, EuiInMemoryTable, useEuiFontSize } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { dataTableSelectors, tableDefaults } from '@kbn/securitysolution-data-table'; +import { getCategory } from '@kbn/triggers-actions-ui-plugin/public'; +import type { + BrowserField, + BrowserFields, + TimelineEventsDetailsItem, +} from '@kbn/timelines-plugin/common'; +import { TableFieldNameCell } from '../components/table_field_name_cell'; +import { TableFieldValueCell } from '../components/table_field_value_cell'; +import { TABLE_TAB_CONTENT_TEST_ID, TABLE_TAB_SEARCH_INPUT_TEST_ID } from './test_ids'; +import { getAllFieldsByName } from '../../../../common/containers/source'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { timelineDefaults } from '../../../../timelines/store/defaults'; +import { timelineSelectors } from '../../../../timelines/store'; import type { EventFieldsData } from '../../../../common/components/event_details/types'; -import { FieldValueCell } from '../../../../common/components/event_details/table/field_value_cell'; -import { FieldNameCell } from '../../../../common/components/event_details/table/field_name_cell'; import { CellActions } from '../components/cell_actions'; -import * as i18n from '../../../../common/components/event_details/translations'; import { useDocumentDetailsContext } from '../../shared/context'; -import type { ColumnsProvider } from '../../../../common/components/event_details/event_fields_browser'; -import { EventFieldsBrowser } from '../../../../common/components/event_details/event_fields_browser'; -import { TimelineTabs } from '../../../../../common/types'; - -export const getColumns: ColumnsProvider = ({ - browserFields, - eventId, - contextId, - scopeId, - getLinkValue, - isDraggable, -}) => [ +import { isInTableScope, isTimelineScope } from '../../../../helpers'; + +const COUNT_PER_PAGE_OPTIONS = [25, 50, 100]; + +const PLACEHOLDER = i18n.translate('xpack.securitySolution.flyout.table.filterPlaceholderLabel', { + defaultMessage: 'Filter by field or value...', +}); +export const FIELD = i18n.translate('xpack.securitySolution.flyout.table.fieldCellLabel', { + defaultMessage: 'Field', +}); +const VALUE = i18n.translate('xpack.securitySolution.flyout.table.valueCellLabel', { + defaultMessage: 'Value', +}); + +/** + * Defines the behavior of the search input that appears above the table of data + */ +const search = { + box: { + incremental: true, + placeholder: PLACEHOLDER, + schema: true, + 'data-test-subj': TABLE_TAB_SEARCH_INPUT_TEST_ID, + }, +}; + +/** + * Retrieve the correct field from the BrowserField + */ +export const getFieldFromBrowserField = memoizeOne( + (field: string, browserFields: BrowserFields): BrowserField | undefined => { + const category = getCategory(field); + + return browserFields[category]?.fields?.[field] as BrowserField; + }, + (newArgs, lastArgs) => newArgs[0] === lastArgs[0] +); + +export type ColumnsProvider = (providerOptions: { + /** + * An object containing fields by type + */ + browserFields: BrowserFields; + /** + * Id of the document + */ + eventId: string; + /** + * Maintain backwards compatibility // TODO remove when possible + */ + scopeId: string; + /** + * Value of the link field if it exists. Allows to navigate to other pages like host, user, network... + */ + getLinkValue: (field: string) => string | null; +}) => Array>; + +export const getColumns: ColumnsProvider = ({ browserFields, eventId, scopeId, getLinkValue }) => [ { field: 'field', name: ( - {i18n.FIELD} + {FIELD} ), width: '30%', render: (field, data) => { - return ( - - ); + return ; }, }, { field: 'values', name: ( - {i18n.VALUE} + {VALUE} ), width: '70%', @@ -52,13 +110,12 @@ export const getColumns: ColumnsProvider = ({ const fieldFromBrowserField = getFieldFromBrowserField(data.field, browserFields); return ( - @@ -68,23 +125,106 @@ export const getColumns: ColumnsProvider = ({ ]; /** - * Table view displayed in the document details expandable flyout right section + * Table view displayed in the document details expandable flyout right section Table tab */ -// TODO: MOVE TO FLYOUT FOLDER - https://github.com/elastic/security-team/issues/7462 export const TableTab = memo(() => { + const smallFontSize = useEuiFontSize('xs').fontSize; + const { browserFields, dataFormattedForFieldBrowser, eventId, scopeId } = useDocumentDetailsContext(); + const [pagination, setPagination] = useState<{ pageIndex: number }>({ + pageIndex: 0, + }); + const onTableChange = useCallback(({ page: { index } }: { page: { index: number } }) => { + setPagination({ pageIndex: index }); + }, []); + + const getScope = useMemo(() => { + if (isTimelineScope(scopeId)) { + return timelineSelectors.getTimelineByIdSelector(); + } else if (isInTableScope(scopeId)) { + return dataTableSelectors.getTableByIdSelector(); + } + }, [scopeId]); + + const defaults = useMemo( + () => (isTimelineScope(scopeId) ? timelineDefaults : tableDefaults), + [scopeId] + ); + + const columnHeaders = useDeepEqualSelector((state) => { + const { columns } = (getScope && getScope(state, scopeId)) ?? defaults; + return columns; + }); + + const fieldsByName = useMemo(() => getAllFieldsByName(browserFields), [browserFields]); + + const items = useMemo( + () => + sortBy(['field'], dataFormattedForFieldBrowser).map((item, i) => ({ + ...item, + ...fieldsByName[item.field], + valuesConcatenated: item.values != null ? item.values.join() : '', + ariaRowindex: i + 1, + })), + [dataFormattedForFieldBrowser, fieldsByName] + ); + + const getLinkValue = useCallback( + (field: string) => { + const columnHeader = columnHeaders.find((col) => col.id === field); + if (!columnHeader || !columnHeader.linkField) { + return null; + } + const linkFieldData = (dataFormattedForFieldBrowser ?? []).find( + (d) => d.field === columnHeader.linkField + ); + const linkFieldValue = getOr(null, 'originalValue', linkFieldData); + return Array.isArray(linkFieldValue) ? linkFieldValue[0] : linkFieldValue; + }, + [dataFormattedForFieldBrowser, columnHeaders] + ); + + // forces the rows of the table to render smaller fonts + const onSetRowProps = useCallback( + ({ field }: TimelineEventsDetailsItem) => ({ + className: 'flyout-table-row-small-font', + 'data-test-subj': `flyout-table-row-${field}`, + }), + [] + ); + + const columns = useMemo( + () => + getColumns({ + browserFields, + eventId, + scopeId, + getLinkValue, + }), + [browserFields, eventId, scopeId, getLinkValue] + ); + return ( - ); }); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/test_ids.ts b/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/test_ids.ts index 6fa34f66265a9..ca894c99b5ffe 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/test_ids.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/tabs/test_ids.ts @@ -7,6 +7,7 @@ import { PREFIX } from '../../../shared/test_ids'; -export const TABLE_TAB_CONTENT_TEST_ID = 'event-fields-browser' as const; +export const TABLE_TAB_CONTENT_TEST_ID = `${PREFIX}DocumentTable` as const; +export const TABLE_TAB_SEARCH_INPUT_TEST_ID = `${PREFIX}DocumentTableSearchInput` as const; export const JSON_TAB_CONTENT_TEST_ID = 'jsonView' as const; export const JSON_TAB_COPY_TO_CLIPBOARD_BUTTON_TEST_ID = `${PREFIX}JsonTabCopyToClipboard` as const; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_investigation_enrichment.test.ts b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_investigation_enrichment.test.ts new file mode 100644 index 0000000000000..0e1cdbc845b38 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_investigation_enrichment.test.ts @@ -0,0 +1,122 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { renderHook } from '@testing-library/react-hooks'; +import { useInvestigationTimeEnrichment } from './use_investigation_enrichment'; +import { + DEFAULT_EVENT_ENRICHMENT_FROM, + DEFAULT_EVENT_ENRICHMENT_TO, +} from '../../../../../common/cti/constants'; +import { useEventEnrichmentComplete } from '../services/threat_intelligence'; + +jest.mock('../services/threat_intelligence'); +jest.mock('react-redux', () => { + const original = jest.requireActual('react-redux'); + return { + ...original, + useDispatch: () => jest.fn(), + }; +}); +jest.mock('../../../../common/hooks/use_app_toasts', () => ({ + useAppToasts: jest.fn().mockReturnValue({ + addError: jest.fn(), + }), +})); +jest.mock('../../../../common/lib/kibana', () => { + const originalModule = jest.requireActual('../../../../common/lib/kibana'); + return { + ...originalModule, + useKibana: jest.fn().mockReturnValue({ + services: { + data: { + search: { + search: () => ({ + subscribe: () => ({ + unsubscribe: jest.fn(), + }), + }), + }, + }, + uiSettings: { + get: jest.fn().mockReturnValue(''), + }, + }, + }), + }; +}); + +describe('useInvestigationTimeEnrichment', () => { + it('should return default range', () => { + (useEventEnrichmentComplete as jest.Mock).mockReturnValue({}); + + const { result } = renderHook(() => + useInvestigationTimeEnrichment({ + eventFields: {}, + }) + ); + + expect(result.current.range).toEqual({ + from: DEFAULT_EVENT_ENRICHMENT_FROM, + to: DEFAULT_EVENT_ENRICHMENT_TO, + }); + expect(typeof result.current.setRange).toBe('function'); + }); + + it('should return loading', () => { + (useEventEnrichmentComplete as jest.Mock).mockReturnValue({ + error: null, + result: undefined, + loading: true, + }); + + const { result } = renderHook(() => + useInvestigationTimeEnrichment({ + eventFields: {}, + }) + ); + + expect(result.current.loading).toEqual(true); + }); + + it('should return no enrichments', () => { + (useEventEnrichmentComplete as jest.Mock).mockReturnValue({}); + + const { result } = renderHook(() => + useInvestigationTimeEnrichment({ + eventFields: {}, + }) + ); + + expect(result.current.result).toEqual({ enrichments: [] }); + }); + + it('should return enrichments and loading false', () => { + (useEventEnrichmentComplete as jest.Mock).mockReturnValue({ + error: null, + result: { + enrichments: [{}], + inspect: { dsl: [] }, + totalCount: 0, + }, + loading: false, + start: jest.fn(), + }); + + const { result } = renderHook(() => + useInvestigationTimeEnrichment({ + eventFields: { test: 'test' }, + }) + ); + + expect(result.current.result).toEqual({ + enrichments: [{}], + inspect: { dsl: [] }, + totalCount: 0, + }); + expect(result.current.loading).toEqual(false); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_investigation_enrichment.ts b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_investigation_enrichment.ts similarity index 58% rename from x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_investigation_enrichment.ts rename to x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_investigation_enrichment.ts index c8a91c41cb847..34cabc044f469 100644 --- a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_investigation_enrichment.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_investigation_enrichment.ts @@ -9,26 +9,67 @@ import { useCallback, useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; import { isEmpty, isEqual } from 'lodash'; import usePrevious from 'react-use/lib/usePrevious'; - -import { InputsModelId } from '../../../store/inputs/constants'; -import type { EventFields } from '../../../../../common/search_strategy/security_solution/cti'; +import { i18n } from '@kbn/i18n'; +import { useEventEnrichmentComplete } from '../services/threat_intelligence'; +import type { + CtiEventEnrichmentStrategyResponse, + EventFields, +} from '../../../../../common/search_strategy'; +import { InputsModelId } from '../../../../common/store/inputs/constants'; import { DEFAULT_EVENT_ENRICHMENT_FROM, DEFAULT_EVENT_ENRICHMENT_TO, } from '../../../../../common/cti/constants'; -import { useAppToasts } from '../../../hooks/use_app_toasts'; -import { useKibana } from '../../../lib/kibana'; -import { inputsActions } from '../../../store/actions'; -import * as i18n from './translations'; -import { useEventEnrichmentComplete } from '.'; +import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; +import { useKibana } from '../../../../common/lib/kibana'; +import { inputsActions } from '../../../../common/store/actions'; import { DEFAULT_THREAT_INDEX_KEY } from '../../../../../common/constants'; +const INVESTIGATION_ENRICHMENT_REQUEST_ERROR = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.requestError', + { + defaultMessage: `An error occurred while requesting threat intelligence`, + } +); + export const QUERY_ID = 'investigation_time_enrichment'; const noop = () => {}; const noEnrichments = { enrichments: [] }; -// TODO: MOVE TO FLYOUT FOLDER - https://github.com/elastic/security-team/issues/7462 -export const useInvestigationTimeEnrichment = (eventFields: EventFields) => { +export interface UseInvestigationTimeEnrichmentProps { + /** + * The event fields to fetch enrichment for + */ + eventFields: EventFields; +} + +export interface UseInvestigationTimeEnrichmentResult { + /** + * The result of the enrichment + */ + result: CtiEventEnrichmentStrategyResponse | undefined | typeof noEnrichments; + /** + * The range of the query + */ + range: { from: string; to: string }; + /** + * Function to set the range of the query + */ + setRange: (range: { from: string; to: string }) => void; + /** + * Whether the enrichment is loading + */ + loading: boolean; +} + +/** + * Hook to fetch the enrichment for a set of event fields. + * Holds the range of the query. + * Returns the result of the enrichment, the range of the query, the function to set it and the loading state. + */ +export const useInvestigationTimeEnrichment = ({ + eventFields, +}: UseInvestigationTimeEnrichmentProps): UseInvestigationTimeEnrichmentResult => { const { addError } = useAppToasts(); const { data, uiSettings } = useKibana().services; const defaultThreatIndices = uiSettings.get(DEFAULT_THREAT_INDEX_KEY); @@ -67,7 +108,7 @@ export const useInvestigationTimeEnrichment = (eventFields: EventFields) => { useEffect(() => { if (error) { - addError(error, { title: i18n.INVESTIGATION_ENRICHMENT_REQUEST_ERROR }); + addError(error, { title: INVESTIGATION_ENRICHMENT_REQUEST_ERROR }); } }, [addError, error]); diff --git a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/api.ts b/x-pack/plugins/security_solution/public/flyout/document_details/shared/services/threat_intelligence.ts similarity index 68% rename from x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/api.ts rename to x-pack/plugins/security_solution/public/flyout/document_details/shared/services/threat_intelligence.ts index 736a170382dae..db51e0505917b 100644 --- a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/api.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/services/threat_intelligence.ts @@ -7,19 +7,28 @@ import type { Observable } from 'rxjs'; import { filter } from 'rxjs'; - import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { isRunningResponse } from '@kbn/data-plugin/common'; +import { useObservable, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; +import { CtiQueries } from '../../../../../common/api/search_strategy'; +import type { CtiEventEnrichmentStrategyResponse } from '../../../../../common/search_strategy'; import type { EventEnrichmentRequestOptionsInput } from '../../../../../common/api/search_strategy'; -import type { CtiEventEnrichmentStrategyResponse } from '../../../../../common/search_strategy/security_solution/cti'; -import { CtiQueries } from '../../../../../common/search_strategy/security_solution/cti'; type GetEventEnrichmentProps = Omit & { + /** + * The data plugin start + */ data: DataPublicPluginStart; + /** + * An `AbortSignal` that allows the caller of `search` to abort a search request. + */ signal: AbortSignal; }; -export const getEventEnrichment = ({ +/** + * API call to retrieve the enrichments for a set of fields + */ +const getEventEnrichment = ({ data, defaultIndex, eventFields, @@ -41,7 +50,13 @@ export const getEventEnrichment = ({ } ); -export const getEventEnrichmentComplete = ( +/** + * Returns the enrichments for a set of fields, excluding the running response + */ +const getEventEnrichmentComplete = ( props: GetEventEnrichmentProps ): Observable => getEventEnrichment(props).pipe(filter((response) => !isRunningResponse(response))); + +export const useEventEnrichmentComplete = () => + useObservable(withOptionalSignal(getEventEnrichmentComplete)); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/shared/utils/threat_intelligence.test.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.test.tsx rename to x-pack/plugins/security_solution/public/flyout/document_details/shared/utils/threat_intelligence.test.tsx index b1573663313ee..fba86d76cedd7 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/utils/threat_intelligence.test.tsx @@ -13,7 +13,7 @@ import { parseExistingEnrichments, getEnrichmentIdentifiers, buildThreatDetailsItems, -} from './helpers'; +} from './threat_intelligence'; describe('parseExistingEnrichments', () => { it('returns an empty array if data is empty', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/shared/utils/threat_intelligence.tsx similarity index 71% rename from x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.tsx rename to x-pack/plugins/security_solution/public/flyout/document_details/shared/utils/threat_intelligence.tsx index a242fa19d770d..2f5bd6510430b 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/utils/threat_intelligence.tsx @@ -6,6 +6,11 @@ */ import { groupBy, isObject } from 'lodash'; +import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; +import { i18n } from '@kbn/i18n'; +import type { ThreatDetailsRow } from '../../left/components/threat_details_view_enrichment_accordion'; +import type { CtiEnrichment, EventFields } from '../../../../../common/search_strategy'; +import { isValidEventField } from '../../../../../common/search_strategy'; import { getDataFromFieldsHits } from '../../../../../common/utils/field_formatters'; import { DEFAULT_INDICATOR_SOURCE_PATH, @@ -20,19 +25,33 @@ import { MATCHED_TYPE, FEED_NAME, } from '../../../../../common/cti/constants'; -import type { TimelineEventsDetailsItem } from '../../../../../common/search_strategy'; -import type { - CtiEnrichment, - CtiEnrichmentIdentifiers, - EventFields, -} from '../../../../../common/search_strategy/security_solution/cti'; -import { isValidEventField } from '../../../../../common/search_strategy/security_solution/cti'; -import { getFirstElement } from '../../../../../common/utils/data_retrieval'; -import * as i18n from './translations'; - -export const isInvestigationTimeEnrichment = (type: string | undefined) => + +const NESTED_OBJECT_VALUES_NOT_RENDERED = i18n.translate( + 'xpack.securitySolution.flyout.threatIntelligence.investigationEnrichmentObjectValuesNotRendered', + { + defaultMessage: + 'This field contains nested object values, which are not rendered here. See the full document for all fields/values', + } +); + +/** + * Retrieves the first element of the given array. + * + * @param array the array to retrieve a value from + * @returns the first element of the array, or undefined if the array is undefined + */ +const getFirstElement: (array: T[] | undefined) => T | undefined = (array) => + array ? array[0] : undefined; + +/** + * Returns true if the enrichment type is 'investigation_time' + */ +export const isInvestigationTimeEnrichment = (type: string | undefined): boolean => type === ENRICHMENT_TYPES.InvestigationTime; +/** + * Parses existing enrichments from the timeline data + */ export const parseExistingEnrichments = ( data: TimelineEventsDetailsItem[] ): TimelineEventsDetailsItem[][] => { @@ -62,12 +81,18 @@ export const parseExistingEnrichments = ( ); }; +/** + * Converts timeline data to a CtiEnrichment object + */ export const timelineDataToEnrichment = (data: TimelineEventsDetailsItem[]): CtiEnrichment => data.reduce((acc, item) => { acc[item.field] = item.originalValue; return acc; }, {}); +/** + * Extracts the first value from an enrichment field + */ export const getEnrichmentValue = (enrichment: CtiEnrichment, field: string) => getFirstElement(enrichment[field]) as string | undefined; @@ -82,7 +107,18 @@ export const getShimmedIndicatorValue = (enrichment: CtiEnrichment, field: strin getEnrichmentValue(enrichment, `threatintel.${field}`) || getEnrichmentValue(enrichment, `threat.${field}`); -export const getEnrichmentIdentifiers = (enrichment: CtiEnrichment): CtiEnrichmentIdentifiers => ({ +/** + * Extracts the identifiers from an enrichment + */ +export const getEnrichmentIdentifiers = ( + enrichment: CtiEnrichment +): { + id: string | undefined; + field: string | undefined; + value: string | undefined; + type: string | undefined; + feedName: string | undefined; +} => ({ id: getEnrichmentValue(enrichment, MATCHED_ID), field: getEnrichmentValue(enrichment, MATCHED_FIELD), value: getEnrichmentValue(enrichment, MATCHED_ATOMIC), @@ -90,6 +126,9 @@ export const getEnrichmentIdentifiers = (enrichment: CtiEnrichment): CtiEnrichme feedName: getShimmedIndicatorValue(enrichment, FEED_NAME), }); +/** + * Returns a string composed of the id and the field for the enrichment + */ const buildEnrichmentId = (enrichment: CtiEnrichment): string => { const { id, field } = getEnrichmentIdentifiers(enrichment); return `${id}${field}`; @@ -116,6 +155,9 @@ export const filterDuplicateEnrichments = (enrichments: CtiEnrichment[]): CtiEnr ); }; +/** + * Returns the fields from the enrichments + */ export const getEnrichmentFields = (items: TimelineEventsDetailsItem[]): EventFields => items.reduce((fields, item) => { if (isValidEventField(item.field)) { @@ -127,26 +169,19 @@ export const getEnrichmentFields = (items: TimelineEventsDetailsItem[]): EventFi return fields; }, {}); +/** + * Returns the first seen date from the enrichment + */ export const getFirstSeen = (enrichment: CtiEnrichment): number => { const firstSeenValue = getShimmedIndicatorValue(enrichment, FIRST_SEEN); const firstSeenDate = Date.parse(firstSeenValue ?? 'no date'); return Number.isInteger(firstSeenDate) ? firstSeenDate : new Date(-1).valueOf(); }; -export interface ThreatDetailsRow { - title: string; - description: { - fieldName: string; - value: string; - }; -} - -interface ThreatDetailItem { - title: string; - description: { fieldName: string; value: unknown }; -} - -export const buildThreatDetailsItems = (enrichment: CtiEnrichment): ThreatDetailItem[] => +/** + * Builds the threat details items for the summary table + */ +export const buildThreatDetailsItems = (enrichment: CtiEnrichment): ThreatDetailsRow[] => Object.keys(enrichment) .sort() .map((field) => { @@ -156,8 +191,8 @@ export const buildThreatDetailsItems = (enrichment: CtiEnrichment): ThreatDetail let value = getFirstElement(enrichment[field]); if (isObject(value)) { - value = i18n.NESTED_OBJECT_VALUES_NOT_RENDERED; + value = NESTED_OBJECT_VALUES_NOT_RENDERED; } - return { title, description: { fieldName: field, value } }; + return { title, description: { fieldName: field, value: value as string } }; }); diff --git a/x-pack/plugins/security_solution/scripts/openapi/bundle_timeline.js b/x-pack/plugins/security_solution/scripts/openapi/bundle_timeline.js new file mode 100644 index 0000000000000..a828c3be1b5d3 --- /dev/null +++ b/x-pack/plugins/security_solution/scripts/openapi/bundle_timeline.js @@ -0,0 +1,46 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +require('../../../../../src/setup_node_env'); +const { bundle } = require('@kbn/openapi-bundler'); +const { join, resolve } = require('path'); + +const ROOT = resolve(__dirname, '../..'); + +(async () => { + await bundle({ + sourceGlob: join(ROOT, 'common/api/timeline/**/*.schema.yaml'), + outputFilePath: join( + ROOT, + 'docs/openapi/serverless/security_solution_timeline_api_{version}.bundled.schema.yaml' + ), + options: { + includeLabels: ['serverless'], + specInfo: { + title: 'Security Solution Timeline API (Elastic Cloud Serverless)', + description: + 'You can create Timelines and Timeline templates via the API, as well as import new Timelines from an ndjson file.', + }, + }, + }); + + await bundle({ + sourceGlob: join(ROOT, 'common/api/timeline/**/*.schema.yaml'), + outputFilePath: join( + ROOT, + 'docs/openapi/ess/security_solution_timeline_api_{version}.bundled.schema.yaml' + ), + options: { + includeLabels: ['ess'], + specInfo: { + title: 'Security Solution Timeline API (Elastic Cloud and self-hosted)', + description: + 'You can create Timelines and Timeline templates via the API, as well as import new Timelines from an ndjson file.', + }, + }, + }); +})(); diff --git a/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.ts b/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.ts index ed6f65ffb7610..2b8f85bbd65ac 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.ts @@ -22,7 +22,7 @@ export interface OpenAndAcknowledgedAlertsToolParams extends AssistantToolParams } export const OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL_DESCRIPTION = - 'Call this for knowledge about the latest n open and acknowledged alerts (sorted by `kibana.alert.risk_score`) in the environment, or when answering questions about open alerts. Do not call this tool for alert count or quantity. Input should be an empty object. The output is an array of the latest n open and acknowledged alerts.'; + 'Call this for knowledge about the latest n open and acknowledged alerts (sorted by `kibana.alert.risk_score`) in the environment, or when answering questions about open alerts. Do not call this tool for alert count or quantity. The output is an array of the latest n open and acknowledged alerts.'; /** * Returns a tool for querying open and acknowledged alerts, or null if the diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/data_source_diff_algorithm.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/data_source_diff_algorithm.test.ts new file mode 100644 index 0000000000000..6944cd137448a --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/data_source_diff_algorithm.test.ts @@ -0,0 +1,428 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { + RuleDataSource, + ThreeVersionsOf, +} from '../../../../../../../../common/api/detection_engine'; +import { + ThreeWayDiffOutcome, + ThreeWayMergeOutcome, + MissingVersion, + DataSourceType, + ThreeWayDiffConflict, +} from '../../../../../../../../common/api/detection_engine'; +import { dataSourceDiffAlgorithm } from './data_source_diff_algorithm'; + +describe('dataSourceDiffAlgorithm', () => { + describe('returns current_version as merged output if there is no update - scenario AAA', () => { + it('if all versions are index patterns', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'two', 'three'], + }, + current_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'two'], + }, + target_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'three'], + }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.StockValueNoUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NONE, + }) + ); + }); + + it('if all versions are data views', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { type: DataSourceType.data_view, data_view_id: '123' }, + current_version: { type: DataSourceType.data_view, data_view_id: '123' }, + target_version: { type: DataSourceType.data_view, data_view_id: '123' }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.StockValueNoUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NONE, + }) + ); + }); + }); + + describe('returns current_version as merged output if current_version is different and there is no update - scenario ABA', () => { + it('if current version is different data type than base and target', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'three'], + }, + current_version: { type: DataSourceType.data_view, data_view_id: '123' }, + target_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'three'], + }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueNoUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NONE, + }) + ); + }); + + it('if all versions are same data type', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'three'], + }, + current_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + target_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'three'], + }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueNoUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NONE, + }) + ); + }); + }); + + describe('returns target_version as merged output if current_version is the same and there is an update - scenario AAB', () => { + it('if target version is different data type than base and current', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { type: DataSourceType.data_view, data_view_id: '123' }, + current_version: { type: DataSourceType.data_view, data_view_id: '123' }, + target_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'three'], + }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.target_version, + diff_outcome: ThreeWayDiffOutcome.StockValueCanUpdate, + merge_outcome: ThreeWayMergeOutcome.Target, + conflict: ThreeWayDiffConflict.NONE, + }) + ); + }); + + it('if all versions are same data type', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { type: DataSourceType.data_view, data_view_id: '123' }, + current_version: { type: DataSourceType.data_view, data_view_id: '123' }, + target_version: { type: DataSourceType.data_view, data_view_id: '456' }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.target_version, + diff_outcome: ThreeWayDiffOutcome.StockValueCanUpdate, + merge_outcome: ThreeWayMergeOutcome.Target, + conflict: ThreeWayDiffConflict.NONE, + }) + ); + }); + }); + + describe('returns current_version as merged output if current version is different but it matches the update - scenario ABB', () => { + it('if all versions are index patterns', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'three'], + }, + current_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + target_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueSameUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NONE, + }) + ); + }); + + it('if all versions are data views', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { type: DataSourceType.data_view, data_view_id: '123' }, + current_version: { type: DataSourceType.data_view, data_view_id: '456' }, + target_version: { type: DataSourceType.data_view, data_view_id: '456' }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueSameUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NONE, + }) + ); + }); + }); + + describe('returns current_version as merged output if all three versions are different - scenario ABC', () => { + it('if all versions are index patterns', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'three'], + }, + current_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + target_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'five'], + }, + }; + + const expectedMergedVersion: RuleDataSource = { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'four', 'five'], + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: expectedMergedVersion, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueCanUpdate, + merge_outcome: ThreeWayMergeOutcome.Merged, + conflict: ThreeWayDiffConflict.SOLVABLE, + }) + ); + }); + + it('if all versions are data views', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { type: DataSourceType.data_view, data_view_id: '123' }, + current_version: { type: DataSourceType.data_view, data_view_id: '456' }, + target_version: { type: DataSourceType.data_view, data_view_id: '789' }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueCanUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NON_SOLVABLE, + }) + ); + }); + + it('if base version is a data view and others are index patterns ', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { type: DataSourceType.data_view, data_view_id: '123' }, + current_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + target_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'five'], + }, + }; + + const expectedMergedVersion: RuleDataSource = { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four', 'two', 'five'], + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: expectedMergedVersion, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueCanUpdate, + merge_outcome: ThreeWayMergeOutcome.Merged, + conflict: ThreeWayDiffConflict.SOLVABLE, + }) + ); + }); + + it('if base version is a index patterns and other are data views', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + current_version: { type: DataSourceType.data_view, data_view_id: '123' }, + target_version: { type: DataSourceType.data_view, data_view_id: '456' }, + }; + + const expectedMergedVersion: RuleDataSource = { + type: DataSourceType.data_view, + data_view_id: '123', + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: expectedMergedVersion, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueCanUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NON_SOLVABLE, + }) + ); + }); + + it('if currrent version is a different data type', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { type: DataSourceType.data_view, data_view_id: '123' }, + current_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + target_version: { type: DataSourceType.data_view, data_view_id: '789' }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueCanUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NON_SOLVABLE, + }) + ); + }); + + it('if target version is a different data type', () => { + const mockVersions: ThreeVersionsOf = { + base_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'two', 'three'], + }, + current_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + target_version: { type: DataSourceType.data_view, data_view_id: '789' }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.CustomizedValueCanUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NON_SOLVABLE, + }) + ); + }); + }); + + describe('if base_version is missing', () => { + it('returns current_version as merged output if current_version and target_version are the same - scenario -AA', () => { + const mockVersions: ThreeVersionsOf = { + base_version: MissingVersion, + current_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + target_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + has_base_version: false, + base_version: undefined, + merged_version: mockVersions.current_version, + diff_outcome: ThreeWayDiffOutcome.MissingBaseNoUpdate, + merge_outcome: ThreeWayMergeOutcome.Current, + conflict: ThreeWayDiffConflict.NONE, + }) + ); + }); + + it('returns target_version as merged output if current_version and target_version are different - scenario -AB', () => { + const mockVersions: ThreeVersionsOf = { + base_version: MissingVersion, + current_version: { type: DataSourceType.data_view, data_view_id: '456' }, + target_version: { + type: DataSourceType.index_patterns, + index_patterns: ['one', 'three', 'four'], + }, + }; + + const result = dataSourceDiffAlgorithm(mockVersions); + + expect(result).toEqual( + expect.objectContaining({ + has_base_version: false, + base_version: undefined, + merged_version: mockVersions.target_version, + diff_outcome: ThreeWayDiffOutcome.MissingBaseCanUpdate, + merge_outcome: ThreeWayMergeOutcome.Target, + conflict: ThreeWayDiffConflict.SOLVABLE, + }) + ); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/data_source_diff_algorithm.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/data_source_diff_algorithm.ts new file mode 100644 index 0000000000000..2f7430ddd4718 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/data_source_diff_algorithm.ts @@ -0,0 +1,148 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { assertUnreachable } from '../../../../../../../../common/utility_types'; +import type { + RuleDataSource, + ThreeVersionsOf, + ThreeWayDiff, +} from '../../../../../../../../common/api/detection_engine/prebuilt_rules'; +import { + determineIfValueCanUpdate, + ThreeWayDiffOutcome, + ThreeWayMergeOutcome, + MissingVersion, + DataSourceType, + ThreeWayDiffConflict, + determineDiffOutcomeForDataSource, +} from '../../../../../../../../common/api/detection_engine/prebuilt_rules'; +import { getDedupedDataSourceVersion, mergeDedupedArrays } from './helpers'; + +export const dataSourceDiffAlgorithm = ( + versions: ThreeVersionsOf +): ThreeWayDiff => { + const { + base_version: baseVersion, + current_version: currentVersion, + target_version: targetVersion, + } = versions; + + const diffOutcome = determineDiffOutcomeForDataSource(baseVersion, currentVersion, targetVersion); + + const valueCanUpdate = determineIfValueCanUpdate(diffOutcome); + + const hasBaseVersion = baseVersion !== MissingVersion; + + const { mergeOutcome, conflict, mergedVersion } = mergeVersions({ + baseVersion: hasBaseVersion ? baseVersion : undefined, + currentVersion, + targetVersion, + diffOutcome, + }); + + return { + has_base_version: hasBaseVersion, + base_version: hasBaseVersion ? baseVersion : undefined, + current_version: currentVersion, + target_version: targetVersion, + merged_version: mergedVersion, + merge_outcome: mergeOutcome, + + diff_outcome: diffOutcome, + conflict, + has_update: valueCanUpdate, + }; +}; + +interface MergeResult { + mergeOutcome: ThreeWayMergeOutcome; + mergedVersion: RuleDataSource; + conflict: ThreeWayDiffConflict; +} + +interface MergeArgs { + baseVersion: RuleDataSource | undefined; + currentVersion: RuleDataSource; + targetVersion: RuleDataSource; + diffOutcome: ThreeWayDiffOutcome; +} + +const mergeVersions = ({ + baseVersion, + currentVersion, + targetVersion, + diffOutcome, +}: MergeArgs): MergeResult => { + const dedupedBaseVersion = baseVersion ? getDedupedDataSourceVersion(baseVersion) : baseVersion; + const dedupedCurrentVersion = getDedupedDataSourceVersion(currentVersion); + const dedupedTargetVersion = getDedupedDataSourceVersion(targetVersion); + + switch (diffOutcome) { + // Scenario -AA is treated as scenario AAA: + // https://github.com/elastic/kibana/pull/184889#discussion_r1636421293 + case ThreeWayDiffOutcome.MissingBaseNoUpdate: + case ThreeWayDiffOutcome.StockValueNoUpdate: + case ThreeWayDiffOutcome.CustomizedValueNoUpdate: + case ThreeWayDiffOutcome.CustomizedValueSameUpdate: + return { + conflict: ThreeWayDiffConflict.NONE, + mergeOutcome: ThreeWayMergeOutcome.Current, + mergedVersion: dedupedCurrentVersion, + }; + + case ThreeWayDiffOutcome.StockValueCanUpdate: + return { + conflict: ThreeWayDiffConflict.NONE, + mergeOutcome: ThreeWayMergeOutcome.Target, + mergedVersion: dedupedTargetVersion, + }; + + case ThreeWayDiffOutcome.CustomizedValueCanUpdate: { + if ( + dedupedCurrentVersion.type === DataSourceType.index_patterns && + dedupedTargetVersion.type === DataSourceType.index_patterns + ) { + const baseVersionToMerge = + dedupedBaseVersion && dedupedBaseVersion.type === DataSourceType.index_patterns + ? dedupedBaseVersion.index_patterns + : []; + + return { + conflict: ThreeWayDiffConflict.SOLVABLE, + mergeOutcome: ThreeWayMergeOutcome.Merged, + mergedVersion: { + type: DataSourceType.index_patterns, + index_patterns: mergeDedupedArrays( + baseVersionToMerge, + dedupedCurrentVersion.index_patterns, + dedupedTargetVersion.index_patterns + ), + }, + }; + } + + return { + conflict: ThreeWayDiffConflict.NON_SOLVABLE, + mergeOutcome: ThreeWayMergeOutcome.Current, + mergedVersion: dedupedCurrentVersion, + }; + } + + // Scenario -AB is treated as scenario ABC, but marked as + // SOLVABLE, and returns the target version as the merged version + // https://github.com/elastic/kibana/pull/184889#discussion_r1636421293 + case ThreeWayDiffOutcome.MissingBaseCanUpdate: { + return { + mergedVersion: targetVersion, + mergeOutcome: ThreeWayMergeOutcome.Target, + conflict: ThreeWayDiffConflict.SOLVABLE, + }; + } + default: + return assertUnreachable(diffOutcome); + } +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/helpers.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/helpers.ts new file mode 100644 index 0000000000000..498b857eb0428 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/helpers.ts @@ -0,0 +1,37 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { difference, union, uniq } from 'lodash'; +import type { RuleDataSource } from '../../../../../../../../common/api/detection_engine'; +import { DataSourceType } from '../../../../../../../../common/api/detection_engine'; + +export const mergeDedupedArrays = ( + dedupedBaseVersion: T[], + dedupedCurrentVersion: T[], + dedupedTargetVersion: T[] +) => { + const addedCurrent = difference(dedupedCurrentVersion, dedupedBaseVersion); + const removedCurrent = difference(dedupedBaseVersion, dedupedCurrentVersion); + + const addedTarget = difference(dedupedTargetVersion, dedupedBaseVersion); + const removedTarget = difference(dedupedBaseVersion, dedupedTargetVersion); + + const bothAdded = union(addedCurrent, addedTarget); + const bothRemoved = union(removedCurrent, removedTarget); + + return difference(union(dedupedBaseVersion, bothAdded), bothRemoved); +}; + +export const getDedupedDataSourceVersion = (version: RuleDataSource): RuleDataSource => { + if (version.type === DataSourceType.index_patterns) { + return { + ...version, + index_patterns: uniq(version.index_patterns), + }; + } + return version; +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/index.ts index b7c0a1143f1a7..fc895543e66b2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/index.ts @@ -10,3 +10,4 @@ export { singleLineStringDiffAlgorithm } from './single_line_string_diff_algorit export { scalarArrayDiffAlgorithm } from './scalar_array_diff_algorithm'; export { simpleDiffAlgorithm } from './simple_diff_algorithm'; export { multiLineStringDiffAlgorithm } from './multi_line_string_diff_algorithm'; +export { dataSourceDiffAlgorithm } from './data_source_diff_algorithm'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/scalar_array_diff_algorithm.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/scalar_array_diff_algorithm.ts index e990ad9aa7c33..215e92377a596 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/scalar_array_diff_algorithm.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/diff/calculation/algorithms/scalar_array_diff_algorithm.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { difference, union, uniq } from 'lodash'; +import { uniq } from 'lodash'; import { assertUnreachable } from '../../../../../../../../common/utility_types'; import type { ThreeVersionsOf, @@ -19,6 +19,7 @@ import { ThreeWayDiffConflict, ThreeWayMergeOutcome, } from '../../../../../../../../common/api/detection_engine/prebuilt_rules'; +import { mergeDedupedArrays } from './helpers'; /** * Diff algorithm used for arrays of scalar values (eg. numbers, strings, booleans, etc.) @@ -105,16 +106,11 @@ const mergeVersions = ({ } case ThreeWayDiffOutcome.CustomizedValueCanUpdate: { - const addedCurrent = difference(dedupedCurrentVersion, dedupedBaseVersion); - const removedCurrent = difference(dedupedBaseVersion, dedupedCurrentVersion); - - const addedTarget = difference(dedupedTargetVersion, dedupedBaseVersion); - const removedTarget = difference(dedupedBaseVersion, dedupedTargetVersion); - - const bothAdded = union(addedCurrent, addedTarget); - const bothRemoved = union(removedCurrent, removedTarget); - - const merged = difference(union(dedupedBaseVersion, bothAdded), bothRemoved); + const merged = mergeDedupedArrays( + dedupedBaseVersion, + dedupedCurrentVersion, + dedupedTargetVersion + ); return { conflict: ThreeWayDiffConflict.SOLVABLE, diff --git a/x-pack/plugins/spaces/common/index.ts b/x-pack/plugins/spaces/common/index.ts index 4a767fb403ee2..65342bf2e43f4 100644 --- a/x-pack/plugins/spaces/common/index.ts +++ b/x-pack/plugins/spaces/common/index.ts @@ -18,5 +18,6 @@ export type { GetAllSpacesOptions, GetAllSpacesPurpose, GetSpaceResult, + SolutionView, } from './types/latest'; export { spaceV1 } from './types'; diff --git a/x-pack/plugins/spaces/common/types/space/v1.ts b/x-pack/plugins/spaces/common/types/space/v1.ts index 9f110dc3098e3..9ba2deb09aaa2 100644 --- a/x-pack/plugins/spaces/common/types/space/v1.ts +++ b/x-pack/plugins/spaces/common/types/space/v1.ts @@ -7,6 +7,8 @@ import type { OnBoardingDefaultSolution } from '@kbn/cloud-plugin/common'; +export type SolutionView = OnBoardingDefaultSolution | 'classic'; + /** * A Space. */ @@ -64,7 +66,7 @@ export interface Space { /** * Solution selected for this space. */ - solution?: OnBoardingDefaultSolution | 'classic'; + solution?: SolutionView; } /** diff --git a/x-pack/plugins/spaces/public/analytics/event_tracker.ts b/x-pack/plugins/spaces/public/analytics/event_tracker.ts new file mode 100644 index 0000000000000..ec936d1c1ef20 --- /dev/null +++ b/x-pack/plugins/spaces/public/analytics/event_tracker.ts @@ -0,0 +1,80 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { AnalyticsServiceStart } from '@kbn/core/public'; + +import type { SolutionView } from '../../common'; + +export enum EventType { + SPACE_SOLUTION_CHANGED = 'space_solution_changed', + SPACE_CHANGED = 'space_changed', +} + +export enum FieldType { + ACTION = 'action', + SPACE_ID = 'space_id', + SPACE_ID_PREV = 'space_id_prev', + SOLUTION = 'solution', + SOLUTION_PREV = 'solution_prev', +} + +export class EventTracker { + constructor(private analytics: Pick) {} + + private track(eventType: string, eventFields: object) { + try { + this.analytics.reportEvent(eventType, eventFields); + } catch (err) { + // eslint-disable-next-line no-console + console.error(err); + } + } + + /** + * Track whenever the space "solution" is changed. + */ + public spaceSolutionChanged({ + spaceId, + action, + solution, + solutionPrev, + }: { + spaceId: string; + action: 'create' | 'edit'; + solution: SolutionView; + solutionPrev?: SolutionView; + }) { + this.track(EventType.SPACE_SOLUTION_CHANGED, { + [FieldType.SPACE_ID]: spaceId, + [FieldType.SOLUTION]: solution, + [FieldType.SOLUTION_PREV]: solutionPrev, + [FieldType.ACTION]: action, + }); + } + + /** + * Track whenever the user changes space. + */ + public changeSpace({ + prevSpaceId, + prevSolution, + nextSpaceId, + nextSolution, + }: { + prevSpaceId: string; + prevSolution?: SolutionView; + nextSpaceId: string; + nextSolution?: SolutionView; + }) { + this.track(EventType.SPACE_CHANGED, { + [FieldType.SPACE_ID]: nextSpaceId, + [FieldType.SPACE_ID_PREV]: prevSpaceId, + [FieldType.SOLUTION]: nextSolution, + [FieldType.SOLUTION_PREV]: prevSolution, + }); + } +} diff --git a/x-pack/plugins/observability_solution/infra/server/lib/adapters/fields/index.ts b/x-pack/plugins/spaces/public/analytics/index.ts similarity index 57% rename from x-pack/plugins/observability_solution/infra/server/lib/adapters/fields/index.ts rename to x-pack/plugins/spaces/public/analytics/index.ts index 5d7c09c54b8c1..a7d363f988aa2 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/adapters/fields/index.ts +++ b/x-pack/plugins/spaces/public/analytics/index.ts @@ -5,4 +5,8 @@ * 2.0. */ -export * from './adapter_types'; +export { registerAnalyticsContext } from './register_analytics_context'; + +export { EventTracker } from './event_tracker'; + +export { registerSpacesEventTypes } from './register_event_types'; diff --git a/x-pack/plugins/spaces/public/analytics/register_analytics_context.ts b/x-pack/plugins/spaces/public/analytics/register_analytics_context.ts new file mode 100644 index 0000000000000..8f6f319d3333c --- /dev/null +++ b/x-pack/plugins/spaces/public/analytics/register_analytics_context.ts @@ -0,0 +1,33 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { Observable } from 'rxjs'; +import { map } from 'rxjs'; + +import type { AnalyticsClient } from '@kbn/core-analytics-browser'; + +import type { SolutionView, Space } from '../../common'; + +export interface SpaceMetadata { + spaceSolutionView?: SolutionView; +} + +export function registerAnalyticsContext( + analytics: Pick, + activeSpace: Observable +) { + analytics.registerContextProvider({ + name: 'Spaces Metadata', + context$: activeSpace.pipe(map((space) => ({ spaceSolution: space.solution }))), + schema: { + spaceSolution: { + type: 'keyword', + _meta: { description: 'The Space solution view', optional: true }, + }, + }, + }); +} diff --git a/x-pack/plugins/spaces/public/analytics/register_event_types.ts b/x-pack/plugins/spaces/public/analytics/register_event_types.ts new file mode 100644 index 0000000000000..701fdadb3c4ee --- /dev/null +++ b/x-pack/plugins/spaces/public/analytics/register_event_types.ts @@ -0,0 +1,82 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CoreSetup, EventTypeOpts, RootSchema } from '@kbn/core/public'; + +import { EventType, FieldType } from './event_tracker'; + +const fields: Record>> = { + [FieldType.SPACE_ID]: { + [FieldType.SPACE_ID]: { + type: 'keyword', + _meta: { + description: 'The ID of the space.', + }, + }, + }, + [FieldType.SPACE_ID_PREV]: { + [FieldType.SPACE_ID_PREV]: { + type: 'keyword', + _meta: { + description: 'The previous ID of the space (before switching space).', + }, + }, + }, + [FieldType.SOLUTION]: { + [FieldType.SOLUTION]: { + type: 'keyword', + _meta: { + description: 'The solution set for the space.', + }, + }, + }, + [FieldType.SOLUTION_PREV]: { + [FieldType.SOLUTION_PREV]: { + type: 'keyword', + _meta: { + description: 'The previous solution value before editing the space.', + optional: true, + }, + }, + }, + [FieldType.ACTION]: { + [FieldType.ACTION]: { + type: 'keyword', + _meta: { + description: 'The user action, either create or edit a space.', + }, + }, + }, +}; + +const eventTypes: Array>> = [ + { + eventType: EventType.SPACE_SOLUTION_CHANGED, + schema: { + ...fields[FieldType.SPACE_ID], + ...fields[FieldType.SOLUTION_PREV], + ...fields[FieldType.SOLUTION], + ...fields[FieldType.ACTION], + }, + }, + { + eventType: EventType.SPACE_CHANGED, + schema: { + ...fields[FieldType.SPACE_ID], + ...fields[FieldType.SPACE_ID_PREV], + ...fields[FieldType.SOLUTION_PREV], + ...fields[FieldType.SOLUTION], + }, + }, +]; + +export function registerSpacesEventTypes(core: CoreSetup) { + const { analytics } = core; + for (const eventType of eventTypes) { + analytics.registerEventType(eventType); + } +} diff --git a/x-pack/plugins/spaces/public/management/edit_space/index.ts b/x-pack/plugins/spaces/public/management/edit_space/index.ts index fa27a38ab5855..78c3b0fc42e04 100644 --- a/x-pack/plugins/spaces/public/management/edit_space/index.ts +++ b/x-pack/plugins/spaces/public/management/edit_space/index.ts @@ -5,5 +5,4 @@ * 2.0. */ -// @ts-ignore export { ManageSpacePage } from './manage_space_page'; diff --git a/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.test.tsx b/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.test.tsx index 2bcf35ccc6cc4..c6aae56a938fc 100644 --- a/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.test.tsx +++ b/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.test.tsx @@ -10,6 +10,7 @@ import { EuiButton } from '@elastic/eui'; import { waitFor } from '@testing-library/react'; import type { ReactWrapper } from 'enzyme'; import React from 'react'; +import { act } from 'react-dom/test-utils'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/public'; import { notificationServiceMock, scopedHistoryMock } from '@kbn/core/public/mocks'; @@ -20,6 +21,8 @@ import { findTestSubject, mountWithIntl } from '@kbn/test-jest-helpers'; import { ConfirmAlterActiveSpaceModal } from './confirm_alter_active_space_modal'; import { EnabledFeatures } from './enabled_features'; import { ManageSpacePage } from './manage_space_page'; +import type { SolutionView, Space } from '../../../common/types/latest'; +import { EventTracker } from '../../analytics'; import type { SpacesManager } from '../../spaces_manager'; import { spacesManagerMock } from '../../spaces_manager/mocks'; @@ -31,7 +34,7 @@ jest.mock('@elastic/eui/lib/components/overlay_mask', () => { }; }); -const space = { +const space: Space = { id: 'my-space', name: 'My Space', disabledFeatures: [], @@ -48,6 +51,9 @@ featuresStart.getFeatures.mockResolvedValue([ }), ]); +const reportEvent = jest.fn(); +const eventTracker = new EventTracker({ reportEvent }); + describe('ManageSpacePage', () => { beforeAll(() => { Object.defineProperty(window, 'location', { @@ -75,6 +81,7 @@ describe('ManageSpacePage', () => { catalogue: {}, spaces: { manage: true }, }} + eventTracker={eventTracker} allowFeatureVisibility /> ); @@ -124,6 +131,7 @@ describe('ManageSpacePage', () => { }} allowFeatureVisibility solutionNavExperiment={Promise.resolve(true)} + eventTracker={eventTracker} /> ); @@ -154,6 +162,7 @@ describe('ManageSpacePage', () => { spaces: { manage: true }, }} allowFeatureVisibility + eventTracker={eventTracker} /> ); @@ -180,6 +189,7 @@ describe('ManageSpacePage', () => { }} allowFeatureVisibility solutionNavExperiment={Promise.resolve(false)} + eventTracker={eventTracker} /> ); @@ -209,6 +219,7 @@ describe('ManageSpacePage', () => { catalogue: {}, spaces: { manage: true }, }} + eventTracker={eventTracker} allowFeatureVisibility /> ); @@ -238,6 +249,7 @@ describe('ManageSpacePage', () => { catalogue: {}, spaces: { manage: true }, }} + eventTracker={eventTracker} allowFeatureVisibility={false} /> ); @@ -258,6 +270,7 @@ describe('ManageSpacePage', () => { color: '#aabbcc', initials: 'AB', disabledFeatures: [], + solution: 'es', }; const spacesManager = spacesManagerMock.create(); @@ -282,7 +295,9 @@ describe('ManageSpacePage', () => { catalogue: {}, spaces: { manage: true }, }} + eventTracker={eventTracker} allowFeatureVisibility + solutionNavExperiment={Promise.resolve(true)} /> ); @@ -299,7 +314,7 @@ describe('ManageSpacePage', () => { wrapper.update(); - updateSpace(wrapper); + updateSpace(wrapper, true, 'oblt'); await clickSaveButton(wrapper); @@ -311,6 +326,14 @@ describe('ManageSpacePage', () => { initials: 'AB', imageUrl: '', disabledFeatures: ['feature-1'], + solution: 'oblt', // solution has been changed + }); + + expect(reportEvent).toHaveBeenCalledWith('space_solution_changed', { + action: 'edit', + solution: 'oblt', + solution_prev: 'es', + space_id: 'existing-space', }); }); @@ -350,6 +373,7 @@ describe('ManageSpacePage', () => { catalogue: {}, spaces: { manage: true }, }} + eventTracker={eventTracker} allowFeatureVisibility /> ); @@ -399,6 +423,7 @@ describe('ManageSpacePage', () => { catalogue: {}, spaces: { manage: true }, }} + eventTracker={eventTracker} allowFeatureVisibility /> ); @@ -436,6 +461,7 @@ describe('ManageSpacePage', () => { catalogue: {}, spaces: { manage: true }, }} + eventTracker={eventTracker} allowFeatureVisibility /> ); @@ -497,6 +523,7 @@ describe('ManageSpacePage', () => { catalogue: {}, spaces: { manage: true }, }} + eventTracker={eventTracker} allowFeatureVisibility /> ); @@ -521,7 +548,11 @@ describe('ManageSpacePage', () => { }); }); -function updateSpace(wrapper: ReactWrapper, updateFeature = true) { +function updateSpace( + wrapper: ReactWrapper, + updateFeature = true, + solution?: SolutionView +) { const nameInput = wrapper.find('input[name="name"]'); const descriptionInput = wrapper.find('textarea[name="description"]'); @@ -531,6 +562,16 @@ function updateSpace(wrapper: ReactWrapper, updateFeature = true) { if (updateFeature) { toggleFeature(wrapper); } + + if (solution) { + act(() => { + findTestSubject(wrapper, `solutionViewSelect`).simulate('click'); + }); + wrapper.update(); + findTestSubject(wrapper, `solutionView${capitalizeFirstLetter(solution)}Option`).simulate( + 'click' + ); + } } function toggleFeature(wrapper: ReactWrapper) { @@ -552,3 +593,7 @@ async function clickSaveButton(wrapper: ReactWrapper) { wrapper.update(); } + +function capitalizeFirstLetter(string: string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} diff --git a/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.tsx b/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.tsx index 7594778062857..7b11bf8a4609d 100644 --- a/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.tsx +++ b/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.tsx @@ -33,6 +33,7 @@ import { EnabledFeatures } from './enabled_features'; import { SolutionView } from './solution_view'; import type { Space } from '../../../common'; import { isReservedSpace } from '../../../common'; +import type { EventTracker } from '../../analytics'; import { getSpacesFeatureDescription } from '../../constants'; import { getSpaceColor, getSpaceInitials } from '../../space_avatar'; import type { SpacesManager } from '../../spaces_manager'; @@ -57,6 +58,7 @@ interface Props { history: ScopedHistory; allowFeatureVisibility: boolean; solutionNavExperiment?: Promise; + eventTracker: EventTracker; } interface State { @@ -454,14 +456,30 @@ export class ManageSpacePage extends Component { }; let action; - if (this.editingExistingSpace()) { - action = this.props.spacesManager.updateSpace(params); + const isEditing = this.editingExistingSpace(); + const { spacesManager, eventTracker } = this.props; + + if (isEditing) { + action = spacesManager.updateSpace(params); } else { - action = this.props.spacesManager.createSpace(params); + action = spacesManager.createSpace(params); } this.setState({ saveInProgress: true }); + const trackSpaceSolutionChange = () => { + const hasChangedSolution = this.state.originalSpace?.solution !== solution; + + if (!hasChangedSolution || solution === undefined) return; + + eventTracker.spaceSolutionChanged({ + spaceId: id, + solution, + solutionPrev: this.state.originalSpace?.solution, + action: isEditing ? 'edit' : 'create', + }); + }; + action .then(() => { this.props.notifications.toasts.addSuccess( @@ -474,11 +492,15 @@ export class ManageSpacePage extends Component { ) ); + trackSpaceSolutionChange(); this.backToSpacesList(); if (requireRefresh) { - setTimeout(() => { - window.location.reload(); + const flushAnalyticsEvents = window.__kbnAnalytics?.flush ?? (() => Promise.resolve()); + flushAnalyticsEvents().then(() => { + setTimeout(() => { + window.location.reload(); + }); }); } }) diff --git a/x-pack/plugins/spaces/public/management/management_service.test.ts b/x-pack/plugins/spaces/public/management/management_service.test.ts index 2eaacfda7c3a9..115c6a82ec0f7 100644 --- a/x-pack/plugins/spaces/public/management/management_service.test.ts +++ b/x-pack/plugins/spaces/public/management/management_service.test.ts @@ -12,10 +12,13 @@ import { managementPluginMock } from '@kbn/management-plugin/public/mocks'; import { ManagementService } from './management_service'; import { getRolesAPIClientMock } from './roles_api_client.mock'; +import { EventTracker } from '../analytics'; import type { ConfigType } from '../config'; import type { PluginsStart } from '../plugin'; import { spacesManagerMock } from '../spaces_manager/mocks'; +const eventTracker = new EventTracker({ reportEvent: jest.fn() }); + describe('ManagementService', () => { const config: ConfigType = { maxSpaces: 1000, @@ -39,6 +42,7 @@ describe('ManagementService', () => { config, getRolesAPIClient: getRolesAPIClientMock, solutionNavExperiment: Promise.resolve(false), + eventTracker, }); expect(mockKibanaSection.registerApp).toHaveBeenCalledTimes(1); @@ -60,6 +64,7 @@ describe('ManagementService', () => { config, getRolesAPIClient: getRolesAPIClientMock, solutionNavExperiment: Promise.resolve(false), + eventTracker, }); }); }); @@ -82,6 +87,7 @@ describe('ManagementService', () => { config, getRolesAPIClient: jest.fn(), solutionNavExperiment: Promise.resolve(false), + eventTracker, }); service.stop(); diff --git a/x-pack/plugins/spaces/public/management/management_service.tsx b/x-pack/plugins/spaces/public/management/management_service.tsx index 143aebba39d96..9975be6ac2986 100644 --- a/x-pack/plugins/spaces/public/management/management_service.tsx +++ b/x-pack/plugins/spaces/public/management/management_service.tsx @@ -10,6 +10,7 @@ import type { ManagementApp, ManagementSetup } from '@kbn/management-plugin/publ import type { RolesAPIClient } from '@kbn/security-plugin-types-public'; import { spacesManagementApp } from './spaces_management_app'; +import type { EventTracker } from '../analytics'; import type { ConfigType } from '../config'; import type { PluginsStart } from '../plugin'; import type { SpacesManager } from '../spaces_manager'; @@ -21,6 +22,7 @@ interface SetupDeps { config: ConfigType; getRolesAPIClient: () => Promise; solutionNavExperiment: Promise; + eventTracker: EventTracker; } export class ManagementService { @@ -33,6 +35,7 @@ export class ManagementService { config, getRolesAPIClient, solutionNavExperiment, + eventTracker, }: SetupDeps) { this.registeredSpacesManagementApp = management.sections.section.kibana.registerApp( spacesManagementApp.create({ @@ -41,6 +44,7 @@ export class ManagementService { config, getRolesAPIClient, solutionNavExperiment, + eventTracker, }) ); } diff --git a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.test.tsx b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.test.tsx index ee0bda60373a7..8576bff6711c0 100644 --- a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.test.tsx +++ b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.test.tsx @@ -58,6 +58,11 @@ featuresStart.getFeatures.mockResolvedValue([ }), ]); +const spacesGridCommonProps = { + serverBasePath: '', + maxSpaces: 1000, +}; + describe('SpacesGridPage', () => { const getUrlForApp = (appId: string) => appId; const history = scopedHistoryMock.create(); @@ -79,7 +84,7 @@ describe('SpacesGridPage', () => { catalogue: {}, spaces: { manage: true }, }} - maxSpaces={1000} + {...spacesGridCommonProps} /> ); @@ -138,8 +143,8 @@ describe('SpacesGridPage', () => { catalogue: {}, spaces: { manage: true }, }} - maxSpaces={1000} solutionNavExperiment={Promise.resolve(true)} + {...spacesGridCommonProps} /> ); @@ -156,6 +161,103 @@ describe('SpacesGridPage', () => { }); }); + it('renders a "current" badge for the current space', async () => { + spacesManager.getActiveSpace.mockResolvedValue(spaces[2]); + const current = await spacesManager.getActiveSpace(); + expect(current.id).toBe('custom-2'); + + const wrapper = mountWithIntl( + + ); + + // allow spacesManager to load spaces and lazy-load SpaceAvatar + await act(async () => {}); + wrapper.update(); + + const activeRow = wrapper.find('[data-test-subj="spacesListTableRow-custom-2"]'); + const nameCell = activeRow.find('[data-test-subj="spacesListTableRowNameCell"]'); + const activeBadge = nameCell.find('EuiBadge'); + expect(activeBadge.text()).toBe('current'); + }); + + it('renders a non-clickable "switch" action for the current space', async () => { + spacesManager.getActiveSpace.mockResolvedValue(spaces[2]); + const current = await spacesManager.getActiveSpace(); + expect(current.id).toBe('custom-2'); + + const wrapper = mountWithIntl( + + ); + + // allow spacesManager to load spaces and lazy-load SpaceAvatar + await act(async () => {}); + wrapper.update(); + + const activeRow = wrapper.find('[data-test-subj="spacesListTableRow-custom-2"]'); + const switchAction = activeRow.find('EuiButtonIcon[data-test-subj="Custom 2-switchSpace"]'); + expect(switchAction.prop('isDisabled')).toBe(true); + }); + + it('renders a clickable "switch" action for the non-current space', async () => { + spacesManager.getActiveSpace.mockResolvedValue(spaces[2]); + const current = await spacesManager.getActiveSpace(); + expect(current.id).toBe('custom-2'); + + const wrapper = mountWithIntl( + + ); + + // allow spacesManager to load spaces and lazy-load SpaceAvatar + await act(async () => {}); + wrapper.update(); + + const nonActiveRow = wrapper.find('[data-test-subj="spacesListTableRow-default"]'); + const switchAction = nonActiveRow.find('EuiButtonIcon[data-test-subj="Default-switchSpace"]'); + expect(switchAction.prop('isDisabled')).toBe(false); + }); + it('renders a create spaces button', async () => { const httpStart = httpServiceMock.createStartContract(); httpStart.get.mockResolvedValue([]); @@ -173,7 +275,7 @@ describe('SpacesGridPage', () => { catalogue: {}, spaces: { manage: true }, }} - maxSpaces={1000} + {...spacesGridCommonProps} /> ); @@ -203,6 +305,7 @@ describe('SpacesGridPage', () => { spaces: { manage: true }, }} maxSpaces={1} + serverBasePath={spacesGridCommonProps.serverBasePath} /> ); @@ -236,7 +339,7 @@ describe('SpacesGridPage', () => { catalogue: {}, spaces: { manage: true }, }} - maxSpaces={1000} + {...spacesGridCommonProps} /> ); @@ -271,7 +374,7 @@ describe('SpacesGridPage', () => { catalogue: {}, spaces: { manage: true }, }} - maxSpaces={1000} + {...spacesGridCommonProps} /> ); diff --git a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx index c6a321b3bf484..e3069743cec42 100644 --- a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx +++ b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx @@ -5,11 +5,13 @@ * 2.0. */ -import type { EuiBasicTableColumn } from '@elastic/eui'; import { + EuiBadge, + type EuiBasicTableColumn, EuiButton, - EuiButtonIcon, EuiCallOut, + EuiFlexGroup, + EuiFlexItem, EuiInMemoryTable, EuiLink, EuiLoadingSpinner, @@ -31,9 +33,9 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { reactRouterNavigate } from '@kbn/kibana-react-plugin/public'; -import type { Space } from '../../../common'; +import { addSpaceIdToPath, type Space } from '../../../common'; import { isReservedSpace } from '../../../common'; -import { DEFAULT_SPACE_ID } from '../../../common/constants'; +import { DEFAULT_SPACE_ID, ENTER_SPACE_PATH } from '../../../common/constants'; import { getSpacesFeatureDescription } from '../../constants'; import { getSpaceAvatarComponent } from '../../space_avatar'; import { SpaceSolutionBadge } from '../../space_solution_badge'; @@ -49,6 +51,7 @@ const LazySpaceAvatar = lazy(() => interface Props { spacesManager: SpacesManager; notifications: NotificationsStart; + serverBasePath: string; getFeatures: FeaturesPluginStart['getFeatures']; capabilities: Capabilities; history: ScopedHistory; @@ -59,6 +62,7 @@ interface Props { interface State { spaces: Space[]; + activeSpace: Space | null; features: KibanaFeature[]; loading: boolean; showConfirmDeleteModal: boolean; @@ -71,6 +75,7 @@ export class SpacesGridPage extends Component { super(props); this.state = { spaces: [], + activeSpace: null, features: [], loading: true, showConfirmDeleteModal: false, @@ -133,11 +138,15 @@ export class SpacesGridPage extends Component { ) : undefined} ({ + 'data-test-subj': `spacesListTableRow-${item.id}`, + })} columns={this.getColumnConfig()} pagination={true} sorting={true} @@ -221,12 +230,18 @@ export class SpacesGridPage extends Component { }); const getSpaces = spacesManager.getSpaces(); + const getActiveSpace = spacesManager.getActiveSpace(); try { - const [spaces, features] = await Promise.all([getSpaces, getFeatures()]); + const [spaces, activeSpace, features] = await Promise.all([ + getSpaces, + getActiveSpace, + getFeatures(), + ]); this.setState({ loading: false, spaces, + activeSpace, features, }); } catch (error) { @@ -247,11 +262,13 @@ export class SpacesGridPage extends Component { field: 'initials', name: '', width: '50px', - render: (value: string, record: Space) => { + render: (_value: string, rowRecord) => { return ( }> - - + + ); @@ -263,11 +280,28 @@ export class SpacesGridPage extends Component { defaultMessage: 'Space', }), sortable: true, - render: (value: string, record: Space) => ( - - {value} - + render: (value: string, rowRecord: Space) => ( + + + + {value} + + + {this.state.activeSpace?.name === rowRecord.name && ( + + + {i18n.translate('xpack.spaces.management.spacesGridPage.currentSpaceMarkerText', { + defaultMessage: 'current', + })} + + + )} + ), + 'data-test-subj': 'spacesListTableRowNameCell', }, { field: 'description', @@ -275,17 +309,19 @@ export class SpacesGridPage extends Component { defaultMessage: 'Description', }), sortable: true, + truncateText: true, + width: '30%', }, { field: 'disabledFeatures', name: i18n.translate('xpack.spaces.management.spacesGridPage.featuresColumnName', { - defaultMessage: 'Features', + defaultMessage: 'Features visible', }), sortable: (space: Space) => { return getEnabledFeatures(this.state.features, space).length; }, - render: (disabledFeatures: string[], record: Space) => { - const enabledFeatureCount = getEnabledFeatures(this.state.features, record).length; + render: (_disabledFeatures: string[], rowRecord: Space) => { + const enabledFeatureCount = getEnabledFeatures(this.state.features, rowRecord).length; if (enabledFeatureCount === this.state.features.length) { return ( { return ( { }), actions: [ { - render: (record: Space) => ( - - ), + isPrimary: true, + name: i18n.translate('xpack.spaces.management.spacesGridPage.editSpaceActionName', { + defaultMessage: `Edit`, + }), + description: (rowRecord) => + i18n.translate('xpack.spaces.management.spacesGridPage.editSpaceActionDescription', { + defaultMessage: `Edit {spaceName}.`, + values: { spaceName: rowRecord.name }, + }), + type: 'icon', + icon: 'pencil', + color: 'primary', + href: (rowRecord) => + reactRouterNavigate(this.props.history, this.getEditSpacePath(rowRecord)).href, + onClick: (rowRecord) => + reactRouterNavigate(this.props.history, this.getEditSpacePath(rowRecord)).onClick, + 'data-test-subj': (rowRecord) => `${rowRecord.name}-editSpace`, }, { - available: (record: Space) => !isReservedSpace(record), - render: (record: Space) => ( - this.onDeleteSpaceClick(record)} - /> - ), + isPrimary: true, + name: i18n.translate('xpack.spaces.management.spacesGridPage.switchSpaceActionName', { + defaultMessage: 'Switch', + }), + description: (rowRecord) => + this.state.activeSpace?.name !== rowRecord.name + ? i18n.translate( + 'xpack.spaces.management.spacesGridPage.switchSpaceActionDescription', + { + defaultMessage: 'Switch to {spaceName}', + values: { spaceName: rowRecord.name }, + } + ) + : i18n.translate( + 'xpack.spaces.management.spacesGridPage.switchSpaceActionDisabledDescription', + { + defaultMessage: '{spaceName} is the current space', + values: { spaceName: rowRecord.name }, + } + ), + type: 'icon', + icon: 'merge', + color: 'primary', + href: (rowRecord: Space) => + addSpaceIdToPath( + this.props.serverBasePath, + rowRecord.id, + `${ENTER_SPACE_PATH}?next=/app/management/kibana/spaces/` + ), + enabled: (rowRecord) => this.state.activeSpace?.name !== rowRecord.name, + 'data-test-subj': (rowRecord) => `${rowRecord.name}-switchSpace`, + }, + { + name: i18n.translate('xpack.spaces.management.spacesGridPage.deleteActionName', { + defaultMessage: `Delete`, + }), + description: (rowRecord) => + isReservedSpace(rowRecord) + ? i18n.translate( + 'xpack.spaces.management.spacesGridPage.deleteActionDisabledDescription', + { + defaultMessage: `{spaceName} is reserved`, + values: { spaceName: rowRecord.name }, + } + ) + : i18n.translate('xpack.spaces.management.spacesGridPage.deleteActionDescription', { + defaultMessage: `Delete {spaceName}`, + values: { spaceName: rowRecord.name }, + }), + type: 'icon', + icon: 'trash', + color: 'danger', + onClick: (rowRecord: Space) => this.onDeleteSpaceClick(rowRecord), + enabled: (rowRecord: Space) => !isReservedSpace(rowRecord), + 'data-test-subj': (rowRecord) => `${rowRecord.name}-deleteSpace`, }, ], }); diff --git a/x-pack/plugins/spaces/public/management/spaces_management_app.test.tsx b/x-pack/plugins/spaces/public/management/spaces_management_app.test.tsx index e953c324be285..cfc4542b4bacd 100644 --- a/x-pack/plugins/spaces/public/management/spaces_management_app.test.tsx +++ b/x-pack/plugins/spaces/public/management/spaces_management_app.test.tsx @@ -22,6 +22,7 @@ import { coreMock, scopedHistoryMock, themeServiceMock } from '@kbn/core/public/ import { featuresPluginMock } from '@kbn/features-plugin/public/mocks'; import { spacesManagementApp } from './spaces_management_app'; +import { EventTracker } from '../analytics'; import type { ConfigType } from '../config'; import type { PluginsStart } from '../plugin'; import { spacesManagerMock } from '../spaces_manager/mocks'; @@ -31,6 +32,8 @@ const config: ConfigType = { allowFeatureVisibility: true, }; +const eventTracker = new EventTracker({ reportEvent: jest.fn() }); + async function mountApp(basePath: string, pathname: string, spaceId?: string) { const container = document.createElement('div'); const setBreadcrumbs = jest.fn(); @@ -54,6 +57,7 @@ async function mountApp(basePath: string, pathname: string, spaceId?: string) { config, getRolesAPIClient: jest.fn(), solutionNavExperiment: Promise.resolve(false), + eventTracker, }) .mount({ basePath, @@ -76,6 +80,7 @@ describe('spacesManagementApp', () => { config, getRolesAPIClient: jest.fn(), solutionNavExperiment: Promise.resolve(false), + eventTracker, }) ).toMatchInlineSnapshot(` Object { @@ -100,7 +105,7 @@ describe('spacesManagementApp', () => { css="You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop)." data-test-subj="kbnRedirectAppLink" > - Spaces Page: {"capabilities":{"catalogue":{},"management":{},"navLinks":{}},"notifications":{"toasts":{}},"spacesManager":{"onActiveSpaceChange$":{}},"history":{"action":"PUSH","length":1,"location":{"pathname":"/","search":"","hash":""}},"maxSpaces":1000,"solutionNavExperiment":{}} + Spaces Page: {"capabilities":{"catalogue":{},"management":{},"navLinks":{}},"notifications":{"toasts":{}},"spacesManager":{"onActiveSpaceChange$":{}},"serverBasePath":"","history":{"action":"PUSH","length":1,"location":{"pathname":"/","search":"","hash":""}},"maxSpaces":1000,"solutionNavExperiment":{}}
`); @@ -127,7 +132,7 @@ describe('spacesManagementApp', () => { css="You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop)." data-test-subj="kbnRedirectAppLink" > - Spaces Edit Page: {"capabilities":{"catalogue":{},"management":{},"navLinks":{}},"notifications":{"toasts":{}},"spacesManager":{"onActiveSpaceChange$":{}},"history":{"action":"PUSH","length":1,"location":{"pathname":"/create","search":"","hash":""}},"allowFeatureVisibility":true,"solutionNavExperiment":{}} + Spaces Edit Page: {"capabilities":{"catalogue":{},"management":{},"navLinks":{}},"notifications":{"toasts":{}},"spacesManager":{"onActiveSpaceChange$":{}},"history":{"action":"PUSH","length":1,"location":{"pathname":"/create","search":"","hash":""}},"allowFeatureVisibility":true,"solutionNavExperiment":{},"eventTracker":{"analytics":{}}}
`); @@ -160,7 +165,7 @@ describe('spacesManagementApp', () => { css="You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop)." data-test-subj="kbnRedirectAppLink" > - Spaces Edit Page: {"capabilities":{"catalogue":{},"management":{},"navLinks":{}},"notifications":{"toasts":{}},"spacesManager":{"onActiveSpaceChange$":{}},"spaceId":"some-space","history":{"action":"PUSH","length":1,"location":{"pathname":"/edit/some-space","search":"","hash":""}},"allowFeatureVisibility":true,"solutionNavExperiment":{}} + Spaces Edit Page: {"capabilities":{"catalogue":{},"management":{},"navLinks":{}},"notifications":{"toasts":{}},"spacesManager":{"onActiveSpaceChange$":{}},"spaceId":"some-space","history":{"action":"PUSH","length":1,"location":{"pathname":"/edit/some-space","search":"","hash":""}},"allowFeatureVisibility":true,"solutionNavExperiment":{},"eventTracker":{"analytics":{}}}
`); diff --git a/x-pack/plugins/spaces/public/management/spaces_management_app.tsx b/x-pack/plugins/spaces/public/management/spaces_management_app.tsx index c551b47cde9c6..f6eea4d2fd1be 100644 --- a/x-pack/plugins/spaces/public/management/spaces_management_app.tsx +++ b/x-pack/plugins/spaces/public/management/spaces_management_app.tsx @@ -19,6 +19,7 @@ import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; import { Route, Router, Routes } from '@kbn/shared-ux-router'; import type { Space } from '../../common'; +import type { EventTracker } from '../analytics'; import type { ConfigType } from '../config'; import type { PluginsStart } from '../plugin'; import type { SpacesManager } from '../spaces_manager'; @@ -29,11 +30,18 @@ interface CreateParams { config: ConfigType; getRolesAPIClient: () => Promise; solutionNavExperiment: Promise; + eventTracker: EventTracker; } export const spacesManagementApp = Object.freeze({ id: 'spaces', - create({ getStartServices, spacesManager, config, solutionNavExperiment }: CreateParams) { + create({ + getStartServices, + spacesManager, + config, + solutionNavExperiment, + eventTracker, + }: CreateParams) { const title = i18n.translate('xpack.spaces.displayName', { defaultMessage: 'Spaces', }); @@ -51,7 +59,7 @@ export const spacesManagementApp = Object.freeze({ text: title, href: `/`, }; - const { notifications, application, chrome } = coreStart; + const { notifications, application, chrome, http } = coreStart; chrome.docTitle.change(title); @@ -63,6 +71,7 @@ export const spacesManagementApp = Object.freeze({ getFeatures={features.getFeatures} notifications={notifications} spacesManager={spacesManager} + serverBasePath={http.basePath.serverBasePath} history={history} getUrlForApp={application.getUrlForApp} maxSpaces={config.maxSpaces} @@ -90,6 +99,7 @@ export const spacesManagementApp = Object.freeze({ history={history} allowFeatureVisibility={config.allowFeatureVisibility} solutionNavExperiment={solutionNavExperiment} + eventTracker={eventTracker} /> ); }; @@ -117,6 +127,7 @@ export const spacesManagementApp = Object.freeze({ history={history} allowFeatureVisibility={config.allowFeatureVisibility} solutionNavExperiment={solutionNavExperiment} + eventTracker={eventTracker} /> ); }; diff --git a/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx b/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx index fab2158cb1c7d..610e3d82339c3 100644 --- a/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx +++ b/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx @@ -30,6 +30,7 @@ import { FormattedMessage, injectI18n } from '@kbn/i18n-react'; import { ManageSpacesButton } from './manage_spaces_button'; import type { Space } from '../../../common'; import { addSpaceIdToPath, ENTER_SPACE_PATH, SPACE_SEARCH_COUNT_THRESHOLD } from '../../../common'; +import type { EventTracker } from '../../analytics'; import { getSpaceAvatarComponent } from '../../space_avatar'; import { SpaceSolutionBadge } from '../../space_solution_badge'; @@ -48,6 +49,7 @@ interface Props { navigateToUrl: ApplicationStart['navigateToUrl']; readonly activeSpace: Space | null; isSolutionNavEnabled: boolean; + eventTracker: EventTracker; } class SpacesMenuUI extends Component { public render() { @@ -95,7 +97,7 @@ class SpacesMenuUI extends Component { id={this.props.id} className={'spcMenu'} title={i18n.translate('xpack.spaces.navControl.spacesMenu.changeCurrentSpaceTitle', { - defaultMessage: 'Change current space', + defaultMessage: 'Change current space xx', })} {...searchableProps} noMatchesMessage={noSpacesMessage} @@ -148,16 +150,36 @@ class SpacesMenuUI extends Component { }); }; - private spaceSelectionChange = ( + private getSpaceDetails = (id: string): Space | undefined => { + return this.props.spaces.find((space) => space.id === id); + }; + + private spaceSelectionChange = async ( newOptions: EuiSelectableOption[], event: EuiSelectableOnChangeEvent ) => { const selectedSpaceItem = newOptions.filter((item) => item.checked === 'on')[0]; + const trackSpaceChange = (nextId?: string) => { + if (!nextId) return; + const nextSpace = this.getSpaceDetails(nextId); + const currentSpace = this.props.activeSpace; + if (!nextSpace || !currentSpace) return; + + this.props.eventTracker.changeSpace({ + nextSpaceId: nextSpace.id, + nextSolution: nextSpace.solution, + prevSpaceId: currentSpace.id, + prevSolution: currentSpace.solution, + }); + }; + if (!!selectedSpaceItem) { + const spaceId = selectedSpaceItem.key; // the key is the unique space id + const urlToSelectedSpace = addSpaceIdToPath( this.props.serverBasePath, - selectedSpaceItem.key, // the key is the unique space id + spaceId, ENTER_SPACE_PATH ); @@ -169,15 +191,23 @@ class SpacesMenuUI extends Component { if (event.shiftKey) { // Open in new window, shift is given priority over other modifiers this.props.toggleSpaceSelector(); + trackSpaceChange(spaceId); window.open(urlToSelectedSpace); } else if (event.ctrlKey || event.metaKey || middleClick) { // Open in new tab - either a ctrl click or middle mouse button + trackSpaceChange(spaceId); window.open(urlToSelectedSpace, '_blank'); } else { // Force full page reload (usually not a good idea, but we need to in order to change spaces) // If the selected space is already the active space, gracefully close the popover - if (this.props.activeSpace?.id === selectedSpaceItem.key) this.props.toggleSpaceSelector(); - else this.props.navigateToUrl(urlToSelectedSpace); + if (this.props.activeSpace?.id === selectedSpaceItem.key) { + this.props.toggleSpaceSelector(); + } else { + trackSpaceChange(spaceId); + const flushAnalyticsEvents = window.__kbnAnalytics?.flush ?? (() => Promise.resolve()); + await flushAnalyticsEvents(); + this.props.navigateToUrl(urlToSelectedSpace); + } } } }; diff --git a/x-pack/plugins/spaces/public/nav_control/nav_control.tsx b/x-pack/plugins/spaces/public/nav_control/nav_control.tsx index 7e104e56c6548..b150ab7cbbbd0 100644 --- a/x-pack/plugins/spaces/public/nav_control/nav_control.tsx +++ b/x-pack/plugins/spaces/public/nav_control/nav_control.tsx @@ -12,12 +12,14 @@ import ReactDOM from 'react-dom'; import type { CoreStart } from '@kbn/core/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; +import type { EventTracker } from '../analytics'; import type { SpacesManager } from '../spaces_manager'; export function initSpacesNavControl( spacesManager: SpacesManager, core: CoreStart, - solutionNavExperiment: Promise + solutionNavExperiment: Promise, + eventTracker: EventTracker ) { core.chrome.navControls.registerLeft({ order: 1000, @@ -43,6 +45,7 @@ export function initSpacesNavControl( navigateToApp={core.application.navigateToApp} navigateToUrl={core.application.navigateToUrl} solutionNavExperiment={solutionNavExperiment} + eventTracker={eventTracker} /> , diff --git a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.test.tsx b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.test.tsx index 528103c5ccbc2..e402217e3db36 100644 --- a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.test.tsx +++ b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.test.tsx @@ -16,10 +16,11 @@ import { act, render, waitFor } from '@testing-library/react'; import React from 'react'; import * as Rx from 'rxjs'; -import { mountWithIntl } from '@kbn/test-jest-helpers'; +import { findTestSubject, mountWithIntl } from '@kbn/test-jest-helpers'; import { NavControlPopover } from './nav_control_popover'; import type { Space } from '../../common'; +import { EventTracker } from '../analytics'; import { SpaceAvatarInternal } from '../space_avatar/space_avatar_internal'; import { SpaceSolutionBadge } from '../space_solution_badge'; import type { SpacesManager } from '../spaces_manager'; @@ -44,11 +45,19 @@ const mockSpaces = [ }, ]; +const reportEvent = jest.fn(); +const eventTracker = new EventTracker({ reportEvent }); + describe('NavControlPopover', () => { - async function setup(spaces: Space[], isSolutionNavEnabled = false) { + async function setup(spaces: Space[], isSolutionNavEnabled = false, activeSpace?: Space) { const spacesManager = spacesManagerMock.create(); spacesManager.getSpaces = jest.fn().mockResolvedValue(spaces); + if (activeSpace) { + // @ts-ignore readonly check + spacesManager.onActiveSpaceChange$ = Rx.of(activeSpace); + } + const wrapper = mountWithIntl( { navigateToApp={jest.fn()} navigateToUrl={jest.fn()} solutionNavExperiment={Promise.resolve(isSolutionNavEnabled)} + eventTracker={eventTracker} /> ); @@ -80,6 +90,7 @@ describe('NavControlPopover', () => { navigateToApp={jest.fn()} navigateToUrl={jest.fn()} solutionNavExperiment={Promise.resolve(false)} + eventTracker={eventTracker} /> ); expect(baseElement).toMatchSnapshot(); @@ -105,6 +116,7 @@ describe('NavControlPopover', () => { navigateToApp={jest.fn()} navigateToUrl={jest.fn()} solutionNavExperiment={Promise.resolve(false)} + eventTracker={eventTracker} /> ); @@ -253,4 +265,40 @@ describe('NavControlPopover', () => { expect(wrapper.find(SpaceSolutionBadge)).toHaveLength(2); }); + + it('should report event when switching space', async () => { + const spaces: Space[] = [ + { + id: 'space-1', + name: 'Space-1', + disabledFeatures: [], + solution: 'classic', + }, + { + id: 'space-2', + name: 'Space 2', + disabledFeatures: [], + solution: 'security', + }, + ]; + + const activeSpace = spaces[0]; + const wrapper = await setup(spaces, true /** isSolutionEnabled **/, activeSpace); + + await act(async () => { + wrapper.find(EuiHeaderSectionItemButton).find('button').simulate('click'); + }); + wrapper.update(); + + expect(reportEvent).not.toHaveBeenCalled(); + + findTestSubject(wrapper, 'space-2-selectableSpaceItem').simulate('click'); + + expect(reportEvent).toHaveBeenCalledWith('space_changed', { + solution: 'security', + solution_prev: 'classic', + space_id: 'space-2', + space_id_prev: 'space-1', + }); + }); }); diff --git a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx index 6f40db60bfd4f..e79e2750bb5bd 100644 --- a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx +++ b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx @@ -21,6 +21,7 @@ import { i18n } from '@kbn/i18n'; import { SpacesDescription } from './components/spaces_description'; import { SpacesMenu } from './components/spaces_menu'; import type { Space } from '../../common'; +import type { EventTracker } from '../analytics'; import { getSpaceAvatarComponent } from '../space_avatar'; import type { SpacesManager } from '../spaces_manager'; @@ -38,6 +39,7 @@ interface Props { serverBasePath: string; theme: WithEuiThemeProps['theme']; solutionNavExperiment: Promise; + eventTracker: EventTracker; } interface State { @@ -109,6 +111,7 @@ class NavControlPopoverUI extends Component { navigateToUrl={this.props.navigateToUrl} activeSpace={this.state.activeSpace} isSolutionNavEnabled={this.state.isSolutionNavEnabled} + eventTracker={this.props.eventTracker} /> ); } diff --git a/x-pack/plugins/spaces/public/plugin.tsx b/x-pack/plugins/spaces/public/plugin.tsx index c915a4ea73880..13f3364d54e94 100644 --- a/x-pack/plugins/spaces/public/plugin.tsx +++ b/x-pack/plugins/spaces/public/plugin.tsx @@ -13,6 +13,7 @@ import type { HomePublicPluginSetup } from '@kbn/home-plugin/public'; import type { ManagementSetup, ManagementStart } from '@kbn/management-plugin/public'; import type { SecurityPluginStart } from '@kbn/security-plugin-types-public'; +import { EventTracker, registerAnalyticsContext, registerSpacesEventTypes } from './analytics'; import type { ConfigType } from './config'; import { createSpacesFeatureCatalogueEntry } from './create_feature_catalogue_entry'; import { isSolutionNavEnabled } from './experiments'; @@ -49,6 +50,7 @@ export type SpacesPluginStart = ReturnType; export class SpacesPlugin implements Plugin { private spacesManager!: SpacesManager; private spacesApi!: SpacesApi; + private eventTracker!: EventTracker; private managementService?: ManagementService; private readonly config: ConfigType; @@ -73,6 +75,9 @@ export class SpacesPlugin implements Plugin isSolutionNavEnabled(cloud, cloudExperiments)) @@ -109,6 +114,7 @@ export class SpacesPlugin implements Plugin feature.id); - const knownSolutions = ['classic', 'es', 'oblt', 'security', 'unset']; + const knownSolutions: Array = [ + 'classic', + 'es', + 'oblt', + 'security', + 'unset', + ]; const resp = (await esClient.search({ index: kibanaIndex, diff --git a/x-pack/plugins/spaces/tsconfig.json b/x-pack/plugins/spaces/tsconfig.json index 9f79252873307..e06e3bec498de 100644 --- a/x-pack/plugins/spaces/tsconfig.json +++ b/x-pack/plugins/spaces/tsconfig.json @@ -38,6 +38,7 @@ "@kbn/security-plugin-types-public", "@kbn/cloud-plugin", "@kbn/cloud-experiments-plugin", + "@kbn/core-analytics-browser" ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/stack_connectors/common/gemini/schema.ts b/x-pack/plugins/stack_connectors/common/gemini/schema.ts index 6cccea399e957..543070c705907 100644 --- a/x-pack/plugins/stack_connectors/common/gemini/schema.ts +++ b/x-pack/plugins/stack_connectors/common/gemini/schema.ts @@ -72,6 +72,7 @@ export const InvokeAIRawActionParamsSchema = schema.object({ stopSequences: schema.maybe(schema.arrayOf(schema.string())), signal: schema.maybe(schema.any()), timeout: schema.maybe(schema.number()), + tools: schema.maybe(schema.arrayOf(schema.any())), }); export const InvokeAIActionResponseSchema = schema.object({ diff --git a/x-pack/plugins/stack_connectors/server/connector_types/gemini/gemini.ts b/x-pack/plugins/stack_connectors/server/connector_types/gemini/gemini.ts index 5bf28c830b679..6cb4671b7aeeb 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/gemini/gemini.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/gemini/gemini.ts @@ -299,9 +299,10 @@ export class GeminiConnector extends SubActionConnector { temperature = 0, signal, timeout, + tools, }: InvokeAIRawActionParams): Promise { const res = await this.runApi({ - body: JSON.stringify(formatGeminiPayload(messages, temperature)), + body: JSON.stringify({ ...formatGeminiPayload(messages, temperature), tools }), model, signal, timeout, diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index d03844fbfe1c6..822c1c00f8889 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -834,7 +834,6 @@ "core.euiProgress.valueText": "{value} %", "core.euiQuickSelect.applyButton": "Appliquer", "core.euiQuickSelect.fullDescription": "Actuellement défini sur {timeTense} {timeValue} {timeUnit}.", - "core.euiQuickSelect.legendText": "Sélection rapide d’une plage temporelle", "core.euiQuickSelect.nextLabel": "Fenêtre temporelle suivante", "core.euiQuickSelect.previousLabel": "Fenêtre temporelle précédente", "core.euiQuickSelect.quickSelectTitle": "Sélection rapide", @@ -846,7 +845,6 @@ "core.euiRecentlyUsed.legend": "Plages de dates récemment utilisées", "core.euiRefreshInterval.fullDescriptionOff": "L'actualisation est désactivée, intervalle défini sur {optionValue} {optionText}.", "core.euiRefreshInterval.fullDescriptionOn": "L'actualisation est activée, intervalle défini sur {optionValue} {optionText}.", - "core.euiRefreshInterval.legend": "Actualiser toutes les", "core.euiRelativeTab.dateInputError": "Doit être une plage valide", "core.euiRelativeTab.fullDescription": "L'unité peut être modifiée. Elle est actuellement définie sur {unit}.", "core.euiRelativeTab.numberInputError": "Doit être >= 0.", @@ -32897,14 +32895,9 @@ "xpack.securitySolution.alertCountByRuleByStatus.ruleName": "kibana.alert.rule.name", "xpack.securitySolution.alertCountByRuleByStatus.status": "Statut", "xpack.securitySolution.alertCountByRuleByStatus.tooltipTitle": "Nom de règle", - "xpack.securitySolution.alertDetails.enrichmentQueryEndDate": "Date de fin", - "xpack.securitySolution.alertDetails.enrichmentQueryStartDate": "Date de début", - "xpack.securitySolution.alertDetails.investigationTimeQueryTitle": "Enrichissement avec la Threat Intelligence", - "xpack.securitySolution.alertDetails.noEnrichmentsFoundDescription": "Cette alerte ne s'accompagne pas de Threat Intelligence.", "xpack.securitySolution.alertDetails.overview.hostRiskDataTitle": "Données de risque de {riskEntity}", "xpack.securitySolution.alertDetails.overview.insights.suppressedAlertsCountTechnicalPreview": "Version d'évaluation technique", "xpack.securitySolution.alertDetails.overview.investigationGuide": "Guide d'investigation", - "xpack.securitySolution.alertDetails.refresh": "Actualiser", "xpack.securitySolution.alertDetails.summary.readLess": "Lire moins", "xpack.securitySolution.alertDetails.summary.readMore": "En savoir plus", "xpack.securitySolution.alerts.badge.readOnly.tooltip": "Impossible de mettre à jour les alertes", @@ -33353,8 +33346,6 @@ "xpack.securitySolution.components.chartSelect.chartsOption": "Graphiques", "xpack.securitySolution.components.chartSelect.chartsOptionTitle": "Résumé", "xpack.securitySolution.components.chartSelect.legendTitle": "Sélectionner un onglet", - "xpack.securitySolution.components.chartSelect.selectAChartAriaLabel": "Sélectionner un graphique", - "xpack.securitySolution.components.chartSelect.tableOption": "Tableau", "xpack.securitySolution.components.chartSelect.tableOptionTitle": "Comptes", "xpack.securitySolution.components.chartSelect.treemapOption": "Compartimentage", "xpack.securitySolution.components.chartSelect.trendOption": "Tendance", @@ -33644,12 +33635,6 @@ "xpack.securitySolution.detectionEngine.alerts.alertsByGrouping.sourceLabel": "source", "xpack.securitySolution.detectionEngine.alerts.alertsByGrouping.userNameLabel": "utilisateur", "xpack.securitySolution.detectionEngine.alerts.alertsByType.alertRuleChartTitle": "Alertes par nom", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.alertTypeChartTitle": "Alertes par type", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.detection": "Détection", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.detections": "Détections", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.prevention": "Prévention", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.preventions": "Préventions", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.typeColumn": "Type", "xpack.securitySolution.detectionEngine.alerts.chartsTitle": "Graphiques", "xpack.securitySolution.detectionEngine.alerts.closedAlertFailedToastMessage": "Impossible de fermer l'alerte ou les alertes.", "xpack.securitySolution.detectionEngine.alerts.closedAlertsTitle": "Fermé", @@ -35936,14 +35921,7 @@ "xpack.securitySolution.event.summary.threat_indicator.modal.close": "Fermer", "xpack.securitySolution.event.summary.threat_indicator.showMatches": "Afficher les {count} alertes de correspondance d'indicateur", "xpack.securitySolution.eventDetails.alertReason": "Raison d'alerte", - "xpack.securitySolution.eventDetails.ctiSummary.feedNamePreposition": "de", - "xpack.securitySolution.eventDetails.ctiSummary.indicatorEnrichmentTitle": "Correspondance de menace détectée", - "xpack.securitySolution.eventDetails.ctiSummary.indicatorEnrichmentTooltipContent": "Affiche les correspondances d'indicateur de menace détectées.", - "xpack.securitySolution.eventDetails.ctiSummary.investigationEnrichmentTitle": "Enrichi avec la Threat Intelligence", - "xpack.securitySolution.eventDetails.ctiSummary.investigationEnrichmentTooltipContent": "Affiche des renseignements supplémentaires sur les menaces (Threat Intelligence) concernant l'alerte. La recherche a porté sur les 30 derniers jours par défaut.", "xpack.securitySolution.eventDetails.description": "Description", - "xpack.securitySolution.eventDetails.field": "Champ", - "xpack.securitySolution.eventDetails.filter.placeholder": "Filtre par Champ, Valeur ou Description...", "xpack.securitySolution.eventDetails.multiFieldBadge": "champ multiple", "xpack.securitySolution.eventDetails.multiFieldTooltipContent": "Les champs multiples peuvent avoir plusieurs valeurs.", "xpack.securitySolution.eventDetails.osqueryView": "Résultats Osquery", @@ -35955,7 +35933,6 @@ "xpack.securitySolution.eventDetails.summaryView": "résumé", "xpack.securitySolution.eventDetails.table": "Tableau", "xpack.securitySolution.eventDetails.table.actions": "Actions", - "xpack.securitySolution.eventDetails.value": "Valeur", "xpack.securitySolution.eventFilter.flyoutForm.creationSuccessToastTitle": "\"{name}\" a été ajouté à la liste de filtres d'événements.", "xpack.securitySolution.eventFilter.form.description.placeholder": "Description", "xpack.securitySolution.eventFilter.form.name.error": "Le nom doit être indiqué", @@ -36200,18 +36177,6 @@ "xpack.securitySolution.fieldBrowser.removeButtonDescription": "Supprimer un champ de temps d'exécution", "xpack.securitySolution.fieldBrowser.runtimeLabel": "Temps d'exécution", "xpack.securitySolution.fieldBrowser.runtimeTitle": "Champ de temps d'exécution", - "xpack.securitySolution.fieldNameIcons.booleanAriaLabel": "Champ booléen", - "xpack.securitySolution.fieldNameIcons.conflictFieldAriaLabel": "Champ conflictuel", - "xpack.securitySolution.fieldNameIcons.dateFieldAriaLabel": "Champ de date", - "xpack.securitySolution.fieldNameIcons.geoPointFieldAriaLabel": "Champ de point géographique", - "xpack.securitySolution.fieldNameIcons.geoShapeFieldAriaLabel": "Champ de forme géométrique", - "xpack.securitySolution.fieldNameIcons.ipAddressFieldAriaLabel": "Champ d'adresse IP", - "xpack.securitySolution.fieldNameIcons.murmur3FieldAriaLabel": "Champ Murmur3", - "xpack.securitySolution.fieldNameIcons.nestedFieldAriaLabel": "Champ imbriqué", - "xpack.securitySolution.fieldNameIcons.numberFieldAriaLabel": "Champ numérique", - "xpack.securitySolution.fieldNameIcons.sourceFieldAriaLabel": "Champ source", - "xpack.securitySolution.fieldNameIcons.stringFieldAriaLabel": "Champ de chaîne", - "xpack.securitySolution.fieldNameIcons.unknownFieldAriaLabel": "Champ inconnu", "xpack.securitySolution.fieldRenderers.moreLabel": "Plus", "xpack.securitySolution.filtersGroup.assignees.buttonTitle": "Utilisateurs affectés", "xpack.securitySolution.filtersGroup.assignees.popoverTooltip": "Filtrer par utilisateurs assignés", @@ -36693,7 +36658,6 @@ "xpack.securitySolution.inspect.modal.somethingWentWrongDescription": "Désolé, un problème est survenu.", "xpack.securitySolution.inspectDescription": "Inspecter", "xpack.securitySolution.inspectPatternDifferent": "Cet élément possède un modèle d'indexation unique séparé du paramètre de vue de données.", - "xpack.securitySolution.investigationEnrichment.requestError": "Une erreur est survenue lors de la demande de Threat Intelligence", "xpack.securitySolution.ja3.fingerprint.ja3.fingerprintLabel": "ja3", "xpack.securitySolution.kpiHosts.hosts.title": "Hôtes", "xpack.securitySolution.kpiHosts.uniqueIps.destinationChartLabel": "Dest.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 164857166ae89..c73289d0b156a 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -835,7 +835,6 @@ "core.euiProgress.valueText": "{value}%", "core.euiQuickSelect.applyButton": "適用", "core.euiQuickSelect.fullDescription": "現在 {timeTense} {timeValue} {timeUnit}に設定されています。", - "core.euiQuickSelect.legendText": "時間範囲をすばやく選択", "core.euiQuickSelect.nextLabel": "次の時間ウィンドウ", "core.euiQuickSelect.previousLabel": "前の時間ウィンドウ", "core.euiQuickSelect.quickSelectTitle": "すばやく選択", @@ -847,7 +846,6 @@ "core.euiRecentlyUsed.legend": "最近使用した日付範囲", "core.euiRefreshInterval.fullDescriptionOff": "更新はオフです。間隔は{optionValue} {optionText}に設定されています。", "core.euiRefreshInterval.fullDescriptionOn": "更新はオンです。間隔は{optionValue} {optionText}に設定されています。", - "core.euiRefreshInterval.legend": "以下の感覚ごとに更新", "core.euiRelativeTab.dateInputError": "有効な範囲でなければなりません", "core.euiRelativeTab.fullDescription": "単位は変更可能です。現在 {unit} に設定されています。", "core.euiRelativeTab.numberInputError": "0以上でなければなりません", @@ -32770,14 +32768,9 @@ "xpack.securitySolution.alertCountByRuleByStatus.ruleName": "kibana.alert.rule.name", "xpack.securitySolution.alertCountByRuleByStatus.status": "ステータス", "xpack.securitySolution.alertCountByRuleByStatus.tooltipTitle": "ルール名", - "xpack.securitySolution.alertDetails.enrichmentQueryEndDate": "終了日", - "xpack.securitySolution.alertDetails.enrichmentQueryStartDate": "開始日", - "xpack.securitySolution.alertDetails.investigationTimeQueryTitle": "Threat Intelligenceで拡張", - "xpack.securitySolution.alertDetails.noEnrichmentsFoundDescription": "このアラートには脅威情報は含まれていません。", "xpack.securitySolution.alertDetails.overview.hostRiskDataTitle": "{riskEntity}リスクデータ", "xpack.securitySolution.alertDetails.overview.insights.suppressedAlertsCountTechnicalPreview": "テクニカルプレビュー", "xpack.securitySolution.alertDetails.overview.investigationGuide": "調査ガイド", - "xpack.securitySolution.alertDetails.refresh": "更新", "xpack.securitySolution.alertDetails.summary.readLess": "表示を減らす", "xpack.securitySolution.alertDetails.summary.readMore": "続きを読む", "xpack.securitySolution.alerts.badge.readOnly.tooltip": "アラートを更新できません", @@ -33226,8 +33219,6 @@ "xpack.securitySolution.components.chartSelect.chartsOption": "チャート", "xpack.securitySolution.components.chartSelect.chartsOptionTitle": "まとめ", "xpack.securitySolution.components.chartSelect.legendTitle": "タブを選択", - "xpack.securitySolution.components.chartSelect.selectAChartAriaLabel": "アラートを選択", - "xpack.securitySolution.components.chartSelect.tableOption": "表", "xpack.securitySolution.components.chartSelect.tableOptionTitle": "カウント", "xpack.securitySolution.components.chartSelect.treemapOption": "ツリーマップ", "xpack.securitySolution.components.chartSelect.trendOption": "傾向", @@ -33516,12 +33507,6 @@ "xpack.securitySolution.detectionEngine.alerts.alertsByGrouping.sourceLabel": "ソース", "xpack.securitySolution.detectionEngine.alerts.alertsByGrouping.userNameLabel": "ユーザー", "xpack.securitySolution.detectionEngine.alerts.alertsByType.alertRuleChartTitle": "名前別アラート", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.alertTypeChartTitle": "タイプ別アラート", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.detection": "検知", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.detections": "検出", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.prevention": "防御", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.preventions": "防御", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.typeColumn": "型", "xpack.securitySolution.detectionEngine.alerts.chartsTitle": "チャート", "xpack.securitySolution.detectionEngine.alerts.closedAlertFailedToastMessage": "アラートをクローズできませんでした。", "xpack.securitySolution.detectionEngine.alerts.closedAlertsTitle": "対応済", @@ -35806,14 +35791,7 @@ "xpack.securitySolution.event.summary.threat_indicator.modal.close": "閉じる", "xpack.securitySolution.event.summary.threat_indicator.showMatches": "すべての{count}件のインジケーター一致アラートを表示", "xpack.securitySolution.eventDetails.alertReason": "アラートの理由", - "xpack.securitySolution.eventDetails.ctiSummary.feedNamePreposition": "開始", - "xpack.securitySolution.eventDetails.ctiSummary.indicatorEnrichmentTitle": "脅威一致が検出されました", - "xpack.securitySolution.eventDetails.ctiSummary.indicatorEnrichmentTooltipContent": "利用可能な脅威インジケーターの一致を表示します。", - "xpack.securitySolution.eventDetails.ctiSummary.investigationEnrichmentTitle": "脅威インテリジェンスで強化", - "xpack.securitySolution.eventDetails.ctiSummary.investigationEnrichmentTooltipContent": "アラートに関する追加の脅威インテリジェンスを表示します。デフォルトでは過去30日分が照会されます。", "xpack.securitySolution.eventDetails.description": "説明", - "xpack.securitySolution.eventDetails.field": "フィールド", - "xpack.securitySolution.eventDetails.filter.placeholder": "フィールド、値、または説明でフィルター...", "xpack.securitySolution.eventDetails.multiFieldBadge": "複数フィールド", "xpack.securitySolution.eventDetails.multiFieldTooltipContent": "複数フィールドにはフィールドごとに複数の値を入力できます", "xpack.securitySolution.eventDetails.osqueryView": "Osquery結果", @@ -35825,7 +35803,6 @@ "xpack.securitySolution.eventDetails.summaryView": "まとめ", "xpack.securitySolution.eventDetails.table": "表", "xpack.securitySolution.eventDetails.table.actions": "アクション", - "xpack.securitySolution.eventDetails.value": "値", "xpack.securitySolution.eventFilter.flyoutForm.creationSuccessToastTitle": "\"{name}\"がイベントフィルターリストに追加されました。", "xpack.securitySolution.eventFilter.form.description.placeholder": "説明", "xpack.securitySolution.eventFilter.form.name.error": "名前を空にすることはできません", @@ -36070,18 +36047,6 @@ "xpack.securitySolution.fieldBrowser.removeButtonDescription": "ランタイムフィールドを削除", "xpack.securitySolution.fieldBrowser.runtimeLabel": "ランタイム", "xpack.securitySolution.fieldBrowser.runtimeTitle": "ランタイムフィールド", - "xpack.securitySolution.fieldNameIcons.booleanAriaLabel": "ブールフィールド", - "xpack.securitySolution.fieldNameIcons.conflictFieldAriaLabel": "矛盾フィールド", - "xpack.securitySolution.fieldNameIcons.dateFieldAriaLabel": "日付フィールド", - "xpack.securitySolution.fieldNameIcons.geoPointFieldAriaLabel": "地理ポイントフィールド", - "xpack.securitySolution.fieldNameIcons.geoShapeFieldAriaLabel": "地理情報シェイプフィールド", - "xpack.securitySolution.fieldNameIcons.ipAddressFieldAriaLabel": "IPアドレスフィールド", - "xpack.securitySolution.fieldNameIcons.murmur3FieldAriaLabel": "Murmur3フィールド", - "xpack.securitySolution.fieldNameIcons.nestedFieldAriaLabel": "入れ子フィールド", - "xpack.securitySolution.fieldNameIcons.numberFieldAriaLabel": "数値フィールド", - "xpack.securitySolution.fieldNameIcons.sourceFieldAriaLabel": "ソースフィールド", - "xpack.securitySolution.fieldNameIcons.stringFieldAriaLabel": "文字列フィールド", - "xpack.securitySolution.fieldNameIcons.unknownFieldAriaLabel": "不明なフィールド", "xpack.securitySolution.fieldRenderers.moreLabel": "詳細", "xpack.securitySolution.filtersGroup.assignees.buttonTitle": "担当者", "xpack.securitySolution.filtersGroup.assignees.popoverTooltip": "担当者でフィルター", @@ -36563,7 +36528,6 @@ "xpack.securitySolution.inspect.modal.somethingWentWrongDescription": "申し訳ございませんが、何か問題が発生しました。", "xpack.securitySolution.inspectDescription": "検査", "xpack.securitySolution.inspectPatternDifferent": "この要素には、データビュー設定とは別の固有のインデックスパターンがあります。", - "xpack.securitySolution.investigationEnrichment.requestError": "脅威インテリジェンスの要求中にエラーが発生しました", "xpack.securitySolution.ja3.fingerprint.ja3.fingerprintLabel": "ja3", "xpack.securitySolution.kpiHosts.hosts.title": "ホスト", "xpack.securitySolution.kpiHosts.uniqueIps.destinationChartLabel": "Dest.", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 993db0fa832fc..ca69f57bc25e1 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -836,7 +836,6 @@ "core.euiProgress.valueText": "{value}%", "core.euiQuickSelect.applyButton": "应用", "core.euiQuickSelect.fullDescription": "当前设置为 {timeTense} {timeValue} {timeUnit}。", - "core.euiQuickSelect.legendText": "快选时间范围", "core.euiQuickSelect.nextLabel": "下一时间窗口", "core.euiQuickSelect.previousLabel": "上一时间窗口", "core.euiQuickSelect.quickSelectTitle": "快速选择", @@ -848,7 +847,6 @@ "core.euiRecentlyUsed.legend": "最近使用的日期范围", "core.euiRefreshInterval.fullDescriptionOff": "刷新已关闭,时间间隔设置为 {optionValue} {optionText}。", "core.euiRefreshInterval.fullDescriptionOn": "刷新已打开,时间间隔设置为 {optionValue} {optionText}。", - "core.euiRefreshInterval.legend": "刷新频率", "core.euiRelativeTab.dateInputError": "必须为有效范围", "core.euiRelativeTab.fullDescription": "单位可更改。当前设置为 {unit}。", "core.euiRelativeTab.numberInputError": "必须 >= 0", @@ -32937,14 +32935,9 @@ "xpack.securitySolution.alertCountByRuleByStatus.ruleName": "kibana.alert.rule.name", "xpack.securitySolution.alertCountByRuleByStatus.status": "状态", "xpack.securitySolution.alertCountByRuleByStatus.tooltipTitle": "规则名称", - "xpack.securitySolution.alertDetails.enrichmentQueryEndDate": "结束日期", - "xpack.securitySolution.alertDetails.enrichmentQueryStartDate": "开始日期", - "xpack.securitySolution.alertDetails.investigationTimeQueryTitle": "使用威胁情报扩充", - "xpack.securitySolution.alertDetails.noEnrichmentsFoundDescription": "此告警没有威胁情报。", "xpack.securitySolution.alertDetails.overview.hostRiskDataTitle": "{riskEntity}风险数据", "xpack.securitySolution.alertDetails.overview.insights.suppressedAlertsCountTechnicalPreview": "技术预览", "xpack.securitySolution.alertDetails.overview.investigationGuide": "调查指南", - "xpack.securitySolution.alertDetails.refresh": "刷新", "xpack.securitySolution.alertDetails.summary.readLess": "阅读更少内容", "xpack.securitySolution.alertDetails.summary.readMore": "阅读更多内容", "xpack.securitySolution.alerts.badge.readOnly.tooltip": "无法更新告警", @@ -33393,8 +33386,6 @@ "xpack.securitySolution.components.chartSelect.chartsOption": "图表", "xpack.securitySolution.components.chartSelect.chartsOptionTitle": "摘要", "xpack.securitySolution.components.chartSelect.legendTitle": "选择选项卡", - "xpack.securitySolution.components.chartSelect.selectAChartAriaLabel": "选择图表", - "xpack.securitySolution.components.chartSelect.tableOption": "表", "xpack.securitySolution.components.chartSelect.tableOptionTitle": "计数", "xpack.securitySolution.components.chartSelect.treemapOption": "树状图", "xpack.securitySolution.components.chartSelect.trendOption": "趋势", @@ -33684,12 +33675,6 @@ "xpack.securitySolution.detectionEngine.alerts.alertsByGrouping.sourceLabel": "源", "xpack.securitySolution.detectionEngine.alerts.alertsByGrouping.userNameLabel": "user", "xpack.securitySolution.detectionEngine.alerts.alertsByType.alertRuleChartTitle": "按名称排列的告警", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.alertTypeChartTitle": "按类型排列的告警", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.detection": "检测", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.detections": "检测", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.prevention": "防护", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.preventions": "防护", - "xpack.securitySolution.detectionEngine.alerts.alertsByType.typeColumn": "类型", "xpack.securitySolution.detectionEngine.alerts.chartsTitle": "图表", "xpack.securitySolution.detectionEngine.alerts.closedAlertFailedToastMessage": "无法关闭告警。", "xpack.securitySolution.detectionEngine.alerts.closedAlertsTitle": "已关闭", @@ -35976,14 +35961,7 @@ "xpack.securitySolution.event.summary.threat_indicator.modal.close": "关闭", "xpack.securitySolution.event.summary.threat_indicator.showMatches": "显示所有 {count} 个指标匹配告警", "xpack.securitySolution.eventDetails.alertReason": "告警原因", - "xpack.securitySolution.eventDetails.ctiSummary.feedNamePreposition": "来自", - "xpack.securitySolution.eventDetails.ctiSummary.indicatorEnrichmentTitle": "检测到威胁匹配", - "xpack.securitySolution.eventDetails.ctiSummary.indicatorEnrichmentTooltipContent": "显示可用的威胁指标匹配。", - "xpack.securitySolution.eventDetails.ctiSummary.investigationEnrichmentTitle": "已使用威胁情报扩充", - "xpack.securitySolution.eventDetails.ctiSummary.investigationEnrichmentTooltipContent": "显示该告警的其他威胁情报。默认会查询过去 30 天的数据。", "xpack.securitySolution.eventDetails.description": "描述", - "xpack.securitySolution.eventDetails.field": "字段", - "xpack.securitySolution.eventDetails.filter.placeholder": "按字段、值或描述筛选......", "xpack.securitySolution.eventDetails.multiFieldBadge": "多字段", "xpack.securitySolution.eventDetails.multiFieldTooltipContent": "多字段的每个字段可以有多个值", "xpack.securitySolution.eventDetails.osqueryView": "Osquery 结果", @@ -35995,7 +35973,6 @@ "xpack.securitySolution.eventDetails.summaryView": "摘要", "xpack.securitySolution.eventDetails.table": "表", "xpack.securitySolution.eventDetails.table.actions": "操作", - "xpack.securitySolution.eventDetails.value": "值", "xpack.securitySolution.eventFilter.flyoutForm.creationSuccessToastTitle": "“{name}”已添加到事件筛选列表。", "xpack.securitySolution.eventFilter.form.description.placeholder": "描述", "xpack.securitySolution.eventFilter.form.name.error": "名称不能为空", @@ -36240,18 +36217,6 @@ "xpack.securitySolution.fieldBrowser.removeButtonDescription": "删除运行时字段", "xpack.securitySolution.fieldBrowser.runtimeLabel": "运行时", "xpack.securitySolution.fieldBrowser.runtimeTitle": "运行时字段", - "xpack.securitySolution.fieldNameIcons.booleanAriaLabel": "布尔值字段", - "xpack.securitySolution.fieldNameIcons.conflictFieldAriaLabel": "冲突字段", - "xpack.securitySolution.fieldNameIcons.dateFieldAriaLabel": "日期字段", - "xpack.securitySolution.fieldNameIcons.geoPointFieldAriaLabel": "地理点字段", - "xpack.securitySolution.fieldNameIcons.geoShapeFieldAriaLabel": "几何形状字段", - "xpack.securitySolution.fieldNameIcons.ipAddressFieldAriaLabel": "IP 地址字段", - "xpack.securitySolution.fieldNameIcons.murmur3FieldAriaLabel": "Murmur3 字段", - "xpack.securitySolution.fieldNameIcons.nestedFieldAriaLabel": "嵌套字段", - "xpack.securitySolution.fieldNameIcons.numberFieldAriaLabel": "数字字段", - "xpack.securitySolution.fieldNameIcons.sourceFieldAriaLabel": "源字段", - "xpack.securitySolution.fieldNameIcons.stringFieldAriaLabel": "字符串字段", - "xpack.securitySolution.fieldNameIcons.unknownFieldAriaLabel": "未知字段", "xpack.securitySolution.fieldRenderers.moreLabel": "更多", "xpack.securitySolution.filtersGroup.assignees.buttonTitle": "被分配人", "xpack.securitySolution.filtersGroup.assignees.popoverTooltip": "按被分配人筛选", @@ -36732,7 +36697,6 @@ "xpack.securitySolution.inspect.modal.somethingWentWrongDescription": "抱歉,出现问题。", "xpack.securitySolution.inspectDescription": "检查", "xpack.securitySolution.inspectPatternDifferent": "此元素具有与数据视图设置不同的唯一索引模式。", - "xpack.securitySolution.investigationEnrichment.requestError": "请求威胁情报时发生错误", "xpack.securitySolution.ja3.fingerprint.ja3.fingerprintLabel": "ja3", "xpack.securitySolution.kpiHosts.hosts.title": "主机", "xpack.securitySolution.kpiHosts.uniqueIps.destinationChartLabel": "目标", diff --git a/x-pack/test/api_integration/apis/management/index_management/inference_endpoints.ts b/x-pack/test/api_integration/apis/management/index_management/inference_endpoints.ts index 40dd20104d06e..be28c5b43f7f2 100644 --- a/x-pack/test/api_integration/apis/management/index_management/inference_endpoints.ts +++ b/x-pack/test/api_integration/apis/management/index_management/inference_endpoints.ts @@ -54,9 +54,9 @@ export default function ({ getService }: FtrProviderContext) { expect(inferenceEndpoints).to.be.ok(); expect( inferenceEndpoints.some( - (endpoint: InferenceAPIConfigResponse) => endpoint.inference_id === inferenceId + (endpoint: InferenceAPIConfigResponse) => endpoint.model_id === inferenceId ) - ).to.be(true); + ).to.eql(true, `${inferenceId} not found in the GET _inference/_all response`); }); it('can delete inference endpoint', async () => { log.debug(`Deleting inference endpoint`); diff --git a/x-pack/test/api_integration/apis/metrics_ui/infra.ts b/x-pack/test/api_integration/apis/metrics_ui/infra.ts index f70cd61dc7635..dfb6744a94583 100644 --- a/x-pack/test/api_integration/apis/metrics_ui/infra.ts +++ b/x-pack/test/api_integration/apis/metrics_ui/infra.ts @@ -246,7 +246,7 @@ export default function ({ getService }: FtrProviderContext) { const response = await makeRequest({ invalidBody, expectedHTTPCode: 400 }); expect(normalizeNewLine(response.body.message)).to.be( - '[request body]: Failed to validate: in metrics/0/type: "any" does not match expected type "cpu" | "normalizedLoad1m" | "diskSpaceUsage" | "memory" | "memoryFree" | "rx" | "tx"' + '[request body]: Failed to validate: in metrics/0/type: "any" does not match expected type "cpu" | "normalizedLoad1m" | "diskSpaceUsage" | "memory" | "memoryFree" | "rx" | "tx" | "rxV2" | "txV2"' ); }); diff --git a/x-pack/test/api_integration/services/security_solution_api.gen.ts b/x-pack/test/api_integration/services/security_solution_api.gen.ts index bd66aa39f2f2a..c4f914183b2eb 100644 --- a/x-pack/test/api_integration/services/security_solution_api.gen.ts +++ b/x-pack/test/api_integration/services/security_solution_api.gen.ts @@ -27,15 +27,19 @@ import { BulkDeleteRulesPostRequestBodyInput } from '@kbn/security-solution-plug import { BulkPatchRulesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/bulk_crud/bulk_patch_rules/bulk_patch_rules_route.gen'; import { BulkUpdateRulesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.gen'; import { BulkUpsertAssetCriticalityRecordsRequestBodyInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/asset_criticality/bulk_upload_asset_criticality.gen'; +import { CleanDraftTimelinesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/clean_draft_timelines/clean_draft_timelines_route.gen'; import { CreateAlertsMigrationRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration.gen'; import { CreateAssetCriticalityRecordRequestBodyInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/asset_criticality/create_asset_criticality.gen'; import { CreateRuleRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/crud/create_rule/create_rule_route.gen'; +import { CreateTimelinesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/create_timelines/create_timelines_route.gen'; import { CreateUpdateProtectionUpdatesNoteRequestParamsInput, CreateUpdateProtectionUpdatesNoteRequestBodyInput, } from '@kbn/security-solution-plugin/common/api/endpoint/protection_updates_note/protection_updates_note.gen'; import { DeleteAssetCriticalityRecordRequestQueryInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/asset_criticality/delete_asset_criticality.gen'; +import { DeleteNoteRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/delete_note/delete_note_route.gen'; import { DeleteRuleRequestQueryInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/crud/delete_rule/delete_rule_route.gen'; +import { DeleteTimelinesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/delete_timelines/delete_timelines_route.gen'; import { DeprecatedTriggerRiskScoreCalculationRequestBodyInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/risk_engine/entity_calculation_route.gen'; import { EndpointIsolateRedirectRequestBodyInput } from '@kbn/security-solution-plugin/common/api/endpoint/actions/isolate_route.gen'; import { EndpointUnisolateRedirectRequestBodyInput } from '@kbn/security-solution-plugin/common/api/endpoint/actions/unisolate_route.gen'; @@ -43,16 +47,22 @@ import { ExportRulesRequestQueryInput, ExportRulesRequestBodyInput, } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/export_rules/export_rules_route.gen'; +import { + ExportTimelinesRequestQueryInput, + ExportTimelinesRequestBodyInput, +} from '@kbn/security-solution-plugin/common/api/timeline/export_timelines/export_timelines_route.gen'; import { FinalizeAlertsMigrationRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/signals_migration/finalize_signals_migration/finalize_signals_migration.gen'; import { FindAssetCriticalityRecordsRequestQueryInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/asset_criticality/list_asset_criticality.gen'; import { FindRulesRequestQueryInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/find_rules/find_rules_route.gen'; import { GetAgentPolicySummaryRequestQueryInput } from '@kbn/security-solution-plugin/common/api/endpoint/policy/policy.gen'; import { GetAlertsMigrationStatusRequestQueryInput } from '@kbn/security-solution-plugin/common/api/detection_engine/signals_migration/get_signals_migration_status/get_signals_migration_status.gen'; import { GetAssetCriticalityRecordRequestQueryInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/asset_criticality/get_asset_criticality.gen'; +import { GetDraftTimelinesRequestQueryInput } from '@kbn/security-solution-plugin/common/api/timeline/get_draft_timelines/get_draft_timelines_route.gen'; import { GetEndpointSuggestionsRequestParamsInput, GetEndpointSuggestionsRequestBodyInput, } from '@kbn/security-solution-plugin/common/api/endpoint/suggestions/get_suggestions.gen'; +import { GetNotesRequestQueryInput } from '@kbn/security-solution-plugin/common/api/timeline/get_notes/get_notes_route.gen'; import { GetPolicyResponseRequestQueryInput } from '@kbn/security-solution-plugin/common/api/endpoint/policy/policy.gen'; import { GetProtectionUpdatesNoteRequestParamsInput } from '@kbn/security-solution-plugin/common/api/endpoint/protection_updates_note/protection_updates_note.gen'; import { @@ -63,18 +73,27 @@ import { GetRuleExecutionResultsRequestQueryInput, GetRuleExecutionResultsRequestParamsInput, } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen'; +import { GetTimelineRequestQueryInput } from '@kbn/security-solution-plugin/common/api/timeline/get_timeline/get_timeline_route.gen'; +import { GetTimelinesRequestQueryInput } from '@kbn/security-solution-plugin/common/api/timeline/get_timelines/get_timelines_route.gen'; import { ImportRulesRequestQueryInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen'; +import { ImportTimelinesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/import_timelines/import_timelines_route.gen'; +import { InstallPrepackedTimelinesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/install_prepackaged_timelines/install_prepackaged_timelines_route.gen'; import { InternalCreateAssetCriticalityRecordRequestBodyInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/asset_criticality/internal_create_asset_criticality.gen'; import { InternalDeleteAssetCriticalityRecordRequestQueryInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/asset_criticality/internal_delete_asset_criticality.gen'; import { InternalGetAssetCriticalityRecordRequestQueryInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/asset_criticality/internal_get_asset_criticality.gen'; import { ManageAlertTagsRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/alert_tags/set_alert_tags/set_alert_tags.gen'; import { PatchRuleRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/crud/patch_rule/patch_rule_route.gen'; +import { PatchTimelineRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/patch_timelines/patch_timeline_route.gen'; import { PerformBulkActionRequestQueryInput, PerformBulkActionRequestBodyInput, } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.gen'; +import { PersistFavoriteRouteRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/persist_favorite/persist_favorite_route.gen'; +import { PersistNoteRouteRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/persist_note/persist_note_route.gen'; +import { PersistPinnedEventRouteRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/pinned_events/pinned_events_route.gen'; import { PreviewRiskScoreRequestBodyInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/risk_engine/preview_route.gen'; import { ReadRuleRequestQueryInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/crud/read_rule/read_rule_route.gen'; +import { ResolveTimelineRequestQueryInput } from '@kbn/security-solution-plugin/common/api/timeline/resolve_timeline/resolve_timeline_route.gen'; import { RulePreviewRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_preview/rule_preview.gen'; import { SearchAlertsRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/signals/query_signals/query_signals_route.gen'; import { SetAlertAssigneesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/alert_assignees/set_alert_assignees_route.gen'; @@ -172,6 +191,18 @@ after 30 days. It also deletes other artifacts specific to the migration impleme .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send(props.body as object); }, + /** + * Retrieves a clean draft timeline. If a draft timeline does not exist, it is created and returned. + + */ + cleanDraftTimelines(props: CleanDraftTimelinesProps) { + return supertest + .post('/api/timeline/_draft') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, createAlertsIndex() { return supertest .post('/api/detection_engine/index') @@ -211,6 +242,14 @@ Migrations are initiated per index. While the process is neither destructive nor .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send(props.body as object); }, + createTimelines(props: CreateTimelinesProps) { + return supertest + .post('/api/timeline') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, createUpdateProtectionUpdatesNote(props: CreateUpdateProtectionUpdatesNoteProps) { return supertest .post( @@ -236,6 +275,14 @@ Migrations are initiated per index. While the process is neither destructive nor .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .query(props.query); }, + deleteNote(props: DeleteNoteProps) { + return supertest + .delete('/api/note') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, /** * Delete a detection rule using the `rule_id` or `id` field. */ @@ -247,6 +294,14 @@ Migrations are initiated per index. While the process is neither destructive nor .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .query(props.query); }, + deleteTimelines(props: DeleteTimelinesProps) { + return supertest + .delete('/api/timeline') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, /** * Calculates and persists Risk Scores for an entity, returning the calculated risk score. */ @@ -305,6 +360,15 @@ Migrations are initiated per index. While the process is neither destructive nor .send(props.body as object) .query(props.query); }, + exportTimelines(props: ExportTimelinesProps) { + return supertest + .post('/api/timeline/_export') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object) + .query(props.query); + }, /** * Finalize successful migrations of detection alerts. This replaces the original index's alias with the successfully migrated index's alias. The endpoint is idempotent; therefore, it can safely be used to poll a given migration and, upon completion, @@ -379,6 +443,14 @@ finalize it. .set(ELASTIC_HTTP_VERSION_HEADER, '1') .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana'); }, + getDraftTimelines(props: GetDraftTimelinesProps) { + return supertest + .get('/api/timeline/_draft') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .query(props.query); + }, getEndpointSuggestions(props: GetEndpointSuggestionsProps) { return supertest .post(replaceParams('/api/endpoint/suggestions/{suggestion_type}', props.params)) @@ -387,6 +459,17 @@ finalize it. .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send(props.body as object); }, + /** + * Gets notes + */ + getNotes(props: GetNotesProps) { + return supertest + .get('/api/note') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .query(props.query); + }, getPolicyResponse(props: GetPolicyResponseProps) { return supertest .get('/api/endpoint/policy_response') @@ -458,6 +541,22 @@ detection engine rules. .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .query(props.query); }, + getTimeline(props: GetTimelineProps) { + return supertest + .get('/api/timeline') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .query(props.query); + }, + getTimelines(props: GetTimelinesProps) { + return supertest + .get('/api/timelines') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .query(props.query); + }, /** * Import detection rules from an `.ndjson` file, including actions and exception lists. The request must include: - The `Content-Type: multipart/form-data` HTTP header. @@ -472,6 +571,14 @@ detection engine rules. .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .query(props.query); }, + importTimelines(props: ImportTimelinesProps) { + return supertest + .post('/api/timeline/_import') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, /** * Initializes the Risk Engine by creating the necessary indices and mappings, removing old transforms, and starting the new risk engine */ @@ -492,6 +599,14 @@ detection engine rules. .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana'); }, + installPrepackedTimelines(props: InstallPrepackedTimelinesProps) { + return supertest + .post('/api/timeline/_prepackaged') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, internalCreateAssetCriticalityRecord(props: InternalCreateAssetCriticalityRecordProps) { return supertest .post('/internal/asset_criticality') @@ -548,6 +663,17 @@ detection engine rules. .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send(props.body as object); }, + /** + * Updates an existing timeline. This API is used to update the title, description, date range, pinned events, pinned queries, and/or pinned saved queries of an existing timeline. + */ + patchTimeline(props: PatchTimelineProps) { + return supertest + .patch('/api/timeline') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, /** * Apply a bulk action, such as bulk edit, duplicate, or delete, to multiple detection rules. The bulk action is applied to all rules that match the query or to the rules listed by their IDs. */ @@ -560,6 +686,30 @@ detection engine rules. .send(props.body as object) .query(props.query); }, + persistFavoriteRoute(props: PersistFavoriteRouteProps) { + return supertest + .patch('/api/timeline/_favorite') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, + persistNoteRoute(props: PersistNoteRouteProps) { + return supertest + .patch('/api/note') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, + persistPinnedEventRoute(props: PersistPinnedEventRouteProps) { + return supertest + .patch('/api/pinned_event') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, /** * Calculates and returns a list of Risk Scores, sorted by identifier_type and risk score. */ @@ -599,6 +749,14 @@ detection engine rules. .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana'); }, + resolveTimeline(props: ResolveTimelineProps) { + return supertest + .get('/api/timeline/resolve') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .query(props.query); + }, rulePreview(props: RulePreviewProps) { return supertest .post('/api/detection_engine/rules/preview') @@ -710,6 +868,9 @@ export interface BulkUpdateRulesProps { export interface BulkUpsertAssetCriticalityRecordsProps { body: BulkUpsertAssetCriticalityRecordsRequestBodyInput; } +export interface CleanDraftTimelinesProps { + body: CleanDraftTimelinesRequestBodyInput; +} export interface CreateAlertsMigrationProps { body: CreateAlertsMigrationRequestBodyInput; } @@ -719,6 +880,9 @@ export interface CreateAssetCriticalityRecordProps { export interface CreateRuleProps { body: CreateRuleRequestBodyInput; } +export interface CreateTimelinesProps { + body: CreateTimelinesRequestBodyInput; +} export interface CreateUpdateProtectionUpdatesNoteProps { params: CreateUpdateProtectionUpdatesNoteRequestParamsInput; body: CreateUpdateProtectionUpdatesNoteRequestBodyInput; @@ -726,9 +890,15 @@ export interface CreateUpdateProtectionUpdatesNoteProps { export interface DeleteAssetCriticalityRecordProps { query: DeleteAssetCriticalityRecordRequestQueryInput; } +export interface DeleteNoteProps { + body: DeleteNoteRequestBodyInput; +} export interface DeleteRuleProps { query: DeleteRuleRequestQueryInput; } +export interface DeleteTimelinesProps { + body: DeleteTimelinesRequestBodyInput; +} export interface DeprecatedTriggerRiskScoreCalculationProps { body: DeprecatedTriggerRiskScoreCalculationRequestBodyInput; } @@ -742,6 +912,10 @@ export interface ExportRulesProps { query: ExportRulesRequestQueryInput; body: ExportRulesRequestBodyInput; } +export interface ExportTimelinesProps { + query: ExportTimelinesRequestQueryInput; + body: ExportTimelinesRequestBodyInput; +} export interface FinalizeAlertsMigrationProps { body: FinalizeAlertsMigrationRequestBodyInput; } @@ -760,10 +934,16 @@ export interface GetAlertsMigrationStatusProps { export interface GetAssetCriticalityRecordProps { query: GetAssetCriticalityRecordRequestQueryInput; } +export interface GetDraftTimelinesProps { + query: GetDraftTimelinesRequestQueryInput; +} export interface GetEndpointSuggestionsProps { params: GetEndpointSuggestionsRequestParamsInput; body: GetEndpointSuggestionsRequestBodyInput; } +export interface GetNotesProps { + query: GetNotesRequestQueryInput; +} export interface GetPolicyResponseProps { query: GetPolicyResponseRequestQueryInput; } @@ -778,9 +958,21 @@ export interface GetRuleExecutionResultsProps { query: GetRuleExecutionResultsRequestQueryInput; params: GetRuleExecutionResultsRequestParamsInput; } +export interface GetTimelineProps { + query: GetTimelineRequestQueryInput; +} +export interface GetTimelinesProps { + query: GetTimelinesRequestQueryInput; +} export interface ImportRulesProps { query: ImportRulesRequestQueryInput; } +export interface ImportTimelinesProps { + body: ImportTimelinesRequestBodyInput; +} +export interface InstallPrepackedTimelinesProps { + body: InstallPrepackedTimelinesRequestBodyInput; +} export interface InternalCreateAssetCriticalityRecordProps { body: InternalCreateAssetCriticalityRecordRequestBodyInput; } @@ -796,16 +988,31 @@ export interface ManageAlertTagsProps { export interface PatchRuleProps { body: PatchRuleRequestBodyInput; } +export interface PatchTimelineProps { + body: PatchTimelineRequestBodyInput; +} export interface PerformBulkActionProps { query: PerformBulkActionRequestQueryInput; body: PerformBulkActionRequestBodyInput; } +export interface PersistFavoriteRouteProps { + body: PersistFavoriteRouteRequestBodyInput; +} +export interface PersistNoteRouteProps { + body: PersistNoteRouteRequestBodyInput; +} +export interface PersistPinnedEventRouteProps { + body: PersistPinnedEventRouteRequestBodyInput; +} export interface PreviewRiskScoreProps { body: PreviewRiskScoreRequestBodyInput; } export interface ReadRuleProps { query: ReadRuleRequestQueryInput; } +export interface ResolveTimelineProps { + query: ResolveTimelineRequestQueryInput; +} export interface RulePreviewProps { body: RulePreviewRequestBodyInput; } diff --git a/x-pack/test/fleet_api_integration/apis/epm/final_pipeline.ts b/x-pack/test/fleet_api_integration/apis/epm/final_pipeline.ts index e5cf4c241767a..157e0178f0ca4 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/final_pipeline.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/final_pipeline.ts @@ -34,8 +34,7 @@ export default function (providerContext: FtrProviderContext) { .expect(201); } - // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/180071 - describe.skip('fleet_final_pipeline', () => { + describe('fleet_final_pipeline', () => { skipIfNoDockerRegistry(providerContext); before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); @@ -157,9 +156,7 @@ export default function (providerContext: FtrProviderContext) { body: { message: 'message-test-1', event: { - original: { - foo: 'bar', - }, + original: JSON.stringify({ foo: 'bar' }), }, '@timestamp': '2023-01-01T09:00:00', tags: [], @@ -185,9 +182,7 @@ export default function (providerContext: FtrProviderContext) { body: { message: 'message-test-1', event: { - original: { - foo: 'bar', - }, + original: JSON.stringify({ foo: 'bar' }), }, '@timestamp': '2023-01-01T09:00:00', tags: ['preserve_original_event'], @@ -204,7 +199,7 @@ export default function (providerContext: FtrProviderContext) { const event = doc._source.event; - expect(event.original).to.eql({ foo: 'bar' }); + expect(event.original).to.eql(JSON.stringify({ foo: 'bar' })); }); const scenarios = [ diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_hidden_datastreams.ts b/x-pack/test/fleet_api_integration/apis/epm/install_hidden_datastreams.ts index ca971aa006954..45a80bfa88456 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/install_hidden_datastreams.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/install_hidden_datastreams.ts @@ -19,8 +19,7 @@ export default function (providerContext: FtrProviderContext) { await supertest.delete(`/api/fleet/epm/packages/${name}/${version}`).set('kbn-xsrf', 'xxxx'); }; - // Failing: See https://github.com/elastic/kibana/issues/184310 - describe.skip('installing with hidden datastream', async () => { + describe('installing with hidden datastream', async () => { skipIfNoDockerRegistry(providerContext); setupFleetAndAgents(providerContext); @@ -28,74 +27,6 @@ export default function (providerContext: FtrProviderContext) { await deletePackage('apm', '8.8.0'); }); - it('should rollover hidden datastreams when failed to update mappings', async function () { - await supertest - .post(`/api/fleet/epm/packages/apm/8.7.0`) - .set('kbn-xsrf', 'xxxx') - .send({ force: true }) - .expect(200); - - const writeDoc = () => - es.index({ - refresh: true, - index: 'metrics-apm.service_summary.10m-default', - document: { - '@timestamp': '2023-05-30T07:50:00.000Z', - agent: { - name: 'go', - }, - data_stream: { - dataset: 'apm.service_summary.10m', - namespace: 'default', - type: 'metrics', - }, - ecs: { - version: '8.6.0-dev', - }, - event: { - agent_id_status: 'missing', - ingested: '2023-05-30T07:57:12Z', - }, - metricset: { - interval: '10m', - name: 'service_summary', - }, - observer: { - hostname: '047e282994fb', - type: 'apm-server', - version: '8.7.0', - }, - processor: { - event: 'metric', - name: 'metric', - }, - service: { - language: { - name: 'go', - }, - name: '___main_elastic_cloud_87_ilm_fix', - }, - }, - }); - - await writeDoc(); - - await supertest - .post(`/api/fleet/epm/packages/apm/8.8.0`) - .set('kbn-xsrf', 'xxxx') - .send({ force: true }) - .expect(200); - - // Rollover are lazy need to write a new doc - await writeDoc(); - const ds = await es.indices.get({ - index: 'metrics-apm.service_summary*', - expand_wildcards: ['open', 'hidden'], - }); - // datastream rolled over - expect(Object.keys(ds).length).greaterThan(1); - }); - it('should not rollover datastreams when successfully updated mappings', async function () { await supertest .post(`/api/fleet/epm/packages/apm/8.8.0`) diff --git a/x-pack/test/fleet_functional/apps/home/welcome.ts b/x-pack/test/fleet_functional/apps/home/welcome.ts index 3cc187769d06b..6bffd88168d22 100644 --- a/x-pack/test/fleet_functional/apps/home/welcome.ts +++ b/x-pack/test/fleet_functional/apps/home/welcome.ts @@ -11,11 +11,10 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); const esArchiver = getService('esArchiver'); - const PageObjects = getPageObjects(['common', 'home']); + const PageObjects = getPageObjects(['common', 'home', 'header']); const kibanaServer = getService('kibanaServer'); - // FLAKY: https://github.com/elastic/kibana/issues/109017 - describe.skip('Welcome interstitial', () => { + describe('Welcome interstitial', () => { before(async () => { // Need to navigate to page first to clear storage before test can be run await PageObjects.common.navigateToUrl('home', undefined); @@ -33,6 +32,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // Reload the home screen and verify the interstitial is displayed await PageObjects.common.navigateToUrl('home', undefined, { disableWelcomePrompt: false }); + await PageObjects.header.waitUntilLoadingHasFinished(); + expect(await PageObjects.home.isWelcomeInterstitialDisplayed()).to.be(true); }); diff --git a/x-pack/test/functional/apps/infra/home_page.ts b/x-pack/test/functional/apps/infra/home_page.ts index 7751359ac30fd..17781fa2cd836 100644 --- a/x-pack/test/functional/apps/infra/home_page.ts +++ b/x-pack/test/functional/apps/infra/home_page.ts @@ -573,8 +573,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { 'system.core.steal.pct', 'system.cpu.nice.pct', 'system.cpu.idle.pct', - 'system.cpu.iowait.pct', - 'system.cpu.irq.pct', ]; for (const field of fields) { diff --git a/x-pack/test/functional/apps/infra/hosts_view.ts b/x-pack/test/functional/apps/infra/hosts_view.ts index 8af7d9fc23dc3..6578a7911bf03 100644 --- a/x-pack/test/functional/apps/infra/hosts_view.ts +++ b/x-pack/test/functional/apps/infra/hosts_view.ts @@ -560,6 +560,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('should have an option to open the chart in lens', async () => { await retry.try(async () => { await pageObjects.infraHostsView.clickAndValidateMetricChartActionOptions(); + await browser.pressKeys(browser.keys.ESCAPE); }); }); }); diff --git a/x-pack/test/functional/apps/spaces/index.ts b/x-pack/test/functional/apps/spaces/index.ts index aa034f4be012b..3fe77a1a4528b 100644 --- a/x-pack/test/functional/apps/spaces/index.ts +++ b/x-pack/test/functional/apps/spaces/index.ts @@ -14,5 +14,6 @@ export default function spacesApp({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./spaces_selection')); loadTestFile(require.resolve('./enter_space')); loadTestFile(require.resolve('./create_edit_space')); + loadTestFile(require.resolve('./spaces_grid')); }); } diff --git a/x-pack/test/functional/apps/spaces/spaces_grid.ts b/x-pack/test/functional/apps/spaces/spaces_grid.ts new file mode 100644 index 0000000000000..62363802db98a --- /dev/null +++ b/x-pack/test/functional/apps/spaces/spaces_grid.ts @@ -0,0 +1,47 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function enterSpaceFunctionalTests({ + getService, + getPageObjects, +}: FtrProviderContext) { + const kibanaServer = getService('kibanaServer'); + const PageObjects = getPageObjects(['security', 'spaceSelector', 'common']); + const spacesService = getService('spaces'); + const testSubjects = getService('testSubjects'); + + const anotherSpace = { + id: 'space2', + name: 'space2', + disabledFeatures: [], + }; + + describe('Spaces grid', function () { + before(async () => { + await spacesService.create(anotherSpace); + + await PageObjects.common.navigateToApp('spacesManagement'); + await testSubjects.existOrFail('spaces-grid-page'); + }); + + after(async () => { + await spacesService.delete('another-space'); + await kibanaServer.savedObjects.cleanStandardList(); + }); + + it('can switch to a space from the row in the grid', async () => { + // use the "current" badge confirm that Default is the current space + await testSubjects.existOrFail('spacesListCurrentBadge-default'); + // click the switch button of "another space" + await PageObjects.spaceSelector.clickSwitchSpaceButton('space2'); + // use the "current" badge confirm that "Another Space" is now the current space + await testSubjects.existOrFail('spacesListCurrentBadge-space2'); + }); + }); +} diff --git a/x-pack/test/functional/config.base.js b/x-pack/test/functional/config.base.js index 834aee5fbaa8c..56ecbef55759f 100644 --- a/x-pack/test/functional/config.base.js +++ b/x-pack/test/functional/config.base.js @@ -146,6 +146,9 @@ export default async function ({ readConfigFile }) { snapshotRestore: { pathname: '/app/management/data/snapshot_restore', }, + spacesManagement: { + pathname: '/app/management/kibana/spaces', + }, remoteClusters: { pathname: '/app/management/data/remote_clusters', }, diff --git a/x-pack/test/functional/page_objects/dataset_quality.ts b/x-pack/test/functional/page_objects/dataset_quality.ts index 7f918ce3ba76f..b2d07161ddbaa 100644 --- a/x-pack/test/functional/page_objects/dataset_quality.ts +++ b/x-pack/test/functional/page_objects/dataset_quality.ts @@ -79,7 +79,7 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv datasetSearchInput: '[placeholder="Filter data sets"]', showFullDatasetNamesSwitch: 'button[aria-label="Show full data set names"]', showInactiveDatasetsNamesSwitch: 'button[aria-label="Show inactive data sets"]', - superDatePickerApplyButton: '.euiQuickSelect__applyButton', + superDatePickerApplyButton: '[data-test-subj="superDatePickerQuickSelectApplyButton"]', }; const testSubjectSelectors = { diff --git a/x-pack/test/functional/page_objects/infra_hosts_view.ts b/x-pack/test/functional/page_objects/infra_hosts_view.ts index 18407b72da412..e302057d5c3ec 100644 --- a/x-pack/test/functional/page_objects/infra_hosts_view.ts +++ b/x-pack/test/functional/page_objects/infra_hosts_view.ts @@ -129,8 +129,6 @@ export function InfraHostsViewProvider({ getService }: FtrProviderContext) { const button = await element.findByTestSubject('embeddablePanelToggleMenuIcon'); await button.click(); await testSubjects.existOrFail('embeddablePanelAction-openInLens'); - // forces the modal to close - await element.click(); }, // KPIs diff --git a/x-pack/test/functional/page_objects/space_selector_page.ts b/x-pack/test/functional/page_objects/space_selector_page.ts index a9bea52bcd2e8..ea9a7948410f3 100644 --- a/x-pack/test/functional/page_objects/space_selector_page.ts +++ b/x-pack/test/functional/page_objects/space_selector_page.ts @@ -212,7 +212,21 @@ export class SpaceSelectorPageObject extends FtrService { await this.testSubjects.setValue('descriptionSpaceText', descriptionSpace); } + async clickSwitchSpaceButton(spaceName: string) { + const collapsedButtonSelector = '[data-test-subj=euiCollapsedItemActionsButton]'; + // open context menu + await this.find.clickByCssSelector(`#${spaceName}-actions ${collapsedButtonSelector}`); + // click context menu item + await this.find.clickByCssSelector( + `.euiContextMenuItem[data-test-subj="${spaceName}-switchSpace"]` // can not use testSubj: multiple elements exist with the same data-test-subj + ); + } + async clickOnDeleteSpaceButton(spaceName: string) { + const collapsedButtonSelector = '[data-test-subj=euiCollapsedItemActionsButton]'; + // open context menu + await this.find.clickByCssSelector(`#${spaceName}-actions ${collapsedButtonSelector}`); + // click context menu item await this.testSubjects.click(`${spaceName}-deleteSpace`); } diff --git a/x-pack/test/functional/services/transform/date_picker.ts b/x-pack/test/functional/services/transform/date_picker.ts index 8752a398c2276..3da0c88fce6b7 100644 --- a/x-pack/test/functional/services/transform/date_picker.ts +++ b/x-pack/test/functional/services/transform/date_picker.ts @@ -37,7 +37,9 @@ export function TransformDatePickerProvider({ getService, getPageObjects }: FtrP await find.selectValue(`[aria-label*="Time unit"]`, timeUnit); // Apply - const applyButton = await quickMenuElement.findByClassName('euiQuickSelect__applyButton'); + const applyButton = await quickMenuElement.findByTestSubject( + 'superDatePickerQuickSelectApplyButton' + ); const actualApplyButtonText = await applyButton.getVisibleText(); expect(actualApplyButtonText).to.be('Apply'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts index 71dd0387a6451..bf0bbea5ad6d9 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts @@ -13,7 +13,7 @@ import { THREAT_DETAILS_VIEW, INDICATOR_MATCH_ENRICHMENT_SECTION, INVESTIGATION_TIME_ENRICHMENT_SECTION, - THREAT_DETAILS_ACCORDION, + ENRICHMENT_SECTION_BUTTON_CONTENT, } from '../../../../../screens/alerts_details'; import { TIMELINE_FIELD } from '../../../../../screens/rule_details'; import { expandFirstAlert, setEnrichmentDates } from '../../../../../tasks/alerts'; @@ -163,36 +163,39 @@ describe('Threat Match Enrichment', { tags: ['@ess', '@serverless', '@skipInServ }); it('Displays matched fields from both indicator match rules and investigation time enrichments on Threat Intel tab', () => { + expandFirstAlert(); + expandDocumentDetailsExpandableFlyoutLeftSection(); + openInsightsTab(); + openThreatIntelligenceTab(); + setEnrichmentDates('08/05/2018 10:00 AM'); + const indicatorMatchRuleEnrichment = { field: 'myhash.mysha256', value: 'a04ac6d98ad989312783d4fe3456c53730b212c79a426fb215708b6c6daa3de3', feedName: 'AbuseCH malware', }; + cy.get(`${INDICATOR_MATCH_ENRICHMENT_SECTION}`).within(() => { + cy.get(`${ENRICHMENT_SECTION_BUTTON_CONTENT}`) + .should('exist') + .should( + 'have.text', + `${indicatorMatchRuleEnrichment.field} ${indicatorMatchRuleEnrichment.value} from ${indicatorMatchRuleEnrichment.feedName}` + ); + }); + const investigationTimeEnrichment = { field: 'source.ip', value: '192.168.1.1', feedName: 'feed_name', }; - - expandFirstAlert(); - expandDocumentDetailsExpandableFlyoutLeftSection(); - openInsightsTab(); - openThreatIntelligenceTab(); - setEnrichmentDates('08/05/2018 10:00 AM'); - - cy.get(`${INDICATOR_MATCH_ENRICHMENT_SECTION} ${THREAT_DETAILS_ACCORDION}`) - .should('exist') - .should( - 'have.text', - `${indicatorMatchRuleEnrichment.field} ${indicatorMatchRuleEnrichment.value} from ${indicatorMatchRuleEnrichment.feedName}` - ); - - cy.get(`${INVESTIGATION_TIME_ENRICHMENT_SECTION} ${THREAT_DETAILS_ACCORDION}`) - .should('exist') - .should( - 'have.text', - `${investigationTimeEnrichment.field} ${investigationTimeEnrichment.value} from ${investigationTimeEnrichment.feedName}` - ); + cy.get(`${INVESTIGATION_TIME_ENRICHMENT_SECTION}`).within(() => { + cy.get(`${ENRICHMENT_SECTION_BUTTON_CONTENT}`) + .should('exist') + .should( + 'have.text', + `${investigationTimeEnrichment.field} ${investigationTimeEnrichment.value} from ${investigationTimeEnrichment.feedName}` + ); + }); }); }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/screens/alerts_details.ts b/x-pack/test/security_solution_cypress/cypress/screens/alerts_details.ts index 6f9ee7b4aea77..bbae387497af7 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/alerts_details.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/alerts_details.ts @@ -5,11 +5,8 @@ * 2.0. */ -export const ALERT_FLYOUT = '[data-test-subj="timeline:details-panel:flyout"]'; - -export const CELL_TEXT = '.euiText'; - -export const ENRICHMENT_QUERY_RANGE_PICKER = '[data-test-subj="enrichment-query-range-picker"]'; +export const ENRICHMENT_QUERY_RANGE_PICKER = + '[data-test-subj="securitySolutionFlyoutThreatIntelligenceDetailsEnrichmentRangePicker"]'; export const ENRICHMENT_QUERY_START_INPUT = '.start-picker'; @@ -17,42 +14,34 @@ export const ENRICHMENT_QUERY_END_INPUT = '.end-picker'; export const FILTER_INPUT = '[data-test-subj="eventDetails"] .euiFieldSearch'; -export const INDICATOR_MATCH_ENRICHMENT_SECTION = '[data-test-subj="threat-match-detected"]'; +export const INDICATOR_MATCH_ENRICHMENT_SECTION = + '[data-test-subj="securitySolutionFlyoutThreatIntelligenceDetailsThreatMatchDetected"]'; export const INVESTIGATION_TIME_ENRICHMENT_SECTION = - '[data-test-subj="enriched-with-threat-intel"]'; + '[data-test-subj="securitySolutionFlyoutThreatIntelligenceDetailsEnrichedWithThreatIntel"]'; -export const JSON_VIEW_TAB = '[data-test-subj="jsonViewTab"]'; +export const ENRICHMENT_SECTION_BUTTON_CONTENT = + '[data-test-subj="securitySolutionFlyoutThreatIntelligenceDetailsEnrichmentButtonContent"]'; -export const JSON_TEXT = '[data-test-subj="kibanaCodeEditor"]'; - -export const OVERVIEW_RULE = '[data-test-subj="eventDetails"] [data-test-subj="ruleName"]'; +export const JSON_VIEW_TAB = '[data-test-subj="jsonViewTab"]'; export const OVERVIEW_STATUS = '[data-test-subj="eventDetails"] [data-test-subj="alertStatus"]'; export const EVENT_DETAILS_ALERT_STATUS_POPOVER = '[data-test-subj="event-details-alertStatusPopover"]'; -export const SUMMARY_VIEW = '[data-test-subj="summary-view"]'; - export const TABLE_CELL = '.euiTableRowCell'; export const CELL_EXPAND_VALUE = '[data-test-subj="euiDataGridCellExpandButton"]'; export const TABLE_TAB = '[data-test-subj="tableTab"]'; -export const TABLE_CONTAINER = '[data-test-subj="event-fields-browser"]'; - export const TABLE_ROWS = '.euiTableRow'; -export const THREAT_DETAILS_ACCORDION = '.euiAccordion__triggerWrapper'; - -export const THREAT_DETAILS_VIEW = '[data-test-subj="threat-details-view-0"]'; +export const THREAT_DETAILS_VIEW = + '[data-test-subj="securitySolutionFlyoutThreatIntelligenceDetailsEnrichmentAccordionTable-0"]'; -export const THREAT_INTEL_TAB = '[data-test-subj="threatIntelTab"]'; - -export const UPDATE_ENRICHMENT_RANGE_BUTTON = '[data-test-subj="enrichment-button"]'; +export const UPDATE_ENRICHMENT_RANGE_BUTTON = + '[data-test-subj="securitySolutionFlyoutThreatIntelligenceDetailsEnrichmentRefreshButton"]'; export const ENRICHED_DATA_ROW = `[data-test-subj='EnrichedDataRow']`; - -export const COPY_ALERT_FLYOUT_LINK = `[data-test-subj="copy-alert-flyout-link"]`; diff --git a/x-pack/test/security_solution_cypress/cypress/screens/expandable_flyout/alert_details_right_panel_table_tab.ts b/x-pack/test/security_solution_cypress/cypress/screens/expandable_flyout/alert_details_right_panel_table_tab.ts index 3a0eec9391437..24065985f377f 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/expandable_flyout/alert_details_right_panel_table_tab.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/expandable_flyout/alert_details_right_panel_table_tab.ts @@ -5,22 +5,23 @@ * 2.0. */ -import { getClassSelector, getDataTestSubjectSelector } from '../../helpers/common'; +import { getDataTestSubjectSelector } from '../../helpers/common'; -export const DOCUMENT_DETAILS_FLYOUT_TABLE_TAB_FILTER = getClassSelector('euiFieldSearch'); +export const DOCUMENT_DETAILS_FLYOUT_TABLE_TAB_FILTER = getDataTestSubjectSelector( + 'securitySolutionFlyoutDocumentTableSearchInput' +); export const DOCUMENT_DETAILS_FLYOUT_TABLE_TAB_TIMESTAMP_ROW = getDataTestSubjectSelector( - 'event-fields-table-row-@timestamp' + 'flyout-table-row-@timestamp' ); export const DOCUMENT_DETAILS_FLYOUT_TABLE_TAB_TIMESTAMP_CELL = getDataTestSubjectSelector('event-field-@timestamp'); -export const DOCUMENT_DETAILS_FLYOUT_TABLE_TAB_ID_ROW = getDataTestSubjectSelector( - 'event-fields-table-row-_id' -); +export const DOCUMENT_DETAILS_FLYOUT_TABLE_TAB_ID_ROW = + getDataTestSubjectSelector('flyout-table-row-_id'); export const DOCUMENT_DETAILS_FLYOUT_TABLE_TAB_HOST_OS_BUILD_ROW = getDataTestSubjectSelector( - 'event-fields-table-row-host.os.build' + 'flyout-table-row-host.os.build' ); export const DOCUMENT_DETAILS_FLYOUT_TABLE_TAB_THREAT_ENRICHMENTS = getDataTestSubjectSelector( - 'event-fields-table-row-threat.enrichments' + 'flyout-table-row-threat.enrichments' ); const DOCUMENT_DETAILS_FLYOUT_TABLE_TAB_ROW_CELL_ACTIONS = 'actionItem-security-detailsFlyout-cellActions-'; diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts b/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts index 2a3038b090240..abd405e1d6c73 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts @@ -60,7 +60,6 @@ import { ENRICHMENT_QUERY_END_INPUT, ENRICHMENT_QUERY_RANGE_PICKER, ENRICHMENT_QUERY_START_INPUT, - THREAT_INTEL_TAB, CELL_EXPAND_VALUE, } from '../screens/alerts_details'; import { FIELD_INPUT } from '../screens/exceptions'; @@ -154,8 +153,6 @@ export const hideMessageTooltip = () => { export const closeAlertFlyout = () => cy.get(CLOSE_FLYOUT).click(); -export const viewThreatIntelTab = () => cy.get(THREAT_INTEL_TAB).click(); - export const setEnrichmentDates = (from?: string, to?: string) => { cy.get(ENRICHMENT_QUERY_RANGE_PICKER).within(() => { if (from) { diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts index 67609fec40c93..c2b21e5c9cd83 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts @@ -65,9 +65,9 @@ export default function ({ getService }: FtrProviderContext) { expect(inferenceEndpoints).to.be.ok(); expect( inferenceEndpoints.some( - (endpoint: InferenceAPIConfigResponse) => endpoint.inference_id === inferenceId + (endpoint: InferenceAPIConfigResponse) => endpoint.model_id === inferenceId ) - ).to.be(true); + ).to.eql(true, `${inferenceId} not found in the GET _inference/_all response`); }); it('can delete inference endpoint', async () => { log.debug(`Deleting inference endpoint`); diff --git a/yarn.lock b/yarn.lock index 7bf39bf8ed4c6..770ba1f29e2f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1767,10 +1767,10 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui@95.4.0": - version "95.4.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-95.4.0.tgz#57ac111c2a3e8125db244928a95787bbb2f318c8" - integrity sha512-UXmn+xgJj4pwq6MV7xMjM79GN+taTv7LBfrtRfurGwhkmvXJrOjMXWq+mfR8rU44lOS2R4AwzH5gcCBjAafLsA== +"@elastic/eui@95.5.0": + version "95.5.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-95.5.0.tgz#a138a17279b06cd076bd400f246ef377afe44453" + integrity sha512-znXhppkr8UNuppxNFu1IGHq3Q8EfMBDtXTYXU/JK5ELgGz0Rd8Syhaw3TJSBoiwufATcmSrFbXCF2grXbY07Kw== dependencies: "@hello-pangea/dnd" "^16.6.0" "@types/lodash" "^4.14.202" @@ -3452,6 +3452,10 @@ version "0.0.0" uid "" +"@kbn/apm-types@link:packages/kbn-apm-types": + version "0.0.0" + uid "" + "@kbn/apm-utils@link:packages/kbn-apm-utils": version "0.0.0" uid "" @@ -7121,16 +7125,16 @@ zod "^3.22.3" zod-to-json-schema "^3.22.5" -"@langchain/core@>0.1.0 <0.3.0", "@langchain/core@>=0.2.11 <0.3.0", "@langchain/core@>=0.2.16 <0.3.0", "@langchain/core@>=0.2.5 <0.3.0", "@langchain/core@^0.2.17", "@langchain/core@~0.2.11": - version "0.2.17" - resolved "https://registry.yarnpkg.com/@langchain/core/-/core-0.2.17.tgz#dfd44a2ccf79cef88ba765741a1c277bc22e483f" - integrity sha512-WnFiZ7R/ZUVeHO2IgcSL7Tu+CjApa26Iy99THJP5fax/NF8UQCc/ZRcw2Sb/RUuRPVm6ALDass0fSQE1L9YNJg== +"@langchain/core@>0.1.0 <0.3.0", "@langchain/core@>=0.2.11 <0.3.0", "@langchain/core@>=0.2.16 <0.3.0", "@langchain/core@>=0.2.18 <0.3.0", "@langchain/core@>=0.2.5 <0.3.0", "@langchain/core@^0.2.18", "@langchain/core@~0.2.11": + version "0.2.18" + resolved "https://registry.yarnpkg.com/@langchain/core/-/core-0.2.18.tgz#1ac4f307fa217ab3555c9634147a6c4ad9826092" + integrity sha512-ru542BwNcsnDfjTeDbIkFIchwa54ctHZR+kVrC8U9NPS9/36iM8p8ruprOV7Zccj/oxtLE5UpEhV+9MZhVcFlA== dependencies: ansi-styles "^5.0.0" camelcase "6" decamelize "1.2.0" js-tiktoken "^1.0.12" - langsmith "~0.1.30" + langsmith "~0.1.39" ml-distance "^4.0.0" mustache "^4.2.0" p-queue "^6.6.2" @@ -7148,12 +7152,12 @@ "@langchain/core" ">=0.2.16 <0.3.0" zod-to-json-schema "^3.22.4" -"@langchain/langgraph@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@langchain/langgraph/-/langgraph-0.0.29.tgz#eda31d101e7a75981e0929661c41ab2461ff8640" - integrity sha512-BSFFJarkXqrMdH9yH6AIiBCw4ww0VsXXpBwqaw+9/7iulW0pBFRSkWXHjEYnmsdCRgyIxoP8vYQAQ8Jtu3qzZA== +"@langchain/langgraph@^0.0.31": + version "0.0.31" + resolved "https://registry.yarnpkg.com/@langchain/langgraph/-/langgraph-0.0.31.tgz#4585fc9b4e9ad9677e97fd8debcfec2ae43a5fb4" + integrity sha512-f5QMSLy/RnLktsqnNm2mq8gp1xplHwQf87XIPVO0IYuumOJiafx5lE7ahPO+fVmCzAz6LxcsVocvD0JqxXR/2w== dependencies: - "@langchain/core" ">=0.2.16 <0.3.0" + "@langchain/core" ">=0.2.18 <0.3.0" uuid "^10.0.0" zod "^3.23.8" @@ -8198,19 +8202,19 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= -"@puppeteer/browsers@2.2.3": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.2.3.tgz#ad6b79129c50825e77ddaba082680f4dad0b674e" - integrity sha512-bJ0UBsk0ESOs6RFcLXOt99a3yTDcOKlzfjad+rhFwdaG1Lu/Wzq58GHYCDTlZ9z6mldf4g+NTb+TXEfe0PpnsQ== +"@puppeteer/browsers@2.2.4": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.2.4.tgz#4307245d881aa5a79743050be66568bad0f6ffbb" + integrity sha512-BdG2qiI1dn89OTUUsx2GZSpUzW+DRffR1wlMJyKxVHYrhnKoELSDxDd+2XImUkuWPEKk76H5FcM/gPFrEK1Tfw== dependencies: - debug "4.3.4" - extract-zip "2.0.1" - progress "2.0.3" - proxy-agent "6.4.0" - semver "7.6.0" - tar-fs "3.0.5" - unbzip2-stream "1.4.3" - yargs "17.7.2" + debug "^4.3.5" + extract-zip "^2.0.1" + progress "^2.0.3" + proxy-agent "^6.4.0" + semver "^7.6.2" + tar-fs "^3.0.6" + unbzip2-stream "^1.4.3" + yargs "^17.7.2" "@redocly/ajv@^8.11.0": version "8.11.0" @@ -14124,14 +14128,14 @@ chromedriver@^126.0.3: proxy-from-env "^1.1.0" tcp-port-used "^1.0.2" -chromium-bidi@0.5.19: - version "0.5.19" - resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.5.19.tgz#e4f4951b7d9b20d668d6b387839f7b7bf2d69ef4" - integrity sha512-UA6zL77b7RYCjJkZBsZ0wlvCTD+jTjllZ8f6wdO4buevXgTZYjV+XLB9CiEa2OuuTGGTLnI7eN9I60YxuALGQg== +chromium-bidi@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.6.1.tgz#533612dd166b7b36a8ba8b90685ad2fa0c98d064" + integrity sha512-kSxJRj0VgtUKz6nmzc2JPfyfJGzwzt65u7PqhPHtgGQUZLF5oG+ST6l6e5ONfStUMAlhSutFCjaGKllXZa16jA== dependencies: mitt "3.0.1" urlpattern-polyfill "10.0.0" - zod "3.22.4" + zod "3.23.8" ci-info@^2.0.0: version "2.0.0" @@ -14813,16 +14817,6 @@ core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" - integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== - dependencies: - env-paths "^2.2.1" - import-fresh "^3.3.0" - js-yaml "^4.1.0" - parse-json "^5.2.0" - cosmiconfig@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" @@ -14845,6 +14839,16 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: path-type "^4.0.0" yaml "^1.10.0" +cosmiconfig@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" + integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== + dependencies: + env-paths "^2.2.1" + import-fresh "^3.3.0" + js-yaml "^4.1.0" + parse-json "^5.2.0" + cp-file@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-7.0.0.tgz#b9454cfd07fe3b974ab9ea0e5f29655791a9b8cd" @@ -15669,10 +15673,10 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" @@ -15683,6 +15687,13 @@ debug@4.3.1: dependencies: ms "2.1.2" +debug@4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + debug@^3.0.0, debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -16123,10 +16134,10 @@ detective@^5.0.2: defined "^1.0.0" minimist "^1.1.1" -devtools-protocol@0.0.1273771: - version "0.0.1273771" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1273771.tgz#46aeb5db41417e2c2ad3d8367c598c975290b1a5" - integrity sha512-QDbb27xcTVReQQW/GHJsdQqGKwYBE7re7gxehj467kKP2DKuYBUj6i2k5LRiAC66J1yZG/9gsxooz/s9pcm0Og== +devtools-protocol@0.0.1299070: + version "0.0.1299070" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz#b3e4cf0b678a46f0f907ae6e07e03ad3a53c00df" + integrity sha512-+qtL3eX50qsJ7c+qVyagqi7AWMoQCBGNfoyJZMwm/NSXVqLYbuitrWEEIzxfUmTNy7//Xe8yhMmQ+elj3uAqSg== dezalgo@^1.0.0, dezalgo@^1.0.4: version "1.0.4" @@ -16507,10 +16518,10 @@ elastic-apm-node@3.46.0: traverse "^0.6.6" unicode-byte-truncate "^1.0.0" -elastic-apm-node@^4.7.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-4.7.1.tgz#39c30172db7d4d2e9af4dd87fc35f5f5171788b3" - integrity sha512-2OWhcjKD6O+S9ZuvywFiqXM7ifHnSUxaOTmCzprxEf/VfBonEBEfyyQ5Omymtm4xQ5Mqh18xKRUBNT74Xup0VQ== +elastic-apm-node@^4.7.2: + version "4.7.2" + resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-4.7.2.tgz#880b3df8e2266aac70f6370f916b0e66d5063455" + integrity sha512-9jsvAeHU6wztM+qUWJvgJCgdCVUI1sfg6a9quXmgkcjUJmRDJG0trfTScELZrfK5VJBQ88LVl05Q0nJW2j6TsA== dependencies: "@elastic/ecs-pino-format" "^1.5.0" "@opentelemetry/api" "^1.4.1" @@ -21922,10 +21933,10 @@ kuler@^2.0.0: resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== -langchain@0.2.3, langchain@^0.2.10: - version "0.2.10" - resolved "https://registry.yarnpkg.com/langchain/-/langchain-0.2.10.tgz#35b74038e54650efbd9fe7d9d59765fe2790bb47" - integrity sha512-i0fC+RlX/6w6HKPWL3N5zrhrkijvpe2Xu4t/qbWzq4uFf8WBfPwmNFom3RtO2RatuPnHLm8mViU6nw8YBDiVwA== +langchain@0.2.3, langchain@^0.2.11: + version "0.2.11" + resolved "https://registry.yarnpkg.com/langchain/-/langchain-0.2.11.tgz#d97e5bbd57e8954f21356fd85603aa39e3efe03f" + integrity sha512-6FQWKNAXuTmwuhHHMOmurLo8pydSRu5C/FwCYvYbR4ulCLqcsj+jre/kfXvA5BdHOZHNo6oQn0/5kxDNnhxMUA== dependencies: "@langchain/core" ">=0.2.11 <0.3.0" "@langchain/openai" ">=0.1.0 <0.3.0" @@ -21949,10 +21960,10 @@ langchainhub@~0.0.8: resolved "https://registry.yarnpkg.com/langchainhub/-/langchainhub-0.0.8.tgz#fd4b96dc795e22e36c1a20bad31b61b0c33d3110" integrity sha512-Woyb8YDHgqqTOZvWIbm2CaFDGfZ4NTSyXV687AG4vXEfoNo7cGQp7nhl7wL3ehenKWmNEmcxCLgOZzW8jE6lOQ== -langsmith@^0.1.37, langsmith@~0.1.30: - version "0.1.37" - resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.37.tgz#7e7bf6fce3eab2a9e95221d5879820ec29d0aa60" - integrity sha512-8JgWykdJywdKWs+WeefOEf4Gkz3YdNkvG5u5JPbgXuodTUwuHPwjmblsldt1OGKkPp7iCWfdtCdnc9z9MYC/Dw== +langsmith@^0.1.39, langsmith@~0.1.30, langsmith@~0.1.39: + version "0.1.39" + resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.39.tgz#cc99f1828a9c0f5ba24bec6b0121edc44e8d282d" + integrity sha512-K2/qbc96JhrZbSL74RbZ0DBOpTB9Mxicu8RQrZ88Xsp1bH2O3+y5EdcvC0g/1YzQWQhcQ4peknCA24c3VTNiNA== dependencies: "@types/uuid" "^9.0.1" commander "^10.0.1" @@ -25921,16 +25932,16 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - progress@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74= +progress@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + proj4@2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/proj4/-/proj4-2.6.2.tgz#4665d7cbc30fd356375007c2fed53b07dbda1d67" @@ -26053,7 +26064,7 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-agent@6.4.0, proxy-agent@^6.4.0: +proxy-agent@^6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.4.0.tgz#b4e2dd51dee2b377748aef8d45604c2d7608652d" integrity sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ== @@ -26164,26 +26175,26 @@ pupa@^3.1.0: dependencies: escape-goat "^4.0.0" -puppeteer-core@22.8.1: - version "22.8.1" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-22.8.1.tgz#757ec8983ca38486dad8e5464e744f4b8aff5a13" - integrity sha512-m1F6ZSTw1xrJ6xD4B+HonkSNVQmMrRMaqca/ivRcZYJ6jqzOnfEh3QgO9HpNPj6heiAZ2+4IPAU3jdZaTIDnSA== +puppeteer-core@22.13.1: + version "22.13.1" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-22.13.1.tgz#3ba03e5ebd98bbbd86e465864cf00314e07309de" + integrity sha512-NmhnASYp51QPRCAf9n0OPxuPMmzkKd8+2sB9Q+BjwwCG25gz6iuNc3LQDWa+cH2tyivmJppLhNNFt6Q3HmoOpw== dependencies: - "@puppeteer/browsers" "2.2.3" - chromium-bidi "0.5.19" - debug "4.3.4" - devtools-protocol "0.0.1273771" - ws "8.17.0" + "@puppeteer/browsers" "2.2.4" + chromium-bidi "0.6.1" + debug "^4.3.5" + devtools-protocol "0.0.1299070" + ws "^8.18.0" -puppeteer@22.8.1: - version "22.8.1" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-22.8.1.tgz#d0b96cd722f62a157804dcc3b0d4909e3620bf1d" - integrity sha512-CFgPSKV+iydjO/8/hJVj251Hqp2PLcIa70j6H7sYqkwM8YJ+D3CA74Ufuj+yKtvDIntQPB/nLw4EHrHPcHOPjw== +puppeteer@22.13.1: + version "22.13.1" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-22.13.1.tgz#f8e4217919b438f18adb754e9d8414fef58fb3de" + integrity sha512-PwXLDQK5u83Fm5A7TGMq+9BR7iHDJ8a3h21PSsh/E6VfhxiKYkU7+tvGZNSCap6k3pCNDd9oNteVBEctcBalmQ== dependencies: - "@puppeteer/browsers" "2.2.3" - cosmiconfig "9.0.0" - devtools-protocol "0.0.1273771" - puppeteer-core "22.8.1" + "@puppeteer/browsers" "2.2.4" + cosmiconfig "^9.0.0" + devtools-protocol "0.0.1299070" + puppeteer-core "22.13.1" pure-rand@^6.0.0: version "6.0.2" @@ -28304,13 +28315,6 @@ semver@7.5.4: dependencies: lru-cache "^6.0.0" -semver@7.6.0: - version "7.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" - semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -29967,17 +29971,6 @@ tape@^5.0.1: string.prototype.trim "^1.2.1" through "^2.3.8" -tar-fs@3.0.5: - version "3.0.5" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.5.tgz#f954d77767e4e6edf973384e1eb95f8f81d64ed9" - integrity sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg== - dependencies: - pump "^3.0.0" - tar-stream "^3.1.5" - optionalDependencies: - bare-fs "^2.1.1" - bare-path "^2.1.0" - tar-fs@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" @@ -30130,7 +30123,7 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.26.0, terser@^5.3.4, terser@^5.31.2, terser@^5.9.0: +terser@^5.26.0, terser@^5.3.4, terser@^5.31.3, terser@^5.9.0: version "5.31.3" resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.3.tgz#b24b7beb46062f4653f049eea4f0cd165d0f0c38" integrity sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA== @@ -30811,7 +30804,7 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -unbzip2-stream@1.4.3: +unbzip2-stream@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== @@ -32500,15 +32493,10 @@ write-file-atomic@^4.0.1, write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@8.17.0: - version "8.17.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" - integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== - -ws@>=8.16.0, ws@^8.2.3, ws@^8.4.2, ws@^8.9.0: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" - integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== +ws@>=8.16.0, ws@^8.18.0, ws@^8.2.3, ws@^8.4.2, ws@^8.9.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== ws@^7.3.1, ws@^7.4.2: version "7.5.10" @@ -32702,19 +32690,6 @@ yargs@17.0.1: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@17.7.2, yargs@^17.0.1, yargs@^17.2.1, yargs@^17.3.1, yargs@^17.7.1, yargs@^17.7.2: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -32732,6 +32707,19 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^17.0.1, yargs@^17.2.1, yargs@^17.3.1, yargs@^17.7.1, yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yargs@^3.15.0: version "3.32.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" @@ -32818,12 +32806,7 @@ zod-to-json-schema@^3.22.3, zod-to-json-schema@^3.22.4, zod-to-json-schema@^3.22 resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.0.tgz#4fc60e88d3c709eedbfaae3f92f8a7bf786469f2" integrity sha512-az0uJ243PxsRIa2x1WmNE/pnuA05gUq/JB8Lwe1EDCCL/Fz9MgjYQ0fPlyc2Tcv6aF2ZA7WM5TWaRZVEFaAIag== -zod@3.22.4: - version "3.22.4" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff" - integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg== - -zod@^3.22.3, zod@^3.22.4, zod@^3.23.8: +zod@3.23.8, zod@^3.22.3, zod@^3.22.4, zod@^3.23.8: version "3.23.8" resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==