Skip to content

Commit

Permalink
Remove alias (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-mo authored and zhejiangxiaomai committed Sep 7, 2022
1 parent ba4275a commit 4032e69
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
11 changes: 0 additions & 11 deletions velox/substrait/SubstraitToVeloxExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ SubstraitVeloxExprConverter::toVeloxExpr(
}
}

std::shared_ptr<const core::ITypedExpr>
SubstraitVeloxExprConverter::toAliasExpr(
const std::vector<std::shared_ptr<const core::ITypedExpr>>& 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<const core::ITypedExpr>
SubstraitVeloxExprConverter::toIsNotNullExpr(
const std::vector<std::shared_ptr<const core::ITypedExpr>>& params,
Expand Down Expand Up @@ -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));
Expand Down
4 changes: 0 additions & 4 deletions velox/substrait/SubstraitToVeloxExpr.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ class SubstraitVeloxExprConverter {
const ::substrait::Expression::Cast& castExpr,
const RowTypePtr& inputType);

/// Create expression for alias.
std::shared_ptr<const core::ITypedExpr> toAliasExpr(
const std::vector<std::shared_ptr<const core::ITypedExpr>>& params);

/// Create expression for is_not_null.
std::shared_ptr<const core::ITypedExpr> toIsNotNullExpr(
const std::vector<std::shared_ptr<const core::ITypedExpr>>& params,
Expand Down

0 comments on commit 4032e69

Please sign in to comment.