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

IS DISTINCT FROM bug with ObjectIdFunctions #11869

Closed
dickson-conde opened this issue Nov 7, 2018 · 10 comments
Closed

IS DISTINCT FROM bug with ObjectIdFunctions #11869

dickson-conde opened this issue Nov 7, 2018 · 10 comments
Labels

Comments

@dickson-conde
Copy link

dickson-conde commented Nov 7, 2018

I'm getting the error:

com.facebook.presto.metadata.OperatorNotFoundException: 'IS DISTINCT FROM' cannot be applied to ObjectId, ObjectId

when trying to select from a view that pulls data from a MongoDB connector despite 'IS DISTINCT FROM' not being used in the view. I'm assuming there's some background logic that happens with joins/aggregations that uses the 'IS DISTINCT FROM' command.

The select works in presto version .188 but does not work in version .203 when testing a presto upgrade.

@dain
Copy link
Contributor

dain commented Nov 7, 2018

Originally IS DISTINCT FROM was automatically generated, but with the introduction of types like ROW, it is not longer possible so it must be manually provided. When this was changed someone missed the Postgres objectid type. The function should be added to https://github.com/prestodb/presto/blob/master/presto-mongodb/src/main/java/com/facebook/presto/mongodb/ObjectIdFunctions.java. I would look at https://github.com/prestodb/presto/blob/master/presto-main/src/main/java/com/facebook/presto/type/VarcharOperators.java#L244 for an example

@electrum
Copy link
Contributor

electrum commented Nov 7, 2018

With the exception of array, map, and row, all of the operators are the same. Does it make sense to require every type to implement the same boilerplate? The INDETERMINATE operator seems to have the same problem.

Related, we should implement XX_HASH_64 for ObjectId.

@dain
Copy link
Contributor

dain commented Nov 7, 2018

@electrum If possible, I'd like the automatic generation behavior back also.

@findepi
Copy link
Contributor

findepi commented Feb 14, 2019

The fix is available in Presto 303 release.

@az-stripe
Copy link

az-stripe commented Mar 11, 2019

@findepi Is the 303 in your above comment a typo? Or are releases numbered in some other way, in addition to the 0.203 format?

@findepi
Copy link
Contributor

findepi commented Mar 12, 2019

@az-stripe you can get it from https://prestosql.io/download.html

@az-stripe
Copy link

az-stripe commented Mar 12, 2019

@findepi oh wow what, what is the difference between http://prestodb.github.io/ and https://prestosql.io/ , i've only ever seen the former, is 305 ahead of the releases in prestodb.github.io?

@rongrong
Copy link
Contributor

@az-stripe prestosql is a fork from prestodb at around release 215/216. the prestosql release starts from 300.

@findepi
Copy link
Contributor

findepi commented Mar 12, 2019

@az-stripe , @rongrong is right. (thanks @rongrong for clarifying the version numbers!)
prestosql can be seen as a fork from prestodb... Or vice versa -- especially if you consider the fact that all top contributors (https://github.com/prestodb/presto/graphs/contributors) are there 🚀

@stale
Copy link

stale bot commented Jun 23, 2021

This issue has been automatically marked as stale because it has not had any activity in the last 2 years. If you feel that this issue is important, just comment and the stale tag will be removed; otherwise it will be closed in 7 days. This is an attempt to ensure that our open issues remain valuable and relevant so that we can keep track of what needs to be done and prioritize the right things.

@stale stale bot added the stale label Jun 23, 2021
@stale stale bot closed this as completed Jul 21, 2021
v-jizhang added a commit to v-jizhang/presto that referenced this issue Sep 14, 2022
Cherry-pick of trinodb/trino#215
and fix trinodb/trino@d780fa0

Solves prestodb#11869

Co-authored-by: Piotr Findeisen <piotr.findeisen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants