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

Should datum_t() == datum_t() crash or not? #3568

Open
mlucy opened this issue Jan 14, 2015 · 5 comments
Open

Should datum_t() == datum_t() crash or not? #3568

mlucy opened this issue Jan 14, 2015 · 5 comments
Assignees
Milestone

Comments

@mlucy
Copy link
Member

mlucy commented Jan 14, 2015

Opinions?

@mlucy mlucy self-assigned this Jan 14, 2015
@mlucy mlucy added this to the 1.16 milestone Jan 14, 2015
@timmaxw
Copy link
Member

timmaxw commented Jan 14, 2015

I'd say "no". A related question is whether datum_t() < datum_t::null() should crash.

@danielmewes
Copy link
Member

I think we should probably allow all comparisons with uninitialized datums, including < != and ==.
I don't think it matters where they sort though.

Additionally we can consider adding an assertion (but not a guarantee) that uninitialized datum_ts don't get < compared.

@mlucy
Copy link
Member Author

mlucy commented Jan 14, 2015

I'm a little torn on this; datum_t() is basically replacing counted_t<datum_t>() from before, so in my mind datum_t() < datum_t::null() is equivalent to *counted_t<datum_t>() == *datum_t::null(), which should clearly crash. (Also, in general, it might make sense to force people to explicitly handle the uninitialized case rather than using uninitialized data like normal data.)

@mlucy
Copy link
Member Author

mlucy commented Jan 14, 2015

Also also, the current system has the pleasant property that if uninitialized data slips through into the normal ReQL code you get an error immediately rather than it being treated normally until something tries to send it to the user or whatever.

@mlucy mlucy modified the milestones: 1.16-polish, 1.16 Jan 15, 2015
@mlucy
Copy link
Member Author

mlucy commented Jan 15, 2015

Moving to polish because we obviously wouldn't hold the release for an internal issue like this. Not sure why I added it to 1.16 initially.

@danielmewes danielmewes modified the milestones: 1.16-polish, 2.0-polish Jan 30, 2015
@danielmewes danielmewes modified the milestones: backlog, 2.0-polish Mar 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants