overflow evaluating requirement error on inner_join #817
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm currently working on issue #702, sorting crates by downloads in the past 90 days. I can't seem to get past the following error when doing an inner_join between crates::table and crate_downloads::table:
I am at a loss to understand what this error message actually means or what is provoking it. I thought that there might be something going wrong with the imports and the way crates is associated with crate_downloads, however after comparing to and replicating other places in which inner_join is called successfully I can't figure out what is being done differently in this case.
I read the Associations documentation as well as the BoxedDsl documentation and haven't found anything obviously awry.
I also went through the getting started tutorial listed on the diesel website in hopes of finding something fundamental that I'm missing, but most everything done there seems to be done in this case as well.
The inner_join seems to not error on a single isolated query:
let new_query = crates::table.inner_join(crate_downloads::table).select((ALL_COLUMNS));
This is still commented out in the code with a label of 'works'. Since this standalone query works (compiles), I didn't think that the problem could be due to the crates and crate_downloads tables being set up correctly to do the join. I thought that the problem might instead be coming from the
into_boxed()
function called when initializingquery
, as the error message mentionsBoxedSelectStatement
, however I cannot find any information that supports this.I have some code for the rest of the query below the inner_join line, however the problem persists with or without the addition of this code. For simplicity I currently have it commented out.
Any help would be very much appreciated! @sgrif @carols10cents