Skip to content

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

Closed

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.

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