dosubot[bot] commented on issue #35197:
URL: https://github.com/apache/superset/issues/35197#issuecomment-3309638406

   <!-- Answer -->
   The error happens because Oracle 11g doesn't support the `FETCH FIRST N ROWS 
ONLY` clause—this syntax was introduced in Oracle 12c. Superset 5, via 
SQLAlchemy and its Oracle engine spec, generates this clause for row limiting, 
and there isn't a configuration option or documented workaround to switch to 
the older `ROWNUM`-based syntax required by Oracle 11g. This logic is hardcoded 
in Superset's Oracle engine spec and SQLAlchemy dialects, and there is no 
version-specific handling for Oracle 11g in Superset 5.0.0 
[[source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/oracle.py)].
   
   Workarounds are limited: you could manually rewrite queries to use `WHERE 
ROWNUM <= N`, but Superset-generated queries (like those from the UI or charts) 
will still use the unsupported syntax. Supporting Oracle 11g would require 
customizing or monkey-patching the `OracleEngineSpec` class to generate 
compatible SQL, but this is not exposed by a simple config or connection 
parameter and would require code changes 
[[source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/oracle.py)].
   
   As of Superset 5.0.0, there is no official or documented solution for this. 
If you need full compatibility with Oracle 11g, you would need to implement a 
custom engine spec or patch the SQL generation logic.
   
   
   <!-- 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/e2845dcd-9f39-4de6-a02e-55d895e448fe?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/e2845dcd-9f39-4de6-a02e-55d895e448fe?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/e2845dcd-9f39-4de6-a02e-55d895e448fe?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/e2845dcd-9f39-4de6-a02e-55d895e448fe?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/e2845dcd-9f39-4de6-a02e-55d895e448fe?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/e2845dcd-9f39-4de6-a02e-55d895e448fe?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/e2845dcd-9f39-4de6-a02e-55d895e448fe?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/35197)


-- 
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-unsubscr...@superset.apache.org

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


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

Reply via email to