heavyai / heavyai-jdbc

A JDBC driver for connecting to an HeavyAI GPU database and running queries.
https://www.heavy.ai/
Other
9 stars 16 forks source link

Regression: INSERT of non-lowercased columns fails in 5.5.0 #29

Open gharris1727 opened 3 years ago

gharris1727 commented 3 years ago

Version 5.5.0 includes this change: https://github.com/omnisci/omnisci-jdbc/commit/67f9cfd56878f0ae5a302ac4030ed42d570f8fbb which altered the addBatch function.

This causes all inserts with non-lowercased columns to fail. For example in omnisql, this sequence of statements succeeds:

CREATE TABLE test ( isCapitalized BOOLEAN NOT NULL );
INSERT INTO test ( isCapitalized ) VALUES ( 'true' );
SELECT isCapitalized FROM test ;
isCapitalized
true

I then executed these statements via the JDBC driver as part of a batched insert. Expected behavior: the JDBC driver mimics the behavior of omnisql, and the insert is successful. Actual behavior: the JDBC driver throws this exception:

java.sql.SQLException: Column isCapitalized does not exist
    at com.omnisci.jdbc.OmniSciPreparedStatement.addBatch(OmniSciPreparedStatement.java:394)
    ...

I confirmed that all prior versions 4.7.1-5.4.0 can successfully execute this insert, and the regression is only present in 5.5.0.