From de5650e48e4bc448519cd66aaa0578cb3848ef7b Mon Sep 17 00:00:00 2001 From: liujiwen Date: Tue, 14 Jan 2025 20:18:03 +0800 Subject: [PATCH] fix 1 --- .../apache/doris/datasource/hive/HMSExternalTable.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java index ec94be9e6fe227..dccefc8b7432fa 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java @@ -464,8 +464,7 @@ public String getViewText() { } String originalText = getViewOriginalText(); - String trinoViewSql = parseTrinoViewDefinition(originalText); - return trinoViewSql != null ? trinoViewSql : originalText; + return parseTrinoViewDefinition(originalText); } /** @@ -481,11 +480,11 @@ public String getViewText() { * } * * @param originalText The original view definition text - * @return The parsed SQL statement, or null if parsing fails + * @return The parsed SQL statement, or original text if parsing fails */ private String parseTrinoViewDefinition(String originalText) { if (originalText == null || !originalText.contains("/* Presto View: ")) { - return null; + return originalText; } try { @@ -503,7 +502,7 @@ private String parseTrinoViewDefinition(String originalText) { } catch (Exception e) { LOG.warn("Decoding Presto view definition failed", e); } - return null; + return originalText; } public String getViewExpandedText() {