You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace dump functions with operator<< overloads (#5026)
[sc-32959]
In TileDB-Py `schema.dump()` is called without any argument, leading
writes to C `stdout` which Jupyter does not capture:
https://github.com/TileDB-Inc/TileDB/blob/76dbda43d98bff7b71527fbffd0dfd657437b00f/tiledb/sm/array_schema/array_schema.cc#L693-L694
Implementing a function that captures the output of the `dump()` to a
string and then prints it to `sys.stdout` will fix the problem. Of
course, `ArraySchema::dump(std::string*)` calls the `dump()` functions
of other classes, so those need to be implemented as well.
**But** we don't even want to write functions called dump internally;
that's a C idiom; we will reserve that term for the C API only. Since
we're dealing with text output, everything here can be done better by
overloading `operator<<` for `std::ostream`.
---
TYPE: IMPROVEMENT
DESC: Output of `schema.dump()` in TileDB-Py is not captured by Jupyter.
Replacing `dump` functions with `operator<<` overloads will give the
ability to print the resulted string from Python.
---------
Co-authored-by: Eric Hughes <[email protected]>
0 commit comments