diff --git a/src/executor/FetchExecutor.cpp b/src/executor/FetchExecutor.cpp
index 26dcc9be3c6e09d0e185847d8c2d177df0197cb9..b2d8df0ae78dd2ddf9990b4ec68bdda5827b0b67 100644
--- a/src/executor/FetchExecutor.cpp
+++ b/src/executor/FetchExecutor.cpp
@@ -34,11 +34,11 @@ Status FetchExecutor::prepareYield() {
         // such as YIELD 1+1, it has not type in schema, the type from the eval()
         colTypes_.emplace_back(nebula::cpp2::SupportedType::UNKNOWN);
         if (col->expr()->isAliasExpression()) {
-            colNames_.emplace_back(*static_cast<InputPropertyExpression*>(col->expr())->prop());
+            colNames_.emplace_back(*dynamic_cast<AliasPropertyExpression*>(col->expr())->prop());
             continue;
         } else if (col->expr()->isTypeCastingExpression()) {
             // type cast
-            auto exprPtr = static_cast<TypeCastingExpression*>(col->expr());
+            auto exprPtr = dynamic_cast<TypeCastingExpression*>(col->expr());
             colTypes_.back() = ColumnTypeToSupportedType(exprPtr->getType());
         }