MCPcopy Create free account
hub / github.com/apache/arrow / WriteValuesSpaced

Method WriteValuesSpaced

cpp/src/parquet/column_writer.cc:1914–1943  ·  view source on GitHub ↗

\brief Write values with spaces and update page statistics accordingly. \param values input buffer of values to write, including spaces. \param num_values number of non-null values in the values buffer. \param num_spaced_values length of values buffer, including spaces and does not count some nulls from ancestor (e.g. empty lists). \param valid_bits validity bitmap of values buffer, which does no

Source from the content-addressed store, hash-verified

1912 /// \param num_nulls number of nulls in the values buffer as well as nulls from the
1913 /// ancestor (e.g. empty lists).
1914 void WriteValuesSpaced(const T* values, int64_t num_values, int64_t num_spaced_values,
1915 const uint8_t* valid_bits, int64_t valid_bits_offset,
1916 int64_t num_levels, int64_t num_nulls) {
1917 if (num_values != num_spaced_values) {
1918 current_value_encoder_->PutSpaced(values, static_cast<int>(num_spaced_values),
1919 valid_bits, valid_bits_offset);
1920 if (bloom_filter_writer_ != nullptr) {
1921 bloom_filter_writer_->UpdateSpaced(values, num_spaced_values, valid_bits,
1922 valid_bits_offset);
1923 }
1924 } else {
1925 current_value_encoder_->Put(values, static_cast<int>(num_values));
1926 if (bloom_filter_writer_ != nullptr) {
1927 bloom_filter_writer_->Update(values, num_values);
1928 }
1929 }
1930 if (page_statistics_ != nullptr) {
1931 page_statistics_->UpdateSpaced(values, valid_bits, valid_bits_offset,
1932 num_spaced_values, num_values, num_nulls);
1933 }
1934
1935 UpdateUnencodedDataBytes();
1936
1937 if constexpr (std::is_same<T, ByteArray>::value) {
1938 if (chunk_geospatial_statistics_ != nullptr) {
1939 chunk_geospatial_statistics_->UpdateSpaced(values, valid_bits, valid_bits_offset,
1940 num_spaced_values, num_values);
1941 }
1942 }
1943 }
1944};
1945
1946template <typename ParquetType>

Callers

nothing calls this directly

Calls 4

PutSpacedMethod · 0.45
UpdateSpacedMethod · 0.45
PutMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected