Skip to content

Conversation

@AbhishekASLK
Copy link
Contributor

This PR annotate isinf(expr) for DuckDB as BOOLEAN

duckdb> select isinf('Infinity'::float);
┌──────────────────────────────────┐
│ isinf(CAST('Infinity' AS FLOAT)) │
╞══════════════════════════════════╡
│                             true │
└──────────────────────────────────┘

Official documentation:
https://duckdb.org/docs/stable/sql/functions/numeric#isinfx

Comment on lines 21 to 26
**{
expr_type: {"returns": exp.DataType.Type.BOOLEAN}
for expr_type in {
exp.IsInf,
}
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in the base annotator, not here. It applies generally AFAICT.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay!

Copy link
Collaborator

@VaggelisD VaggelisD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also remove it from BigQuery's type annotator given that we moved this to base

Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@georgesittas georgesittas merged commit bec45a5 into tobymao:main Jan 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants