-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HIVE-28703: Integral Data Type Overflow Not Enforced for JsonSerDe an…
…d UDFs
- Loading branch information
araika
committed
Jan 16, 2025
1 parent
6c6fb28
commit 3d680a4
Showing
17 changed files
with
295 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"tiny_value": 128, "small_value" : 32768, "int_value" : 2147483648, "big_value" : 9223372036854775808} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
drop table if exists json_serde1_1; | ||
|
||
create table json_serde1_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hadoop.hive.serde2.JsonSerDe'; | ||
|
||
insert into table json_serde1_1 values (128, 32768, 2147483648, 9223372036854775808); | ||
|
||
select * from json_serde1_1; | ||
|
||
drop table json_serde1_1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
drop table if exists json_serde2_1; | ||
|
||
create table json_serde2_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hadoop.hive.serde2.JsonSerDe'; | ||
|
||
LOAD DATA LOCAL INPATH '../../data/files/sampleJson.json' INTO TABLE json_serde2_1; | ||
|
||
select * from json_serde2_1; | ||
|
||
drop table json_serde2_1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
drop table if exists json_serde3_1; | ||
|
||
create table json_serde3_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hive.hcatalog.data.JsonSerDe'; | ||
|
||
insert into table json_serde3_1 values (127, 32768, 2147483648, 9223372036854775808); | ||
|
||
select * from json_serde3_1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
drop table if exists json_serde4_1; | ||
|
||
create table json_serde4_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hive.hcatalog.data.JsonSerDe'; | ||
|
||
LOAD DATA LOCAL INPATH '../../data/files/sampleJson.json' INTO TABLE json_serde4_1; | ||
|
||
select * from json_serde4_1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
PREHOOK: query: drop table if exists json_serde1_1 | ||
PREHOOK: type: DROPTABLE | ||
PREHOOK: Output: database:default | ||
POSTHOOK: query: drop table if exists json_serde1_1 | ||
POSTHOOK: type: DROPTABLE | ||
POSTHOOK: Output: database:default | ||
PREHOOK: query: create table json_serde1_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hadoop.hive.serde2.JsonSerDe' | ||
PREHOOK: type: CREATETABLE | ||
PREHOOK: Output: database:default | ||
PREHOOK: Output: default@json_serde1_1 | ||
POSTHOOK: query: create table json_serde1_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hadoop.hive.serde2.JsonSerDe' | ||
POSTHOOK: type: CREATETABLE | ||
POSTHOOK: Output: database:default | ||
POSTHOOK: Output: default@json_serde1_1 | ||
PREHOOK: query: insert into table json_serde1_1 values (128, 32768, 2147483648, 9223372036854775808) | ||
PREHOOK: type: QUERY | ||
PREHOOK: Input: _dummy_database@_dummy_table | ||
PREHOOK: Output: default@json_serde1_1 | ||
Status: Failed | ||
Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.hive.serde2.io.ByteWritable org.apache.hadoop.hive.ql.udf.UDFToByte.evaluate(org.apache.hadoop.io.IntWritable):Value out of range for Byte: 128 | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.reflect.InvocationTargetException | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.IllegalArgumentException: Value out of range for Byte: 128 | ||
#### A masked pattern was here #### | ||
], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.hive.serde2.io.ByteWritable org.apache.hadoop.hive.ql.udf.UDFToByte.evaluate(org.apache.hadoop.io.IntWritable):Value out of range for Byte: 128 | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.reflect.InvocationTargetException | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.IllegalArgumentException: Value out of range for Byte: 128 | ||
#### A masked pattern was here #### | ||
]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE] | ||
[Masked Vertex killed due to OTHER_VERTEX_FAILURE] | ||
DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1 | ||
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.hive.serde2.io.ByteWritable org.apache.hadoop.hive.ql.udf.UDFToByte.evaluate(org.apache.hadoop.io.IntWritable):Value out of range for Byte: 128 | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.reflect.InvocationTargetException | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.IllegalArgumentException: Value out of range for Byte: 128 | ||
#### A masked pattern was here #### | ||
], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.hive.serde2.io.ByteWritable org.apache.hadoop.hive.ql.udf.UDFToByte.evaluate(org.apache.hadoop.io.IntWritable):Value out of range for Byte: 128 | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.reflect.InvocationTargetException | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.IllegalArgumentException: Value out of range for Byte: 128 | ||
#### A masked pattern was here #### | ||
]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
PREHOOK: query: drop table if exists json_serde2_1 | ||
PREHOOK: type: DROPTABLE | ||
PREHOOK: Output: database:default | ||
POSTHOOK: query: drop table if exists json_serde2_1 | ||
POSTHOOK: type: DROPTABLE | ||
POSTHOOK: Output: database:default | ||
PREHOOK: query: create table json_serde2_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hadoop.hive.serde2.JsonSerDe' | ||
PREHOOK: type: CREATETABLE | ||
PREHOOK: Output: database:default | ||
PREHOOK: Output: default@json_serde2_1 | ||
POSTHOOK: query: create table json_serde2_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hadoop.hive.serde2.JsonSerDe' | ||
POSTHOOK: type: CREATETABLE | ||
POSTHOOK: Output: database:default | ||
POSTHOOK: Output: default@json_serde2_1 | ||
PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/sampleJson.json' INTO TABLE json_serde2_1 | ||
PREHOOK: type: LOAD | ||
#### A masked pattern was here #### | ||
PREHOOK: Output: default@json_serde2_1 | ||
POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/sampleJson.json' INTO TABLE json_serde2_1 | ||
POSTHOOK: type: LOAD | ||
#### A masked pattern was here #### | ||
POSTHOOK: Output: default@json_serde2_1 | ||
PREHOOK: query: select * from json_serde2_1 | ||
PREHOOK: type: QUERY | ||
PREHOOK: Input: default@json_serde2_1 | ||
#### A masked pattern was here #### | ||
POSTHOOK: query: select * from json_serde2_1 | ||
POSTHOOK: type: QUERY | ||
POSTHOOK: Input: default@json_serde2_1 | ||
#### A masked pattern was here #### | ||
Failed with exception java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: java.lang.IllegalArgumentException: Failed to parse integral value for category BYTE: 128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
PREHOOK: query: drop table if exists json_serde3_1 | ||
PREHOOK: type: DROPTABLE | ||
PREHOOK: Output: database:default | ||
POSTHOOK: query: drop table if exists json_serde3_1 | ||
POSTHOOK: type: DROPTABLE | ||
POSTHOOK: Output: database:default | ||
PREHOOK: query: create table json_serde3_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hive.hcatalog.data.JsonSerDe' | ||
PREHOOK: type: CREATETABLE | ||
PREHOOK: Output: database:default | ||
PREHOOK: Output: default@json_serde3_1 | ||
POSTHOOK: query: create table json_serde3_1 (tiny_value TINYINT, small_value SMALLINT, int_value INT, big_value BIGINT) | ||
row format serde 'org.apache.hive.hcatalog.data.JsonSerDe' | ||
POSTHOOK: type: CREATETABLE | ||
POSTHOOK: Output: database:default | ||
POSTHOOK: Output: default@json_serde3_1 | ||
PREHOOK: query: insert into table json_serde3_1 values (127, 32768, 2147483648, 9223372036854775808) | ||
PREHOOK: type: QUERY | ||
PREHOOK: Input: _dummy_database@_dummy_table | ||
PREHOOK: Output: default@json_serde3_1 | ||
Status: Failed | ||
Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.hive.serde2.io.ShortWritable org.apache.hadoop.hive.ql.udf.UDFToShort.evaluate(org.apache.hadoop.io.IntWritable):Value out of range for Short: 32768 | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.reflect.InvocationTargetException | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.IllegalArgumentException: Value out of range for Short: 32768 | ||
#### A masked pattern was here #### | ||
], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.hive.serde2.io.ShortWritable org.apache.hadoop.hive.ql.udf.UDFToShort.evaluate(org.apache.hadoop.io.IntWritable):Value out of range for Short: 32768 | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.reflect.InvocationTargetException | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.IllegalArgumentException: Value out of range for Short: 32768 | ||
#### A masked pattern was here #### | ||
]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE] | ||
[Masked Vertex killed due to OTHER_VERTEX_FAILURE] | ||
DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1 | ||
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.hive.serde2.io.ShortWritable org.apache.hadoop.hive.ql.udf.UDFToShort.evaluate(org.apache.hadoop.io.IntWritable):Value out of range for Short: 32768 | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.reflect.InvocationTargetException | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.IllegalArgumentException: Value out of range for Short: 32768 | ||
#### A masked pattern was here #### | ||
], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable | ||
#### A masked pattern was here #### | ||
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.hive.serde2.io.ShortWritable org.apache.hadoop.hive.ql.udf.UDFToShort.evaluate(org.apache.hadoop.io.IntWritable):Value out of range for Short: 32768 | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.reflect.InvocationTargetException | ||
#### A masked pattern was here #### | ||
Caused by: java.lang.IllegalArgumentException: Value out of range for Short: 32768 | ||
#### A masked pattern was here #### | ||
]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1 |
Oops, something went wrong.