Skip to content

[BUG] timestampdiff return wrong schema in V2 #3475

Closed
@xinyual

Description

@xinyual

What is the bug?
The wrong schema we use for function timestampdiff.

How can one reproduce the bug?
Create any index. Then run ppl: source=demo | eval f = timestampdiff(YEAR, '1997-01-01 00:00:00', '2001-03-06 00:00:00') | fields f
Then it returns

{
    "schema": [
        {
            "name": "f",
            "type": "timestamp"
        }
    ],
    "datarows": [
        [
            4
        ]
    ],
    "total": 1,
    "size": 1
}

What is the expected behavior?
The schema should not be timestamp. Int or long could be better.

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

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions