Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: mention and clarify meaning of ! in schemas #10243

Open
1 task done
hottwaj opened this issue Sep 27, 2024 · 7 comments
Open
1 task done

docs: mention and clarify meaning of ! in schemas #10243

hottwaj opened this issue Sep 27, 2024 · 7 comments
Labels
docs Documentation related issues or PRs

Comments

@hottwaj
Copy link

hottwaj commented Sep 27, 2024

Please describe the issue

Current docs online about tables, schemas and data types do not mention that schema types may include an "!" prefix, e.g. a schema might look like this

{'not null float': '!float64',
 'nullable float': 'float64',}

see e.g. https://ibis-project.org/reference/schemas

Probably should be a separate ticket, but I'd also suggest that the use of ! to indicate "not null" could do with a re-think because I think its ambiguous depending on your background e.g. my expectation was that this was the correct interpretation

{'required float': 'float64',  # but ibis actually uses !float64 for this
 'not required float': '!float64',}  # ibis uses float64 for this

Thanks!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@hottwaj hottwaj added the docs Documentation related issues or PRs label Sep 27, 2024
@cpcloud
Copy link
Member

cpcloud commented Sep 27, 2024

Thanks, yep, that should be documented. Any interesting in making a PR to add some docs?

@ahaan1984
Copy link

Hi! Can I try working on this issue?

@cpcloud
Copy link
Member

cpcloud commented Sep 28, 2024

Hi! Can I try working on this issue?

Yes, of course!

@cpcloud
Copy link
Member

cpcloud commented Nov 2, 2024

Would still happily accept a pull request for this!

Ping @IndexSeek if you're interested!

@ahaan1984
Copy link

Hi, I'm sorry for lack of communication from my end, I couldn't work on the issue as I was sick, I'll get a PR created in a few days.

@daniel-bale
Copy link

not sure should I open a new issue

ibis.dtype does not accept string value with nullable=False. It is confusing if one not knowing "!" prefix exists.
Doc should mention this or output more helpful error message.

Also, I cannot find string name of data types in docs. It would be nice to have a table to list all and also mention the "!" prefix.

@gforsyth
Copy link
Member

Hi @daniel-bale -- all the datatype names are listed on this page: https://ibis-project.org/reference/datatypes

And we should support passing nullable as a kwarg when using string-parsing for dtypes. I can put up a PR for that.

gforsyth added a commit that referenced this issue Dec 30, 2024
…10632)

## Description of changes

Noted in #10243, passing `nullable` to `ibis.dtype` when using a string
name for
the dtype leads to an unhelpful error. Instead, we should just support
this.

This adds support for 'primitive' dtype specifications -- there's no
defined
behavior for how to specify nested nullable types with a single keyword
argument, but this should cover most cases.

## Issues closed

xref #10243 but doesn't close it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related issues or PRs
Projects
Status: backlog
Development

No branches or pull requests

5 participants