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

com.yammer.breakerbox.jdbi.DependencyDB#findLatest is failing on Oracle DB #47

Open
maksymgendin opened this issue Dec 16, 2017 · 5 comments

Comments

@maksymgendin
Copy link
Contributor

Hi!

com.yammer.breakerbox.jdbi.DependencyDB#findLatest is failing on Oracle DB because of limit 1 in the query...I wanted to discuss possible solutions to fix it 😄 With Hibernate it would be simple, but I have no idea if there is a nice solution with JDBI except calling com.yammer.breakerbox.jdbi.DependencyDB#all (the result list is ordered via order by timestamp desc) and getting the first entry in the result list...

Best regards
Maksym

@maksymgendin
Copy link
Contributor Author

@chrisgray Any thoughts on it?

@chrisgray
Copy link
Contributor

I'd suggest us rewriting the findLatest SQL query to instead of trying to leverage limit 1 or fetch first rows or using rownum. Perhaps we just rewrite the select overall to do a sub-select to find the max of the timestamps and then use that to produce similar output to the current limit 1 query. That way it doesn't have to fight against the different sql syntaxes for row limitation.

@maksymgendin
Copy link
Contributor Author

@chrisgray Is my pull request O.K.?

@chrisgray
Copy link
Contributor

@maksymgendin I'm sorry but I'm no longer a Yammer employee so I'm unable to merge your PR. We'd have to get someone from Yammer to merge this in.

@maksymgendin
Copy link
Contributor Author

@clarkbreyman-yammer @bmorton @chrismohr @daniel-robertson @eoh @geoffreymoller @ipoval @jamessheridan @jaylaney @joelklabo @kevn @SirAlvarex @smoak

Hi guys! Could you please take a look at my pull request for this issue and merge it if it's O.K.? It's getting really urgent. Thanks in advance! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants