GitHub user dosubot[bot] added a comment to the discussion: Modify Automatic 
“IN” Filter to Support “LIKE” Search for Categorical Filters

<!-- Answer -->
1. The rationale behind Superset defaulting to "IN" for categorical filters, 
even when filtering text fields, is not explicitly documented in the 
repository. However, using "IN" is generally efficient for exact matches, which 
is often suitable for categorical data.

2. Superset does have logic to handle different data types and apply 
appropriate operators. The `useSimpleTabFilterProps` function includes logic to 
determine relevant operators based on column types, but it doesn't 
automatically switch to "LIKE" or "ILIKE" for text columns by default 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx)</sup>.

3. While I can't predict the acceptance of a pull request, introducing an 
optional "LIKE" search mode could be a valuable enhancement for users needing 
partial matching for text data. It would be beneficial to align with the 
project's goals and guidelines when proposing such a feature.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*

---
<sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/f551d7e5-0bc8-4970-a8a3-fca178a64230?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/f551d7e5-0bc8-4970-a8a3-fca178a64230?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/f551d7e5-0bc8-4970-a8a3-fca178a64230?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/f551d7e5-0bc8-4970-a8a3-fca178a64230?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/f551d7e5-0bc8-4970-a8a3-fca178a64230?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/f551d7e5-0bc8-4970-a8a3-fca178a64230?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/f551d7e5-0bc8-4970-a8a3-fca178a64230?feedback_type=other)</sup>


GitHub link: 
https://github.com/apache/superset/discussions/33625#discussioncomment-13315742

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to