BigQuery error · Query and syntax errors
No matching signature for function
A function was called with argument types that none of its signatures accept, for example DATE_DIFF with a DATE and a TIMESTAMP, or SUBSTR on an INT64. BigQuery lists every signature and which argument didn't fit. Convert that argument with CAST or a date function.
The error message
No matching signature for function <FUNCTION> Argument types: <argument_types> Signature: <FUNCTION>(<expected_types>) Argument <n>: Unable to coerce type <type> to expected type <expected_type> at [<line>:<column>]
Causes
Mixed date and time types
DATE_DIFF(CURRENT_DATE(), TIMESTAMP '2026-11-01 10:00:00 UTC', DAY) fails: DATE_DIFF accepts two DATEs, two DATETIMEs or two TIMESTAMPs, and the message shows each signature with the argument that couldn't be coerced, such as Argument 2: Unable to coerce type TIMESTAMP to expected type DATE.
A number passed to a string function
SUBSTR(20261123, 1, 4) fails with Argument types: INT64, INT64, INT64 because SUBSTR takes STRING or BYTES. The same happens with dates stored as integers such as 20261123.
A function from another dialect with different arguments
Functions that exist in BigQuery under the same name but with another argument order or types, such as DATE_DIFF (end date first) or DATE_TRUNC (part last), fail when written the way Snowflake, Redshift or SQL Server expect. A name that doesn't exist at all gives Function not found instead.
Older message format
Older BigQuery versions, and the Google docs, show the error on one line: No matching signature for function <FUNCTION> for argument types: <types>. Supported signatures: ....
How to fix it
1. Use the function that matches the type
Pick the function family of the value's type, or convert one argument so both are the same type.
SELECT
DATE_DIFF(DATE '2026-11-23', DATE(TIMESTAMP '2026-11-01 10:00:00 UTC'), DAY) AS days_since_signup,
TIMESTAMP_DIFF(TIMESTAMP '2026-11-23 10:00:00 UTC', TIMESTAMP '2026-11-01 10:00:00 UTC', HOUR) AS hours_since_signup;2. Cast numbers to STRING for string functions
Convert explicitly, or parse integer dates into real DATE values once.
SELECT
SUBSTR(CAST(20261123 AS STRING), 1, 4) AS year_text,
PARSE_DATE('%Y%m%d', CAST(20261123 AS STRING)) AS order_date;3. Check the argument order in the GoogleSQL reference
BigQuery's DATE_DIFF(end_date, start_date, part) and DATE_TRUNC(date, part) differ from other warehouses. See DATE_DIFF and DATE_TRUNC.
How to prevent it
- Store dates as DATE or TIMESTAMP, not as integers or strings, so functions don't need conversions in every query.
- Dry-run migrated SQL in CI: signature errors are found at analysis time, for free.
FAQ
Is a query that fails with No matching signature billed?
No. It fails during analysis, before any data is read, so nothing is billed on-demand and no slot time is used under editions.
How do I read the multi-line error?
The first lines show the types you passed. Each Signature: line is one accepted form of the function, followed by the argument number that didn't fit and why. Fix the argument named under the signature you meant to use.
Why does CONCAT('order-', 42) work but SUBSTR(42, 1, 1) doesn't?
Functions differ in which implicit conversions they allow. CONCAT accepts the INT64 here, while SUBSTR only has STRING and BYTES signatures. When in doubt, cast explicitly.
Related
SQL reference
More query and syntax errors
All BigQuery error messages · What 50M daily events say about BigQuery failures
