dosubot[bot] commented on issue #36304: URL: https://github.com/apache/superset/issues/36304#issuecomment-3585040193
<!-- Answer --> This is a current limitation of the ENABLE_SUPERSET_META_DB feature: it only supports a single filter per column, so queries with WHERE IN or multiple OR conditions on the same column won't work as expected and will often return no data—even after recent updates to SQL clause handling. This is due to how filters are processed in the meta database adapter, which doesn't natively support multi-value filters or complex predicates on a single column ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/extensions/metadb.py#L292-L418)). As a workaround, you can run separate queries for each DeviceId, or—if you need robust cross-database joins—use a federated engine like Trino directly instead of the meta database feature ([discussion](https://github.com/apache/superset/discussions/34902)). Also, double-check that all DeviceIds exist in both tables and match the join condition, just to rule out data issues. If you need to debug further, reviewing Superset and Trino logs for errors or warnings may help, but the core limitation is in the meta database adapter's filter logic. This feature is still experimental and best suited for moderate data sizes and simple queries. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5813efdd-fb64-4c56-b472-78688adc5ecb?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5813efdd-fb64-4c56-b472-78688adc5ecb?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5813efdd-fb64-4c56-b472-78688adc5ecb?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5813efdd-fb64-4c56-b472-78688adc5ecb?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5813efdd-fb64-4c56-b472-78688adc5ecb?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5813efdd-fb64-4c56-b472-78688adc5ecb?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5813efdd-fb64-4c56-b472-78688adc5ecb?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=This%20is%20a%20current%20limitation%20of%20the%20ENABLE_SUPERSET_META_DB%20feature%3A%20it%20only%20supports%20a%20single%20filter%20per%20column%2C%20so%20queries%20with%20WHERE%20IN%20or%20multiple%20OR%20conditions%20on%20the%20same%20column%20won%27t%20work%20as%20expected%20and%20will%20often%20return%20no%20data%E2%80%94even%20after%20recent%20updates%20to%20SQL%20clause%20handling.%20This%20is%20due%20to%20how%20filters%20are%20processed%20in%20the%20meta%20database%20adapter%2C%20which%20doesn%27t%20natively%20support%20multi-value%20filters%20or%20complex%20predicates%20on%20a%20single%20column%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/extensions/metadb.py%23L292-L418%2 9%29.%0A%0AAs%20a%20workaround%2C%20you%20can%20run%20separate%20queries%20for%20each%20DeviceId%2C%20or%E2%80%94if%20you%20need%20robust%20cross-database%20joins%E2%80%94use%20a%20federated%20engine%20like%20Trino%20directly%20instead%20of%20the%20meta%20database%20feature%20%28%5Bdiscussion%5D%28https%3A//github.com/apache/superset/discussions/34902%29%29.%20Also%2C%20double-check%20that%20all%20DeviceIds%20exist%20in%20both%20tables%20and%20match%20the%20join%20condition%2C%20just%20to%20rule%20out%20data%20issues.%0A%0AIf%20you%20need%20to%20debug%20further%2C%20reviewing%20Superset%20and%20Trino%20logs%20for%20errors%20or%20warnings%20may%20help%2C%20but%20the%20core%20limitation%20is%20in%20the%20meta%20database%20adapter%27s%20filter%20logic.%20This%20feature%20is%20still%20experimental%20and%20best%20suited%20for%20moderate%20data%20sizes%20and%20simple%20queries.) [](https://go .dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36304) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
