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

UINT32 mods in support of schema-printer PR #342 #343

Merged
merged 3 commits into from
Jan 7, 2022

Conversation

johnkerl
Copy link
Collaborator

@johnkerl johnkerl commented Jan 7, 2022

This is in support of #342, which will be rebased atop this.

@shortcut-integration
Copy link

@johnkerl johnkerl marked this pull request as draft January 7, 2022 18:28
@johnkerl johnkerl force-pushed the kerl/sc-12282-uint32 branch from 1530b81 to a777faf Compare January 7, 2022 18:53
@@ -131,6 +131,15 @@ attr <- tiledb:::libtiledb_attribute(ctx, "a1", "INT32", filter_list, 1, FALSE)
expect_true(is(attr, "externalptr"))
#})

#test_that("basic integer libtiledb_attr constructor works", {
##ctx <- tiledb:::libtiledb_ctx()
ctx <- tiledb_get_context()@ptr
Copy link
Contributor

Choose a reason for hiding this comment

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

(That's an old test file and an old / unusual construct. On the margin I'd rather not propagate it.)

filter <- tiledb:::libtiledb_filter(ctx, "NONE")
filter_list <- tiledb:::libtiledb_filter_list(ctx, c(filter))
attr <- tiledb:::libtiledb_attribute(ctx, "a1", "UINT32", filter_list, 1, FALSE)
expect_true(is(attr, "externalptr"))
Copy link
Contributor

Choose a reason for hiding this comment

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

That is sadly a somewhat uninformative test (as 'anything' could be an external pointer). Not much we can do about it. You could test that the attr is in fact an attribute but maybe this whole block is marginal.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks @eddelbuettel ! I made an effort to copy UINT32 attribute-fill-value tests from all the existing INT32 attribute-fill-value test I could find -- perhaps we can improve both the old and the new on this PR? Or on a separate PR perhaps?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just remnove this block. We have a test for UINT32 which is good.

There is an testfile inst/tinytest/test_filterlist.R so if the test is for filterlist changes maybe that would have been better?

Copy link
Collaborator Author

@johnkerl johnkerl Jan 7, 2022

Choose a reason for hiding this comment

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

Thanks @eddelbuettel ! I'll take a look. Perhaps that will be a good place to add coverage for old INT32 cases as well as new UINT32 coverage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@eddelbuettel on further reflection, I believe lines 89-101 of inst/tinytest/test_attr.R on this PR are the right location, since they test tiledb_attribute_set_fill_value and tiledb_attribute_get_fill_value which are functions modified on this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Absolutely!

I was harping about the changes to a file I could have / should have nuked but didn't and that change you kindly removed. This one is now tight and focussed..

Copy link
Contributor

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

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

Looks modulo the minor comment re the one test. Let me know if you want to make another pass / commit here or if you prefer that I merge.

@johnkerl johnkerl marked this pull request as ready for review January 7, 2022 19:32
@johnkerl
Copy link
Collaborator Author

johnkerl commented Jan 7, 2022

Replied on #343 (comment) -- please let me know what you think -- thanks @eddelbuettel !

@eddelbuettel eddelbuettel merged commit 7c9af4c into master Jan 7, 2022
@johnkerl johnkerl deleted the kerl/sc-12282-uint32 branch January 7, 2022 20:47
@johnkerl
Copy link
Collaborator Author

johnkerl commented Jan 7, 2022

Thanks @eddelbuettel !

johnkerl added a commit that referenced this pull request Jan 7, 2022
johnkerl added a commit that referenced this pull request Jan 7, 2022
@eddelbuettel eddelbuettel mentioned this pull request Jan 24, 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.

2 participants