gohive
gohive copied to clipboard
Does gohive support transaction?
I tried the following SQL statements
CREATE DATABASE IF NOT EXISTS iris;
DROP TABLE IF EXISTS iris.train;
CREATE TABLE iris.train (
sepal_length float,
sepal_width float,
petal_length float,
petal_width float,
class int);
INSERT INTO TABLE iris.train VALUES
(6.4,2.8,5.6,2.2,2),
(5.0,2.3,3.3,1.0,1),
(4.9,2.5,4.5,1.7,2);
And received error Table not found train
. I would suspect Hive runs the statement asynchronously. Is there an option to make all statement atomic?
seeing https://github.com/apache/hive/blob/master/service-rpc/if/TCLIService.thrift#L710, it seems that hive thrift api provide a parameter runAsync
in struct TExecuteStatementReq
to set whether the command should be executed asynchronously and the default behavior is false.