Skip to content

[BUG] Rename does not work with nested fields #2740

Closed

Description

@lezzago

What is the bug?
Rename does not work with nested fields. When I tried to rename a nested field, the renamed field would just have empty values. This is an example query that has issues:

source=otel-metrics-2024.05| rename `attributes.resource.attributes.service@name` as ServiceName | dedup ServiceName | fields ServiceName

How can one reproduce the bug?
Make a similar query to the one below that renames a nested field

source=otel-metrics-2024.05| rename `attributes.resource.attributes.service@name` as ServiceName | fields ServiceName

What is the expected behavior?
The values from the renamed field should not be empty

What is your host/environment?

  • OS: AWS OpenSearch 2.11

Activity

  1. added
    bug
    on Jun 12, 2024
  2. changed the title [-][BUG] Rename does not work with backtick fields[/-] [+][BUG] Rename does not work with nested fields[/+] on Jun 12, 2024
  3. LantaoJin commented on Jun 14, 2024

    @LantaoJin
    Member

    Not sure if it relates to opensearch-project/OpenSearch#14355. @penghuo, how does the RenameOperator work in SQL engine? If the implementation relates to rename field processor, it might be the bug of OpenSearch Core.

  4. dblock commented on Jul 1, 2024

    @dblock
    Member

    [Catch All Triage - Attendees 1, 2, 3, 4, 5]

  5. added
    catch-all acknowledged
    on Jan 7, 2025
  6. removed
    catch-all acknowledged
    on Apr 29, 2025
  7. added
    PPL
    on May 29, 2025
  8. moved this from Not Started to In progress in PPL Trackeron Jun 27, 2025
  9. moved this from In progress to Not Started in PPL Trackeron Jun 27, 2025
  10. self-assigned this
    on Jun 27, 2025
  11. songkant-aws commented on Apr 16, 2026

    @songkant-aws
    Collaborator

    This is no longer issue in latest Calcite engine enabled PPL query. PPL flatten nested fields per original design because of some historical decisions. We don't know the struct internal field schema. With workaround solutions, accessing struct fields are resolved by this PR: #4719.

  12. moved this from Not Started to Done in PPL Trackeron Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PPLbug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions