I'm using the Databricks JDBC driver recently made available via Maven:
https://mvnrepository.com/artifact/com.databricks/databricks-jdbc/2.6.25
While trying to create a table with `GENERATED` columns I receive the following exception:
Caused by: java.sql.SQLException: [Databricks][DatabricksJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: Error running query: org.apache.spark.sql.catalyst.parser.ParseException:
no viable alternative at input 'CREATE TABLE default.test_generated_columns_not_supported_sbju2lhx0065( id INT, a_number INT, a_number_times_two INT GENERATED'(line 1, pos 120)
== SQL ==
CREATE TABLE default.test_generated_columns_not_supported_sbju2lhx0065( id INT, a_number INT, a_number_times_two INT GENERATED ALWAYS AS (a_number * 2)) USING DELTA
------------------------------------------------------------------------------------------------------------------------^^^
, Query: CREATE TABLE default.test_generated_columns_not_supported_sbju2lhx0065( id INT, a_number INT, a_number_times_two INT GENERATED ALWAYS AS (a_number * 2)) USING DELTA.
at com.databricks.client.hivecommon.api.HS2Client.buildExceptionFromTStatusSqlState(Unknown Source)
at com.databricks.client.hivecommon.api.HS2Client.pollForOperationCompletion(Unknown Source)
at com.databricks.client.hivecommon.api.HS2Client.executeStatementInternal(Unknown Source)
at com.databricks.client.hivecommon.api.HS2Client.executeStatement(Unknown Source)
at com.databricks.client.hivecommon.dataengine.HiveJDBCNativeQueryExecutor.executeRowCountQueryHelper(Unknown Source)
at com.databricks.client.hivecommon.dataengine.HiveJDBCNativeQueryExecutor.execute(Unknown Source)
at com.databricks.client.jdbc.common.SStatement.executeNoParams(Unknown Source)
at com.databricks.client.jdbc.common.BaseStatement.execute(Unknown Source)
at com.databricks.client.hivecommon.jdbc42.Hive42Statement.execute(Unknown Source)
This query was working fine when I was using simba spark-jdbc42 2.6.16.
I've tried running the query also in a Databricks Community Cloud Notebook and there it was executed just fine.
Is this a regression issue?