Skip to content

Conversation

@NickCrews
Copy link
Contributor

@github-actions github-actions bot added the datatypes Issues relating to ibis's datatypes (under `ibis.expr.datatypes`) label Sep 13, 2025


@infer.register(Deferred)
def infer_deferred(value: Deferred) -> NoReturn:
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry for my ignorance: is there somewhere I can refer to to get an idea of circumstances that cause inference to be triggered? seems like its not when building a Deferred which makes sense, so presumably its when incorporating a Deferred into an expression bound to a concrete table or column?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

honestly, I don't see/understand all the cases either.

This is one example that exercises it:

import ibis

t = ibis.memtable({"a": [1, 2, 3], "b": [4, None, 6]})
t.fill_null({"a": ibis._.b})

I found this by looking up call sites of dt.infer().

I'm not sure this is required/correct to use infer() here. I think probably we should actually be binding the values to the table first, and then we would be able to resolve their values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So maybe we should actually frame this error message as "this is unexpected behavior, please file a bug with the ibis maintainers"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am trying to fix this particular bad implementation at #11698.

There could still be other places in the ibis codebase where you could trigger this.

@NickCrews NickCrews force-pushed the docs-deferred-dtype-error branch from 19e7273 to 004e104 Compare October 17, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datatypes Issues relating to ibis's datatypes (under `ibis.expr.datatypes`)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants