You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeSignature::Coercible for math functions #14763
Log for example can be handled with TypeSignature::Coercible where the desired type is float and allow source types are integer.
We must not encode coercion rules in every single function.
Standard coercion rules must be property of the engine. Not a property of every single function separately.
We must not encode coercion rules in every single function.
Standard coercion rules must be property of the engine. Not a property of every single function separately.
In an extensible query engine, users should define coercion rules as part of the function definition, specifying how data types are converted. The engine itself cannot define coercion rules for every function.
I noticed that TypeSignatureClass::Numeric is marked as TODO, and I think math functions could benefit from using the Numeric class. Additionally, since there is no Float class, would it make sense to start by implementing Numeric first?
Activity
alan910127 commentedon Feb 19, 2025
take
findepi commentedon Feb 19, 2025
We must not encode coercion rules in every single function.
Standard coercion rules must be property of the engine. Not a property of every single function separately.
jayzhan211 commentedon Feb 19, 2025
In an extensible query engine, users should define coercion rules as part of the function definition, specifying how data types are converted. The engine itself cannot define coercion rules for every function.
findepi commentedon Feb 19, 2025
Why??
The function itself cannot define coercion rules for the engine.
jayzhan211 commentedon Feb 19, 2025
Why not? I don't see any problem with my statement
alan910127 commentedon Feb 25, 2025
I noticed that TypeSignatureClass::Numeric is marked as TODO, and I think math functions could benefit from using the Numeric class. Additionally, since there is no Float class, would it make sense to start by implementing Numeric first?
Refactor `log()` signature to use coercion API + fixes (#18519)
Refactor `log()` signature to use coercion API + fixes (apache#18519)
Refactor `log()` signature to use coercion API + fixes (apache#18519)
refactor: Use `Signature::coercible` for isnan/iszero (#19604)
refactor: Use `Signature::coercible` for isnan/iszero (apache#19604)