From 4032e69da3d8304a4a1e03b3e61b0f88c91e7b7d Mon Sep 17 00:00:00 2001 From: Rui Mo Date: Wed, 7 Sep 2022 13:34:57 +0800 Subject: [PATCH] Remove alias (#46) --- velox/substrait/SubstraitToVeloxExpr.cpp | 11 ----------- velox/substrait/SubstraitToVeloxExpr.h | 4 ---- 2 files changed, 15 deletions(-) diff --git a/velox/substrait/SubstraitToVeloxExpr.cpp b/velox/substrait/SubstraitToVeloxExpr.cpp index ac9f74bd24c1..c3fad0e4829a 100644 --- a/velox/substrait/SubstraitToVeloxExpr.cpp +++ b/velox/substrait/SubstraitToVeloxExpr.cpp @@ -73,14 +73,6 @@ SubstraitVeloxExprConverter::toVeloxExpr( } } -std::shared_ptr -SubstraitVeloxExprConverter::toAliasExpr( - const std::vector>& params) { - VELOX_CHECK(params.size() == 1, "Alias expects one parameter."); - // Alias is omitted due to name change is not needed. - return params[0]; -} - std::shared_ptr SubstraitVeloxExprConverter::toIsNotNullExpr( const std::vector>& params, @@ -142,9 +134,6 @@ SubstraitVeloxExprConverter::toVeloxExpr( if (veloxFunction == "extract") { return toExtractExpr(std::move(params), toVeloxType(typeName)); } - if (veloxFunction == "alias") { - return toAliasExpr(std::move(params)); - } if (veloxFunction == "is_not_null") { return toIsNotNullExpr(std::move(params), toVeloxType(typeName)); diff --git a/velox/substrait/SubstraitToVeloxExpr.h b/velox/substrait/SubstraitToVeloxExpr.h index 8077fd23369a..f580174ca06a 100644 --- a/velox/substrait/SubstraitToVeloxExpr.h +++ b/velox/substrait/SubstraitToVeloxExpr.h @@ -59,10 +59,6 @@ class SubstraitVeloxExprConverter { const ::substrait::Expression::Cast& castExpr, const RowTypePtr& inputType); - /// Create expression for alias. - std::shared_ptr toAliasExpr( - const std::vector>& params); - /// Create expression for is_not_null. std::shared_ptr toIsNotNullExpr( const std::vector>& params,