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

r.table().map().coerceTo(object) error #2802

Closed
wojons opened this issue Aug 4, 2014 · 8 comments
Closed

r.table().map().coerceTo(object) error #2802

wojons opened this issue Aug 4, 2014 · 8 comments
Assignees
Milestone

Comments

@wojons
Copy link
Contributor

wojons commented Aug 4, 2014

Doing something like the above but will show it again here.

r.table().map().coerceTo('object')
RqlRuntimeError: Cannot coerce STREAM to OBJECT in:

but if i do it like

r.table().map().coerceTo('array').coerceTo('object')

That works fine i feel like if the system comes across this type of error it where changing it to array and then object would solve it it should do it with out having throw out an error. I guess this should be considered one of the first query optimizes

@asakatida
Copy link
Contributor

This is a particular case of the #2721 proposal.

@mlucy
Copy link
Member

mlucy commented Aug 4, 2014

This seems only somewhat related; we could easily define a stream -> object coercion without implicitly converting streams to arrays.

@wojons
Copy link
Contributor Author

wojons commented Aug 4, 2014

How ever it gets done. New users would be confused on how to do this so it touches on use ability

@coffeemug coffeemug added this to the subsequent milestone Aug 12, 2014
@danielmewes danielmewes modified the milestones: 2.1, subsequent Mar 24, 2015
@danielmewes danielmewes modified the milestones: 2.1, 2.1-polish Apr 22, 2015
@mlucy
Copy link
Member

mlucy commented Apr 22, 2015

I think we should do this as described.

@danielmewes -- how would you feel about bumping this to polish?

@mlucy
Copy link
Member

mlucy commented Apr 22, 2015

Er, nevermind, beat me to it ^.^

@danielmewes
Copy link
Member

I have no objections. We should overload object for streams.

@danielmewes
Copy link
Member

Marking settled as suggested.

@encryptio
Copy link
Contributor

Fixed in 2fcc0b5 in next, CL 3211

encryptio added a commit that referenced this issue Sep 14, 2015
The code was limiting the source type in SEQUENCE -> OBJECT coercions to only be
an array, but this is misleading and unhelpful.

There's a possibility of using too much memory for this (because we have
an array size limit but no object size limit), but there are other solutions
being worked on for that problem more generally.

Fixes #2802
@danielmewes danielmewes modified the milestones: 2.2-polish, 2.2 Oct 29, 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

6 participants