diff --git a/src/Functions/FunctionsConversion.h b/src/Functions/FunctionsConversion.h index 4dc64d16f09..1e047e9b6ff 100644 --- a/src/Functions/FunctionsConversion.h +++ b/src/Functions/FunctionsConversion.h @@ -2840,7 +2840,7 @@ protected: bool useDefaultImplementationForNulls() const override { return false; } /// CAST(Nothing, T) -> T bool useDefaultImplementationForNothing() const override { return false; } - bool useDefaultImplementationForConstants() const override { return false; } + bool useDefaultImplementationForConstants() const override { return true; } bool useDefaultImplementationForLowCardinalityColumns() const override { return false; } ColumnNumbers getArgumentsThatAreAlwaysConstant() const override { return {1}; }