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

Fix typos and possibly a bug? #509

Merged
merged 1 commit into from Sep 6, 2022

Conversation

BenSandeen
Copy link
Contributor

@BenSandeen BenSandeen commented Aug 24, 2022

Fix a typo in comments, fix some whitespace, and possibly fix a bug??

I haven't been able to get the tests running, so I'm sorry if this fails tests

This is an attempt to resolve this issue: #508

@CLAassistant
Copy link

CLAassistant commented Aug 24, 2022

CLA assistant check
All committers have signed the CLA.

@rtwalker
Copy link
Contributor

Thanks for the PR!

I haven't been able to get the tests running, so I'm sorry if this fails tests

I just kicked them off, so we'll find out shortly :)

Were you trying cargo pgx test pg14? It's good for us to know when things don't work for others.

@BenSandeen
Copy link
Contributor Author

BenSandeen commented Aug 24, 2022

Were you trying cargo pgx test pg14? It's good for us to know when things don't work for others.

I was attempting to run cargo pgx test pg12; I'd have preferred to test against PG 14, but pgx's installation somehow only managed to get PG 12 up and running (despite saying it was installing PG 11, PG 12, PG 13, and PG 14). And which directory am I supposed to run the tests in? I tried both the root directory and extension.

Comment on lines +197 to +198
if *l > 0 {
*l -= 1;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely don't fully understand this code yet, but it seems suspicious that we're using r instead of l here. I could certainly be mistaken, though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is definitely a bug. Great catch!

@BenSandeen BenSandeen changed the title Fix typos and possibly bug? Fix typos and possibly a bug? Aug 25, 2022
@rtwalker
Copy link
Contributor

I was attempting to run cargo pgx test pg12; I'd have preferred to test against PG 14, but pgx's installation somehow only managed to get PG 12 up and running (despite saying it was installing PG 11, PG 12, PG 13, and PG 14). And which directory am I supposed to run the tests in? I tried both the root directory and extension.

CI is reporting tests passing and I think it's OK if you just want to rely on that for this size of PR.

If you still want to get a setup that you can use for developing and testing locally though I'm happy to try to assist. Otherwise, just ignore the below :)

To tell pgx to only care about PG14 during init, you can either

  • cargo pgx init --pg14 /path/to/pg_config if you have a local PostgreSQL 14 installed that you want pgx to use
  • cargo pgx init --pg14 download to use a PostgreSQL installation that pgx will download and manage for testing

Tests should be run from the extension/ subdirectory. (I don't love it, but perhaps we can at least make that explicit in the README)

Copy link
Contributor

@JLockerman JLockerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that looks like a bug in the bias correction code. I suspect it's a significant contributor to issue #508

@BenSandeen
Copy link
Contributor Author

Yup, that looks like a bug in the bias correction code. I suspect it's a significant contributor to issue #508

I spent some more time thinking about this, and I'm less confident than I originally was that it'll completely resolve that issue (although I still don't fully understand this code :P ). There are some tests that are still passing when run against this PR that assert that the estimate_count() method returns values with greater error than we'd expect. Specifically, the following tests that use a value for b of 12 or greater that assert a relative error of greater than 10%:

Comment on lines +197 to +198
if *l > 0 {
*l -= 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is definitely a bug. Great catch!

@WireBaron
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 6, 2022

@bors bors bot merged commit 9a4bf31 into timescale:main Sep 6, 2022
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

Successfully merging this pull request may close these issues.

None yet

5 participants