gohive icon indicating copy to clipboard operation
gohive copied to clipboard

Does gohive support transaction?

Open tonyyang-svail opened this issue 5 years ago • 1 comments

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?

tonyyang-svail avatar Jun 03 '19 03:06 tonyyang-svail

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.

yuyicg avatar Jun 03 '19 05:06 yuyicg