tp: Rename storage::Storage to column::Column

Change-Id: I4b054333dcbd314c8dc16b59a3887f2bded29a46
diff --git a/Android.bp b/Android.bp
index 8363428..ee7f6b6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -2251,8 +2251,8 @@
         ":perfetto_src_shared_lib_test_protos_protos",
         ":perfetto_src_shared_lib_test_utils",
         ":perfetto_src_trace_processor_containers_containers",
+        ":perfetto_src_trace_processor_db_column_column",
         ":perfetto_src_trace_processor_db_db",
-        ":perfetto_src_trace_processor_db_storage_storage",
         ":perfetto_src_trace_processor_export_json",
         ":perfetto_src_trace_processor_importers_android_bugreport_android_bugreport",
         ":perfetto_src_trace_processor_importers_common_common",
@@ -10761,6 +10761,47 @@
     ],
 }
 
+// GN: //src/trace_processor/db/column:column
+filegroup {
+    name: "perfetto_src_trace_processor_db_column_column",
+    srcs: [
+        "src/trace_processor/db/column/arrangement_overlay.cc",
+        "src/trace_processor/db/column/column.cc",
+        "src/trace_processor/db/column/dense_null_overlay.cc",
+        "src/trace_processor/db/column/dummy_storage.cc",
+        "src/trace_processor/db/column/id_storage.cc",
+        "src/trace_processor/db/column/null_overlay.cc",
+        "src/trace_processor/db/column/numeric_storage.cc",
+        "src/trace_processor/db/column/selector_overlay.cc",
+        "src/trace_processor/db/column/set_id_storage.cc",
+        "src/trace_processor/db/column/string_storage.cc",
+        "src/trace_processor/db/column/utils.cc",
+    ],
+}
+
+// GN: //src/trace_processor/db/column:fake_storage
+filegroup {
+    name: "perfetto_src_trace_processor_db_column_fake_storage",
+    srcs: [
+        "src/trace_processor/db/column/fake_storage.cc",
+    ],
+}
+
+// GN: //src/trace_processor/db/column:unittests
+filegroup {
+    name: "perfetto_src_trace_processor_db_column_unittests",
+    srcs: [
+        "src/trace_processor/db/column/arrangement_overlay_unittest.cc",
+        "src/trace_processor/db/column/dense_null_overlay_unittest.cc",
+        "src/trace_processor/db/column/id_storage_unittest.cc",
+        "src/trace_processor/db/column/null_overlay_unittest.cc",
+        "src/trace_processor/db/column/numeric_storage_unittest.cc",
+        "src/trace_processor/db/column/selector_overlay_unittest.cc",
+        "src/trace_processor/db/column/set_id_storage_unittest.cc",
+        "src/trace_processor/db/column/string_storage_unittest.cc",
+    ],
+}
+
 // GN: //src/trace_processor/db:compare
 filegroup {
     name: "perfetto_src_trace_processor_db_compare",
@@ -10779,47 +10820,6 @@
     ],
 }
 
-// GN: //src/trace_processor/db/storage:fake_storage
-filegroup {
-    name: "perfetto_src_trace_processor_db_storage_fake_storage",
-    srcs: [
-        "src/trace_processor/db/storage/fake_storage.cc",
-    ],
-}
-
-// GN: //src/trace_processor/db/storage:storage
-filegroup {
-    name: "perfetto_src_trace_processor_db_storage_storage",
-    srcs: [
-        "src/trace_processor/db/storage/arrangement_overlay.cc",
-        "src/trace_processor/db/storage/dense_null_overlay.cc",
-        "src/trace_processor/db/storage/dummy_storage.cc",
-        "src/trace_processor/db/storage/id_storage.cc",
-        "src/trace_processor/db/storage/null_overlay.cc",
-        "src/trace_processor/db/storage/numeric_storage.cc",
-        "src/trace_processor/db/storage/selector_overlay.cc",
-        "src/trace_processor/db/storage/set_id_storage.cc",
-        "src/trace_processor/db/storage/storage.cc",
-        "src/trace_processor/db/storage/string_storage.cc",
-        "src/trace_processor/db/storage/utils.cc",
-    ],
-}
-
-// GN: //src/trace_processor/db/storage:unittests
-filegroup {
-    name: "perfetto_src_trace_processor_db_storage_unittests",
-    srcs: [
-        "src/trace_processor/db/storage/arrangement_overlay_unittest.cc",
-        "src/trace_processor/db/storage/dense_null_overlay_unittest.cc",
-        "src/trace_processor/db/storage/id_storage_unittest.cc",
-        "src/trace_processor/db/storage/null_overlay_unittest.cc",
-        "src/trace_processor/db/storage/numeric_storage_unittest.cc",
-        "src/trace_processor/db/storage/selector_overlay_unittest.cc",
-        "src/trace_processor/db/storage/set_id_storage_unittest.cc",
-        "src/trace_processor/db/storage/string_storage_unittest.cc",
-    ],
-}
-
 // GN: //src/trace_processor/db:unittests
 filegroup {
     name: "perfetto_src_trace_processor_db_unittests",
@@ -13635,11 +13635,11 @@
         ":perfetto_src_shared_lib_unittests",
         ":perfetto_src_trace_processor_containers_containers",
         ":perfetto_src_trace_processor_containers_unittests",
+        ":perfetto_src_trace_processor_db_column_column",
+        ":perfetto_src_trace_processor_db_column_fake_storage",
+        ":perfetto_src_trace_processor_db_column_unittests",
         ":perfetto_src_trace_processor_db_compare",
         ":perfetto_src_trace_processor_db_db",
-        ":perfetto_src_trace_processor_db_storage_fake_storage",
-        ":perfetto_src_trace_processor_db_storage_storage",
-        ":perfetto_src_trace_processor_db_storage_unittests",
         ":perfetto_src_trace_processor_db_unittests",
         ":perfetto_src_trace_processor_export_json",
         ":perfetto_src_trace_processor_importers_android_bugreport_android_bugreport",
@@ -14356,8 +14356,8 @@
         ":perfetto_src_protozero_proto_ring_buffer",
         ":perfetto_src_protozero_protozero",
         ":perfetto_src_trace_processor_containers_containers",
+        ":perfetto_src_trace_processor_db_column_column",
         ":perfetto_src_trace_processor_db_db",
-        ":perfetto_src_trace_processor_db_storage_storage",
         ":perfetto_src_trace_processor_export_json",
         ":perfetto_src_trace_processor_importers_android_bugreport_android_bugreport",
         ":perfetto_src_trace_processor_importers_common_common",
@@ -14590,8 +14590,8 @@
         ":perfetto_src_protozero_proto_ring_buffer",
         ":perfetto_src_protozero_protozero",
         ":perfetto_src_trace_processor_containers_containers",
+        ":perfetto_src_trace_processor_db_column_column",
         ":perfetto_src_trace_processor_db_db",
-        ":perfetto_src_trace_processor_db_storage_storage",
         ":perfetto_src_trace_processor_export_json",
         ":perfetto_src_trace_processor_importers_android_bugreport_android_bugreport",
         ":perfetto_src_trace_processor_importers_common_common",
diff --git a/BUILD b/BUILD
index 845329e..ce2259c 100644
--- a/BUILD
+++ b/BUILD
@@ -216,8 +216,8 @@
     srcs = [
         ":src_kernel_utils_syscall_table",
         ":src_protozero_proto_ring_buffer",
+        ":src_trace_processor_db_column_column",
         ":src_trace_processor_db_db",
-        ":src_trace_processor_db_storage_storage",
         ":src_trace_processor_export_json",
         ":src_trace_processor_importers_android_bugreport_android_bugreport",
         ":src_trace_processor_importers_common_common",
@@ -1290,33 +1290,33 @@
     linkstatic = True,
 )
 
-# GN target: //src/trace_processor/db/storage:storage
+# GN target: //src/trace_processor/db/column:column
 perfetto_filegroup(
-    name = "src_trace_processor_db_storage_storage",
+    name = "src_trace_processor_db_column_column",
     srcs = [
-        "src/trace_processor/db/storage/arrangement_overlay.cc",
-        "src/trace_processor/db/storage/arrangement_overlay.h",
-        "src/trace_processor/db/storage/dense_null_overlay.cc",
-        "src/trace_processor/db/storage/dense_null_overlay.h",
-        "src/trace_processor/db/storage/dummy_storage.cc",
-        "src/trace_processor/db/storage/dummy_storage.h",
-        "src/trace_processor/db/storage/id_storage.cc",
-        "src/trace_processor/db/storage/id_storage.h",
-        "src/trace_processor/db/storage/null_overlay.cc",
-        "src/trace_processor/db/storage/null_overlay.h",
-        "src/trace_processor/db/storage/numeric_storage.cc",
-        "src/trace_processor/db/storage/numeric_storage.h",
-        "src/trace_processor/db/storage/selector_overlay.cc",
-        "src/trace_processor/db/storage/selector_overlay.h",
-        "src/trace_processor/db/storage/set_id_storage.cc",
-        "src/trace_processor/db/storage/set_id_storage.h",
-        "src/trace_processor/db/storage/storage.cc",
-        "src/trace_processor/db/storage/storage.h",
-        "src/trace_processor/db/storage/string_storage.cc",
-        "src/trace_processor/db/storage/string_storage.h",
-        "src/trace_processor/db/storage/types.h",
-        "src/trace_processor/db/storage/utils.cc",
-        "src/trace_processor/db/storage/utils.h",
+        "src/trace_processor/db/column/arrangement_overlay.cc",
+        "src/trace_processor/db/column/arrangement_overlay.h",
+        "src/trace_processor/db/column/column.cc",
+        "src/trace_processor/db/column/column.h",
+        "src/trace_processor/db/column/dense_null_overlay.cc",
+        "src/trace_processor/db/column/dense_null_overlay.h",
+        "src/trace_processor/db/column/dummy_storage.cc",
+        "src/trace_processor/db/column/dummy_storage.h",
+        "src/trace_processor/db/column/id_storage.cc",
+        "src/trace_processor/db/column/id_storage.h",
+        "src/trace_processor/db/column/null_overlay.cc",
+        "src/trace_processor/db/column/null_overlay.h",
+        "src/trace_processor/db/column/numeric_storage.cc",
+        "src/trace_processor/db/column/numeric_storage.h",
+        "src/trace_processor/db/column/selector_overlay.cc",
+        "src/trace_processor/db/column/selector_overlay.h",
+        "src/trace_processor/db/column/set_id_storage.cc",
+        "src/trace_processor/db/column/set_id_storage.h",
+        "src/trace_processor/db/column/string_storage.cc",
+        "src/trace_processor/db/column/string_storage.h",
+        "src/trace_processor/db/column/types.h",
+        "src/trace_processor/db/column/utils.cc",
+        "src/trace_processor/db/column/utils.h",
     ],
 )
 
@@ -5261,8 +5261,8 @@
     name = "trace_processor",
     srcs = [
         ":src_kernel_utils_syscall_table",
+        ":src_trace_processor_db_column_column",
         ":src_trace_processor_db_db",
-        ":src_trace_processor_db_storage_storage",
         ":src_trace_processor_export_json",
         ":src_trace_processor_importers_android_bugreport_android_bugreport",
         ":src_trace_processor_importers_common_common",
@@ -5426,8 +5426,8 @@
         ":src_profiling_symbolizer_symbolize_database",
         ":src_profiling_symbolizer_symbolizer",
         ":src_protozero_proto_ring_buffer",
+        ":src_trace_processor_db_column_column",
         ":src_trace_processor_db_db",
-        ":src_trace_processor_db_storage_storage",
         ":src_trace_processor_export_json",
         ":src_trace_processor_importers_android_bugreport_android_bugreport",
         ":src_trace_processor_importers_common_common",
@@ -5649,8 +5649,8 @@
         ":src_profiling_symbolizer_symbolize_database",
         ":src_profiling_symbolizer_symbolizer",
         ":src_protozero_proto_ring_buffer",
+        ":src_trace_processor_db_column_column",
         ":src_trace_processor_db_db",
-        ":src_trace_processor_db_storage_storage",
         ":src_trace_processor_export_json",
         ":src_trace_processor_importers_android_bugreport_android_bugreport",
         ":src_trace_processor_importers_common_common",
diff --git a/src/trace_processor/BUILD.gn b/src/trace_processor/BUILD.gn
index ed29cfe..c9575f4 100644
--- a/src/trace_processor/BUILD.gn
+++ b/src/trace_processor/BUILD.gn
@@ -270,7 +270,7 @@
     ":top_level_unittests",
     "containers:unittests",
     "db:unittests",
-    "db/storage:unittests",
+    "db/column:unittests",
     "importers/android_bugreport:unittests",
     "importers/common:unittests",
     "importers/ftrace:unittests",
diff --git a/src/trace_processor/db/BUILD.gn b/src/trace_processor/db/BUILD.gn
index 5dc4901..e19f583 100644
--- a/src/trace_processor/db/BUILD.gn
+++ b/src/trace_processor/db/BUILD.gn
@@ -44,7 +44,7 @@
     "../util:glob",
     "../util:regex",
     "../util:util",
-    "storage",
+    "column",
   ]
 }
 
