Hi Dremio team, hi Community!
I’m working on a PoC where we integrate Dremio (latest build, downloaded this week) via JDBC. Our code uses Prepared Statements. Even the most simple prepared statements lead to exceptions in Dremio’s server component.
Sample query with the SF Crimes sample data source that ships with Dremio Community:
SELECT * FROM sf_incidents WHERE category = ? LIMIT 100
The parameter is replaced by “ASSAULT”
Exception Stack Trace:
Blockquote
Exception in thread “main” java.sql.SQLException: Failed to create prepared statement: error_id: “02d50c0a-4cf5-4e2f-83e3-a6c41adbff6b”
endpoint {
address: “dremio.europe-west4-a.c.inno2018-sept.internal”
user_port: 31010
fabric_port: 45678
roles {
sql_query: true
java_executor: true
master: true
}
startTime: 1537357876175
max_direct_memory: 8589934592
available_cores: 4
}
error_type: PLAN
message: “PLAN ERROR: Cannot convert RexNode to equivalent Dremio expression. RexNode Class: org.apache.calcite.rex.RexDynamicParam, RexNode Digest: ?0\n\n\n[Error Id: 02d50c0a-4cf5-4e2f-83e3-a6c41adbff6b on dremio.europe-west4-a.c.inno2018-sept.internal:31010]\n\n”
original_message: “Cannot convert RexNode to equivalent Dremio expression. RexNode Class: org.apache.calcite.rex.RexDynamicParam, RexNode Digest: ?0”
at com.dremio.jdbc.impl.DremioJdbc41Factory.newServerPreparedStatement(DremioJdbc41Factory.java:147)
at com.dremio.jdbc.impl.DremioJdbc41Factory.newPreparedStatement(DremioJdbc41Factory.java:108)
at com.dremio.jdbc.impl.DremioJdbc41Factory.newPreparedStatement(DremioJdbc41Factory.java:50)
at cdjd.org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:329)
at com.dremio.jdbc.impl.DremioConnectionImpl.prepareStatement(DremioConnectionImpl.java:304)
at cdjd.org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:168)
at com.dremio.jdbc.impl.DremioConnectionImpl.prepareStatement(DremioConnectionImpl.java:336)
at MainDremio.resultsViaPreparedStatement(MainDremio.java:27)
at MainDremio.main(MainDremio.java:15)
Has anyone seen the problem before? If not, I’d open an GitHub issue and provide a reproducer.
Query profile is attached.
Thanks, Tim
queryProfile.zip (5.6 KB)