This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new e045bbf1249 branch-3.1: [opt](hive) unify the serde name of hive table
#54189 (#54265)
e045bbf1249 is described below
commit e045bbf124936d9831244db6758bd394fda21375
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Aug 4 15:55:43 2025 +0800
branch-3.1: [opt](hive) unify the serde name of hive table #54189 (#54265)
Cherry-picked from #54189
Co-authored-by: Mingyu Chen (Rayner) <[email protected]>
---
.../doris/datasource/hive/HiveMetaStoreClientHelper.java | 2 +-
.../org/apache/doris/datasource/hive/source/HiveScanNode.java | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreClientHelper.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreClientHelper.java
index a888bdff7ec..9874c18c5b3 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreClientHelper.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreClientHelper.java
@@ -97,7 +97,7 @@ public class HiveMetaStoreClientHelper {
public static final String LEGACY_HIVE_JSON_SERDE =
"org.apache.hadoop.hive.serde2.JsonSerDe";
public static final String OPENX_JSON_SERDE =
"org.openx.data.jsonserde.JsonSerDe";
public static final String HIVE_TEXT_SERDE =
"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe";
- public static final String HIVE_CSV_SERDE =
"org.apache.hadoop.hive.serde2.OpenCSVSerde";
+ public static final String HIVE_OPEN_CSV_SERDE =
"org.apache.hadoop.hive.serde2.OpenCSVSerde";
public static final String HIVE_MULTI_DELIMIT_SERDE =
"org.apache.hadoop.hive.serde2.MultiDelimitSerDe";
public enum HiveFileFormat {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/source/HiveScanNode.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/source/HiveScanNode.java
index 1b259dfb283..4a47f97f7f2 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/source/HiveScanNode.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/source/HiveScanNode.java
@@ -436,7 +436,7 @@ public class HiveScanNode extends FileQueryScanNode {
}
} else if
(serDeLib.equals(HiveMetaStoreClientHelper.HIVE_TEXT_SERDE)) {
type = TFileFormatType.FORMAT_TEXT;
- } else if
(serDeLib.equals(HiveMetaStoreClientHelper.HIVE_CSV_SERDE)) {
+ } else if
(serDeLib.equals(HiveMetaStoreClientHelper.HIVE_OPEN_CSV_SERDE)) {
type = TFileFormatType.FORMAT_CSV_PLAIN;
} else if
(serDeLib.equals(HiveMetaStoreClientHelper.HIVE_MULTI_DELIMIT_SERDE)) {
type = TFileFormatType.FORMAT_TEXT;
@@ -490,7 +490,7 @@ public class HiveScanNode extends FileQueryScanNode {
// TODO: support skip footer count
fileAttributes.setSkipLines(HiveProperties.getSkipHeaderCount(table));
String serDeLib = table.getSd().getSerdeInfo().getSerializationLib();
- if
(serDeLib.equals("org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe")
+ if (serDeLib.equals(HiveMetaStoreClientHelper.HIVE_TEXT_SERDE)
||
serDeLib.equals(HiveMetaStoreClientHelper.HIVE_MULTI_DELIMIT_SERDE)) {
TFileTextScanRangeParams textParams = new
TFileTextScanRangeParams();
// set properties of LazySimpleSerDe and MultiDelimitSerDe
@@ -511,7 +511,7 @@ public class HiveScanNode extends FileQueryScanNode {
fileAttributes.setHeaderType("");
fileAttributes.setEnableTextValidateUtf8(
sessionVariable.enableTextValidateUtf8);
- } else if
(serDeLib.equals("org.apache.hadoop.hive.serde2.OpenCSVSerde")) {
+ } else if
(serDeLib.equals(HiveMetaStoreClientHelper.HIVE_OPEN_CSV_SERDE)) {
TFileTextScanRangeParams textParams = new
TFileTextScanRangeParams();
// set set properties of OpenCSVSerde
// 1. set column separator
@@ -531,7 +531,7 @@ public class HiveScanNode extends FileQueryScanNode {
}
fileAttributes.setEnableTextValidateUtf8(
sessionVariable.enableTextValidateUtf8);
- } else if (serDeLib.equals("org.apache.hive.hcatalog.data.JsonSerDe"))
{
+ } else if (serDeLib.equals(HiveMetaStoreClientHelper.HIVE_JSON_SERDE))
{
TFileTextScanRangeParams textParams = new
TFileTextScanRangeParams();
textParams.setColumnSeparator("\t");
textParams.setLineDelimiter("\n");
@@ -544,7 +544,7 @@ public class HiveScanNode extends FileQueryScanNode {
fileAttributes.setReadJsonByLine(true);
fileAttributes.setStripOuterArray(false);
fileAttributes.setHeaderType("");
- } else if (serDeLib.equals("org.openx.data.jsonserde.JsonSerDe")) {
+ } else if
(serDeLib.equals(HiveMetaStoreClientHelper.OPENX_JSON_SERDE)) {
if (!sessionVariable.isReadHiveJsonInOneColumn()) {
TFileTextScanRangeParams textParams = new
TFileTextScanRangeParams();
textParams.setColumnSeparator("\t");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]