Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Sep 28, 2024
1 parent 2f6c442 commit e1215c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apis/python/src/tiledbsoma/_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ def _fill_out_slot_soma_domain(
# Here the slot_domain isn't specified by the user; we're setting it.
# The SOMA spec disallows negative soma_joinid.
if index_column_name == SOMA_JOINID:
slot_domain = (0, 2**31 - 2) # R-friendly, which 2**63-1 is not
slot_domain = 2**63-1
else:
saturated_range = True
elif np.issubdtype(dtype, NPFloating):
Expand Down
4 changes: 3 additions & 1 deletion apis/python/src/tiledbsoma/_sparse_nd_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,10 @@ def _dim_capacity_and_extent(
int64 is returned for the capacity.
"""
if dim_shape is None:
dim_capacity = 2**31 - 2 # Make this friendly for reads by tiledbsoma-r
dim_capacity = 2**63-1
dim_extent = min(dim_capacity, create_options.dim_tile(dim_name, 2048))
# Avoid core array-creation error since max must have room for one tile extent
dim_capacity -= dim_extent
else:
if dim_shape <= 0:
raise ValueError(
Expand Down
9 changes: 3 additions & 6 deletions libtiledbsoma/test/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@

namespace helper {

// This non-obvious number is:
// * Something that fits into signed 32-bit integer for R-friendliness;
// * Is a comfortable tile-extent distance away from 2^31-1 for default
// core tile extent. (Using 2^31-1 exactly would result in a core
// array-creation error.)
const int CORE_DOMAIN_MAX = 2147483646;
// This is 2**63-1, minus 1,000,000 to leave room for core tile extent.
// (Using 2**63-1 exactly would result in a core array-creation error.)
const int64_t CORE_DOMAIN_MAX = 9223372036853775808;

static std::unique_ptr<ArrowSchema> _create_index_cols_info_schema(
const std::vector<DimInfo>& dim_infos);
Expand Down

0 comments on commit e1215c6

Please sign in to comment.