apache / apache/druid

How to use lookups in a WHERE expression?

Open
#11,607 1 comment 0 reactions 0 assignees View on GitHub
Area - Lookups Question
Dominant language
Java
Stars
14.1k
Forks
3.8k
Avg merge
2d 58m
Merged PRs (30d)
233

Description

Is there a way to use lookups result to filter an output?
For instance I'm using this query:
"SELECT DISTINCT device_id, LOOKUP(device_id, 'devices') as date_created FROM "my_table" WHERE LOOKUP(device_id, 'devices') != 1"
But this query causes runtime error
Is it working with expessions?

Contributor guide

Open the contributing guide

Research direction

The report only identifies a SQL query using LOOKUP in a WHERE clause and says it produces a runtime error; no source file or test is named. Start by reproducing the query and capturing the full error, then trace the relevant Druid lookup and expression entry points. Done means the supported behavior is clarified or the failure is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
data, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.