Giter Site home page Giter Site logo

Comments (5)

KAllan357 avatar KAllan357 commented on June 2, 2024

Just an additional note: it appears this is also affecting several other statements I used to be able to execute:

  • SHOW WAREHOUSES LIKE ...
  • ALTER WAREHOUSE %s RESUME

from snowflake-jdbc.

howryu avatar howryu commented on June 2, 2024

Hi @KAllan357 Thanks for reporting.

First I am not an expert clojure.java.jdbc. Is this a tool? Or a package on top of JDBC driver.

From the stacktrace it seems that clojure.java.jdbc/db-do-command maps to Java Statement.exeuteBatch() and from Javadoc, it states that executeBatch will throw SQLException if the statement generate a result set. https://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#executeBatch()

And from 3.3.0 we decided to disable PreparedStatement on certain statements type. And right now it only worked for SELECT statement and DML. For DDL and all other statements type, we returned exception now.

Do you know clojure.java.jdbc have api which will use Statement.exeucte()api?
From their doc, it seems that they are using PreparedStatement all the time.

from snowflake-jdbc.

howryu avatar howryu commented on June 2, 2024

Update:
Just discussed with my colleagues, we decide to catch such exceptions in JDBC. and ignore it. Then you can execute show transactions. Hopefully it will solve your problem.

from snowflake-jdbc.

KAllan357 avatar KAllan357 commented on June 2, 2024

@howryu clojure.java.jdbc is the defacto JDBC library for Clojure and as you saw, they chose to execute prepared statements throughout their code.

Your proposed solution to relax the strictness of executing prepared statements sounds good.

from snowflake-jdbc.

howryu avatar howryu commented on June 2, 2024

@KAllan357
This is resolved in 45f9506. Release is planned in JDBC v3.4.0 for 30th Nov

from snowflake-jdbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.