forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](hive) support find serde info from both tbl properties and serd…
…e properties (apache#37043) Some hive table set serde properties in tblproperties. We need to support it
- Loading branch information
1 parent
b3b035e
commit 9a72f75
Showing
6 changed files
with
121 additions
and
26 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
docker/thirdparties/docker-compose/hive/scripts/data/regression/serde_prop/run.sh
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,9 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" | ||
|
||
# create table | ||
hive -f "${CUR_DIR}"/some_serde_table.hql | ||
|
||
|
34 changes: 34 additions & 0 deletions
34
.../thirdparties/docker-compose/hive/scripts/data/regression/serde_prop/some_serde_table.hql
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,34 @@ | ||
create database if not exists regression; | ||
use regression; | ||
|
||
CREATE TABLE `serde_test1`( | ||
`id` int, | ||
`name` string) | ||
ROW FORMAT SERDE | ||
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' | ||
WITH SERDEPROPERTIES ( | ||
'field.delim'='', | ||
'serialization.format'='') | ||
STORED AS INPUTFORMAT | ||
'org.apache.hadoop.mapred.TextInputFormat' | ||
OUTPUTFORMAT | ||
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'; | ||
|
||
CREATE TABLE `serde_test2`( | ||
`id` int, | ||
`name` string) | ||
ROW FORMAT SERDE | ||
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' | ||
WITH SERDEPROPERTIES ( | ||
'field.delim'='', | ||
'serialization.format'='') | ||
STORED AS INPUTFORMAT | ||
'org.apache.hadoop.mapred.TextInputFormat' | ||
OUTPUTFORMAT | ||
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' | ||
TBLPROPERTIES ( | ||
'field.delim'='|' | ||
); | ||
|
||
insert into serde_test1 values(1, "abc"),(2, "def"); | ||
insert into serde_test2 values(1, "abc"),(2, "def"); |
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