Exemple #1
0
    static void vector(const ColumnString::Chars & data,
        const ColumnString::Offsets & offsets,
        ColumnString::Chars & res_data,
        ColumnString::Offsets & res_offsets)
    {
        res_data.resize(data.size());
        res_offsets.assign(offsets);
        size_t size = offsets.size();

        ColumnString::Offset prev_offset = 0;
        for (size_t i = 0; i < size; ++i)
        {
            for (size_t j = prev_offset; j < offsets[i] - 1; ++j)
                res_data[j] = data[offsets[i] + prev_offset - 2 - j];
            res_data[offsets[i] - 1] = 0;
            prev_offset = offsets[i];
        }
    }
Exemple #2
0
 static void array(const ColumnString::Offsets & offsets, PaddedPODArray<UInt64> & res)
 {
     size_t size = offsets.size();
     for (size_t i = 0; i < size; ++i)
         res[i] = offsets[i] - offsets[i - 1];
 }
Exemple #3
0
 static void vector(const ColumnString::Chars & /*data*/, const ColumnString::Offsets & offsets, PaddedPODArray<UInt64> & res)
 {
     size_t size = offsets.size();
     for (size_t i = 0; i < size; ++i)
         res[i] = offsets[i] - 1 - offsets[i - 1];
 }