You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sfirke (via GitHub)" <gi...@apache.org> on 2023/04/20 14:08:49 UTC

[GitHub] [superset] sfirke commented on issue #21027: DISTINCT command error Incorrect syntax near the keyword on SQLLab when connect MSSQL database

sfirke commented on issue #21027:
URL: https://github.com/apache/superset/issues/21027#issuecomment-1516398570

   An idea: modify https://github.com/apache/superset/blob/b2b8c3e05b69cc19cbb8394f621c1b9095bda132/superset/db_engine_specs/base.py#L897-L899.  It currently finds the first select keyword (dialect-specific) and injects the TOP there.  It could instead find the first select keyword _followed by a non-select keyword_.
   
   Then in `superset/db_engine_specs/mssql.py`, specify `select_keywords = {"SELECT", "DISTINCT"}`.  Then the TOP 1000 would get injected after SELECT DISTINCT.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org