chromium/third_party/perfetto/src/trace_processor/db/table.cc

/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "src/trace_processor/db/table.h"

#include <algorithm>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>

#include "perfetto/base/logging.h"
#include "perfetto/base/status.h"
#include "perfetto/public/compiler.h"
#include "perfetto/trace_processor/basic_types.h"
#include "perfetto/trace_processor/ref_counted.h"
#include "src/trace_processor/containers/bit_vector.h"
#include "src/trace_processor/containers/row_map.h"
#include "src/trace_processor/containers/string_pool.h"
#include "src/trace_processor/db/column.h"
#include "src/trace_processor/db/column/arrangement_overlay.h"
#include "src/trace_processor/db/column/data_layer.h"
#include "src/trace_processor/db/column/overlay_layer.h"
#include "src/trace_processor/db/column/range_overlay.h"
#include "src/trace_processor/db/column/selector_overlay.h"
#include "src/trace_processor/db/column/storage_layer.h"
#include "src/trace_processor/db/column/types.h"
#include "src/trace_processor/db/column_storage_overlay.h"
#include "src/trace_processor/db/query_executor.h"

namespace perfetto::trace_processor {

namespace {
Indices;

constexpr uint32_t kIndexVectorThreshold =;

// Returns if |op| is an operation that can use the fact that the data is
// sorted.
bool IsSortingOp(FilterOp op) {}

void ApplyMinMaxQuery(RowMap& rm,
                      Order o,
                      const column::DataLayerChain& chain) {}

void ApplyLimitAndOffset(RowMap& rm, const Query& q) {}

}  // namespace

Table::Table(StringPool* pool,
             uint32_t row_count,
             std::vector<ColumnLegacy> columns,
             std::vector<ColumnStorageOverlay> overlays)
    :{}

Table::~Table() = default;

Table& Table::operator=(Table&& other) noexcept {}

Table Table::Copy() const {}

Table Table::CopyExceptOverlays() const {}

RowMap Table::QueryToRowMap(const Query& q) const {}

Table Table::Sort(const std::vector<Order>& ob) const {}

void Table::OnConstructionCompleted(
    std::vector<RefPtr<column::StorageLayer>> storage_layers,
    std::vector<RefPtr<column::OverlayLayer>> null_layers,
    std::vector<RefPtr<column::OverlayLayer>> overlay_layers) {}

bool Table::HasNullOrOverlayLayer(uint32_t col_idx) const {}

void Table::CreateChains() const {}

base::Status Table::CreateIndex(const std::string& name,
                                std::vector<uint32_t> col_idxs,
                                bool replace) {}

base::Status Table::DropIndex(const std::string& name) {}

void Table::ApplyDistinct(const Query& q, RowMap* rm) const {}

void Table::ApplySort(const Query& q, RowMap* rm) const {}

RowMap Table::TryApplyIndex(const std::vector<Constraint>& c_vec,
                            uint32_t& cs_offset) const {}

RowMap Table::ApplyIdJoinConstraints(const std::vector<Constraint>& cs,
                                     uint32_t& cs_offset) const {}

}  // namespace perfetto::trace_processor