mysql> select ipv4_num_to_string(3232235521::uint32);
+------------------------------------------------------------------+
| ipv4_num_to_string(arrow_cast(Int64(3232235521),Utf8("UInt32"))) |
+------------------------------------------------------------------+
| 192.168.0.1 |
+------------------------------------------------------------------+
1 row in set (0.01 sec)
mysql> select ipv4_num_to_string(3232235521);
ERROR 1815 (HY000): (PlanQuery): Failed to plan SQL: Error during planning: Failed to coerce arguments for 'ipv4_num_to_string': cannot coerce Int64 to Exact([UInt32]). No matching function for 'ipv4_num_to_string(Int64)'. You may need an explicit cast.
Candidate functions:
ipv4_num_to_string(UInt32)
We could update the ipv4_num_to_string signature to accept Int32 and automatically coerce the input type.
|
TypeSignature::Exact(vec![DataType::UInt32]), |
We could update the
ipv4_num_to_stringsignature to acceptInt32and automatically coerce the input type.greptimedb/src/common/function/src/scalars/ip/ipv4.rs
Line 47 in 8a3bd37