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

Add overload to Array::create that explicitly accepts a context. #5325

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/cpp_api/aggregates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/array_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array_metadata() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/array_schema_evolution.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void create_array(const Context& ctx) {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_uri, schema);
Array::create(ctx, array_uri, schema);
}

void write_array(const Context& ctx) {
Expand Down
4 changes: 2 additions & 2 deletions examples/cpp_api/axes_labels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void create_data_array(tiledb::Context& ctx, const std::string& array_uri) {
schema.set_allows_dups(false);

// Create the (empty) array on disk.
tiledb::Array::create(array_uri, schema);
tiledb::Array::create(ctx, array_uri, schema);
}

void create_axes_array(tiledb::Context& ctx, const std::string& array_uri) {
Expand All @@ -96,7 +96,7 @@ void create_axes_array(tiledb::Context& ctx, const std::string& array_uri) {
schema.set_allows_dups(true);

// Create the (empty) array on disk.
tiledb::Array::create(array_uri, schema);
tiledb::Array::create(ctx, array_uri, schema);
}

void write_axes_array(tiledb::Context& ctx, const std::string& array_uri) {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/consolidation_plan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_fragment(int min, int max) {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/current_domain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void create_array(Context& ctx, const std::string& array_uri) {
ArraySchemaExperimental::set_current_domain(ctx, schema, current_domain);

// Create the (empty) array on disk
Array::create(array_uri, schema);
Array::create(ctx, array_uri, schema);
}

void print_current_domain(Context& ctx) {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/deletes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/encryption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) encrypted array.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/enumerations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void create_array() {
// Finally, we add the attribute as per normal.
schema.add_attribute(attr);

Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/filters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void create_array() {
schema.add_attribute(a1).add_attribute(a2);

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/fragment_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/fragments_consolidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array_1() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/groups.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void create_array(const std::string& array_name, tiledb_array_type_t type) {
ArraySchema schema(ctx, type);
schema.set_domain(domain).set_order({{TILEDB_ROW_MAJOR, TILEDB_ROW_MAJOR}});
schema.add_attribute(Attribute::create<int>(ctx, "a"));
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void create_arrays_groups() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/multi_attribute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void create_array() {
schema.add_attribute(Attribute::create<float[2]>(ctx, "a2"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/multi_range_subarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/nullable_attribute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void create_array() {
schema.add_attribute(a3);

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void create_array(const std::string& array_name, tiledb_array_type_t type) {
ArraySchema schema(ctx, type);
schema.set_domain(domain).set_order({{TILEDB_ROW_MAJOR, TILEDB_ROW_MAJOR}});
schema.add_attribute(Attribute::create<int>(ctx, "a"));
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void move_remove_obj() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/png_ingestion_webp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void create_array(
schema.add_attribute(rgba);

// Create the empty array on disk.
Array::create(array_path, schema);
Array::create(ctx, array_path, schema);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/query_condition_dense.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void create_array(Context& ctx) {
schema.add_attribute(a).add_attribute(b).add_attribute(c).add_attribute(d);

// Create the (empty) array.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/query_condition_sparse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void create_array(Context& ctx) {
.add_attribute(Attribute::create<float>(ctx, "d"));

// Create the (empty) array.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/quickstart_dense.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void create_array(const Context& ctx) {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name_, schema);
Array::create(ctx, array_name_, schema);
}

void write_array(const Context& ctx) {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/quickstart_dimension_labels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void create_array(const Context& ctx, const char* array_uri) {
ctx, schema, 0, "y", TILEDB_INCREASING_DATA, TILEDB_FLOAT64);
ArraySchemaExperimental::add_dimension_label(
ctx, schema, 1, "timestamp", TILEDB_INCREASING_DATA, TILEDB_DATETIME_SEC);
Array::create(array_uri, schema);
Array::create(ctx, array_uri, schema);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/quickstart_sparse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/quickstart_sparse_heter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int32_t>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/quickstart_sparse_string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int32_t>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/reading_dense_layouts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/reading_incomplete.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void create_array() {
schema.add_attribute(Attribute::create<std::string>(ctx, "a2"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/reading_sparse_layouts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/using_tiledb_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void create_array(uint32_t row_tile_extent, uint32_t col_tile_extent) {
schema.set_domain(dom);
schema.add_attribute(Attribute::create<int32_t>(ctx, "a"));

Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/variable_length.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void create_array() {
schema.add_attribute(Attribute::create<std::vector<int>>(ctx, "a2"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/writing_dense_global.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/writing_dense_global_expansion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array_global() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/writing_dense_multiple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array_1() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/writing_dense_padding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/writing_sparse_global.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp_api/writing_sparse_multiple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void create_array() {
schema.add_attribute(Attribute::create<int>(ctx, "a"));

// Create the (empty) array on disk.
Array::create(array_name, schema);
Array::create(ctx, array_name, schema);
}

void write_array() {
Expand Down
2 changes: 1 addition & 1 deletion examples/png_ingestion/src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void create_array(
.add_attribute(Attribute::create<uint8_t>(ctx, "alpha"));

// Create the (empty) array on disk.
Array::create(array_path, schema);
Array::create(ctx, array_path, schema);
}

/**
Expand Down
Loading
Loading