Skip to content

[BUG] SPAN has different behavior between pushdown and non-pushdown for timestamp before 1971 #3827

@qianheng-aws

Description

@qianheng-aws

What is the bug?
The PPL:

source = test | eval ts = timestamp("1961-04-12 09:10:00") | stats count() by span(ts, 1h) | head 1

get results:

{
  "schema": [
    {
      "name": "count()",
      "type": "bigint"
    },
    {
      "name": "span(ts,1h)",
      "type": "timestamp"
    }
  ],
  "datarows": [
    [
      6005,
      "1961-04-12 10:00:00"
    ]
  ],
  "total": 1,
  "size": 1
}

"1961-04-12 09:10:00" is rounded to "1961-04-12 10:00:00". However, in DSL, it should be rounded to "1961-04-12 09:00:00"

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

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

What is the expected behavior?
A clear and concise description of what you expected to happen.

What is your host/environment?

  • OS: [e.g. Mac]
  • Version [e.g. 3.1.0-SNAPSHOT]
  • Plugins SQL

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