parquet_reset_settings Subroutine

public subroutine parquet_reset_settings()

Restores every setting to the value it had before this program changed it.

Every knob returns to its factory value. For the Arrow thread pool that means the capacity captured on the first parquet_set_arrow_threads call; if it was never called, that part is a no-op rather than a resize to an invented default, since Arrow's own initial capacity is hardware-dependent and is not a number this library gets to choose.

Every setting added to this module must be reset here. A knob that is settable but not resettable leaks across the boundary this procedure exists to draw, and nothing else would notice -- which is why the test suite asserts the factory value of each one after a reset.

Arguments

None

Source Code

    subroutine parquet_reset_settings()

        if (cfg_arrow_threads_initial >= 1) then
            call parquet_set_thread_pool_capacity(int(cfg_arrow_threads_initial, kind=c_int))
            cfg_arrow_threads_initial = -1
        end if
        cfg_sort_threads = 0
        cfg_prefetch_threads = 0
        cfg_table_threads = 0
        cfg_string_threads = 0
        cfg_random_threads = 0
        cfg_random_parallel_min_elements = 1000_int64
        cfg_default_compression = ""
        cfg_default_compression_level = level_codec_default
        cfg_default_use_threads = .true.
        cfg_verbosity = verb_normal
        cfg_message_stream = stream_stdout
        cfg_sort_counting_path = .true.
        cfg_sort_radix_path = .true.
        cfg_sort_counting_bucket_limit = 0
        cfg_target_row_group_bytes = 0
        cfg_statistics_prescreen = .true.
        cfg_file_date = ""
        call parquet_push_settings_to_cpp()
    end subroutine parquet_reset_settings