diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilderForEncryption.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilderForEncryption.java index 1f00fa048d36bf..e76b7456fc4e8b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilderForEncryption.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilderForEncryption.java @@ -121,8 +121,10 @@ public LogicalPlan visitCreateTable(DorisParser.CreateTableContext ctx) { @Override public LogicalPlan visitTableValuedFunction(DorisParser.TableValuedFunctionContext ctx) { DorisParser.PropertyItemListContext properties = ctx.properties; - encryptProperty(visitPropertyItemList(properties), properties.start.getStartIndex(), - properties.stop.getStopIndex()); + if (properties != null) { + encryptProperty(visitPropertyItemList(properties), properties.start.getStartIndex(), + properties.stop.getStopIndex()); + } return super.visitTableValuedFunction(ctx); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateTableCommand.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateTableCommand.java index 16a384edaacded..e030010bed9318 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateTableCommand.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateTableCommand.java @@ -244,7 +244,8 @@ public StmtType stmtType() { @Override public boolean needAuditEncryption() { - return !createTableInfo.getEngineName().equalsIgnoreCase(CreateTableInfo.ENGINE_OLAP); + // ATTN: createTableInfo.getEngineName() may be null + return !CreateTableInfo.ENGINE_OLAP.equalsIgnoreCase(createTableInfo.getEngineName()); } }