Git Product home page Git Product logo

Comments (3)

nineinchnick avatar nineinchnick commented on September 16, 2024 1

Why do you need to execute two queries in the same exec? This is generally not supported and is not related to preparing queries.

from trino-go-client.

nineinchnick avatar nineinchnick commented on September 16, 2024

I think it's done this way to avoid extra logic to check if there are any parameters for the query. Can you describe a use case when this is not desirable? Also, PRs are always welcome.

from trino-go-client.

NachoNievaG avatar NachoNievaG commented on September 16, 2024

Hi @nineinchnick, thank you for answering.
So, currently for our scenario, we need to change the insert_existing_partitions_behavior value to OVERWRITE for some given executions. So for this we have two choices:

  1. in the same exec, we trigger 3 queries (one for changing the session var, one as the necessary exec, and one for changing the session var back )
  2. create two trino client connections and determine which will trigger which queries. (we have a releation of ~80% needing APPEND and ~20% needing OVERWRITE.

But when we came to execute two queries in the same exec fot testing purposes, we got back the following error:

trino: query failed (400 Bad Request): "Invalid X-Trino-Prepared-Statement header: line 1:67: mismatched input ';'. Expecting: '%', '*', '+', '-', '.', '/', 'AND', 'AT', 'OR', '[', '||', <EOF>, <predicate>"

that's how we found out that every exec was sent as a prepared statement (and also read the trino.go file to confirm), therefore my treasure hunting.

I'll be looking for a way to enhance this behavior and possibly come back with good news :)

from trino-go-client.

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.