MCPcopy Create free account
hub / github.com/TileDB-Inc/TileDB / expand_current_domain

Function expand_current_domain

examples/cpp_api/current_domain.cc:129–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void expand_current_domain(Context& ctx) {
130 // Get the array schema
131 ArraySchema schema(ctx, array_name);
132
133 // Get the domain
134 Domain domain = schema.domain();
135
136 // Create an ArraySchemaEvolution object
137 ArraySchemaEvolution schema_evolution(ctx);
138
139 // Create the new CurrentDomain object
140 CurrentDomain new_current_domain(ctx);
141
142 // Create an NDRectangle object
143 NDRectangle ndrect(ctx, domain);
144
145 // Assign the range [1, 200] to the rectangle's first dimension
146 ndrect.set_range<int32_t>("d1", 1, 200);
147
148 // Set the NDRectangle to the CurrentDomain
149 new_current_domain.set_ndrectangle(ndrect);
150
151 // Set the current domain to the array schema evolution
152 schema_evolution.expand_current_domain(new_current_domain);
153
154 // Evolve the array
155 schema_evolution.array_evolve(array_name);
156}
157
158int main() {
159 Context ctx;

Callers 1

mainFunction · 0.70

Calls 3

domainMethod · 0.45
set_ndrectangleMethod · 0.45
expand_current_domainMethod · 0.45

Tested by

no test coverage detected