@@ -78,8 +78,8 @@
     "../../base",
     "../tables",
     "../views",
-    "storage",
-    "storage:fake_storage",
+    "column",
+    "column:fake_storage",
   ]
 }
 
diff --git a/src/trace_processor/db/column.cc b/src/trace_processor/db/column.cc
index 7d108e1..59edbe0 100644
--- a/src/trace_processor/db/column.cc
+++ b/src/trace_processor/db/column.cc
@@ -16,8 +16,8 @@
 #include "src/trace_processor/db/column.h"
 
 #include "perfetto/base/logging.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "src/trace_processor/db/compare.h"
-#include "src/trace_processor/db/storage/utils.h"
 #include "src/trace_processor/db/table.h"
 #include "src/trace_processor/util/glob.h"
 #include "src/trace_processor/util/regex.h"
diff --git a/src/trace_processor/db/column.h b/src/trace_processor/db/column.h
index 87752f3..b003dbf 100644
--- a/src/trace_processor/db/column.h
+++ b/src/trace_processor/db/column.h
@@ -24,10 +24,10 @@
 #include "perfetto/trace_processor/basic_types.h"
 #include "src/trace_processor/containers/row_map.h"
 #include "src/trace_processor/containers/string_pool.h"
+#include "src/trace_processor/db/column/types.h"
 #include "src/trace_processor/db/column_storage.h"
 #include "src/trace_processor/db/column_storage_overlay.h"
 #include "src/trace_processor/db/compare.h"
