xref: /aosp_15_r20/external/perfetto/src/trace_processor/db/column/dummy_storage.cc (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1 /*
2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "src/trace_processor/db/column/dummy_storage.h"
18 
19 #include <cstdint>
20 #include <optional>
21 #include <vector>
22 
23 #include "perfetto/base/logging.h"
24 #include "perfetto/trace_processor/basic_types.h"
25 #include "src/trace_processor/db/column/data_layer.h"
26 #include "src/trace_processor/db/column/types.h"
27 
28 namespace perfetto::trace_processor::column {
29 
SingleSearch(FilterOp,SqlValue,uint32_t) const30 SingleSearchResult DummyStorage::ChainImpl::SingleSearch(FilterOp,
31                                                          SqlValue,
32                                                          uint32_t) const {
33   PERFETTO_FATAL("Shouldn't be called");
34 }
35 
ValidateSearchConstraints(FilterOp,SqlValue) const36 SearchValidationResult DummyStorage::ChainImpl::ValidateSearchConstraints(
37     FilterOp,
38     SqlValue) const {
39   PERFETTO_FATAL("Shouldn't be called");
40 }
41 
SearchValidated(FilterOp,SqlValue,Range) const42 RangeOrBitVector DummyStorage::ChainImpl::SearchValidated(FilterOp,
43                                                           SqlValue,
44                                                           Range) const {
45   PERFETTO_FATAL("Shouldn't be called");
46 }
47 
IndexSearchValidated(FilterOp,SqlValue,Indices &) const48 void DummyStorage::ChainImpl::IndexSearchValidated(FilterOp,
49                                                    SqlValue,
50                                                    Indices&) const {
51   PERFETTO_FATAL("Shouldn't be called");
52 }
53 
StableSort(Token *,Token *,SortDirection) const54 void DummyStorage::ChainImpl::StableSort(Token*, Token*, SortDirection) const {
55   PERFETTO_FATAL("Shouldn't be called");
56 }
57 
Distinct(Indices &) const58 void DummyStorage::ChainImpl::Distinct(Indices&) const {
59   PERFETTO_FATAL("Shouldn't be called");
60 }
61 
size() const62 uint32_t DummyStorage::ChainImpl::size() const {
63   return 0;
64 }
65 
MaxElement(Indices &) const66 std::optional<Token> DummyStorage::ChainImpl::MaxElement(Indices&) const {
67   PERFETTO_FATAL("Shouldn't be called");
68 }
69 
MinElement(Indices &) const70 std::optional<Token> DummyStorage::ChainImpl::MinElement(Indices&) const {
71   PERFETTO_FATAL("Shouldn't be called");
72 }
73 
Get_AvoidUsingBecauseSlow(uint32_t) const74 SqlValue DummyStorage::ChainImpl::Get_AvoidUsingBecauseSlow(uint32_t) const {
75   PERFETTO_FATAL("Shouldn't be called");
76 }
77 
78 }  // namespace perfetto::trace_processor::column
79