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 does not support querying Alias fields #3069

Open
ashwin-pc opened this issue Oct 11, 2024 · 2 comments
Open

[BUG] PPL does not support querying Alias fields #3069

ashwin-pc opened this issue Oct 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ashwin-pc
Copy link
Member

What is the bug?
When querying using PPL but there is an alias field in the filter clause. The query fails.

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. 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.

@penghuo
Copy link
Collaborator

penghuo commented Oct 12, 2024

could u add more context? sample query and sample data to reporduce the issue.

@xinyual
Copy link

xinyual commented Oct 14, 2024

I can provide a sample

PUT /try
{
    "mappings":{
        "properties": {
            "time1": {
                "type": "date"
            },
            "time2": {
                "type": "alias",
                "path": "time1"
            }
        }
    }
}
POST /_plugins/_ppl/
{
    "query": "source=try | fields `time2`"
}

It shows

{
  "error": {
    "reason": "Invalid Query",
    "details": "can't resolve Symbol(namespace=FIELD_NAME, name=time2) in type env",
    "type": "SemanticCheckException"
  },
  "status": 400
}

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
Development

No branches or pull requests

3 participants