This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch dev-1.4.0
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/dev-1.4.0 by this push:
new 72d84048a give more exception in CustomerDelimitedJSONSerDe.java
(#4341)
72d84048a is described below
commit 72d84048a9849d0691c5c59ed89697f34f0fba88
Author: GuoPhilipse <[email protected]>
AuthorDate: Wed Mar 8 11:49:23 2023 +0800
give more exception in CustomerDelimitedJSONSerDe.java (#4341)
---
.../engineplugin/hive/serde/CustomerDelimitedJSONSerDe.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git
a/linkis-engineconn-plugins/hive/src/main/java/org/apache/linkis/engineplugin/hive/serde/CustomerDelimitedJSONSerDe.java
b/linkis-engineconn-plugins/hive/src/main/java/org/apache/linkis/engineplugin/hive/serde/CustomerDelimitedJSONSerDe.java
index 9c425ff05..fe948f795 100644
---
a/linkis-engineconn-plugins/hive/src/main/java/org/apache/linkis/engineplugin/hive/serde/CustomerDelimitedJSONSerDe.java
+++
b/linkis-engineconn-plugins/hive/src/main/java/org/apache/linkis/engineplugin/hive/serde/CustomerDelimitedJSONSerDe.java
@@ -320,12 +320,20 @@ public class CustomerDelimitedJSONSerDe extends
LazySimpleSerDe {
}
default:
{
+ if (!"INTERVAL_YEAR_MONTH".equals(category.name())
+ && !"INTERVAL_DAY_TIME".equals(category.name())) {
+ throw new RuntimeException("Unknown primitive type: " + category);
+ }
boolean containsIntervalYearMonth = false;
boolean containsIntervalDayTime = false;
for (PrimitiveObjectInspector.PrimitiveCategory primitiveCategory :
PrimitiveObjectInspector.PrimitiveCategory.values()) {
- containsIntervalYearMonth =
"INTERVAL_YEAR_MONTH".equals(primitiveCategory.name());
- containsIntervalDayTime =
"INTERVAL_DAY_TIME".equals(primitiveCategory.name());
+ containsIntervalYearMonth =
+ "INTERVAL_YEAR_MONTH".equals(primitiveCategory.name())
+ && "INTERVAL_YEAR_MONTH".equals(category.name());
+ containsIntervalDayTime =
+ "INTERVAL_DAY_TIME".equals(primitiveCategory.name())
+ && "INTERVAL_DAY_TIME".equals(category.name());
try {
if (containsIntervalYearMonth) {
wc =
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]