While testing the newly released Simba Spark SQL ODBC driver 126.96.36.1996 against 1.4.0-SNAPSHOT, we found that if HiveThriftServer2 is started with HiveThriftServer2.startWithContext(), then simple queries like
fail with the following error message (need to turn on ODBC trace log):
However, JDBC client like Beeline is fine. Also, if the server is started via sbin/start-thriftserver.sh, both ODBC and JDBC work fine.
The reason for this failure is that, HiveThriftServer2.startWithContext() doesn't properly set the "spark.sql.hive.version" property. It seems that Simba ODBC driver 188.8.131.526 behaves differently when this property is missing. What I observed is that, in this case, the ODBC driver issues a GetColumns command, which isn't overriden in Spark HiveThriftServer2, and this falls back to original Hive code path, which results in unexpected behavior.