diff --git a/velox/expression/CastExpr-inl.h b/velox/expression/CastExpr-inl.h index 5397a6f23aa1..1110ce28170a 100644 --- a/velox/expression/CastExpr-inl.h +++ b/velox/expression/CastExpr-inl.h @@ -717,8 +717,6 @@ void CastExpr::applyCastPrimitives( auto* resultFlatVector = result->as>(); auto* inputSimpleVector = input.as>(); - auto& resultType = resultFlatVector->type(); - if (!hooks_->truncate()) { if (!hooks_->legacy()) { applyToSelectedNoThrowLocal(context, rows, result, [&](int row) {