-#include "src/trace_processor/db/storage/types.h"
 #include "src/trace_processor/db/typed_column_internal.h"
 
 namespace perfetto {
diff --git a/src/trace_processor/db/storage/BUILD.gn b/src/trace_processor/db/column/BUILD.gn
similarity index 95%
rename from src/trace_processor/db/storage/BUILD.gn
rename to src/trace_processor/db/column/BUILD.gn
index ea2eace..83289e1 100644
--- a/src/trace_processor/db/storage/BUILD.gn
+++ b/src/trace_processor/db/column/BUILD.gn
@@ -14,10 +14,12 @@
 
 import("../../../../gn/test.gni")
 
-source_set("storage") {
+source_set("column") {
   sources = [
     "arrangement_overlay.cc",
     "arrangement_overlay.h",
+    "column.cc",
+    "column.h",
     "dense_null_overlay.cc",
     "dense_null_overlay.h",
     "dummy_storage.cc",
@@ -32,8 +34,6 @@
     "selector_overlay.h",
     "set_id_storage.cc",
     "set_id_storage.h",
-    "storage.cc",
-    "storage.h",
     "string_storage.cc",
     "string_storage.h",
     "types.h",
@@ -59,7 +59,7 @@
     "fake_storage.h",
   ]
   deps = [
-    ":storage",
+    ":column",
     "../../../../gn:default_deps",
     "../../../../gn:gtest_and_gmock",
     "../../containers",
@@ -79,8 +79,8 @@
     "string_storage_unittest.cc",
   ]
   deps = [
+    ":column",
     ":fake_storage",
-    ":storage",
     "../:compare",
     "../../../../gn:default_deps",
     "../../../../gn:gtest_and_gmock",
diff --git a/src/trace_processor/db/storage/arrangement_overlay.cc b/src/trace_processor/db/column/arrangement_overlay.cc
similarity index 96%
rename from src/trace_processor/db/storage/arrangement_overlay.cc
rename to src/trace_processor/db/column/arrangement_overlay.cc
index 342e7e1..6e642b1 100644
--- a/src/trace_processor/db/storage/arrangement_overlay.cc
+++ b/src/trace_processor/db/column/arrangement_overlay.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/arrangement_overlay.h"
+#include "src/trace_processor/db/column/arrangement_overlay.h"
 
 #include <algorithm>
 #include <cstdint>
@@ -26,14 +26,14 @@
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace {
 
 using Range = RowMap::Range;
 
 }  // namespace
 
-ArrangementOverlay::ArrangementOverlay(std::unique_ptr<Storage> inner,
+ArrangementOverlay::ArrangementOverlay(std::unique_ptr<Column> inner,
                                        const std::vector<uint32_t>* arrangement)
     : inner_(std::move(inner)), arrangement_(arrangement) {
   PERFETTO_DCHECK(*std::max_element(arrangement->begin(), arrangement->end()) <=
@@ -128,6 +128,6 @@
   inner_->Serialize(arrangement_overlay->set_storage());
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/arrangement_overlay.h b/src/trace_processor/db/column/arrangement_overlay.h
similarity index 81%
rename from src/trace_processor/db/storage/arrangement_overlay.h
rename to src/trace_processor/db/column/arrangement_overlay.h
index 59c1de1..8da14f2 100644
--- a/src/trace_processor/db/storage/arrangement_overlay.h
+++ b/src/trace_processor/db/column/arrangement_overlay.h
@@ -14,22 +14,22 @@
  * limitations under the License.
  */
 
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_ARRANGEMENT_OVERLAY_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_ARRANGEMENT_OVERLAY_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_ARRANGEMENT_OVERLAY_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_ARRANGEMENT_OVERLAY_H_
 
 #include <memory>
-#include "src/trace_processor/db/storage/storage.h"
+#include "src/trace_processor/db/column/column.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Storage responsible for rearranging the elements of another Storage. It deals
 // with duplicates, permutations and selection; for selection only, it's more
 // efficient to use `SelectorOverlay`.
-class ArrangementOverlay : public Storage {
+class ArrangementOverlay : public Column {
  public:
-  explicit ArrangementOverlay(std::unique_ptr<Storage> inner,
+  explicit ArrangementOverlay(std::unique_ptr<Column> inner,
                               const std::vector<uint32_t>* arrangement);
 
   SearchValidationResult ValidateSearchConstraints(SqlValue,
@@ -56,12 +56,12 @@
   }
 
  private:
-  std::unique_ptr<Storage> inner_;
+  std::unique_ptr<Column> inner_;
   const std::vector<uint32_t>* arrangement_;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
 
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_ARRANGEMENT_OVERLAY_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_ARRANGEMENT_OVERLAY_H_
diff --git a/src/trace_processor/db/storage/arrangement_overlay_unittest.cc b/src/trace_processor/db/column/arrangement_overlay_unittest.cc
similarity index 91%
rename from src/trace_processor/db/storage/arrangement_overlay_unittest.cc
rename to src/trace_processor/db/column/arrangement_overlay_unittest.cc
index e677ce8..ba0ca0c 100644
--- a/src/trace_processor/db/storage/arrangement_overlay_unittest.cc
+++ b/src/trace_processor/db/column/arrangement_overlay_unittest.cc
@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/arrangement_overlay.h"
+#include "src/trace_processor/db/column/arrangement_overlay.h"
 
-#include "src/trace_processor/db/storage/fake_storage.h"
-#include "src/trace_processor/db/storage/types.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/fake_storage.h"
+#include "src/trace_processor/db/column/types.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace {
 
 using testing::ElementsAre;
@@ -83,6 +83,6 @@
 }
 
 }  // namespace
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/storage.cc b/src/trace_processor/db/column/column.cc
similarity index 84%
rename from src/trace_processor/db/storage/storage.cc
rename to src/trace_processor/db/column/column.cc
index 78ed335..a3e62d4 100644
--- a/src/trace_processor/db/storage/storage.cc
+++ b/src/trace_processor/db/column/column.cc
@@ -14,14 +14,14 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/storage.h"
+#include "src/trace_processor/db/column/column.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
-Storage::~Storage() = default;
+Column::~Column() = default;
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/storage.h b/src/trace_processor/db/column/column.h
similarity index 91%
rename from src/trace_processor/db/storage/storage.h
rename to src/trace_processor/db/column/column.h
index eb0c52a..9e013f9 100644
--- a/src/trace_processor/db/storage/storage.h
+++ b/src/trace_processor/db/column/column.h
@@ -13,12 +13,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_STORAGE_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_STORAGE_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_COLUMN_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_COLUMN_H_
 
 #include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 namespace protos::pbzero {
@@ -26,14 +26,15 @@
 }
 
 namespace trace_processor {
-namespace storage {
+namespace column {
 
-// Backing storage for columnar tables.
-class Storage {
+// Defines an API of a Column. Storages and Overlays both inherit from
+// Column.
+class Column {
  public:
   using StorageProto = protos::pbzero::SerializedColumn_Storage;
 
-  virtual ~Storage();
+  virtual ~Column();
 
   // Verifies whether any further filtering is needed and if not, whether the
   // search would return all values or none of them. This allows for skipping
@@ -105,7 +106,7 @@
   virtual uint32_t size() const = 0;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_STORAGE_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_COLUMN_H_
diff --git a/src/trace_processor/db/storage/dense_null_overlay.cc b/src/trace_processor/db/column/dense_null_overlay.cc
similarity index 96%
rename from src/trace_processor/db/storage/dense_null_overlay.cc
rename to src/trace_processor/db/column/dense_null_overlay.cc
index c66247b..dc22b7a 100644
--- a/src/trace_processor/db/storage/dense_null_overlay.cc
+++ b/src/trace_processor/db/column/dense_null_overlay.cc
@@ -14,21 +14,21 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/dense_null_overlay.h"
+#include "src/trace_processor/db/column/dense_null_overlay.h"
 
 #include <cstdint>
 #include <variant>
 
 #include "protos/perfetto/trace_processor/serialization.pbzero.h"
 #include "src/trace_processor/containers/bit_vector.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/types.h"
 #include "src/trace_processor/tp_metatrace.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
-DenseNullOverlay::DenseNullOverlay(std::unique_ptr<Storage> inner,
+DenseNullOverlay::DenseNullOverlay(std::unique_ptr<Column> inner,
                                    const BitVector* non_null)
     : inner_(std::move(inner)), non_null_(non_null) {}
 
@@ -169,6 +169,6 @@
   inner_->Serialize(null_overlay->set_storage());
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/dense_null_overlay.h b/src/trace_processor/db/column/dense_null_overlay.h
similarity index 79%
rename from src/trace_processor/db/storage/dense_null_overlay.h
rename to src/trace_processor/db/column/dense_null_overlay.h
index 4d58a6c..511fa27 100644
--- a/src/trace_processor/db/storage/dense_null_overlay.h
+++ b/src/trace_processor/db/column/dense_null_overlay.h
@@ -14,26 +14,26 @@
  * limitations under the License.
  */
 
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_DENSE_NULL_OVERLAY_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_DENSE_NULL_OVERLAY_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_DENSE_NULL_OVERLAY_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_DENSE_NULL_OVERLAY_H_
 
 #include <memory>
 #include <variant>
 
 #include "src/trace_processor/containers/bit_vector.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Overlay which introduces the layer of nullability but without changing the
 // "spacing" of the underlying storage i.e. this overlay simply "masks" out
 // rows in the underlying storage with nulls.
-class DenseNullOverlay : public Storage {
+class DenseNullOverlay : public Column {
  public:
-  DenseNullOverlay(std::unique_ptr<Storage> inner, const BitVector* non_null);
+  DenseNullOverlay(std::unique_ptr<Column> inner, const BitVector* non_null);
 
   SearchValidationResult ValidateSearchConstraints(SqlValue,
                                                    FilterOp) const override;
@@ -57,12 +57,12 @@
   uint32_t size() const override { return non_null_->size(); }
 
  private:
-  std::unique_ptr<Storage> inner_;
+  std::unique_ptr<Column> inner_;
   const BitVector* non_null_ = nullptr;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
 
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_DENSE_NULL_OVERLAY_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_DENSE_NULL_OVERLAY_H_
diff --git a/src/trace_processor/db/storage/dense_null_overlay_unittest.cc b/src/trace_processor/db/column/dense_null_overlay_unittest.cc
similarity index 92%
rename from src/trace_processor/db/storage/dense_null_overlay_unittest.cc
rename to src/trace_processor/db/column/dense_null_overlay_unittest.cc
index 6a5eb6f..1c2da97 100644
--- a/src/trace_processor/db/storage/dense_null_overlay_unittest.cc
+++ b/src/trace_processor/db/column/dense_null_overlay_unittest.cc
@@ -14,21 +14,21 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/dense_null_overlay.h"
+#include "src/trace_processor/db/column/dense_null_overlay.h"
 #include <cstdint>
 #include <memory>
 #include <vector>
 
 #include "src/trace_processor/containers/bit_vector.h"
-#include "src/trace_processor/db/storage/fake_storage.h"
-#include "src/trace_processor/db/storage/numeric_storage.h"
-#include "src/trace_processor/db/storage/types.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/fake_storage.h"
+#include "src/trace_processor/db/column/numeric_storage.h"
+#include "src/trace_processor/db/column/types.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace {
 
 using testing::ElementsAre;
@@ -116,6 +116,6 @@
 }
 
 }  // namespace
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/dummy_storage.cc b/src/trace_processor/db/column/dummy_storage.cc
similarity index 94%
rename from src/trace_processor/db/storage/dummy_storage.cc
rename to src/trace_processor/db/column/dummy_storage.cc
index ed30e8d..2c1add1 100644
--- a/src/trace_processor/db/storage/dummy_storage.cc
+++ b/src/trace_processor/db/column/dummy_storage.cc
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/dummy_storage.h"
+#include "src/trace_processor/db/column/dummy_storage.h"
 #include "protos/perfetto/trace_processor/serialization.pbzero.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 SearchValidationResult DummyStorage::ValidateSearchConstraints(SqlValue,
                                                                FilterOp) const {
@@ -54,6 +54,6 @@
   PERFETTO_FATAL("Shouldn't be called");
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/dummy_storage.h b/src/trace_processor/db/column/dummy_storage.h
similarity index 80%
rename from src/trace_processor/db/storage/dummy_storage.h
rename to src/trace_processor/db/column/dummy_storage.h
index 7fd3a40..8e04aec 100644
--- a/src/trace_processor/db/storage/dummy_storage.h
+++ b/src/trace_processor/db/column/dummy_storage.h
@@ -13,11 +13,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_DUMMY_STORAGE_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_DUMMY_STORAGE_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_DUMMY_STORAGE_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_DUMMY_STORAGE_H_
 
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 
@@ -26,11 +26,11 @@
 }
 
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Dummy storage. Used for columns that are not supposed to have operations done
 // on them.
-class DummyStorage final : public Storage {
+class DummyStorage final : public Column {
  public:
   DummyStorage() = default;
 
@@ -54,7 +54,7 @@
   uint32_t size() const override;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_DUMMY_STORAGE_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_DUMMY_STORAGE_H_
diff --git a/src/trace_processor/db/storage/fake_storage.cc b/src/trace_processor/db/column/fake_storage.cc
similarity index 93%
rename from src/trace_processor/db/storage/fake_storage.cc
rename to src/trace_processor/db/column/fake_storage.cc
index 9d2316a..0294c53 100644
--- a/src/trace_processor/db/storage/fake_storage.cc
+++ b/src/trace_processor/db/column/fake_storage.cc
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/fake_storage.h"
+#include "src/trace_processor/db/column/fake_storage.h"
 #include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 FakeStorage::FakeStorage(uint32_t size, SearchStrategy strategy)
     : size_(size), strategy_(strategy) {}
@@ -88,6 +88,6 @@
   PERFETTO_FATAL("Not implemented");
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/fake_storage.h b/src/trace_processor/db/column/fake_storage.h
similarity index 74%
rename from src/trace_processor/db/storage/fake_storage.h
rename to src/trace_processor/db/column/fake_storage.h
index 2320269..a77ab41 100644
--- a/src/trace_processor/db/storage/fake_storage.h
+++ b/src/trace_processor/db/column/fake_storage.h
@@ -14,20 +14,20 @@
  * limitations under the License.
  */
 
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_FAKE_STORAGE_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_FAKE_STORAGE_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_FAKE_STORAGE_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_FAKE_STORAGE_H_
 
 #include <memory>
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Fake implementation of Storage for use in tests.
-class FakeStorage final : public Storage {
+class FakeStorage final : public Column {
  public:
   SearchValidationResult ValidateSearchConstraints(SqlValue,
                                                    FilterOp) const override;
@@ -48,24 +48,23 @@
 
   void Serialize(StorageProto*) const override;
 
-  static std::unique_ptr<Storage> SearchAll(uint32_t size) {
-    return std::unique_ptr<Storage>(
-        new FakeStorage(size, SearchStrategy::kAll));
+  static std::unique_ptr<Column> SearchAll(uint32_t size) {
+    return std::unique_ptr<Column>(new FakeStorage(size, SearchStrategy::kAll));
   }
 
-  static std::unique_ptr<Storage> SearchNone(uint32_t size) {
-    return std::unique_ptr<Storage>(
+  static std::unique_ptr<Column> SearchNone(uint32_t size) {
+    return std::unique_ptr<Column>(
         new FakeStorage(size, SearchStrategy::kNone));
   }
 
-  static std::unique_ptr<Storage> SearchSubset(uint32_t size, RowMap::Range r) {
+  static std::unique_ptr<Column> SearchSubset(uint32_t size, RowMap::Range r) {
     std::unique_ptr<FakeStorage> storage(
         new FakeStorage(size, SearchStrategy::kRange));
     storage->range_ = r;
     return std::move(storage);
   }
 
-  static std::unique_ptr<Storage> SearchSubset(uint32_t size, BitVector bv) {
+  static std::unique_ptr<Column> SearchSubset(uint32_t size, BitVector bv) {
     std::unique_ptr<FakeStorage> storage(
         new FakeStorage(size, SearchStrategy::kBitVector));
     storage->bit_vector_ = std::move(bv);
@@ -84,8 +83,8 @@
   BitVector bit_vector_;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
 
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_FAKE_STORAGE_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_FAKE_STORAGE_H_
diff --git a/src/trace_processor/db/storage/id_storage.cc b/src/trace_processor/db/column/id_storage.cc
similarity index 97%
rename from src/trace_processor/db/storage/id_storage.cc
rename to src/trace_processor/db/column/id_storage.cc
index 0b9adee..5080d3a 100644
--- a/src/trace_processor/db/storage/id_storage.cc
+++ b/src/trace_processor/db/column/id_storage.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/id_storage.h"
+#include "src/trace_processor/db/column/id_storage.h"
 #include <optional>
 
 #include "perfetto/base/logging.h"
@@ -22,13 +22,13 @@
 #include "protos/perfetto/trace_processor/serialization.pbzero.h"
 #include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/types.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/types.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "src/trace_processor/tp_metatrace.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 namespace {
 
@@ -273,6 +273,6 @@
   id_storage->set_size(size_);
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/id_storage.h b/src/trace_processor/db/column/id_storage.h
similarity index 86%
rename from src/trace_processor/db/storage/id_storage.h
rename to src/trace_processor/db/column/id_storage.h
index 475c29b..a367a71 100644
--- a/src/trace_processor/db/storage/id_storage.h
+++ b/src/trace_processor/db/column/id_storage.h
@@ -13,16 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_ID_STORAGE_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_ID_STORAGE_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_ID_STORAGE_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_ID_STORAGE_H_
 
 #include "perfetto/base/status.h"
 #include "perfetto/ext/base/status_or.h"
 #include "perfetto/trace_processor/basic_types.h"
 #include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 
@@ -31,10 +31,10 @@
 }
 
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Storage for Id columns.
-class IdStorage final : public Storage {
+class IdStorage final : public Column {
  public:
   explicit IdStorage(uint32_t size) : size_(size) {}
 
@@ -70,7 +70,7 @@
   const uint32_t size_ = 0;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_ID_STORAGE_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_ID_STORAGE_H_
diff --git a/src/trace_processor/db/storage/id_storage_unittest.cc b/src/trace_processor/db/column/id_storage_unittest.cc
similarity index 97%
rename from src/trace_processor/db/storage/id_storage_unittest.cc
rename to src/trace_processor/db/column/id_storage_unittest.cc
index db3cd1a..2b85670 100644
--- a/src/trace_processor/db/storage/id_storage_unittest.cc
+++ b/src/trace_processor/db/column/id_storage_unittest.cc
@@ -13,13 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "src/trace_processor/db/storage/id_storage.h"
+#include "src/trace_processor/db/column/id_storage.h"
 #include <limits>
 
 #include "perfetto/trace_processor/basic_types.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
@@ -33,7 +33,7 @@
   return a.size() == b.size() && a.CountSetBits() == b.CountSetBits();
 }
 
-namespace storage {
+namespace column {
 namespace {
 
 using testing::ElementsAre;
@@ -278,6 +278,6 @@
 }
 
 }  // namespace
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/null_overlay.cc b/src/trace_processor/db/column/null_overlay.cc
similarity index 95%
rename from src/trace_processor/db/storage/null_overlay.cc
rename to src/trace_processor/db/column/null_overlay.cc
index d593671..54a1d9a 100644
--- a/src/trace_processor/db/storage/null_overlay.cc
+++ b/src/trace_processor/db/column/null_overlay.cc
@@ -14,20 +14,20 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/null_overlay.h"
+#include "src/trace_processor/db/column/null_overlay.h"
 
 #include <cstdint>
 
 #include "protos/perfetto/trace_processor/serialization.pbzero.h"
 #include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 #include "src/trace_processor/tp_metatrace.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace {
 
 using Range = RowMap::Range;
@@ -83,7 +83,7 @@
   return storage_->ValidateSearchConstraints(sql_val, op);
 }
 
-NullOverlay::NullOverlay(std::unique_ptr<Storage> storage,
+NullOverlay::NullOverlay(std::unique_ptr<Column> storage,
                          const BitVector* non_null)
     : storage_(std::move(storage)), non_null_(non_null) {
   PERFETTO_DCHECK(non_null_->CountSetBits() <= storage_->size());
@@ -185,6 +185,6 @@
   storage_->Serialize(null_overlay->set_storage());
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/null_overlay.h b/src/trace_processor/db/column/null_overlay.h
similarity index 79%
rename from src/trace_processor/db/storage/null_overlay.h
rename to src/trace_processor/db/column/null_overlay.h
index ff7f4ec..19971e1 100644
--- a/src/trace_processor/db/storage/null_overlay.h
+++ b/src/trace_processor/db/column/null_overlay.h
@@ -14,25 +14,25 @@
  * limitations under the License.
  */
 
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_NULL_OVERLAY_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_NULL_OVERLAY_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_NULL_OVERLAY_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_NULL_OVERLAY_H_
 
 #include <memory>
 #include <variant>
 
 #include "src/trace_processor/containers/bit_vector.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Overlay which introduces the layer of nullability. Specifically, spreads out
 // the storage with nulls using a BitVector.
-class NullOverlay : public Storage {
+class NullOverlay : public Column {
  public:
-  NullOverlay(std::unique_ptr<Storage> storage, const BitVector* non_null);
+  NullOverlay(std::unique_ptr<Column> storage, const BitVector* non_null);
 
   SearchValidationResult ValidateSearchConstraints(SqlValue,
                                                    FilterOp) const override;
@@ -56,12 +56,12 @@
   uint32_t size() const override { return non_null_->size(); }
 
  private:
-  std::unique_ptr<Storage> storage_ = nullptr;
+  std::unique_ptr<Column> storage_ = nullptr;
   const BitVector* non_null_ = nullptr;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
 
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_NULL_OVERLAY_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_NULL_OVERLAY_H_
diff --git a/src/trace_processor/db/storage/null_overlay_unittest.cc b/src/trace_processor/db/column/null_overlay_unittest.cc
similarity index 93%
rename from src/trace_processor/db/storage/null_overlay_unittest.cc
rename to src/trace_processor/db/column/null_overlay_unittest.cc
index 730e2ae..9862898 100644
--- a/src/trace_processor/db/storage/null_overlay_unittest.cc
+++ b/src/trace_processor/db/column/null_overlay_unittest.cc
@@ -14,22 +14,22 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/null_overlay.h"
+#include "src/trace_processor/db/column/null_overlay.h"
 
 #include <memory>
 #include <vector>
 
 #include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/fake_storage.h"
-#include "src/trace_processor/db/storage/numeric_storage.h"
-#include "src/trace_processor/db/storage/types.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/fake_storage.h"
+#include "src/trace_processor/db/column/numeric_storage.h"
+#include "src/trace_processor/db/column/types.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace {
 
 using testing::ElementsAre;
@@ -142,6 +142,6 @@
 }
 
 }  // namespace
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/numeric_storage.cc b/src/trace_processor/db/column/numeric_storage.cc
similarity index 98%
rename from src/trace_processor/db/storage/numeric_storage.cc
rename to src/trace_processor/db/column/numeric_storage.cc
index 8bd2fa8..b4b79fb 100644
--- a/src/trace_processor/db/storage/numeric_storage.cc
+++ b/src/trace_processor/db/column/numeric_storage.cc
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/numeric_storage.h"
+#include "src/trace_processor/db/column/numeric_storage.h"
 
 #include <cmath>
 #include <cstddef>
@@ -29,14 +29,14 @@
 #include "protos/perfetto/trace_processor/serialization.pbzero.h"
 #include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "src/trace_processor/tp_metatrace.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace {
 
 using Range = RowMap::Range;
@@ -636,6 +636,6 @@
                                   static_cast<size_t>(type_size) * size_);
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/numeric_storage.h b/src/trace_processor/db/column/numeric_storage.h
similarity index 90%
rename from src/trace_processor/db/storage/numeric_storage.h
rename to src/trace_processor/db/column/numeric_storage.h
index 6af150a..287ff11 100644
--- a/src/trace_processor/db/storage/numeric_storage.h
+++ b/src/trace_processor/db/column/numeric_storage.h
@@ -13,14 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_NUMERIC_STORAGE_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_NUMERIC_STORAGE_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_NUMERIC_STORAGE_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_NUMERIC_STORAGE_H_
 
 #include <variant>
 
 #include "perfetto/trace_processor/basic_types.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 
@@ -29,10 +29,10 @@
 }
 
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Storage for all numeric type data (i.e. doubles, int32, int64, uint32).
-class NumericStorageBase : public Storage {
+class NumericStorageBase : public Column {
  public:
   SearchValidationResult ValidateSearchConstraints(SqlValue,
                                                    FilterOp) const override;
@@ -109,7 +109,7 @@
   const std::vector<T>* vector_;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_NUMERIC_STORAGE_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_NUMERIC_STORAGE_H_
diff --git a/src/trace_processor/db/storage/numeric_storage_unittest.cc b/src/trace_processor/db/column/numeric_storage_unittest.cc
similarity index 98%
rename from src/trace_processor/db/storage/numeric_storage_unittest.cc
rename to src/trace_processor/db/column/numeric_storage_unittest.cc
index 5cc675f..cd1203b 100644
--- a/src/trace_processor/db/storage/numeric_storage_unittest.cc
+++ b/src/trace_processor/db/column/numeric_storage_unittest.cc
@@ -13,13 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "src/trace_processor/db/storage/numeric_storage.h"
+#include "src/trace_processor/db/column/numeric_storage.h"
 #include <cstdint>
 
 #include "perfetto/trace_processor/basic_types.h"
+#include "src/trace_processor/db/column/types.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "src/trace_processor/db/compare.h"
-#include "src/trace_processor/db/storage/types.h"
-#include "src/trace_processor/db/storage/utils.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
@@ -29,7 +29,7 @@
   return std::tie(a.start, a.end) == std::tie(b.start, b.end);
 }
 
-namespace storage {
+namespace column {
 namespace {
 
 using testing::ElementsAre;
@@ -641,6 +641,6 @@
 }
 
 }  // namespace
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/selector_overlay.cc b/src/trace_processor/db/column/selector_overlay.cc
similarity index 94%
rename from src/trace_processor/db/storage/selector_overlay.cc
rename to src/trace_processor/db/column/selector_overlay.cc
index 98f8f89..bb58680 100644
--- a/src/trace_processor/db/storage/selector_overlay.cc
+++ b/src/trace_processor/db/column/selector_overlay.cc
@@ -14,20 +14,20 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/selector_overlay.h"
+#include "src/trace_processor/db/column/selector_overlay.h"
 
 #include "protos/perfetto/trace_processor/serialization.pbzero.h"
 #include "src/trace_processor/containers/bit_vector.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/types.h"
 #include "src/trace_processor/tp_metatrace.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 using Range = RowMap::Range;
 
-SelectorOverlay::SelectorOverlay(std::unique_ptr<Storage> inner,
+SelectorOverlay::SelectorOverlay(std::unique_ptr<Column> inner,
                                  const BitVector* selector)
     : inner_(std::move(inner)), selector_(selector) {}
 
@@ -106,6 +106,6 @@
   selector_->Serialize(selector_overlay->set_bit_vector());
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/selector_overlay.h b/src/trace_processor/db/column/selector_overlay.h
similarity index 78%
rename from src/trace_processor/db/storage/selector_overlay.h
rename to src/trace_processor/db/column/selector_overlay.h
index d591034..d1a8670 100644
--- a/src/trace_processor/db/storage/selector_overlay.h
+++ b/src/trace_processor/db/column/selector_overlay.h
@@ -14,22 +14,22 @@
  * limitations under the License.
  */
 
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_SELECTOR_OVERLAY_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_SELECTOR_OVERLAY_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_SELECTOR_OVERLAY_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_SELECTOR_OVERLAY_H_
 
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Storage which "selects" specific rows from an underlying storage using a
 // BitVector. See ArrangementOverlay for a more generic class which allows
 // duplication and rearragement but is less performant.
-class SelectorOverlay : public Storage {
+class SelectorOverlay : public Column {
  public:
-  SelectorOverlay(std::unique_ptr<Storage> storage, const BitVector* non_null);
+  SelectorOverlay(std::unique_ptr<Column> storage, const BitVector* non_null);
 
   SearchValidationResult ValidateSearchConstraints(SqlValue,
                                                    FilterOp) const override;
@@ -53,12 +53,12 @@
   uint32_t size() const override { return selector_->size(); }
 
  private:
-  std::unique_ptr<Storage> inner_ = nullptr;
+  std::unique_ptr<Column> inner_ = nullptr;
   const BitVector* selector_ = nullptr;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
 
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_SELECTOR_OVERLAY_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_SELECTOR_OVERLAY_H_
diff --git a/src/trace_processor/db/storage/selector_overlay_unittest.cc b/src/trace_processor/db/column/selector_overlay_unittest.cc
similarity index 92%
rename from src/trace_processor/db/storage/selector_overlay_unittest.cc
rename to src/trace_processor/db/column/selector_overlay_unittest.cc
index 18bec1d..e408d33 100644
--- a/src/trace_processor/db/storage/selector_overlay_unittest.cc
+++ b/src/trace_processor/db/column/selector_overlay_unittest.cc
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/selector_overlay.h"
+#include "src/trace_processor/db/column/selector_overlay.h"
 
-#include "src/trace_processor/db/storage/fake_storage.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/fake_storage.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace {
 
 using testing::ElementsAre;
@@ -82,6 +82,6 @@
 }
 
 }  // namespace
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/set_id_storage.cc b/src/trace_processor/db/column/set_id_storage.cc
similarity index 96%
rename from src/trace_processor/db/storage/set_id_storage.cc
rename to src/trace_processor/db/column/set_id_storage.cc
index dd0af25..56a3cf1 100644
--- a/src/trace_processor/db/storage/set_id_storage.cc
+++ b/src/trace_processor/db/column/set_id_storage.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/set_id_storage.h"
+#include "src/trace_processor/db/column/set_id_storage.h"
 
 #include <functional>
 
@@ -22,13 +22,13 @@
 #include "protos/perfetto/trace_processor/serialization.pbzero.h"
 #include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/types.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/types.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "src/trace_processor/tp_metatrace.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 namespace {
 
@@ -278,13 +278,12 @@
   PERFETTO_ELOG("Not implemented");
 }
 
-void SetIdStorage::Serialize(
-    protos::pbzero::SerializedColumn::Storage* msg) const {
+void SetIdStorage::Serialize(StorageProto* msg) const {
   auto* vec_msg = msg->set_set_id_storage();
   vec_msg->set_values(reinterpret_cast<const uint8_t*>(values_->data()),
                       sizeof(SetId) * size());
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/set_id_storage.h b/src/trace_processor/db/column/set_id_storage.h
similarity index 85%
rename from src/trace_processor/db/storage/set_id_storage.h
rename to src/trace_processor/db/column/set_id_storage.h
index 6886bef..19f2604 100644
--- a/src/trace_processor/db/storage/set_id_storage.h
+++ b/src/trace_processor/db/column/set_id_storage.h
@@ -13,12 +13,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_SET_ID_STORAGE_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_SET_ID_STORAGE_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_SET_ID_STORAGE_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_SET_ID_STORAGE_H_
 
 #include "src/trace_processor/containers/row_map.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 
@@ -27,10 +27,10 @@
 }
 
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Storage for SetId columns.
-class SetIdStorage final : public Storage {
+class SetIdStorage final : public Column {
  public:
   using SetId = uint32_t;
 
@@ -70,7 +70,7 @@
   const std::vector<SetId>* values_ = nullptr;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_SET_ID_STORAGE_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_SET_ID_STORAGE_H_
diff --git a/src/trace_processor/db/storage/set_id_storage_unittest.cc b/src/trace_processor/db/column/set_id_storage_unittest.cc
similarity index 97%
rename from src/trace_processor/db/storage/set_id_storage_unittest.cc
rename to src/trace_processor/db/column/set_id_storage_unittest.cc
index 1352314..8f2b8d9 100644
--- a/src/trace_processor/db/storage/set_id_storage_unittest.cc
+++ b/src/trace_processor/db/column/set_id_storage_unittest.cc
@@ -13,10 +13,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "src/trace_processor/db/storage/set_id_storage.h"
+#include "src/trace_processor/db/column/set_id_storage.h"
 
-#include "src/trace_processor/db/storage/types.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/types.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
@@ -30,7 +30,7 @@
   return a.size() == b.size() && a.CountSetBits() == b.CountSetBits();
 }
 
-namespace storage {
+namespace column {
 namespace {
 
 using testing::ElementsAre;
@@ -281,6 +281,6 @@
 }
 
 }  // namespace
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/string_storage.cc b/src/trace_processor/db/column/string_storage.cc
similarity index 97%
rename from src/trace_processor/db/storage/string_storage.cc
rename to src/trace_processor/db/column/string_storage.cc
index 7d2bc64..15d4a66 100644
--- a/src/trace_processor/db/storage/string_storage.cc
+++ b/src/trace_processor/db/column/string_storage.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/string_storage.h"
+#include "src/trace_processor/db/column/string_storage.h"
 
 #include "perfetto/ext/base/scoped_file.h"
 #include "perfetto/ext/base/status_or.h"
@@ -26,17 +26,17 @@
 #include "src/trace_processor/containers/null_term_string_view.h"
 #include "src/trace_processor/containers/row_map.h"
 #include "src/trace_processor/containers/string_pool.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "src/trace_processor/tp_metatrace.h"
 #include "src/trace_processor/util/glob.h"
 #include "src/trace_processor/util/regex.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 namespace {
 using Range = RowMap::Range;
@@ -492,8 +492,7 @@
             });
 }
 
-void StringStorage::Serialize(
-    protos::pbzero::SerializedColumn::Storage* msg) const {
+void StringStorage::Serialize(StorageProto* msg) const {
   auto* string_storage_msg = msg->set_string_storage();
   string_storage_msg->set_is_sorted(is_sorted_);
 
@@ -502,6 +501,6 @@
       sizeof(StringPool::Id) * size());
 }
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/string_storage.h b/src/trace_processor/db/column/string_storage.h
similarity index 88%
rename from src/trace_processor/db/storage/string_storage.h
rename to src/trace_processor/db/column/string_storage.h
index 1e89f24..3e2b9de 100644
--- a/src/trace_processor/db/storage/string_storage.h
+++ b/src/trace_processor/db/column/string_storage.h
@@ -13,14 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_STRING_STORAGE_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_STRING_STORAGE_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_STRING_STORAGE_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_STRING_STORAGE_H_
 
 #include "perfetto/trace_processor/basic_types.h"
 #include "src/trace_processor/containers/row_map.h"
 #include "src/trace_processor/containers/string_pool.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 
@@ -29,10 +29,10 @@
 }
 
 namespace trace_processor {
-namespace storage {
+namespace column {
 
 // Storage for String columns.
-class StringStorage final : public Storage {
+class StringStorage final : public Column {
  public:
   StringStorage(StringPool* string_pool,
                 const std::vector<StringPool::Id>* data,
@@ -85,7 +85,7 @@
   const bool is_sorted_ = false;
 };
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_STRING_STORAGE_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_STRING_STORAGE_H_
diff --git a/src/trace_processor/db/storage/string_storage_unittest.cc b/src/trace_processor/db/column/string_storage_unittest.cc
similarity index 98%
rename from src/trace_processor/db/storage/string_storage_unittest.cc
rename to src/trace_processor/db/column/string_storage_unittest.cc
index 9ccafe8..8164047 100644
--- a/src/trace_processor/db/storage/string_storage_unittest.cc
+++ b/src/trace_processor/db/column/string_storage_unittest.cc
@@ -13,14 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "src/trace_processor/db/storage/string_storage.h"
+#include "src/trace_processor/db/column/string_storage.h"
 
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/types.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace {
 
 using Range = RowMap::Range;
@@ -347,6 +347,6 @@
 }
 
 }  // namespace
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/types.h b/src/trace_processor/db/column/types.h
similarity index 94%
rename from src/trace_processor/db/storage/types.h
rename to src/trace_processor/db/column/types.h
index 83c5d01..2ad4fea 100644
--- a/src/trace_processor/db/storage/types.h
+++ b/src/trace_processor/db/column/types.h
@@ -13,8 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_TYPES_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_TYPES_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_TYPES_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_TYPES_H_
 
 #include <variant>
 #include "perfetto/trace_processor/basic_types.h"
@@ -103,4 +103,4 @@
 }  // namespace trace_processor
 }  // namespace perfetto
 
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_TYPES_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_TYPES_H_
diff --git a/src/trace_processor/db/storage/utils.cc b/src/trace_processor/db/column/utils.cc
similarity index 95%
rename from src/trace_processor/db/storage/utils.cc
rename to src/trace_processor/db/column/utils.cc
index 04ca89d..540feaa 100644
--- a/src/trace_processor/db/storage/utils.cc
+++ b/src/trace_processor/db/column/utils.cc
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/utils.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace utils {
 
 SearchValidationResult CompareIntColumnWithDouble(SqlValue* sql_val,
@@ -70,6 +70,6 @@
 
 }  // namespace utils
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage/utils.h b/src/trace_processor/db/column/utils.h
similarity index 94%
rename from src/trace_processor/db/storage/utils.h
rename to src/trace_processor/db/column/utils.h
index 6317a9b..ef8ead0 100644
--- a/src/trace_processor/db/storage/utils.h
+++ b/src/trace_processor/db/column/utils.h
@@ -13,17 +13,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_UTILS_H_
-#define SRC_TRACE_PROCESSOR_DB_STORAGE_UTILS_H_
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_UTILS_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_UTILS_H_
 
 #include "perfetto/base/logging.h"
 #include "perfetto/trace_processor/basic_types.h"
 #include "src/trace_processor/containers/bit_vector.h"
-#include "src/trace_processor/db/storage/types.h"
+#include "src/trace_processor/db/column/types.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace storage {
+namespace column {
 namespace utils {
 
 template <typename Comparator, typename ValType, typename DataType>
@@ -96,7 +96,7 @@
 
 }  // namespace utils
 
-}  // namespace storage
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
-#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_UTILS_H_
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_UTILS_H_
diff --git a/src/trace_processor/db/query_executor.cc b/src/trace_processor/db/query_executor.cc
index 46b02d1..155d8b1 100644
--- a/src/trace_processor/db/query_executor.cc
+++ b/src/trace_processor/db/query_executor.cc
@@ -26,18 +26,18 @@
 #include "perfetto/ext/base/status_or.h"
 #include "perfetto/trace_processor/basic_types.h"
 #include "src/trace_processor/containers/string_pool.h"
+#include "src/trace_processor/db/column/arrangement_overlay.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/dense_null_overlay.h"
+#include "src/trace_processor/db/column/dummy_storage.h"
+#include "src/trace_processor/db/column/id_storage.h"
+#include "src/trace_processor/db/column/null_overlay.h"
+#include "src/trace_processor/db/column/numeric_storage.h"
+#include "src/trace_processor/db/column/selector_overlay.h"
+#include "src/trace_processor/db/column/set_id_storage.h"
+#include "src/trace_processor/db/column/string_storage.h"
+#include "src/trace_processor/db/column/types.h"
 #include "src/trace_processor/db/query_executor.h"
-#include "src/trace_processor/db/storage/arrangement_overlay.h"
-#include "src/trace_processor/db/storage/dense_null_overlay.h"
-#include "src/trace_processor/db/storage/dummy_storage.h"
-#include "src/trace_processor/db/storage/id_storage.h"
-#include "src/trace_processor/db/storage/null_overlay.h"
-#include "src/trace_processor/db/storage/numeric_storage.h"
-#include "src/trace_processor/db/storage/selector_overlay.h"
-#include "src/trace_processor/db/storage/set_id_storage.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/string_storage.h"
-#include "src/trace_processor/db/storage/types.h"
 #include "src/trace_processor/db/table.h"
 
 namespace perfetto {
@@ -46,12 +46,12 @@
 namespace {
 
 using Range = RowMap::Range;
-using Storage = storage::Storage;
+using Storage = column::Column;
 
 }  // namespace
 
 void QueryExecutor::FilterColumn(const Constraint& c,
-                                 const storage::Storage& storage,
+                                 const column::Column& storage,
                                  RowMap* rm) {
   // Shortcut of empty row map.
   if (rm->empty())
@@ -95,7 +95,7 @@
 }
 
 void QueryExecutor::LinearSearch(const Constraint& c,
-                                 const storage::Storage& storage,
+                                 const column::Column& storage,
                                  RowMap* rm) {
   // TODO(b/283763282): Align these to word boundaries.
   Range bounds(rm->Get(0), rm->Get(rm->size() - 1) + 1);
@@ -123,7 +123,7 @@
 }
 
 void QueryExecutor::IndexSearch(const Constraint& c,
-                                const storage::Storage& storage,
+                                const column::Column& storage,
                                 RowMap* rm) {
   // Create outmost TableIndexVector.
   std::vector<uint32_t> table_indices = std::move(*rm).TakeAsIndexVector();
@@ -183,69 +183,69 @@
     }
 
     // Create storage
-    std::unique_ptr<Storage> storage;
+    std::unique_ptr<column::Column> storage;
     if (col.IsSetId()) {
       if (col.IsNullable()) {
-        storage = std::make_unique<storage::SetIdStorage>(
+        storage = std::make_unique<column::SetIdStorage>(
             &col.storage<std::optional<uint32_t>>().non_null_vector());
       } else {
-        storage = std::make_unique<storage::SetIdStorage>(
+        storage = std::make_unique<column::SetIdStorage>(
             &col.storage<uint32_t>().vector());
       }
     } else {
       switch (col.col_type()) {
         case ColumnType::kDummy:
-          storage = std::make_unique<storage::DummyStorage>();
+          storage = std::make_unique<column::DummyStorage>();
           break;
         case ColumnType::kId:
-          storage = std::make_unique<storage::IdStorage>(column_size);
+          storage = std::make_unique<column::IdStorage>(column_size);
           break;
         case ColumnType::kString:
-          storage = std::make_unique<storage::StringStorage>(
+          storage = std::make_unique<column::StringStorage>(
               table->string_pool(), &col.storage<StringPool::Id>().vector(),
               col.IsSorted());
           break;
         case ColumnType::kInt64:
           if (col.IsNullable()) {
-            storage = std::make_unique<storage::NumericStorage<int64_t>>(
+            storage = std::make_unique<column::NumericStorage<int64_t>>(
                 &col.storage<std::optional<int64_t>>().non_null_vector(),
                 col.col_type(), col.IsSorted());
 
           } else {
-            storage = std::make_unique<storage::NumericStorage<int64_t>>(
+            storage = std::make_unique<column::NumericStorage<int64_t>>(
                 &col.storage<int64_t>().vector(), col.col_type(),
                 col.IsSorted());
           }
           break;
         case ColumnType::kUint32:
           if (col.IsNullable()) {
-            storage = std::make_unique<storage::NumericStorage<uint32_t>>(
+            storage = std::make_unique<column::NumericStorage<uint32_t>>(
                 &col.storage<std::optional<uint32_t>>().non_null_vector(),
                 col.col_type(), col.IsSorted());
           } else {
-            storage = std::make_unique<storage::NumericStorage<uint32_t>>(
+            storage = std::make_unique<column::NumericStorage<uint32_t>>(
                 &col.storage<uint32_t>().vector(), col.col_type(),
                 col.IsSorted());
           }
           break;
         case ColumnType::kInt32:
           if (col.IsNullable()) {
-            storage = std::make_unique<storage::NumericStorage<int32_t>>(
+            storage = std::make_unique<column::NumericStorage<int32_t>>(
                 &col.storage<std::optional<int32_t>>().non_null_vector(),
                 col.col_type(), col.IsSorted());
           } else {
-            storage = std::make_unique<storage::NumericStorage<int32_t>>(
+            storage = std::make_unique<column::NumericStorage<int32_t>>(
                 &col.storage<int32_t>().vector(), col.col_type(),
                 col.IsSorted());
           }
           break;
         case ColumnType::kDouble:
           if (col.IsNullable()) {
-            storage = std::make_unique<storage::NumericStorage<double>>(
+            storage = std::make_unique<column::NumericStorage<double>>(
                 &col.storage<std::optional<double>>().non_null_vector(),
                 col.col_type(), col.IsSorted());
           } else {
-            storage = std::make_unique<storage::NumericStorage<double>>(
+            storage = std::make_unique<column::NumericStorage<double>>(
                 &col.storage<double>().vector(), col.col_type(),
                 col.IsSorted());
           }
@@ -256,19 +256,19 @@
       // with Id::Null().
       PERFETTO_CHECK(col.col_type() != ColumnType::kString);
       if (col.IsDense()) {
-        storage = std::make_unique<storage::DenseNullOverlay>(
+        storage = std::make_unique<column::DenseNullOverlay>(
             std::move(storage), col.storage_base().bv());
       } else {
-        storage = std::make_unique<storage::NullOverlay>(
+        storage = std::make_unique<column::NullOverlay>(
             std::move(storage), col.storage_base().bv());
       }
     }
     if (col.overlay().row_map().IsIndexVector()) {
-      storage = std::make_unique<storage::ArrangementOverlay>(
+      storage = std::make_unique<column::ArrangementOverlay>(
           std::move(storage), col.overlay().row_map().GetIfIndexVector());
     }
     if (col.overlay().row_map().IsBitVector()) {
-      storage = std::make_unique<storage::SelectorOverlay>(
+      storage = std::make_unique<column::SelectorOverlay>(
           std::move(storage), col.overlay().row_map().GetIfBitVector());
     }
     uint32_t pre_count = rm.size();
@@ -279,7 +279,7 @@
 }
 
 void QueryExecutor::BoundedColumnFilterForTesting(const Constraint& c,
-                                                  const storage::Storage& col,
+                                                  const column::Column& col,
                                                   RowMap* rm) {
   switch (col.ValidateSearchConstraints(c.value, c.op)) {
     case SearchValidationResult::kAllData:
@@ -295,7 +295,7 @@
 }
 
 void QueryExecutor::IndexedColumnFilterForTesting(const Constraint& c,
-                                                  const storage::Storage& col,
+                                                  const column::Column& col,
                                                   RowMap* rm) {
   switch (col.ValidateSearchConstraints(c.value, c.op)) {
     case SearchValidationResult::kAllData:
diff --git a/src/trace_processor/db/query_executor.h b/src/trace_processor/db/query_executor.h
index 0b171ca..e5feff5 100644
--- a/src/trace_processor/db/query_executor.h
+++ b/src/trace_processor/db/query_executor.h
@@ -16,15 +16,11 @@
 #ifndef SRC_TRACE_PROCESSOR_DB_QUERY_EXECUTOR_H_
 #define SRC_TRACE_PROCESSOR_DB_QUERY_EXECUTOR_H_
 
-#include <array>
-#include <numeric>
 #include <vector>
 
-#include "perfetto/ext/base/small_vector.h"
-#include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/containers/row_map.h"
 #include "src/trace_processor/db/column.h"
-#include "src/trace_processor/db/storage/storage.h"
+#include "src/trace_processor/db/column/column.h"
 
 namespace perfetto {
 namespace trace_processor {
@@ -36,8 +32,7 @@
   static constexpr uint32_t kMaxOverlayCount = 8;
 
   // |row_count| is the size of the last overlay.
-  QueryExecutor(const std::vector<storage::Storage*>& columns,
-                uint32_t row_count)
+  QueryExecutor(const std::vector<column::Column*>& columns, uint32_t row_count)
       : columns_(columns), row_count_(row_count) {}
 
   // Apply all the constraints on the data and return the filtered RowMap.
@@ -64,27 +59,27 @@
 
   // Used only in unittests. Exposes private function.
   static void BoundedColumnFilterForTesting(const Constraint&,
-                                            const storage::Storage&,
+                                            const column::Column&,
                                             RowMap*);
 
   // Used only in unittests. Exposes private function.
   static void IndexedColumnFilterForTesting(const Constraint&,
-                                            const storage::Storage&,
+                                            const column::Column&,
                                             RowMap*);
 
  private:
   // Updates RowMap with result of filtering single column using the Constraint.
-  static void FilterColumn(const Constraint&, const storage::Storage&, RowMap*);
+  static void FilterColumn(const Constraint&, const column::Column&, RowMap*);
 
   // Filters the column using Range algorithm - tries to find the smallest Range
   // to filter the storage with.
-  static void LinearSearch(const Constraint&, const storage::Storage&, RowMap*);
+  static void LinearSearch(const Constraint&, const column::Column&, RowMap*);
 
   // Filters the column using Index algorithm - finds the indices to filter the
   // storage with.
-  static void IndexSearch(const Constraint&, const storage::Storage&, RowMap*);
+  static void IndexSearch(const Constraint&, const column::Column&, RowMap*);
 
-  std::vector<storage::Storage*> columns_;
+  std::vector<column::Column*> columns_;
 
   // Number of rows in the outmost overlay.
   uint32_t row_count_ = 0;
diff --git a/src/trace_processor/db/query_executor_unittest.cc b/src/trace_processor/db/query_executor_unittest.cc
index aae25e5..a376b08 100644
--- a/src/trace_processor/db/query_executor_unittest.cc
+++ b/src/trace_processor/db/query_executor_unittest.cc
@@ -17,15 +17,15 @@
 #include "src/trace_processor/db/query_executor.h"
 
 #include "perfetto/trace_processor/basic_types.h"
-#include "src/trace_processor/db/storage/arrangement_overlay.h"
-#include "src/trace_processor/db/storage/fake_storage.h"
-#include "src/trace_processor/db/storage/id_storage.h"
-#include "src/trace_processor/db/storage/null_overlay.h"
-#include "src/trace_processor/db/storage/numeric_storage.h"
-#include "src/trace_processor/db/storage/selector_overlay.h"
-#include "src/trace_processor/db/storage/set_id_storage.h"
-#include "src/trace_processor/db/storage/storage.h"
-#include "src/trace_processor/db/storage/string_storage.h"
+#include "src/trace_processor/db/column/arrangement_overlay.h"
+#include "src/trace_processor/db/column/column.h"
+#include "src/trace_processor/db/column/fake_storage.h"
+#include "src/trace_processor/db/column/id_storage.h"
+#include "src/trace_processor/db/column/null_overlay.h"
+#include "src/trace_processor/db/column/numeric_storage.h"
+#include "src/trace_processor/db/column/selector_overlay.h"
+#include "src/trace_processor/db/column/set_id_storage.h"
+#include "src/trace_processor/db/column/string_storage.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
@@ -34,16 +34,16 @@
 
 using testing::ElementsAre;
 
-using IdStorage = storage::IdStorage;
-using SetIdStorage = storage::SetIdStorage;
-using StringStorage = storage::StringStorage;
-using NullOverlay = storage::NullOverlay;
-using ArrangementOverlay = storage::ArrangementOverlay;
-using SelectorOverlay = storage::SelectorOverlay;
+using IdStorage = column::IdStorage;
+using SetIdStorage = column::SetIdStorage;
+using StringStorage = column::StringStorage;
+using NullOverlay = column::NullOverlay;
+using ArrangementOverlay = column::ArrangementOverlay;
+using SelectorOverlay = column::SelectorOverlay;
 
 TEST(QueryExecutor, OnlyStorageRange) {
   std::vector<int64_t> storage_data{1, 2, 3, 4, 5};
-  storage::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
+  column::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
 
   Constraint c{0, FilterOp::kGe, SqlValue::Long(3)};
   RowMap rm(0, storage.size());
@@ -55,7 +55,7 @@
 
 TEST(QueryExecutor, OnlyStorageRangeIsNull) {
   std::vector<int64_t> storage_data{1, 2, 3, 4, 5};
-  storage::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
+  column::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
 
   Constraint c{0, FilterOp::kIsNull, SqlValue()};
   RowMap rm(0, 5);
@@ -70,7 +70,7 @@
   std::iota(storage_data.begin(), storage_data.end(), 0);
   std::transform(storage_data.begin(), storage_data.end(), storage_data.begin(),
                  [](int64_t n) { return n % 5; });
-  storage::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
+  column::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
 
   Constraint c{0, FilterOp::kLt, SqlValue::Long(2)};
   RowMap rm(0, 10);
@@ -85,7 +85,7 @@
 
 TEST(QueryExecutor, OnlyStorageIndexIsNull) {
   std::vector<int64_t> storage_data{1, 2, 3, 4, 5};
-  storage::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
+  column::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
 
   Constraint c{0, FilterOp::kIsNull, SqlValue()};
   RowMap rm(0, 5);
@@ -97,10 +97,10 @@
 TEST(QueryExecutor, NullBounds) {
   std::vector<int64_t> storage_data(5);
   std::iota(storage_data.begin(), storage_data.end(), 0);
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
   BitVector bv{1, 1, 0, 1, 1, 0, 0, 0, 1, 0};
-  storage::NullOverlay storage(std::move(numeric), &bv);
+  column::NullOverlay storage(std::move(numeric), &bv);
 
   Constraint c{0, FilterOp::kGe, SqlValue::Long(3)};
   RowMap rm(0, 10);
@@ -114,11 +114,11 @@
 TEST(QueryExecutor, NullRangeIsNull) {
   std::vector<int64_t> storage_data(5);
   std::iota(storage_data.begin(), storage_data.end(), 0);
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   BitVector bv{1, 1, 0, 1, 1, 0, 0, 0, 1, 0};
-  storage::NullOverlay storage(std::move(numeric), &bv);
+  column::NullOverlay storage(std::move(numeric), &bv);
 
   Constraint c{0, FilterOp::kIsNull, SqlValue()};
   RowMap rm(0, storage.size());
@@ -137,11 +137,11 @@
   std::iota(storage_data.begin(), storage_data.end(), 0);
   std::transform(storage_data.begin(), storage_data.end(), storage_data.begin(),
                  [](int64_t n) { return n % 3; });
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   BitVector bv{1, 1, 0, 1, 1, 0, 1, 0, 0, 1};
-  storage::NullOverlay storage(std::move(numeric), &bv);
+  column::NullOverlay storage(std::move(numeric), &bv);
 
   Constraint c{0, FilterOp::kGe, SqlValue::Long(1)};
   RowMap rm(0, 10);
@@ -157,11 +157,11 @@
 TEST(QueryExecutor, NullIndexIsNull) {
   std::vector<int64_t> storage_data(5);
   std::iota(storage_data.begin(), storage_data.end(), 0);
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   BitVector bv{1, 1, 0, 1, 1, 0, 0, 0, 1, 0};
-  storage::NullOverlay storage(std::move(numeric), &bv);
+  column::NullOverlay storage(std::move(numeric), &bv);
 
   Constraint c{0, FilterOp::kIsNull, SqlValue()};
   RowMap rm(0, 10);
@@ -178,7 +178,7 @@
 TEST(QueryExecutor, SelectorOverlayBounds) {
   std::vector<int64_t> storage_data(5);
   std::iota(storage_data.begin(), storage_data.end(), 0);
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   BitVector bv{1, 1, 0, 0, 1};
@@ -196,7 +196,7 @@
   std::iota(storage_data.begin(), storage_data.end(), 0);
   std::transform(storage_data.begin(), storage_data.end(), storage_data.begin(),
                  [](int64_t n) { return n % 5; });
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   BitVector bv{1, 1, 0, 1, 1, 0, 1, 0, 0, 1};
@@ -212,11 +212,11 @@
 TEST(QueryExecutor, ArrangementOverlayBounds) {
   std::vector<int64_t> storage_data(5);
   std::iota(storage_data.begin(), storage_data.end(), 0);
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   std::vector<uint32_t> arrangement{4, 1, 2, 2, 3};
-  storage::ArrangementOverlay storage(std::move(numeric), &arrangement);
+  column::ArrangementOverlay storage(std::move(numeric), &arrangement);
 
   Constraint c{0, FilterOp::kGe, SqlValue::Long(3)};
   RowMap rm(0, 5);
@@ -226,11 +226,11 @@
 }
 
 TEST(QueryExecutor, ArrangementOverlaySubsetInputRange) {
-  std::unique_ptr<storage::Storage> fake =
-      storage::FakeStorage::SearchSubset(5u, RowMap::Range(2u, 4u));
+  std::unique_ptr<column::Column> fake =
+      column::FakeStorage::SearchSubset(5u, RowMap::Range(2u, 4u));
 
   std::vector<uint32_t> arrangement{4, 1, 2, 2, 3};
-  storage::ArrangementOverlay storage(std::move(fake), &arrangement);
+  column::ArrangementOverlay storage(std::move(fake), &arrangement);
 
   Constraint c{0, FilterOp::kGe, SqlValue::Long(0u)};
   RowMap rm(1, 3);
@@ -240,11 +240,11 @@
 }
 
 TEST(QueryExecutor, ArrangementOverlaySubsetInputBitvector) {
-  std::unique_ptr<storage::Storage> fake =
-      storage::FakeStorage::SearchSubset(5u, BitVector({0, 0, 1, 1, 0}));
+  std::unique_ptr<column::Column> fake =
+      column::FakeStorage::SearchSubset(5u, BitVector({0, 0, 1, 1, 0}));
 
   std::vector<uint32_t> arrangement{4, 1, 2, 2, 3};
-  storage::ArrangementOverlay storage(std::move(fake), &arrangement);
+  column::ArrangementOverlay storage(std::move(fake), &arrangement);
 
   Constraint c{0, FilterOp::kGe, SqlValue::Long(0u)};
   RowMap rm(1, 3);
@@ -256,11 +256,11 @@
 TEST(QueryExecutor, ArrangementOverlayIndex) {
   std::vector<int64_t> storage_data(5);
   std::iota(storage_data.begin(), storage_data.end(), 0);
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   std::vector<uint32_t> arrangement{4, 1, 2, 2, 3};
-  storage::ArrangementOverlay storage(std::move(numeric), &arrangement);
+  column::ArrangementOverlay storage(std::move(numeric), &arrangement);
 
   Constraint c{0, FilterOp::kGe, SqlValue::Long(3)};
   RowMap rm(0, 5);
@@ -271,7 +271,7 @@
 
 TEST(QueryExecutor, MismatchedTypeNullWithOtherOperations) {
   std::vector<int64_t> storage_data{0, 1, 2, 3, 0, 1, 2, 3};
-  storage::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
+  column::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64);
 
   // Filter.
   Constraint c{0, FilterOp::kGe, SqlValue()};
@@ -283,14 +283,14 @@
 
 TEST(QueryExecutor, SingleConstraintWithNullAndSelector) {
   std::vector<int64_t> storage_data{0, 1, 2, 3, 0, 1, 2, 3};
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   // Current vector
   // 0, 1, NULL, 2, 3, 0, NULL, NULL, 1, 2, 3, NULL
   BitVector null_bv{1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0};
   auto null =
-      std::make_unique<storage::NullOverlay>(std::move(numeric), &null_bv);
+      std::make_unique<column::NullOverlay>(std::move(numeric), &null_bv);
 
   // Final vector
   // 0, NULL, 3, NULL, 1, 3
@@ -309,14 +309,14 @@
 
 TEST(QueryExecutor, SingleConstraintWithNullAndArrangement) {
   std::vector<int64_t> storage_data{0, 1, 2, 3, 0, 1, 2, 3};
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   // Current vector
   // 0, 1, NULL, 2, 3, 0, NULL, NULL, 1, 2, 3, NULL
   BitVector null_bv{1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0};
   auto null =
-      std::make_unique<storage::NullOverlay>(std::move(numeric), &null_bv);
+      std::make_unique<column::NullOverlay>(std::move(numeric), &null_bv);
 
   // Final vector
   // NULL, 3, NULL, NULL, 3, NULL
@@ -335,14 +335,14 @@
 
 TEST(QueryExecutor, IsNullWithSelector) {
   std::vector<int64_t> storage_data{0, 1, 2, 3, 0, 1, 2, 3};
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64);
 
   // Current vector
   // 0, 1, NULL, 2, 3, 0, NULL, NULL, 1, 2, 3, NULL
   BitVector null_bv{1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0};
   auto null =
-      std::make_unique<storage::NullOverlay>(std::move(numeric), &null_bv);
+      std::make_unique<column::NullOverlay>(std::move(numeric), &null_bv);
 
   // Final vector
   // 0, NULL, 3, NULL, 1, 3
@@ -361,13 +361,13 @@
 
 TEST(QueryExecutor, BinarySearch) {
   std::vector<int64_t> storage_data{0, 1, 2, 3, 4, 5, 6};
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64, true);
 
   // Add nulls - {0, 1, NULL, NULL, 2, 3, NULL, NULL, 4, 5, 6, NULL}
   BitVector null_bv{1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0};
   auto null =
-      std::make_unique<storage::NullOverlay>(std::move(numeric), &null_bv);
+      std::make_unique<column::NullOverlay>(std::move(numeric), &null_bv);
 
   // Final vector {1, NULL, 3, NULL, 5, NULL}.
   BitVector selector_bv{0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1};
@@ -385,7 +385,7 @@
 
 TEST(QueryExecutor, BinarySearchIsNull) {
   std::vector<int64_t> storage_data{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
-  auto numeric = std::make_unique<storage::NumericStorage<int64_t>>(
+  auto numeric = std::make_unique<column::NumericStorage<int64_t>>(
       &storage_data, ColumnType::kInt64, true);
 
   // Select 6 elements from storage, resulting in a vector {0, 1, 3, 4, 6, 7}.
@@ -395,7 +395,7 @@
 
   // Add nulls, final vector {NULL, NULL, NULL 0, 1, 3, 4, 6, 7}.
   BitVector null_bv{0, 0, 0, 1, 1, 1, 1, 1, 1};
-  storage::NullOverlay storage(std::move(selector), &null_bv);
+  column::NullOverlay storage(std::move(selector), &null_bv);
 
   // Filter.
   Constraint c{0, FilterOp::kIsNull, SqlValue()};
@@ -410,7 +410,7 @@
 
 TEST(QueryExecutor, SetIdStorage) {
   std::vector<uint32_t> storage_data{0, 0, 0, 3, 3, 3, 6, 6, 6, 9, 9, 9};
-  auto numeric = std::make_unique<storage::SetIdStorage>(&storage_data);
+  auto numeric = std::make_unique<column::SetIdStorage>(&storage_data);
 
   // Select 6 elements from storage, resulting in a vector {0, 3, 3, 6, 9, 9}.
   BitVector selector_bv{0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1};
@@ -419,7 +419,7 @@
 
   // Add nulls - vector (size 10) {NULL, 0, 3, NULL, 3, 6, NULL, 9, 9, NULL}.
   BitVector null_bv{0, 1, 1, 0, 1, 1, 0, 1, 1, 0};
-  storage::NullOverlay storage(std::move(selector), &null_bv);
+  column::NullOverlay storage(std::move(selector), &null_bv);
 
   // Filter.
   Constraint c{0, FilterOp::kIsNull, SqlValue()};
@@ -435,8 +435,8 @@
 
 TEST(QueryExecutor, BinarySearchNotEq) {
   std::vector<int64_t> storage_data{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
-  storage::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64,
-                                           true);
+  column::NumericStorage<int64_t> storage(&storage_data, ColumnType::kInt64,
+                                          true);
 
   // Filter.
   Constraint c{0, FilterOp::kNe, SqlValue::Long(5)};
diff --git a/src/trace_processor/perfetto_sql/intrinsics/functions/BUILD.gn b/src/trace_processor/perfetto_sql/intrinsics/functions/BUILD.gn
index 99488e2..e34973c 100644
--- a/src/trace_processor/perfetto_sql/intrinsics/functions/BUILD.gn
+++ b/src/trace_processor/perfetto_sql/intrinsics/functions/BUILD.gn
@@ -54,7 +54,7 @@
     "../../../../base",
     "../../../containers",
     "../../../db",
-    "../../../db/storage",
+    "../../../db/column",
     "../../../importers/common",
     "../../../importers/ftrace:ftrace_descriptors",
     "../../../perfetto_sql/intrinsics/table_functions",
diff --git a/src/trace_processor/perfetto_sql/intrinsics/functions/utils.h b/src/trace_processor/perfetto_sql/intrinsics/functions/utils.h
index 36f1afc..57bd8dc 100644
--- a/src/trace_processor/perfetto_sql/intrinsics/functions/utils.h
+++ b/src/trace_processor/perfetto_sql/intrinsics/functions/utils.h
@@ -26,7 +26,7 @@
 #include "perfetto/ext/base/string_utils.h"
 #include "perfetto/ext/trace_processor/demangle.h"
 #include "protos/perfetto/common/builtin_clock.pbzero.h"
-#include "src/trace_processor/db/storage/utils.h"
+#include "src/trace_processor/db/column/utils.h"
 #include "src/trace_processor/export_json.h"
 #include "src/trace_processor/importers/common/clock_tracker.h"
 #include "src/trace_processor/perfetto_sql/intrinsics/functions/sql_function.h"