ziyumuxi opened a new issue, #38520:
URL: https://github.com/apache/superset/issues/38520

   ### Bug description
   
   When using Apache Superset 6.0.0 with an Oracle database (tested on Oracle 
11g/12c), executing simple queries that involve ROWNUM or triggers an implicit 
LIMIT clause results in an ORA-00933: SQL command not properly ended error.
   This issue seems to be exacerbated by the "Formatted" (SQLGlot) feature in 
SQL Lab, which attempts to rewrite the SQL query. Even with the latest sqlglot 
(v29.0.1), the rewritten SQL appears to be incompatible with Oracle's strict 
syntax requirements regarding LIMIT/OFFSET or ROWNUM usage in specific contexts.
   
   ### Screenshots/recordings
   
   <img width="850" height="210" alt="Image" 
src="https://github.com/user-attachments/assets/fce8d04d-5ec8-4262-8bff-f74a2a2974b7";
 />
   
   <img width="2120" height="930" alt="Image" 
src="https://github.com/user-attachments/assets/0202f228-2e8d-4e87-b4f0-8a85deea5b1d";
 />
   
   ### Superset version
   
   6.0.0
   
   ### Python version
   
   3.9
   
   ### Node version
   
   18 or greater
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   Upgrading sqlglot to the latest version (29.0.1) does not fix this issue.
   Switching from cx_Oracle to oracledb driver does not fix this issue.
   The issue is strictly related to the SQL generation/transformation layer 
before execution.
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


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