[
https://issues.apache.org/jira/browse/CALCITE-6867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alessandro Solimando updated CALCITE-6867:
------------------------------------------
Summary: Druid Adapter transforms an SQL NOT IN filter to a Druid IN filter
(was: Druid Adapter transforms an SQL NOT_IN filter to a Druid IN filter)
> Druid Adapter transforms an SQL NOT IN filter to a Druid IN filter
> ------------------------------------------------------------------
>
> Key: CALCITE-6867
> URL: https://issues.apache.org/jira/browse/CALCITE-6867
> Project: Calcite
> Issue Type: Bug
> Components: druid-adapter
> Affects Versions: 1.38.0
> Reporter: Yu Xu
> Assignee: Mihai Budiu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.39.0
>
>
> Currently Druid Adapter would transform in / not in to In filter which is not
> correct, need to fix it.
> note:
> # Currently DruidJsonFilter##toInKindDruidFilter had filter only handle for
> two kind *SqlKind.DRUID_IN* and *SqlKind.DRUID_NOT_IN*
> # DruidJsonFilter##toInKindDruidFilter check for *SqlKind.IN* not
> *SqlKind.DRUID_NOT_IN* , would transform all to JsonInFilter include
> *SqlKind.DRUID_NOT_IN* , this is not fitable
> ut: DruidQueryFilterTest##testNotInFilter
> The newly added test fails as follows without the fix:
> {code:java}
> Expected: with toString()
> "{\"type\":\"not\",\"field\":{\"type\":\"in\",\"dimension\":\"dimensionName\",\"values\":[\"1\",\"5\",\"value1\"]}}"
> but: toString() was
> "{\"type\":\"in\",\"dimension\":\"dimensionName\",\"values\":[\"1\",\"5\",\"value1\"]}"
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)