BigQuery error · Query and syntax errors
No matching signature for operator
An operator such as =, <, >= or IN got two values of types BigQuery won't compare or combine implicitly: STRING vs INT64, DATE vs TIMESTAMP, DATETIME vs TIMESTAMP. Convert one side explicitly with CAST, SAFE_CAST or a date function so both sides have the same type.
The error message
No matching signature for operator <operator> for argument types: <type1>, <type2> Signature: T1 <operator> T1 Unable to find common supertype for templated argument <T1> Input types for <T1>: {<type1>, <type2>} at [<line>:<column>]
Causes
A string compared with a number
WHERE order_id = 42 when order_id is a STRING fails with No matching signature for operator = for argument types: STRING, INT64. IDs loaded from CSV or JSON as strings are the classic case, as is a parameter quoted in one tool and not in another.
DATE, DATETIME and TIMESTAMP mixed
WHERE order_date >= TIMESTAMP '2026-11-01 00:00:00 UTC' fails with argument types: DATE, TIMESTAMP. BI tools that send date-range filters as TIMESTAMP against a DATE or DATETIME column trigger this often.
Older message format
Before the current multi-line format, BigQuery printed the same error as No matching signature for operator = for argument types: STRING, INT64. Supported signature: ANY = ANY at [<line>:<column>]. Both mean the two sides have no common type.
How to fix it
1. Compare like with like
Quote the literal to match a STRING column, or cast the column. Casting the column in WHERE makes BigQuery convert every row, so prefer changing the literal side.
WITH orders AS (SELECT '42' AS order_id, 19.99 AS amount)
SELECT order_id, amount
FROM orders
WHERE order_id = '42';2. Convert dates and timestamps explicitly
Turn the TIMESTAMP into a DATE (or the DATE into a TIMESTAMP) on the side that is a constant. Keep a partitioning column unwrapped so partition pruning still works.
WITH orders AS (SELECT DATE '2026-11-01' AS order_date)
SELECT order_date
FROM orders
WHERE order_date >= DATE(TIMESTAMP '2026-11-01 00:00:00 UTC', 'UTC');3. Use SAFE_CAST for dirty data
If a STRING column has values that aren't numbers, SAFE_CAST returns NULL for them instead of failing the whole query.
WITH payments AS (
SELECT '100' AS amount_text UNION ALL
SELECT 'n/a'
)
SELECT amount_text
FROM payments
WHERE SAFE_CAST(amount_text AS INT64) > 50;How to prevent it
- Load IDs and amounts with explicit schemas instead of autodetect, so types are consistent across tables.
- Use typed query parameters in applications instead of building SQL strings, so a filter value keeps its type.
- Dry-run queries in CI: type errors are found at analysis time, for free.
FAQ
Is a query with a type mismatch billed?
No. It fails during analysis, before reading data, so it costs nothing on-demand and uses no slots under editions.
Does casting a column in WHERE stop partition pruning?
Wrapping the partitioning column in a function other than the few supported ones can prevent pruning and make the query scan, and bill, every partition. Convert the constant side instead.
Can BigQuery compare INT64 with FLOAT64 or NUMERIC?
Yes. Numeric types coerce to a common supertype, so those comparisons work. The error appears for types with no common supertype, such as STRING and INT64 or DATE and TIMESTAMP.
Related
SQL reference
More query and syntax errors
All BigQuery error messages · What 50M daily events say about BigQuery failures
