Merge pull request #58358 from ClickHouse/format-constexpr

Make function `format` return a constant on constant arguments.
This commit is contained in:
Alexey Milovidov 2023-12-30 12:34:56 +01:00 committed by GitHub
commit ebd95586d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,7 @@ public:
size_t getNumberOfArguments() const override { return 0; }
bool useDefaultImplementationForConstants() const override { return true; }
ColumnNumbers getArgumentsThatAreAlwaysConstant() const override { return {0}; }
DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
SELECT isConstant(format('{}, world', 'Hello'));