Skip to content

[BUG] PPLTypeChecker not work on aggregation functions #4000

@LantaoJin

Description

@LantaoJin

What is the bug?
PPLTypeChecker not work on aggregation functions:

How can one reproduce the bug?

PUT test001
{
    "mappings" : {
        "properties" : {
            "key" : {
                "type" : "keyword"
            },
            "text" : {
                "type" : "text"
            }
        }
    }
}
PUT test001/_doc/1
{
  "key": "abc",
  "text": "def"
}

POST /_plugins/_ppl/
{
  "query": """
  source=test001 | stats sum(text) 
  """
}
POST /_plugins/_ppl/
{
  "query": """
  source=test001 | stats sum(key) 
  """
}

Queries failed in codegen.

What is the expected behavior?
Throw error message that the sum() accepts numeric types only.

Metadata

Metadata

Assignees

Labels

PPLPiped processing languagebugSomething isn't workingcalcitecalcite migration releated

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions