Comments (3)
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.
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.
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:
- 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 )
- 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)
- Queries don't get canceled on context cancel HOT 8
- Does trino-go-client support golang sql.NamedArg? HOT 2
- Do not send DELETE after QueryRow HOT 1
- Can't execute more than one query on one connection HOT 9
- ParsingException for SQL Server when stored-procedure-table-function is enabled HOT 3
- Client.Timeout exceeded while awaiting headers
- access kerberized data HOT 10
- Queries sometimes fail when decoding progress percent in the response HOT 2
- How to set a custom name to prepared statements, in different connections HOT 2
- Add option to configure X-Trino-Client-Tags http header based on a setting in the conenction URL
- Any way to extract queryId from result / rows? HOT 1
- Update Go version to 1.18 HOT 3
- Can't update to v0.310.0 HOT 3
- Reduce dependencies HOT 12
- Pool of system root CAs is not used by default in case of https connection with no `SSLCert` and `SSLCertPath` configured.
- Null support for inserts HOT 3
- Bug/Feat: Performance degradation with multiple requests HOT 8
- Panic in `CheckNamedValue()` for an `INSERT` prepared statement which receives a nil value HOT 1
- Expose underlying trino error codes / names HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trino-go-client.