Skip to content

[BUG] fields is changing the outcome of the following commands that depend on selected fields #2739

@TackAdam

Description

@TackAdam

What is the bug?
When running stats count() operation on a nested parameter the result seems to just return 0. If the field is specified before running the count, it will show the correct value.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Go to 'OpenSearch Playground:Query Workbench https://playground.opensearch.org/app/opensearch-query-workbench#/
  2. Click on PPL and enter the PPL "source = jaeger-span-* |stats count (references.refType)" and hit Run
Screenshot 2024-06-11 at 4 34 36 PM -Output will be 0

Enter the PPL "source = jaeger-span-* | fields references.refType|stats count (references.refType)" and hit Run
Screenshot 2024-06-11 at 4 36 22 PM
-Output will be 193

What is the expected behavior?
The stats count() should return a consistent value regardless of any preceeding field selection.

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Add any other context about the problem.

Metadata

Metadata

Assignees

Labels

PPLPiped processing languagebugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions