Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PPL gets error but looks syntax correct #3078

Open
xinyual opened this issue Oct 17, 2024 · 1 comment · May be fixed by #3079
Open

[BUG] PPL gets error but looks syntax correct #3078

xinyual opened this issue Oct 17, 2024 · 1 comment · May be fixed by #3079
Labels
bug Something isn't working

Comments

@xinyual
Copy link

xinyual commented Oct 17, 2024

What is the bug?
I run a syntax correct PPL but it shows a bug. It works on 2.15 but fails on 2.17 and current main

How can one reproduce the bug?
Index mappings:

{
"mappings": {
      "properties": {
        "Content": {
          "type": "text"
        },
        "Level": {
          "type": "keyword"
        },
        "OriginalLog": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          }
        },
        "Time": {
          "type": "date",
          "format": "EEE MMM dd HH:mm:ss yyyy||yyyy-MM-dd||epoch_millis"
        }
      }
    }
}

PPL:
"source=loghub-apache-new | where Level = 'error' | eval is_mod = IF(LIKE(OriginalLog, '%mod_jk%'), 1, 0), is_dir = IF(LIKE(OriginalLog, '%directory%'), 1, 0) | stats COUNT() as sum_is_mod by span(Time, 1d)"

Some samples:

{
          "Time": "Sun Dec 04 06:19:18 2005",
          "Level": "error",
          "Content": "mod_jk child workerEnv in error state 6",
          "OriginalLog": "[Sun Dec 04 06:19:18 2005] [error] mod_jk child workerEnv in error state 6"
        }
        {
          "Time": "Sun Dec 04 06:22:48 2005",
          "Level": "notice",
          "Content": "jk2_init() Found child 32479 in scoreboard slot 6",
          "OriginalLog": "[Sun Dec 04 06:22:48 2005] [notice] jk2_init() Found child 32479 in scoreboard slot 6"
        }

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

What is your host/environment?
OS 2.17

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.

@xinyual xinyual added bug Something isn't working untriaged labels Oct 17, 2024
@xinyual xinyual changed the title [BUG] PPL get error [BUG] PPL gets error but looks syntax correct Oct 17, 2024
@LantaoJin
Copy link
Member

It seems a regression issue caused by #2762. I can reproduce in locally. Will file a fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants