-
Notifications
You must be signed in to change notification settings - Fork 2
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
aggregations to dataframe always misses the first pagination #101
Comments
Hi @Andy7475 , thanks for finding this bug 👍 I'll merge the fix as soon as I regain admin rights on this repo. |
Hi Leonard, I can see you have modified the code, but doing 'pip install
pandagg' is still pulling the old code with the error for some reason (even
with 0.2.4); I am modifying it locally for the time being.
Just thought you would like to know :)
Andy
…On Mon, 14 Feb 2022 at 16:52, Léonard Binet ***@***.***> wrote:
Hi @Andy7475 <https://github.com/Andy7475> , thanks for finding this bug
👍 I'll merge the fix as soon as I regain admin rights on this repo.
—
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADBY27FMYZLJMR7SMCVOHCLU3EXL7ANCNFSM5KJD6MAA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Subject: Request for a new release of Pandagg on PyPI Hi Leonard, I was wondering if it would be possible for you to publish a new version of the package from the master branch to PyPI, so that users can easily install the latest version using pip. I understand that this may not be a priority for you, and I would be happy to assist in any way that I can. If there is anything I can do to help, please let me know. Thank you for your time and for maintaining such a valuable package. I look forward to your response. All the best, Andy |
Hi,
This is a really useful package, thank you! I noticed though that scan_composite_agg has a bug. It misses the first page of aggregations. I think it is because you declare variable 'buckets', enter while loop, re-declare it, then iterate over it. So the first version of buckets never has a chance to be iterated over, which is why I presume we always miss the 1st pagination. . Hope that makes sense, think you just need to move a line
YOU DECLARE BUCKETS HERE
buckets: List[BucketDict] = r.aggregations.data[a_name][ # type: ignore
"buckets"
]
after_key: AfterKey = r.aggregations.data[a_name]["after_key"] # type: ignore
THEN CHANGE IT HERE, BEFORE YOU HAVE HAD A CHANCE TO ITERATE OVER THE OLD ONE
buckets = agg_clause_response["buckets"] # type: ignore ****MOVE THIS LINE TO LATER
for bucket in buckets:
The text was updated successfully, but these errors were encountered: