dosubot[bot] commented on issue #36770: URL: https://github.com/apache/superset/issues/36770#issuecomment-3676339047
<!-- Greeting --> Hi @nico-gsantos! I'm [Dosu](https://go.dosu.dev/dosubot) and Iām helping the superset team. <!-- Answer --> Superset's SQL parser (sqlglot) does not currently support the Apache Doris MATCH operator or full text search syntax, which is why you see a ParseError when running queries like `SELECT * FROM t WHERE column1 MATCH 'word1 word2'`. Superset maps Doris connections to the Doris dialect in sqlglot, but there is no explicit handling for MATCH or Doris full text search in either Superset or sqlglot, so any unrecognized syntax will fail during parsing before reaching the database ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/sql/parse.py#L99-L574), [source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/doris.py#L105-L310)). There is no built-in way to bypass or relax SQL parsing for Doris in Superset. A common workaround is to create a view in Doris that encapsulates your full text search logic, then query that view from Superset. Alternatively, supporting MATCH would require extending sqlglot's Doris dialect, which is a non-trivial code change ([reference](https://github.com/apache/superset/discussions/34083)). <!-- 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/e8a816a1-104c-4d07-b439-f4d4ac9bc666?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/e8a816a1-104c-4d07-b439-f4d4ac9bc666?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/e8a816a1-104c-4d07-b439-f4d4ac9bc666?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/e8a816a1-104c-4d07-b439-f4d4ac9bc666?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e8a816a1-104c-4d07-b439-f4d4ac9bc666?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/e8a816a1-104c-4d07-b439-f4d4ac9bc666?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e8a816a1-104c-4d07-b439-f4d4ac9bc666?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Superset%27s%20SQL%20parser%20%28sqlglot%29%20does%20not%20currently%20support%20the%20Apache%20Doris%20MATCH%20operator%20or%20full%20text%20search%20syntax%2C%20which%20is%20why%20you%20see%20a%20ParseError%20when%20running%20queries%20like%20%60SELECT%20%2A%20FROM%20t%20WHERE%20column1%20MATCH%20%27word1%20word2%27%60.%20Superset%20maps%20Doris%20connections%20to%20the%20Doris%20dialect%20in%20sqlglot%2C%20but%20there%20is%20no%20explicit%20handling%20for%20MATCH%20or%20Doris%20full%20text%20search%20in%20either%20Superset%20or%20sqlglot%2C%20so%20any%20unrecognized%20syntax%20will%20fail%20during%20parsing%20before%20reaching%20the%20database%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/ superset/sql/parse.py%23L99-L574%29%2C%20%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/doris.py%23L105-L310%29%29.%0A%0AThere%20is%20no%20built-in%20way%20to%20bypass%20or%20relax%20SQL%20parsing%20for%20Doris%20in%20Superset.%20A%20common%20workaround%20is%20to%20create%20a%20view%20in%20Doris%20that%20encapsulates%20your%20full%20text%20search%20logic%2C%20then%20query%20that%20view%20from%20Superset.%20Alternatively%2C%20supporting%20MATCH%20would%20require%20extending%20sqlglot%27s%20Doris%20dialect%2C%20which%20is%20a%20non-trivial%20code%20change%20%28%5Breference%5D%28https%3A//github.com/apache/superset/discussions/34083%29%29.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20thi s%20issue!&url=https%3A//github.com/apache/superset/issues/36770) -- 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]
