Vansh5632 commented on issue #36770: URL: https://github.com/apache/superset/issues/36770#issuecomment-3698544864
Hi everyone, I’ve investigated this issue, and the root cause lies in how sqlglot (which Superset uses for SQL parsing) handles the Doris dialect. Currently, sqlglot’s Doris dialect inherits from MySQL. As a result, it treats MATCH strictly as part of the MySQL full-text search syntax (MATCH (...) AGAINST (...)) and fails to parse the Apache Doris specific infix syntax (e.g., column MATCH 'value'). I propose two ways to resolve this: 1. Upstream Fix (Recommended) We contribute a fix directly to the sqlglot repository. Action: Modify the Doris dialect in sqlglot to register MATCH as a binary comparison operator (similar to LIKE or EQ). Outcome: Once merged and released in sqlglot, we simply bump the library version in Superset. This ensures better long-term support and benefits the wider community. 2. Immediate Workaround (Superset-side) If an immediate fix is required before the upstream release, we can implement a temporary patch within Superset. Action: Create a custom dialect wrapper or monkey-patch the sqlglot dialect configuration in superset/db_engine_specs/doris.py to recognize the MATCH token as a binary operator during the parsing phase. My Proposal: I believe Option 1 is the cleanest approach. I am happy to open the PR against sqlglot to add this support. Could the maintainers (@mistercrunch ) let me know if you prefer waiting for the upstream fix, or if you'd like to see a workaround implemented in the interim? -- 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]
