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

Method WriteValuesSpaced

cpp/src/parquet/column_writer.cc:1913–1942  ·  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

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