Code:
val sqlstring = "CREATE TABLE IF NOT EXISTS test_table (col1 int , col2 string) STORED AS ORC"
val df = hive.executeQuery(sqlstring)
Output:
java.lang.RuntimeException: java.io.IOException: shadehive.org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.lang.NullPointerException
at com.hortonworks.spark.sql.hive.llap.HiveWarehouseDataSourceReader.readSchema(HiveWarehouseDataSourceReader.java:130)
at org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation$.apply(DataSourceV2Relation.scala:6)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:224)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:164)
at com.hortonworks.spark.sql.hive.llap.HiveWarehouseSessionImpl.executeQuery(HiveWarehouseSessionImpl.java:62)
... 161 elided
But this works:
hive.createTable("test_table").column("col1", "string")
If you need more information please comment
I would like to execute queries, what is this problem?