-
Notifications
You must be signed in to change notification settings - Fork 195
chore: Remove Status from ArraySchema, Attribute, Dimension, Domain #5541
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
base: main
Are you sure you want to change the base?
Conversation
@@ -515,25 +512,25 @@ class ArraySchema { | |||
* Sets whether the array allows coordinate duplicates. | |||
* It errors out if set to `1` for dense arrays. | |||
*/ | |||
Status set_allows_dups(bool allows_dups); | |||
void set_allows_dups(bool allows_dups); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. Should return bool
. I won't continue to mark the rest of these for both of our sake :')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only has_dimension
and has_attribute
have value which can now be return this way, the other affected functions do not have out arguments.
if (domain == nullptr) { | ||
return; | ||
} | ||
throw DimensionException( | ||
std::string("Setting the domain to a dimension with type '") + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: no need to cast the exception body to std::string
. Rings true throughout PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for the concatenation
There are a number of old stories which refer to "un-
Status
ing" various parts of the code. I can imagine some benefits of doing this, but a new one concerns our upcoming interoperability with Rust code.The Rust crate we use to interoperate with C++,
cxx
, can generate idiomatic bindings in Rust to use types and call functions which are defined in C++. These bindings can declare and use "opaque" types, i.e. types whose definitions reside within C++ and are invisible to Rust code. However, these types cannot be passed by value to and from Rust functions.Status
is commonly used as a return value from our internal C++ code. This prevents us from declaring bindings for those functions incxx
and thus calling them from Rust. We probably cannot migrateStatus
from an opaque type to a shared type, but we can "un-Status
" the functions we want to use.This pull request "un-
Status
es" the methods of classes in thearray_schema
directory. This will eventually allow them to be called from Rust code.TYPE: NO_HISTORY
DESC: Un-Status array_schema methods