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

   <!-- Greeting -->
   Hi @ziyumuxi! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.
   
   <!-- Answer -->
   This is a [known issue](https://github.com/apache/superset/issues/35197). 
Superset 5.0.0+ generates `FETCH FIRST N ROWS ONLY` syntax for row limiting, 
which is only valid in Oracle 12c+. Oracle 11g requires the older `ROWNUM` 
approach, and since the newer syntax isn't compatible, you get the ORA-00933 
error.
   
   The Superset maintainers have [indicated they don't plan to officially 
support Oracle 11g](https://github.com/apache/superset/issues/35197) since it 
reached end of life in 2013.
   
   **Workarounds:**
   1. **Upgrade to Oracle 12c or later** (recommended)
   2. **Create a custom engine spec** by modifying 
[`superset/db_engine_specs/oracle.py`](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/oracle.py)
 to generate Oracle 11g-compatible `ROWNUM` syntax
   
   If you're on Oracle 12c and still seeing issues, there's a [separate known 
issue](https://github.com/apache/superset/issues/37044) where sqlglot generates 
invalid positional `GROUP BY` clauses (like `GROUP BY 1,2,3`) that Oracle 
rejects. Upgrading sqlglot to 27.29.0+ should resolve that specific problem.
   
   
   <!-- 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/fe8f87d1-828a-4148-8ea6-c3ccc1891220?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/fe8f87d1-828a-4148-8ea6-c3ccc1891220?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/fe8f87d1-828a-4148-8ea6-c3ccc1891220?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/fe8f87d1-828a-4148-8ea6-c3ccc1891220?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/fe8f87d1-828a-4148-8ea6-c3ccc1891220?feedback_type=hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/fe8f87d1-828a-4148-8ea6-c3ccc1891220?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/fe8f87d1-828a-4148-8ea6-c3ccc1891220?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20%5Bknown%20issue%5D%28https%3A//github.com/apache/superset/issues/35197%29.%20Superset%205.0.0%2B%20generates%20%60FETCH%20FIRST%20N%20ROWS%20ONLY%60%20syntax%20for%20row%20limiting%2C%20which%20is%20only%20valid%20in%20Oracle%2012c%2B.%20Oracle%2011g%20requires%20the%20older%20%60ROWNUM%60%20approach%2C%20and%20since%20the%20newer%20syntax%20isn%27t%20compatible%2C%20you%20get%20the%20ORA-00933%20error.%0A%0AThe%20Superset%20maintainers%20have%20%5Bindicated%20they%20don%27t%20plan%20to%20officially%20support%20Oracle%2011g%5D%28https%3A//github.com/apache/superset/issues/35197%29%20since%20it%20reached%20end%20of%20life%20in%202013.%0A%0A%2A%2AWorkarounds%3A%2A%2A%0A1.%20%2A%2AUpgrade%20to%20Oracle%2012c%20or%20later%2A%2A%20%28re
 
commended%29%0A2.%20%2A%2ACreate%20a%20custom%20engine%20spec%2A%2A%20by%20modifying%20%5B%60superset/db_engine_specs/oracle.py%60%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/oracle.py%29%20to%20generate%20Oracle%2011g-compatible%20%60ROWNUM%60%20syntax%0A%0AIf%20you%27re%20on%20Oracle%2012c%20and%20still%20seeing%20issues%2C%20there%27s%20a%20%5Bseparate%20known%20issue%5D%28https%3A//github.com/apache/superset/issues/37044%29%20where%20sqlglot%20generates%20invalid%20positional%20%60GROUP%20BY%60%20clauses%20%28like%20%60GROUP%20BY%201%2C2%2C3%60%29%20that%20Oracle%20rejects.%20Upgrading%20sqlglot%20to%2027.29.0%2B%20should%20resolve%20that%20specific%20problem.)&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%20help
 
ed%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/38520)


-- 
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]

Reply via email to