[jira] [Created] (HIVE-25558) create two tables and want to make some partitions on the table ,joins,union also

2021-09-25 Thread shiva (Jira)
shiva created HIVE-25558:


 Summary: create two tables and want to make some partitions on the 
table ,joins,union also 
 Key: HIVE-25558
 URL: https://issues.apache.org/jira/browse/HIVE-25558
 Project: Hive
  Issue Type: Bug
  Components: Clients
Affects Versions: 3.1.1
Reporter: shiva






--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (HIVE-18632) TYPE CASTING ERROR: CONVERTING FORM INT TO STRING

2018-02-05 Thread shiva (JIRA)
shiva created HIVE-18632:


 Summary: TYPE CASTING ERROR: CONVERTING FORM INT TO STRING
 Key: HIVE-18632
 URL: https://issues.apache.org/jira/browse/HIVE-18632
 Project: Hive
  Issue Type: Bug
  Components: Database/Schema
Affects Versions: 1.1.0
Reporter: shiva


HI,

AVRO source file field data type have int but we want to load the data using 
the string,

we have created the AVSC schema for that field has string.

getting error while doing the select * from table name;

1 >> Created a table in Hive with AVRO data.
CREATE EXTERNAL TABLE tweets (username string, tweet string, timestamp bigint)
COMMENT 'A table backed by Avro data with the Avro schema stored in HDFS'
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
STORED AS
INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
LOCATION '/home/neha/test_data/avro_create_data'
TBLPROPERTIES 
('avro.schema.literal'='{"namespace":"com.miguno.avro","name":"Tweet","type":"record","fields":[

{"name" : "username","type" : "string","doc" : "Name of the user account on 
Twitter.com"}
,

{"name" : "tweet","type":"string","doc" : "The content of the Twitter message"}
,

{"name" : "timestamp", "type" : "long", "doc" : "Unix epoch time in seconds"}
]}');

2 >> Altered type of a column (to a compatible type) using ALTER TABLE. In this 
example, altered type for column "timestamp" from "long" to "int".

ALTER TABLE tweets SET TBLPROPERTIES 
('avro.schema.literal'='{"namespace":"com.miguno.avro","name":"Tweet","type":"record","fields":[

{"name" : "username","type" : "string","doc" : "Name of the user account on 
Twitter.com"}
,

{"name" : "tweet","type":"string","doc" : "The content of the Twitter message"}
,

{"name" : "timestamp", "type" : "int", "doc" : "Unix epoch time in seconds"}
]}');

3 >> Now, a select query on this table fails with following error.

hive> select * from tweets;
OK
Failed with exception java.io.IOException:org.apache.avro.AvroTypeException: 
Found "long", expecting "int"
Time taken: 4.514 seconds



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)