#include "src/trace_processor/perfetto_sql/intrinsics/functions/interval_intersect.h"
#include <algorithm>
#include <cinttypes>
#include <cstdint>
#include <iterator>
#include <memory>
#include <numeric>
#include <string>
#include <string_view>
#include <utility>
#include <variant>
#include <vector>
#include "perfetto/base/compiler.h"
#include "perfetto/base/logging.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/flat_hash_map.h"
#include "perfetto/ext/base/status_or.h"
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/trace_processor/basic_types.h"
#include "src/trace_processor/containers/interval_intersector.h"
#include "src/trace_processor/containers/string_pool.h"
#include "src/trace_processor/db/runtime_table.h"
#include "src/trace_processor/perfetto_sql/engine/function_util.h"
#include "src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.h"
#include "src/trace_processor/perfetto_sql/intrinsics/types/partitioned_intervals.h"
#include "src/trace_processor/sqlite/bindings/sqlite_bind.h"
#include "src/trace_processor/sqlite/bindings/sqlite_column.h"
#include "src/trace_processor/sqlite/bindings/sqlite_function.h"
#include "src/trace_processor/sqlite/bindings/sqlite_result.h"
#include "src/trace_processor/sqlite/bindings/sqlite_stmt.h"
#include "src/trace_processor/sqlite/bindings/sqlite_type.h"
#include "src/trace_processor/sqlite/bindings/sqlite_value.h"
#include "src/trace_processor/sqlite/sqlite_utils.h"
#include "src/trace_processor/util/status_macros.h"
namespace perfetto::trace_processor::perfetto_sql {
namespace {
static const uint32_t kArgCols = …;
static const uint32_t kIdCols = …;
static const uint32_t kPartitionColsOffset = …;
Intervals;
BuilderColType;
struct MultiIndexInterval { … };
BuilderColType FromSqlValueTypeToBuilderType(SqlValue::Type type) { … }
base::StatusOr<std::vector<BuilderColType>> GetPartitionsSqlType(
const Partitions& partitions) { … }
static base::StatusOr<uint32_t> PushPartition(
RuntimeTable::Builder& builder,
const std::vector<Partition*>& partitions) { … }
struct IntervalIntersect : public SqliteFunction<IntervalIntersect> { … };
}
base::Status RegisterIntervalIntersectFunctions(PerfettoSqlEngine& engine,
StringPool* pool) { … }
}