@@ -946,19 +946,13 @@ void Array::load_all_enumerations(bool all_schemas) {
946946 }
947947 // Load all enumerations, discarding the returned list of loaded enumerations.
948948 if (all_schemas) {
949- // Since array open v1 does not initialize array_schemas_all, we need to
950- // either serialize the full schemas with LoadEnumerationsResponse, or
951- // reopen the array using array open v2 (only if the config is set to use
952- // v1) so that we can store the enumerations from the response in the
953- // correct schemas using the schema names.
954-
955- // For now, reopen the array if it's found to be using array open v1.
956- // Once we update to use post_array_schema_from_rest we will always have
957- // array_schemas_all initialized and this could go away.
949+ // Unless we are using array open V3, Array::array_schemas_all_ will not be
950+ // initialized. We throw an exception since this is required to store the
951+ // loaded enumerations.
958952 if (!use_refactored_array_open ()) {
959- throw_if_not_ok (config_. set ( " rest.use_refactored_array_open " , " true " ));
960- throw_if_not_ok ( reopen ());
961- throw_if_not_ok (config_. set ( " rest.use_refactored_array_open" , " false " ) );
953+ throw ArrayException (
954+ " Unable to load enumerations for all array schemas; The array must "
955+ " be opened using ` rest.use_refactored_array_open=true` " );
962956 }
963957
964958 get_enumerations_all_schemas ();
0 commit comments