Skip to content

[BUG] Pushdown not work with expression OR isnull(x) #4046

@LantaoJin

Description

@LantaoJin

What is the bug?
Pushdown not work with expression OR isnull(x)

POST /_plugins/_ppl/_explain
{
  "query": """
source=account | where firstname = 'Amber' or isnull(gender)
  """
}

returns

{
  "calcite": {
    "logical": """LogicalSystemLimit(fetch=[10000], type=[QUERY_SIZE_LIMIT])
  LogicalProject(account_number=[$0], firstname=[$1], address=[$2], balance=[$3], gender=[$4], city=[$5], employer=[$6], state=[$7], age=[$8], email=[$9], lastname=[$10])
    LogicalFilter(condition=[OR(=($1, 'Amber'), IS NULL($4))])
      CalciteLogicalIndexScan(table=[[OpenSearch, account]])
""",
    "physical": """EnumerableLimit(fetch=[10000])
  EnumerableCalc(expr#0..10=[{inputs}], expr#11=['Amber':VARCHAR], expr#12=[=($t1, $t11)], expr#13=[IS NULL($t4)], expr#14=[OR($t12, $t13)], proj#0..10=[{exprs}], $condition=[$t14])
    CalciteEnumerableIndexScan(table=[[OpenSearch, account]], PushDownContext=[[PROJECT->[account_number, firstname, address, balance, gender, city, employer, state, age, email, lastname]], OpenSearchRequestBuilder(sourceBuilder={"from":0,"timeout":"1m","_source":{"includes":["account_number","firstname","address","balance","gender","city","employer","state","age","email","lastname"],"excludes":[]}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])
"""
  }
}

which the predicate pushdown does not work.

Metadata

Metadata

Assignees

Labels

PPLPiped processing languagebugSomething isn't workingpushdownpushdown related issues

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions