You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2021/09/23 09:37:27 UTC

[GitHub] [drill] jaceksan opened a new issue #2320: Propage SqlState through JDBC

jaceksan opened a new issue #2320:
URL: https://github.com/apache/drill/issues/2320


   **Is your feature request related to a problem? Please describe.**
   We have to handle certain SqlStates by parsing exception text, which is dangerous taking future changes into account.
   Particularly we need to handle:
   - table does not exists when dropping or selecting a table
   - table already exists when creating a table 
   
   **Describe the solution you'd like**
   SqlState is filled with deterministic codes.
   
   **Describe alternatives you've considered**
   We have to handle certain SqlStates by parsing exception text, which is dangerous taking future changes into account.
   
   **Additional context**
   My use case: we create cache tables in Drill/Dremio and register related metadata about those tables in our Redis.
   It may happen that cache table disappears or Redis is purged.
   Then we may try to create duplicate table or drop non-existing table.
   We need to be able to detect TABLE DOES NOT EXIST and TABLE ALREADY EXISTS states and react accordingly.
   Parsing exception text is definitely not optimal solution, message can be changed and bad things can happen.
   
   


-- 
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: dev-unsubscribe@drill.apache.org

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



[GitHub] [drill] cgivre commented on issue #2320: Propage SqlState through JDBC

Posted by GitBox <gi...@apache.org>.
cgivre commented on issue #2320:
URL: https://github.com/apache/drill/issues/2320#issuecomment-951067970


   @jaceksan Did you try the `CREATE TABLE IF NOT EXISTS`  and `DROP TABLE IF NOT EXISTS`?    Those two constructs are supported in Drill. 


-- 
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: dev-unsubscribe@drill.apache.org

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



[GitHub] [drill] jaceksan commented on issue #2320: Propage SqlState through JDBC

Posted by GitBox <gi...@apache.org>.
jaceksan commented on issue #2320:
URL: https://github.com/apache/drill/issues/2320#issuecomment-951902145


   @cgivre yep, that works. I use it in my specific use case.
   I do not have any other relevant use case now on the table, so priority of this issue becomes low for me.
   Thanks for the answer!


-- 
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: dev-unsubscribe@drill.apache.org

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