You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "donsunnyjay (via GitHub)" <gi...@apache.org> on 2023/11/29 11:40:40 UTC

[I] WITH RECURSIVE Common Table Expression doesn't parse case of select queries correctly [superset]

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

   A clear and concise description of what the bug is.
   
   #### How to reproduce the bug
   
   While trying to execute a query using `WITH RECURSIVE` Common Table Expression on RDS MariaDB. I encounter the following error:
   
   Sample SQL query:
   ```
   WITH RECURSIVE t(n) AS (
       VALUES (1)
     UNION ALL
       SELECT n+1 FROM t WHERE n < 100
   )
   select sum(n) FROM t
   
   ```
   
   ```
   DB engine Error
   
   Only SELECT statements are allowed against this database.
   
   This may be triggered by:
   Issue 1022 - Database does not allow data manipulation. 
   ```
   However, I found simply changing the case of the final select query to uppercase works. I understand that `WITH RECURSIVE` was supported after this [bug report](https://github.com/apache/superset/issues/13938) but I think the functionality needs to be extended or the error message should be updated accordingly to reflect this.
   
   ### Expected results
   
   what you expected to happen.
   The query should be able to execute successfully with either `select` and `SELECT`
   
   ### Actual results
   
   Instead it results in the following error
   
   ```
   DB engine Error
   
   Only SELECT statements are allowed against this database.
   ```
   
   #### Screenshots
   
   If applicable, add screenshots to help explain your problem.
   
   **select lower case:**
   [
   ![Screenshot 2023-11-29 at 11 31 04](https://github.com/apache/superset/assets/25720142/ea467005-ea2b-42b5-8fc9-4ceb62809bc9)
   ]
   
   **SELECT upper case:**
   
   ![Screenshot 2023-11-29 at 11 31 25](https://github.com/apache/superset/assets/25720142/eca296c5-adc9-445b-bf32-8d126d7095c8)
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: `Firefox`
   - superset version: `Version: 2.1.1`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [ X] I have reproduced the issue with at least the latest released version of superset.
   - [ X] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


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


Re: [I] WITH RECURSIVE Common Table Expression doesn't parse case of select queries correctly [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26128:
URL: https://github.com/apache/superset/issues/26128#issuecomment-2045793604

   Thanks! Officially, we support 3.1.x and 4.0.0 now, but I'm guessing the same issue exists there too.


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


Re: [I] WITH RECURSIVE Common Table Expression doesn't parse case of select queries correctly [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26128:
URL: https://github.com/apache/superset/issues/26128#issuecomment-2043497089

   Tempted to close this as stale, and because it's reported on Superset 2.x, where we're only supporting 3.1 and 4.0 now. 
   
   That said, I would bet that it's still happening... can you verify this? We can keep it open if it's still happening. I'm wondering if the work done recently around SQLGlot might have resolved this along the way (cc @betodealmeida @john-bodley )


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


Re: [I] WITH RECURSIVE Common Table Expression doesn't parse case of select queries correctly [superset]

Posted by "betodealmeida (via GitHub)" <gi...@apache.org>.
betodealmeida commented on issue #26128:
URL: https://github.com/apache/superset/issues/26128#issuecomment-2045798717

   I'm happy to take a look if this is still happening.


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


Re: [I] WITH RECURSIVE Common Table Expression doesn't parse case of select queries correctly [superset]

Posted by "skannan-maf (via GitHub)" <gi...@apache.org>.
skannan-maf commented on issue #26128:
URL: https://github.com/apache/superset/issues/26128#issuecomment-2851038765

   I encountered this error but without a recursive CTE. But my last WITH snippet had a UNION in it... Possibly the UNION ??


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


Re: [I] WITH RECURSIVE Common Table Expression doesn't parse case of select queries correctly [superset]

Posted by "donsunnyjay (via GitHub)" <gi...@apache.org>.
donsunnyjay commented on issue #26128:
URL: https://github.com/apache/superset/issues/26128#issuecomment-2044487353

   Hello @rusackas 
   I checked and I'm still able to reproduce this behavior on superset version `3.0.3`, as we've upgraded our version of Superset since this issue was initially reported.


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


Re: [I] WITH RECURSIVE Common Table Expression doesn't parse case of select queries correctly [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26128:
URL: https://github.com/apache/superset/issues/26128#issuecomment-2704681115

   This has been silent for upward of a year. I'll close it as stale, but if it is indeed happening in 4.x, we can certainly reopen it. 


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


Re: [I] WITH RECURSIVE Common Table Expression doesn't parse case of select queries correctly [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #26128: WITH RECURSIVE Common Table Expression doesn't parse case of select queries correctly
URL: https://github.com/apache/superset/issues/26128


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