tp: rename the executor's filter values to params

**Why**

The executor calls the values its operators compare columns with filter
values, a name taken from the interpreter, where only filters use them.
The next PRs let a run bind them and expressions will read them later,
so they get the usual database name. The interpreter is also going
away, so the executor's comments shouldn't describe it in its terms.

**Changes**

- `FilterValue` is now `ParamValue`, in `param_value.h`.
- `FilterValueCaster` and `GetFilterValue(List)Caster` are now
  `ParamCaster` and `GetParam(List)Caster`.
- `Context::SetFilterValues()` and `filter_values()` are now
  `SetParams()` and `params()`. `PhysicalPlan::filter_values()` is now
  `params()` too.
- The index of a param in `Filter`, `IndexScan` and `SortedScan`
  conditions is `param` rather than `value`.
- Comments in `filter.cc`, `index_scan.h`, `sorted_scan.h` and
  `param_value.h` no longer refer to the interpreter.

Names in the interpreter and `core/common` don't change.

**Testing**

No behaviour change. `perfetto_unittests` and all diff tests pass.
diff --git a/BUILD b/BUILD
index 959e27e..4ae4723 100644
--- a/BUILD
+++ b/BUILD
@@ -2675,7 +2675,6 @@
         "src/trace_processor/core/exec/expression.h",
         "src/trace_processor/core/exec/filter.cc",
         "src/trace_processor/core/exec/filter.h",
-        "src/trace_processor/core/exec/filter_value.h",
         "src/trace_processor/core/exec/graph_tree.cc",
         "src/trace_processor/core/exec/graph_tree.h",
         "src/trace_processor/core/exec/group_table.cc",
@@ -2699,6 +2698,7 @@
         "src/trace_processor/core/exec/limit.h",
         "src/trace_processor/core/exec/operator.cc",
         "src/trace_processor/core/exec/operator.h",
+        "src/trace_processor/core/exec/param_value.h",
         "src/trace_processor/core/exec/pipeline.cc",
         "src/trace_processor/core/exec/pipeline.h",
         "src/trace_processor/core/exec/row_batch.cc",
diff --git a/src/trace_processor/core/exec/BUILD.gn b/src/trace_processor/core/exec/BUILD.gn
index 18a63a6..4cd9e59 100644
--- a/src/trace_processor/core/exec/BUILD.gn
+++ b/src/trace_processor/core/exec/BUILD.gn
@@ -46,7 +46,6 @@
     "expression.h",
     "filter.cc",
     "filter.h",
-    "filter_value.h",
     "graph_tree.cc",
     "graph_tree.h",
     "group_table.cc",
@@ -70,6 +69,7 @@
     "limit.h",
     "operator.cc",
     "operator.h",
+    "param_value.h",
     "pipeline.cc",
     "pipeline.h",
     "row_batch.cc",
diff --git a/src/trace_processor/core/exec/context.h b/src/trace_processor/core/exec/context.h
index 8f220eb..da158f0 100644
--- a/src/trace_processor/core/exec/context.h
+++ b/src/trace_processor/core/exec/context.h
@@ -25,7 +25,7 @@
 
 namespace perfetto::trace_processor::core::exec {
 
-struct FilterValue;
+struct ParamValue;
 
 // What one execution of a plan shares as it runs: the storage the batches'
 // own columns are in. A step takes a buffer for each column it fills, sized
@@ -51,19 +51,17 @@
   // value is zero.
   const ColumnBuffer& NullBuffer();
 
-  // The values the next run's filters compare with, by parameter, already
-  // cast (see FilterValue). Nothing is copied: the caller keeps them alive and
+  // The next run's params: the values its operators compare with, already
+  // cast (see ParamValue). Nothing is copied: the caller keeps them alive and
   // unchanged until the run ends.
-  void SetFilterValues(base::Span<const FilterValue> values) {
-    filter_values_ = values;
-  }
-  base::Span<const FilterValue> filter_values() const { return filter_values_; }
+  void SetParams(base::Span<const ParamValue> params) { params_ = params; }
+  base::Span<const ParamValue> params() const { return params_; }
 
  private:
   // Declared before `nulls_`, so it outlives it.
   BufferPool buffers_;
   ColumnBuffer nulls_;
-  base::Span<const FilterValue> filter_values_;
+  base::Span<const ParamValue> params_;
 };
 
 }  // namespace perfetto::trace_processor::core::exec
diff --git a/src/trace_processor/core/exec/filter.cc b/src/trace_processor/core/exec/filter.cc
index 15e7c6d..c6c52ea 100644
--- a/src/trace_processor/core/exec/filter.cc
+++ b/src/trace_processor/core/exec/filter.cc
@@ -33,8 +33,8 @@
 #include "src/trace_processor/core/common/storage_types.h"
 #include "src/trace_processor/core/exec/column_view.h"
 #include "src/trace_processor/core/exec/context.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/operator.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/row_batch.h"
 #include "src/trace_processor/core/exec/selection.h"
 #include "src/trace_processor/core/exec/variant.h"
@@ -85,11 +85,11 @@
 }
 
 // Keeps the rows of a column of storage type T which compare true by O with
-// the filter value. The kernels read each row's value at the column's data
+// the param. The kernels read each row's value at the column's data
 // plus the row, so the data passed starts where the window does.
 template <typename T, typename O>
 void Compare(const ColumnView& column,
-             const FilterValue& cast,
+             const ParamValue& cast,
              const StringPool& pool,
              Rows& r) {
   // The value was cast for the column's storage type, which picks its
@@ -148,7 +148,7 @@
 template <typename T>
 void CompareByOp(const Op& op,
                  const ColumnView& column,
-                 const FilterValue& cast,
+                 const ParamValue& cast,
                  const StringPool& pool,
                  Rows& r) {
   switch (op.index()) {
@@ -177,10 +177,10 @@
   PERFETTO_FATAL("Unsupported filter operator");
 }
 
-// Drops the nulls, which no comparison or IN is true of, as the interpreter
-// does. False if nothing is left to compare: no row can match the cast value,
-// every row left does, or no row is left.
-bool KeepRowsWhichCanMatch(const FilterValue& cast,
+// Drops the nulls, which no comparison or IN is true of. False if nothing is
+// left to compare: no row can match the cast value, every row left does, or no
+// row is left.
+bool KeepRowsWhichCanMatch(const ParamValue& cast,
                            const ColumnView& column,
                            Rows& r) {
   if (cast.value.validity == CastFilterValueResult::kNoneMatch) {
@@ -193,7 +193,7 @@
 
 // Applies a comparison or IN to the rows kept so far.
 void ApplyCondition(const Op& op,
-                    const FilterValue& cast,
+                    const ParamValue& cast,
                     const ColumnView& column,
                     const StringPool& pool,
                     Rows& r) {
@@ -238,7 +238,7 @@
 
 bool Filter::Process(RowBatch& batch, OperatorState& state) const {
   State& s = state.Cast<State>();
-  const FilterValue* values = s.context->filter_values().b;
+  const ParamValue* values = s.context->params().b;
   const Selection& selection = batch.selection();
   Rows r{s.rows.data(), selection.size()};
   for (uint32_t i = 0; i < r.count; ++i) {
@@ -252,8 +252,8 @@
       continue;
     }
     PERFETTO_DCHECK(column.kind() != ColumnView::Kind::kVariant);
-    PERFETTO_DCHECK(c.value < s.context->filter_values().size());
-    ApplyCondition(c.op, values[c.value], column, *pool_, r);
+    PERFETTO_DCHECK(c.param < s.context->params().size());
+    ApplyCondition(c.op, values[c.param], column, *pool_, r);
   }
   batch.mutable_selection().KeepRows(
       base::Span<const uint32_t>(r.rows, r.rows + r.count));
diff --git a/src/trace_processor/core/exec/filter.h b/src/trace_processor/core/exec/filter.h
index 3fbcb12..bacd9c9 100644
--- a/src/trace_processor/core/exec/filter.h
+++ b/src/trace_processor/core/exec/filter.h
@@ -35,8 +35,8 @@
 // Keeps the rows of each batch for which every condition holds. Nothing is
 // copied: the batch's selection is narrowed.
 //
-// A condition compares a column with one of the run's filter values (see
-// Context::SetFilterValues) by =, !=, <, <=, >, >=, IN or, for a string
+// A condition compares a column with one of the run's params (see
+// Context::SetParams) by =, !=, <, <=, >, >=, IN or, for a string
 // column, GLOB, or tests it with IS [NOT] NULL. The values come already cast
 // for the column and comparison, so a Filter only compares.
 //
@@ -59,8 +59,8 @@
   struct Condition {
     uint32_t column = 0;
     Op op{Eq{}};
-    // The filter value compared with. Unused by IS [NOT] NULL.
-    uint32_t value = 0;
+    // The param compared with. Unused by IS [NOT] NULL.
+    uint32_t param = 0;
   };
 
   // `pool` holds the strings of the columns, and must outlive the filter.
@@ -76,7 +76,7 @@
   struct State : OperatorState {
     explicit State(const Context& c) : context(&c) {}
     ~State() override;
-    // Where the run's filter values are.
+    // Where the run's params are.
     const Context* context;
     // The batch rows still kept, increasing.
     CallScratch<std::array<uint32_t, kMaxBatchRows>> rows;
diff --git a/src/trace_processor/core/exec/filter_benchmark.cc b/src/trace_processor/core/exec/filter_benchmark.cc
index 826e522..79437a0 100644
--- a/src/trace_processor/core/exec/filter_benchmark.cc
+++ b/src/trace_processor/core/exec/filter_benchmark.cc
@@ -40,8 +40,8 @@
 #include "src/trace_processor/core/dataframe/specs.h"
 #include "src/trace_processor/core/exec/context.h"
 #include "src/trace_processor/core/exec/dataframe_scan.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/operator.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/row_batch.h"
 
 namespace perfetto::trace_processor::core::exec {
@@ -131,13 +131,13 @@
   Filter filter({{1, op, 0}}, &s.pool());
   DataframeScan scan({df.shared_column(kId), df.shared_column(column)},
                      df.row_count());
-  FilterValueCaster<OneValue> caster =
-      GetFilterValueCaster<OneValue>(df.column_type(column), op);
+  ParamCaster<OneValue> caster =
+      GetParamCaster<OneValue>(df.column_type(column), op);
   OneValue fetcher(value);
-  FilterValue cast[1];
+  ParamValue cast[1];
 
   Context context;
-  context.SetFilterValues(base::Span<const FilterValue>(cast));
+  context.SetParams(base::Span<const ParamValue>(cast));
   std::unique_ptr<OperatorState> scan_state = scan.MakeState(context);
   std::unique_ptr<OperatorState> filter_state = filter.MakeState(context);
   RowBatch batch;
diff --git a/src/trace_processor/core/exec/filter_unittest.cc b/src/trace_processor/core/exec/filter_unittest.cc
index db27f6d..1054929 100644
--- a/src/trace_processor/core/exec/filter_unittest.cc
+++ b/src/trace_processor/core/exec/filter_unittest.cc
@@ -31,8 +31,8 @@
 #include "src/trace_processor/core/common/value_fetcher.h"
 #include "src/trace_processor/core/exec/column_view.h"
 #include "src/trace_processor/core/exec/context.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/operator.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/row_batch.h"
 #include "src/trace_processor/core/exec/test_utils.h"
 #include "src/trace_processor/core/exec/variant.h"
@@ -99,9 +99,9 @@
   std::unique_ptr<OperatorState> state = filter.MakeState(context);
   List fetcher;
   fetcher.v = std::move(list);
-  FilterValue cast[1];
-  GetFilterValueListCaster<List>(type)(fetcher, 0, pool, &cast[0]);
-  context.SetFilterValues(base::Span<const FilterValue>(cast));
+  ParamValue cast[1];
+  GetParamListCaster<List>(type)(fetcher, 0, pool, &cast[0]);
+  context.SetParams(base::Span<const ParamValue>(cast));
   RowBatch out;
   out.CopyFrom(batch);
   EXPECT_TRUE(filter.Process(out, *state));
@@ -144,7 +144,7 @@
   // casters it picked for each condition.
   void CastAll(const std::vector<On>& on,
                const std::vector<Value>& values,
-               std::vector<FilterValue>* cast) {
+               std::vector<ParamValue>* cast) {
     Values fetcher;
     fetcher.v = values;
     cast->resize(values.size());
@@ -154,8 +154,8 @@
       }
       StorageType type =
           c.column == 0 ? StorageType{Int64{}} : StorageType{String{}};
-      GetFilterValueCaster<Values>(type, c.op)(fetcher, c.index, pool_,
-                                               &(*cast)[c.index]);
+      GetParamCaster<Values>(type, c.op)(fetcher, c.index, pool_,
+                                         &(*cast)[c.index]);
     }
   }
 
@@ -174,9 +174,9 @@
     Filter filter(Conditions(on), &pool_);
     Context context;
     std::unique_ptr<OperatorState> state = filter.MakeState(context);
-    std::vector<FilterValue> cast;
+    std::vector<ParamValue> cast;
     CastAll(on, values, &cast);
-    context.SetFilterValues(base::Span<const FilterValue>(cast));
+    context.SetParams(base::Span<const ParamValue>(cast));
     RowBatch batch;
     batch.CopyFrom(in ? *in : batch_);
     EXPECT_TRUE(filter.Process(batch, *state));
@@ -237,10 +237,10 @@
   Filter filter(Conditions(on), &pool_);
   Context context;
   std::unique_ptr<OperatorState> state = filter.MakeState(context);
-  std::vector<FilterValue> cast;
+  std::vector<ParamValue> cast;
   auto run = [&](const char* lt, const char* ne) {
     CastAll(on, {lt, ne}, &cast);
-    context.SetFilterValues(base::Span<const FilterValue>(cast));
+    context.SetParams(base::Span<const ParamValue>(cast));
     RowBatch batch;
     batch.CopyFrom(batch_);
     EXPECT_TRUE(filter.Process(batch, *state));
@@ -260,10 +260,9 @@
   std::unique_ptr<OperatorState> state = filter.MakeState(context);
   Values fetcher;
   fetcher.v = {int64_t{12}};
-  FilterValue cast[1];
-  GetFilterValueCaster<Values>(StorageType{Id{}}, Ge{})(fetcher, 0, pool,
-                                                        &cast[0]);
-  context.SetFilterValues(base::Span<const FilterValue>(cast));
+  ParamValue cast[1];
+  GetParamCaster<Values>(StorageType{Id{}}, Ge{})(fetcher, 0, pool, &cast[0]);
+  context.SetParams(base::Span<const ParamValue>(cast));
   RowBatch batch;
   batch.AddBorrowedColumn(
       ColumnView::Reference(StorageType{Id{}}, nullptr, nullptr, 10));
diff --git a/src/trace_processor/core/exec/index_scan.cc b/src/trace_processor/core/exec/index_scan.cc
index bc75233..c14ab31 100644
--- a/src/trace_processor/core/exec/index_scan.cc
+++ b/src/trace_processor/core/exec/index_scan.cc
@@ -33,8 +33,8 @@
 #include "src/trace_processor/core/common/storage_types.h"
 #include "src/trace_processor/core/dataframe/types.h"
 #include "src/trace_processor/core/exec/context.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/operator.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/row_batch.h"
 #include "src/trace_processor/core/util/bit_vector.h"
 #include "src/trace_processor/core/util/slab.h"
@@ -97,11 +97,11 @@
 base::Span<const uint32_t> IndexScan::Find(const State& s) const {
   base::Span<const uint32_t> entries(
       permutation_->data(), permutation_->data() + permutation_->size());
-  const FilterValue* values = s.context->filter_values().b;
+  const ParamValue* values = s.context->params().b;
   for (uint32_t i = 0; i < equalities_.size() && !entries.empty(); ++i) {
     const Equality& eq = equalities_[i];
-    PERFETTO_DCHECK(eq.value < s.context->filter_values().size());
-    const FilterValue& cast = values[eq.value];
+    PERFETTO_DCHECK(eq.param < s.context->params().size());
+    const ParamValue& cast = values[eq.param];
     if (cast.value.validity == CastFilterValueResult::kNoneMatch) {
       entries.e = entries.b;
       break;
diff --git a/src/trace_processor/core/exec/index_scan.h b/src/trace_processor/core/exec/index_scan.h
index e3f5e45..61ba32f 100644
--- a/src/trace_processor/core/exec/index_scan.h
+++ b/src/trace_processor/core/exec/index_scan.h
@@ -34,10 +34,9 @@
 namespace perfetto::trace_processor::core::exec {
 
 // Reads the rows of a dataframe which an index finds for equalities on its
-// leading columns, in index order, as the dataframe interpreter does. Each
-// equality narrows the index's entries; any other condition is left to a
-// Filter after the scan. The searches run once per run, on the first
-// GetData(). The columns must be finalized.
+// leading columns, in index order. Each equality narrows the index's entries;
+// any other condition is left to a Filter after the scan. The searches run once
+// per run, on the first GetData(). The columns must be finalized.
 class IndexScan final : public Source {
  public:
   static constexpr char kType = 0;
@@ -46,8 +45,8 @@
   // = on one of the index's columns, given in index order.
   struct Equality {
     std::shared_ptr<const dataframe::Column> column;
-    // Index into the run's filter values.
-    uint32_t value = 0;
+    // Index into the run's params.
+    uint32_t param = 0;
   };
 
   // `pool` must outlive the scan.
diff --git a/src/trace_processor/core/exec/lookup_benchmark.cc b/src/trace_processor/core/exec/lookup_benchmark.cc
index d45420e..4eee7f8 100644
--- a/src/trace_processor/core/exec/lookup_benchmark.cc
+++ b/src/trace_processor/core/exec/lookup_benchmark.cc
@@ -39,9 +39,9 @@
 #include "src/trace_processor/core/dataframe/specs.h"
 #include "src/trace_processor/core/dataframe/typed_cursor.h"
 #include "src/trace_processor/core/exec/filter.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/index_scan.h"
 #include "src/trace_processor/core/exec/operator.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/pipeline.h"
 #include "src/trace_processor/core/exec/row_cursor.h"
 #include "src/trace_processor/core/exec/sorted_scan.h"
@@ -196,7 +196,7 @@
         cast_(conditions.size()),
         pool_(pool) {
     for (const Condition& c : conditions) {
-      casters_.push_back(GetFilterValueCaster<Fetcher>(c.type, c.op));
+      casters_.push_back(GetParamCaster<Fetcher>(c.type, c.op));
     }
     fetcher_.filter_values_ = values_.data();
   }
@@ -208,7 +208,7 @@
     for (uint32_t i = 0; i < casters_.size(); ++i) {
       casters_[i](fetcher_, i, *pool_, &cast_[i]);
     }
-    return cursor_.Open(base::Span<const FilterValue>(
+    return cursor_.Open(base::Span<const ParamValue>(
         cast_.data(), cast_.data() + cast_.size()));
   }
   RowCursor& cursor() { return cursor_; }
@@ -218,8 +218,8 @@
   Pipeline pipeline_;
   RowCursor cursor_;
   std::vector<FetcherValue> values_;
-  std::vector<FilterValue> cast_;
-  std::vector<FilterValueCaster<Fetcher>> casters_;
+  std::vector<ParamValue> cast_;
+  std::vector<ParamCaster<Fetcher>> casters_;
   Fetcher fetcher_;
   const StringPool* pool_;
 };
diff --git a/src/trace_processor/core/exec/filter_value.h b/src/trace_processor/core/exec/param_value.h
similarity index 70%
rename from src/trace_processor/core/exec/filter_value.h
rename to src/trace_processor/core/exec/param_value.h
index 9812916..73eefba 100644
--- a/src/trace_processor/core/exec/filter_value.h
+++ b/src/trace_processor/core/exec/param_value.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef SRC_TRACE_PROCESSOR_CORE_EXEC_FILTER_VALUE_H_
-#define SRC_TRACE_PROCESSOR_CORE_EXEC_FILTER_VALUE_H_
+#ifndef SRC_TRACE_PROCESSOR_CORE_EXEC_PARAM_VALUE_H_
+#define SRC_TRACE_PROCESSOR_CORE_EXEC_PARAM_VALUE_H_
 
 #include <cstdint>
 #include <memory>
@@ -35,16 +35,16 @@
 
 namespace perfetto::trace_processor::core::exec {
 
-// A value a run of a plan compares a column with, already cast to the column's
-// storage type for one comparison, exactly as the dataframe interpreter casts
-// it (see filter_value_cast.h): a value, or that every or no row matches.
+// A param of a run: a value its operators compare a column with, already cast
+// to the column's storage type for one comparison (see filter_value_cast.h): a
+// value, or that every or no row matches.
 //
-// Whoever runs a plan keeps one per condition from run to run, and casts each
+// Whoever runs a plan keeps one per param from run to run, and casts each
 // run's values into them with casters it picked when the plan was built (see
-// GetFilterValueCaster). Everything after only reads them: nothing is
+// GetParamCaster). Everything after only reads them: nothing is
 // allocated, and nothing dispatches on the column's type or the comparison,
 // which matters when each run looks up one row.
-struct FilterValue {
+struct ParamValue {
   filter::CastFilterValueResult value =
       filter::CastFilterValueResult::NoneMatch();
   // For a string compared by = or !=: the string's id in the pool.
@@ -62,11 +62,11 @@
 // Casts the value `fetcher` has at `index` into `out`, for a column of
 // storage type T compared by `op`. `pool` holds the column's strings.
 template <typename T, typename Fetcher>
-void CastFilterValueFor(Fetcher& fetcher,
-                        uint32_t index,
-                        NonNullOp op,
-                        const StringPool& pool,
-                        FilterValue* out) {
+void CastParamFor(Fetcher& fetcher,
+                  uint32_t index,
+                  NonNullOp op,
+                  const StringPool& pool,
+                  ParamValue* out) {
   out->value = filter::CastFilterValue<T>(index, fetcher, op);
   if constexpr (std::is_same_v<T, String>) {
     if (out->value.validity != filter::CastFilterValueResult::kValid) {
@@ -96,11 +96,11 @@
 // Casts the IN list `fetcher` iterates at `index` into `out`, for a column of
 // storage type T.
 template <typename T, typename Fetcher>
-void CastFilterValueListFor(Fetcher& fetcher,
-                            uint32_t index,
-                            NonNullOp op,
-                            const StringPool& pool,
-                            FilterValue* out) {
+void CastParamListFor(Fetcher& fetcher,
+                      uint32_t index,
+                      NonNullOp op,
+                      const StringPool& pool,
+                      ParamValue* out) {
   auto& list = out->list;
   if (!list) {
     list = std::make_unique<filter::CastFilterValueListResult>();
@@ -115,19 +115,19 @@
 }  // namespace internal
 
 // Casts a value for one storage type and comparison, picked once, when a plan
-// is built (see GetFilterValueCaster).
+// is built (see GetParamCaster).
 template <typename Fetcher>
-class FilterValueCaster {
+class ParamCaster {
  public:
   using Fn =
-      void (*)(Fetcher&, uint32_t, NonNullOp, const StringPool&, FilterValue*);
+      void (*)(Fetcher&, uint32_t, NonNullOp, const StringPool&, ParamValue*);
 
-  FilterValueCaster(Fn fn, NonNullOp op) : fn_(fn), op_(op) {}
+  ParamCaster(Fn fn, NonNullOp op) : fn_(fn), op_(op) {}
 
   void operator()(Fetcher& fetcher,
                   uint32_t index,
                   const StringPool& pool,
-                  FilterValue* out) const {
+                  ParamValue* out) const {
     fn_(fetcher, index, op_, pool, out);
   }
 
@@ -139,24 +139,23 @@
 // The caster for a column of storage type `type` compared by `op`, one of =,
 // !=, <, <=, >, >= or, for a string column, GLOB.
 template <typename Fetcher>
-FilterValueCaster<Fetcher> GetFilterValueCaster(StorageType type,
-                                                const Op& op) {
+ParamCaster<Fetcher> GetParamCaster(StorageType type, const Op& op) {
   PERFETTO_CHECK(op.IsAnyOf<RangeOp>() || op.Is<Eq>() || op.Is<Ne>() ||
                  (op.Is<Glob>() && type.Is<String>()));
   NonNullOp non_null = *op.TryDowncast<NonNullOp>();
   switch (type.index()) {
     case StorageType::GetTypeIndex<Id>():
-      return {&internal::CastFilterValueFor<Id, Fetcher>, non_null};
+      return {&internal::CastParamFor<Id, Fetcher>, non_null};
     case StorageType::GetTypeIndex<Uint32>():
-      return {&internal::CastFilterValueFor<Uint32, Fetcher>, non_null};
+      return {&internal::CastParamFor<Uint32, Fetcher>, non_null};
     case StorageType::GetTypeIndex<Int32>():
-      return {&internal::CastFilterValueFor<Int32, Fetcher>, non_null};
+      return {&internal::CastParamFor<Int32, Fetcher>, non_null};
     case StorageType::GetTypeIndex<Int64>():
-      return {&internal::CastFilterValueFor<Int64, Fetcher>, non_null};
+      return {&internal::CastParamFor<Int64, Fetcher>, non_null};
     case StorageType::GetTypeIndex<Double>():
-      return {&internal::CastFilterValueFor<Double, Fetcher>, non_null};
+      return {&internal::CastParamFor<Double, Fetcher>, non_null};
     case StorageType::GetTypeIndex<String>():
-      return {&internal::CastFilterValueFor<String, Fetcher>, non_null};
+      return {&internal::CastParamFor<String, Fetcher>, non_null};
     default:
       PERFETTO_FATAL("Unsupported storage type");
   }
@@ -165,21 +164,21 @@
 // The caster of IN lists for a column of storage type `type`. `Fetcher` must
 // iterate lists (see ValueFetcher::IteratorInit).
 template <typename Fetcher>
-FilterValueCaster<Fetcher> GetFilterValueListCaster(StorageType type) {
+ParamCaster<Fetcher> GetParamListCaster(StorageType type) {
   NonNullOp eq = Eq{};
   switch (type.index()) {
     case StorageType::GetTypeIndex<Id>():
-      return {&internal::CastFilterValueListFor<Id, Fetcher>, eq};
+      return {&internal::CastParamListFor<Id, Fetcher>, eq};
     case StorageType::GetTypeIndex<Uint32>():
-      return {&internal::CastFilterValueListFor<Uint32, Fetcher>, eq};
+      return {&internal::CastParamListFor<Uint32, Fetcher>, eq};
     case StorageType::GetTypeIndex<Int32>():
-      return {&internal::CastFilterValueListFor<Int32, Fetcher>, eq};
+      return {&internal::CastParamListFor<Int32, Fetcher>, eq};
     case StorageType::GetTypeIndex<Int64>():
-      return {&internal::CastFilterValueListFor<Int64, Fetcher>, eq};
+      return {&internal::CastParamListFor<Int64, Fetcher>, eq};
     case StorageType::GetTypeIndex<Double>():
-      return {&internal::CastFilterValueListFor<Double, Fetcher>, eq};
+      return {&internal::CastParamListFor<Double, Fetcher>, eq};
     case StorageType::GetTypeIndex<String>():
-      return {&internal::CastFilterValueListFor<String, Fetcher>, eq};
+      return {&internal::CastParamListFor<String, Fetcher>, eq};
     default:
       PERFETTO_FATAL("Unsupported storage type");
   }
@@ -187,4 +186,4 @@
 
 }  // namespace perfetto::trace_processor::core::exec
 
-#endif  // SRC_TRACE_PROCESSOR_CORE_EXEC_FILTER_VALUE_H_
+#endif  // SRC_TRACE_PROCESSOR_CORE_EXEC_PARAM_VALUE_H_
diff --git a/src/trace_processor/core/exec/pipeline_formatter.cc b/src/trace_processor/core/exec/pipeline_formatter.cc
index 546d34a..614f186 100644
--- a/src/trace_processor/core/exec/pipeline_formatter.cc
+++ b/src/trace_processor/core/exec/pipeline_formatter.cc
@@ -286,7 +286,7 @@
     for (const Filter::Condition& c : filter.conditions_) {
       out += (out.empty() ? "" : ", ") + Column(c.column) + " " + OpName(c.op);
       if (!c.op.IsAnyOf<NullOp>()) {
-        out += " ?" + std::to_string(c.value);
+        out += " ?" + std::to_string(c.param);
       }
     }
     return "Filter(" + out + ")";
diff --git a/src/trace_processor/core/exec/row_cursor.h b/src/trace_processor/core/exec/row_cursor.h
index 14fae17..dcf2836 100644
--- a/src/trace_processor/core/exec/row_cursor.h
+++ b/src/trace_processor/core/exec/row_cursor.h
@@ -25,8 +25,8 @@
 #include "perfetto/base/status.h"
 #include "perfetto/ext/base/span.h"
 #include "src/trace_processor/core/exec/context.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/operator.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/row_batch.h"
 
 namespace perfetto::trace_processor::core::exec {
@@ -44,9 +44,9 @@
   ~RowCursor();
 
   // Rewinds and moves to the first row, the run's filters comparing with
-  // `filter_values` (see Context::SetFilterValues).
-  bool Open(base::Span<const FilterValue> filter_values = {}) {
-    context_.SetFilterValues(filter_values);
+  // `params` (see Context::SetParams).
+  bool Open(base::Span<const ParamValue> params = {}) {
+    context_.SetParams(params);
     Restart(source_, *state_);
     batch_ = nullptr;
     index_ = 0;
diff --git a/src/trace_processor/core/exec/search_scans_unittest.cc b/src/trace_processor/core/exec/search_scans_unittest.cc
index 8ca5709..742b960 100644
--- a/src/trace_processor/core/exec/search_scans_unittest.cc
+++ b/src/trace_processor/core/exec/search_scans_unittest.cc
@@ -39,9 +39,9 @@
 #include "src/trace_processor/core/dataframe/specs.h"
 #include "src/trace_processor/core/exec/dataframe_scan.h"
 #include "src/trace_processor/core/exec/filter.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/index_scan.h"
 #include "src/trace_processor/core/exec/operator.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/pipeline.h"
 #include "src/trace_processor/core/exec/row_batch.h"
 #include "src/trace_processor/core/exec/row_cursor.h"
@@ -57,7 +57,7 @@
 // Bigger than an int32, so a column holding it is stored as an int64.
 constexpr int64_t kBig = int64_t{1} << 40;
 
-// Fetches filter values from a vector.
+// Fetches params from a vector.
 struct Values : ValueFetcher {
   using Type = size_t;
   static constexpr Type kNull = base::variant_index<Value, std::nullptr_t>();
@@ -220,7 +220,7 @@
   struct ExecPlan {
     std::unique_ptr<Source> scan;
     std::unique_ptr<Pipeline> pipeline;
-    std::vector<std::optional<FilterValueCaster<Values>>> casters;
+    std::vector<std::optional<ParamCaster<Values>>> casters;
   };
   std::optional<ExecPlan> Lower(const dataframe::LogicalPlan& plan) {
     std::vector<std::shared_ptr<const dataframe::Column>> columns;
@@ -242,7 +242,7 @@
         }
         if (f->value_index && !f->op.IsAnyOf<NullOp>()) {
           out.casters[*f->value_index] =
-              GetFilterValueCaster<Values>(f->storage, f->op);
+              GetParamCaster<Values>(f->storage, f->op);
         }
         using K = SortedScan::Search::Kind;
         std::optional<K> kind;
@@ -278,8 +278,7 @@
           if (!p.op.Is<Eq>()) {
             return std::nullopt;
           }
-          out.casters[*p.value_index] =
-              GetFilterValueCaster<Values>(p.storage, p.op);
+          out.casters[*p.value_index] = GetParamCaster<Values>(p.storage, p.op);
           equalities.push_back({df_->shared_column(p.col), *p.value_index});
         }
         index = &df_->indexes()[idx->index];
@@ -389,19 +388,19 @@
 
         Values fetcher;
         fetcher.values = &slots;
-        std::vector<FilterValue> cast(slots.size());
+        std::vector<ParamValue> cast(slots.size());
         for (uint32_t i = 0; i < slots.size(); ++i) {
           if (exec->casters[i]) {
             (*exec->casters[i])(fetcher, i, pool_, &cast[i]);
           }
         }
         // Whoever casts values can move them afterwards, as lowering does.
-        std::vector<FilterValue> moved;
-        for (FilterValue& value : cast) {
+        std::vector<ParamValue> moved;
+        for (ParamValue& value : cast) {
           moved.push_back(std::move(value));
         }
         std::vector<uint32_t> actual;
-        for (bool ok = cursor.Open(base::Span<const FilterValue>(
+        for (bool ok = cursor.Open(base::Span<const ParamValue>(
                  moved.data(), moved.data() + moved.size()));
              ok; ok = cursor.Next()) {
           uint32_t row = cursor.Value<uint32_t>(kId);
diff --git a/src/trace_processor/core/exec/sorted_scan.cc b/src/trace_processor/core/exec/sorted_scan.cc
index e229956..79ec40a 100644
--- a/src/trace_processor/core/exec/sorted_scan.cc
+++ b/src/trace_processor/core/exec/sorted_scan.cc
@@ -33,8 +33,8 @@
 #include "src/trace_processor/core/common/storage_types.h"
 #include "src/trace_processor/core/dataframe/types.h"
 #include "src/trace_processor/core/exec/context.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/operator.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/row_batch.h"
 #include "src/trace_processor/core/util/range.h"
 
@@ -84,12 +84,12 @@
 }
 
 Range SortedScan::Find(const Context& context) const {
-  const FilterValue* values = context.filter_values().b;
+  const ParamValue* values = context.params().b;
   Range range{0, row_count_};
   for (uint32_t i = 0; i < searches_.size() && !range.empty(); ++i) {
     const Search& s = searches_[i];
-    PERFETTO_DCHECK(s.value < context.filter_values().size());
-    const FilterValue& cast = values[s.value];
+    PERFETTO_DCHECK(s.param < context.params().size());
+    const ParamValue& cast = values[s.param];
     if (cast.value.validity == CastFilterValueResult::kNoneMatch) {
       range.e = range.b;
       break;
@@ -139,7 +139,7 @@
 
 Range SortedScan::FindIdEq(const Context& context) const {
   Range range{0, row_count_};
-  const FilterValue& cast = context.filter_values().b[searches_[0].value];
+  const ParamValue& cast = context.params().b[searches_[0].param];
   if (PERFETTO_LIKELY(cast.value.validity == CastFilterValueResult::kValid)) {
     filter::IdEqualRange(
         base::unchecked_get<CastFilterValueResult::Id>(cast.value.value).value,
diff --git a/src/trace_processor/core/exec/sorted_scan.h b/src/trace_processor/core/exec/sorted_scan.h
index eb8afb7..c80160e 100644
--- a/src/trace_processor/core/exec/sorted_scan.h
+++ b/src/trace_processor/core/exec/sorted_scan.h
@@ -35,9 +35,9 @@
 
 // Reads the rows of a dataframe kept by searches of its sorted columns.
 //
-// Each search narrows a contiguous range of rows with the same kernels as the
-// dataframe interpreter, so both find the same rows. The searches run once per
-// run, on the first GetData(); the range is then read like DataframeScan.
+// Each search narrows a contiguous range of rows with the search kernels of
+// core/common (see filter_kernels.h). The searches run once per run, on the
+// first GetData(); the range is then read like DataframeScan.
 // Searched columns must be non-null and finalized.
 class SortedScan final : public Source {
  public:
@@ -57,8 +57,8 @@
     Kind kind = Kind::kBinarySearch;
     // One of =, <, <=, >, >=. Only = for kSetIdEq and kSmallValueEq.
     Op op{Eq{}};
-    // Index into the run's filter values.
-    uint32_t value = 0;
+    // Index into the run's params.
+    uint32_t param = 0;
   };
 
   // `pool` must outlive the scan.
diff --git a/src/trace_processor/perfetto_sql/engine/pipeline_module.cc b/src/trace_processor/perfetto_sql/engine/pipeline_module.cc
index c3a55a1..b3434db 100644
--- a/src/trace_processor/perfetto_sql/engine/pipeline_module.cc
+++ b/src/trace_processor/perfetto_sql/engine/pipeline_module.cc
@@ -385,7 +385,7 @@
       return rc;
     }
   }
-  c->eof = !c->rows->Open(c->plan->filter_values());
+  c->eof = !c->rows->Open(c->plan->params());
   if (c->eof)
     return CheckStatus(c);
   return SQLITE_OK;
diff --git a/src/trace_processor/perfetto_sql/pipeline/literal.cc b/src/trace_processor/perfetto_sql/pipeline/literal.cc
index 2473652..e34d300 100644
--- a/src/trace_processor/perfetto_sql/pipeline/literal.cc
+++ b/src/trace_processor/perfetto_sql/pipeline/literal.cc
@@ -28,7 +28,7 @@
 #include "src/trace_processor/core/common/op_types.h"
 #include "src/trace_processor/core/common/storage_types.h"
 #include "src/trace_processor/core/common/value_fetcher.h"
-#include "src/trace_processor/core/exec/filter_value.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/perfetto_sql/pipeline/compiler.h"
 #include "src/trace_processor/perfetto_sql/pipeline/plan_serialization.h"
 
@@ -36,8 +36,8 @@
 namespace ex = core::exec;
 namespace {
 
-// Hands literals to the shared filter value casts, so they mean for each column
-// type what any other filter value means. A scalar is the first literal; IN
+// Hands literals to the shared param casts, so they mean for each column
+// type what any other param means. A scalar is the first literal; IN
 // iterates them all.
 struct LiteralFetcher : core::ValueFetcher {
   static constexpr Type kInt64 = 0;
@@ -136,19 +136,17 @@
   return out;
 }
 
-ex::FilterValue CastLiterals(const core::Op& op,
-                             const Literal* literals,
-                             uint32_t count,
-                             core::StorageType type,
-                             const StringPool& pool) {
+ex::ParamValue CastLiterals(const core::Op& op,
+                            const Literal* literals,
+                            uint32_t count,
+                            core::StorageType type,
+                            const StringPool& pool) {
   LiteralFetcher fetcher(literals, count);
-  ex::FilterValue value;
+  ex::ParamValue value;
   if (op.Is<core::In>()) {
-    ex::GetFilterValueListCaster<LiteralFetcher>(type)(fetcher, 0, pool,
-                                                       &value);
+    ex::GetParamListCaster<LiteralFetcher>(type)(fetcher, 0, pool, &value);
   } else {
-    ex::GetFilterValueCaster<LiteralFetcher>(type, op)(fetcher, 0, pool,
-                                                       &value);
+    ex::GetParamCaster<LiteralFetcher>(type, op)(fetcher, 0, pool, &value);
   }
   return value;
 }
diff --git a/src/trace_processor/perfetto_sql/pipeline/literal.h b/src/trace_processor/perfetto_sql/pipeline/literal.h
index a6a8126..cb3d5ca 100644
--- a/src/trace_processor/perfetto_sql/pipeline/literal.h
+++ b/src/trace_processor/perfetto_sql/pipeline/literal.h
@@ -23,7 +23,7 @@
 #include "perfetto/ext/base/status_or.h"
 #include "src/trace_processor/core/common/op_types.h"
 #include "src/trace_processor/core/common/storage_types.h"
-#include "src/trace_processor/core/exec/filter_value.h"
+#include "src/trace_processor/core/exec/param_value.h"
 
 namespace perfetto::trace_processor {
 class StringPool;
@@ -34,8 +34,8 @@
 class Compiler;
 class PlanCodec;
 
-// A value written in a query: a number or a string. Unlike a filter value,
-// which a run binds, a literal is part of the plan and never changes.
+// A value written in a query: a number or a string. It is part of the plan
+// and never changes: a plan's constant params are cast from its literals.
 struct Literal {
   enum class Type : uint8_t { kInt64, kDouble, kString };
 
@@ -53,11 +53,11 @@
 
 // Casts the `count` literals `op` compares with for a column of storage `type`,
 // as the dataframe's filters cast them.
-core::exec::FilterValue CastLiterals(const core::Op& op,
-                                     const Literal* literals,
-                                     uint32_t count,
-                                     core::StorageType type,
-                                     const StringPool& pool);
+core::exec::ParamValue CastLiterals(const core::Op& op,
+                                    const Literal* literals,
+                                    uint32_t count,
+                                    core::StorageType type,
+                                    const StringPool& pool);
 
 // Writes or reads `literal`.
 void SerializeLiteral(PlanCodec&, Literal* literal);
diff --git a/src/trace_processor/perfetto_sql/pipeline/operations/scan.cc b/src/trace_processor/perfetto_sql/pipeline/operations/scan.cc
index 6c05a1e..2c47e03 100644
--- a/src/trace_processor/perfetto_sql/pipeline/operations/scan.cc
+++ b/src/trace_processor/perfetto_sql/pipeline/operations/scan.cc
@@ -48,8 +48,8 @@
 #include "src/trace_processor/core/dataframe/types.h"
 #include "src/trace_processor/core/exec/dataframe_scan.h"
 #include "src/trace_processor/core/exec/empty_source.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/index_scan.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/sorted_scan.h"
 #include "src/trace_processor/core/util/bit_vector.h"
 #include "src/trace_processor/perfetto_sql/pipeline/compiler.h"
@@ -434,7 +434,7 @@
   std::vector<uint32_t> values;
   for (uint32_t i = 0; i < search_->predicates.size(); ++i) {
     columns.push_back(data.columns[Position(search_->predicates[i].column)]);
-    values.push_back(*c->TakeFilterValue(node, i));
+    values.push_back(*c->TakeParam(node, i));
   }
   if (search_->kind == ScanSearch::Kind::kIndex) {
     // Rows are read in index order, so the table's order is lost.
@@ -466,7 +466,7 @@
           std::holds_alternative<dataframe::logical::BinarySearch>(*strategy));
       search.kind = ex::SortedScan::Search::Kind::kBinarySearch;
     }
-    search.value = values[i];
+    search.param = values[i];
     searches.push_back(std::move(search));
   }
   c->SetSource(std::make_unique<ex::SortedScan>(data.columns, data.row_count,
diff --git a/src/trace_processor/perfetto_sql/pipeline/operations/scan.h b/src/trace_processor/perfetto_sql/pipeline/operations/scan.h
index abcc245..78b24a8 100644
--- a/src/trace_processor/perfetto_sql/pipeline/operations/scan.h
+++ b/src/trace_processor/perfetto_sql/pipeline/operations/scan.h
@@ -28,7 +28,7 @@
 #include "perfetto/ext/base/status_or.h"
 #include "src/trace_processor/core/common/op_types.h"
 #include "src/trace_processor/core/dataframe/types.h"
-#include "src/trace_processor/core/exec/filter_value.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/perfetto_sql/pipeline/logical_plan.h"
 #include "src/trace_processor/perfetto_sql/pipeline/operations/where.h"
 #include "src/trace_processor/perfetto_sql/pipeline/plan_types.h"
@@ -125,7 +125,7 @@
   struct Condition {
     ColumnId column = 0;
     core::Op op{core::Eq{}};
-    const core::exec::FilterValue* value = nullptr;
+    const core::exec::ParamValue* value = nullptr;
   };
   // How searching the dataframe would answer some of a WHERE's conditions.
   struct SearchPlan {
diff --git a/src/trace_processor/perfetto_sql/pipeline/operations/where.cc b/src/trace_processor/perfetto_sql/pipeline/operations/where.cc
index 1551f41..da087fa 100644
--- a/src/trace_processor/perfetto_sql/pipeline/operations/where.cc
+++ b/src/trace_processor/perfetto_sql/pipeline/operations/where.cc
@@ -33,7 +33,7 @@
 #include "src/trace_processor/core/common/storage_types.h"
 #include "src/trace_processor/core/common/value_fetcher.h"
 #include "src/trace_processor/core/exec/filter.h"
-#include "src/trace_processor/core/exec/filter_value.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/perfetto_sql/pipeline/compiler.h"
 #include "src/trace_processor/perfetto_sql/pipeline/literal.h"
 #include "src/trace_processor/perfetto_sql/pipeline/logical_plan.h"
@@ -292,7 +292,7 @@
   OutputProperties out = c.input(0);
   out.DropRows();
   // A rewrite may have cast some already.
-  std::vector<std::optional<ex::FilterValue>>& values = c.filter_values();
+  std::vector<std::optional<ex::ParamValue>>& values = c.params();
   values.resize(predicates_.size());
   for (uint32_t i = 0; i < predicates_.size(); ++i) {
     const WherePredicate& p = predicates_[i];
@@ -330,7 +330,7 @@
   // A scan converts no column, so only conditions on columns of a known type,
   // read as the table stores them, have values to search with. They are what
   // these conditions test whether or not the scan answers them.
-  std::vector<std::optional<ex::FilterValue>> values(where.predicates_.size());
+  std::vector<std::optional<ex::ParamValue>> values(where.predicates_.size());
   std::vector<uint32_t> predicate_indices;
   std::vector<Scan::Condition> conditions;
   for (uint32_t i = 0; i < where.predicates_.size(); ++i) {
@@ -350,7 +350,7 @@
   std::optional<Scan::SearchPlan> searched =
       scan.PlanSearch(conditions, *bound->bindings.dataframes[scan_id]);
   if (!searched) {
-    bound->planned[self].filter_values = std::move(values);
+    bound->planned[self].params = std::move(values);
     return;
   }
 
@@ -358,8 +358,8 @@
   ScanSearch search;
   search.kind = searched->kind;
   search.index = searched->index;
-  std::vector<std::optional<ex::FilterValue>>& scan_values =
-      bound->planned[scan_id].filter_values;
+  std::vector<std::optional<ex::ParamValue>>& scan_values =
+      bound->planned[scan_id].params;
   std::vector<bool> moved(where.predicates_.size(), false);
   for (uint32_t j : searched->answered) {
     uint32_t i = predicate_indices[j];
@@ -370,7 +370,7 @@
   scan.SetSearch(std::move(search));
   PlanNodeInputs(bound, scan_id, context);
   std::vector<WherePredicate> kept;
-  std::vector<std::optional<ex::FilterValue>> kept_values;
+  std::vector<std::optional<ex::ParamValue>> kept_values;
   for (uint32_t i = 0; i < where.predicates_.size(); ++i) {
     if (!moved[i]) {
       kept.push_back(where.predicates_[i]);
@@ -378,7 +378,7 @@
     }
   }
   where.predicates_ = std::move(kept);
-  bound->planned[self].filter_values = std::move(kept_values);
+  bound->planned[self].params = std::move(kept_values);
   if (where.predicates_.empty()) {
     plan.Bypass(self);
   }
@@ -392,8 +392,8 @@
     ex::Filter::Condition condition;
     condition.column = c->QueryPosition(predicates_[i].column);
     condition.op = predicates_[i].op;
-    if (std::optional<uint32_t> value = c->TakeFilterValue(node, i)) {
-      condition.value = *value;
+    if (std::optional<uint32_t> value = c->TakeParam(node, i)) {
+      condition.param = *value;
     }
     conditions.push_back(condition);
   }
diff --git a/src/trace_processor/perfetto_sql/pipeline/operations/where.h b/src/trace_processor/perfetto_sql/pipeline/operations/where.h
index 60366c0..78b0ec9 100644
--- a/src/trace_processor/perfetto_sql/pipeline/operations/where.h
+++ b/src/trace_processor/perfetto_sql/pipeline/operations/where.h
@@ -25,7 +25,7 @@
 #include "perfetto/base/status.h"
 #include "src/trace_processor/core/common/op_types.h"
 #include "src/trace_processor/core/common/storage_types.h"
-#include "src/trace_processor/core/exec/filter_value.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/perfetto_sql/pipeline/literal.h"
 #include "src/trace_processor/perfetto_sql/pipeline/logical_plan.h"
 #include "src/trace_processor/perfetto_sql/pipeline/operation_registry.h"
diff --git a/src/trace_processor/perfetto_sql/pipeline/output_properties.cc b/src/trace_processor/perfetto_sql/pipeline/output_properties.cc
index c194980..90f4f15 100644
--- a/src/trace_processor/perfetto_sql/pipeline/output_properties.cc
+++ b/src/trace_processor/perfetto_sql/pipeline/output_properties.cc
@@ -402,9 +402,8 @@
   bound_->planned[self_].programs = std::move(programs);
 }
 
-std::vector<std::optional<core::exec::FilterValue>>&
-DeriveContext::filter_values() {
-  return bound_->planned[self_].filter_values;
+std::vector<std::optional<core::exec::ParamValue>>& DeriveContext::params() {
+  return bound_->planned[self_].params;
 }
 
 void DeriveContext::Fail(base::Status status) {
diff --git a/src/trace_processor/perfetto_sql/pipeline/output_properties.h b/src/trace_processor/perfetto_sql/pipeline/output_properties.h
index f566aec..2f8cce8 100644
--- a/src/trace_processor/perfetto_sql/pipeline/output_properties.h
+++ b/src/trace_processor/perfetto_sql/pipeline/output_properties.h
@@ -26,7 +26,7 @@
 #include "perfetto/base/status.h"
 #include "src/trace_processor/core/common/storage_types.h"
 #include "src/trace_processor/core/exec/expression.h"
-#include "src/trace_processor/core/exec/filter_value.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/perfetto_sql/pipeline/plan_types.h"
 
 namespace perfetto::trace_processor::pipeline {
@@ -216,7 +216,7 @@
   // The programs of the expressions it computes, if any.
   std::vector<core::exec::ExprProgram> programs;
   // By condition, the value it tests with, if any, until lowering takes it.
-  std::vector<std::optional<core::exec::FilterValue>> filter_values;
+  std::vector<std::optional<core::exec::ParamValue>> params;
   // The columns it added to the plan, which planning it again reuses.
   std::vector<ColumnId> new_columns;
   size_t new_columns_used = 0;
@@ -248,7 +248,7 @@
   void SetPrograms(std::vector<core::exec::ExprProgram> programs);
 
   // The values of the conditions this node tests.
-  std::vector<std::optional<core::exec::FilterValue>>& filter_values();
+  std::vector<std::optional<core::exec::ParamValue>>& params();
 
   // Records why the plan cannot run.
   void Fail(base::Status status);
diff --git a/src/trace_processor/perfetto_sql/pipeline/physical_plan.cc b/src/trace_processor/perfetto_sql/pipeline/physical_plan.cc
index 1feaebc..eaa2af3 100644
--- a/src/trace_processor/perfetto_sql/pipeline/physical_plan.cc
+++ b/src/trace_processor/perfetto_sql/pipeline/physical_plan.cc
@@ -263,14 +263,14 @@
   return out.side_pipelines_.back().get();
 }
 
-std::optional<uint32_t> Lowering::TakeFilterValue(const PlanNode& node,
-                                                  uint32_t condition) {
-  std::optional<core::exec::FilterValue>& value =
-      plan_->bound_.planned[plan().IdOf(node)].filter_values[condition];
+std::optional<uint32_t> Lowering::TakeParam(const PlanNode& node,
+                                            uint32_t condition) {
+  std::optional<core::exec::ParamValue>& value =
+      plan_->bound_.planned[plan().IdOf(node)].params[condition];
   if (!value) {
     return std::nullopt;
   }
-  std::vector<core::exec::FilterValue>& values = plan_->out_->filter_values_;
+  std::vector<core::exec::ParamValue>& values = plan_->out_->params_;
   values.push_back(std::move(*value));
   value.reset();
   return static_cast<uint32_t>(values.size() - 1);
diff --git a/src/trace_processor/perfetto_sql/pipeline/physical_plan.h b/src/trace_processor/perfetto_sql/pipeline/physical_plan.h
index 49a5139..f52480c 100644
--- a/src/trace_processor/perfetto_sql/pipeline/physical_plan.h
+++ b/src/trace_processor/perfetto_sql/pipeline/physical_plan.h
@@ -24,9 +24,9 @@
 #include <vector>
 
 #include "perfetto/base/status.h"
-#include "src/trace_processor/core/exec/filter_value.h"
 #include "src/trace_processor/core/exec/interval_lanes.h"
 #include "src/trace_processor/core/exec/operator.h"
+#include "src/trace_processor/core/exec/param_value.h"
 #include "src/trace_processor/core/exec/pipeline.h"
 #include "src/trace_processor/perfetto_sql/pipeline/logical_plan.h"
 #include "src/trace_processor/perfetto_sql/pipeline/output_properties.h"
@@ -66,12 +66,10 @@
     return side_pipelines_;
   }
 
-  // The values a Filter compares columns with, known when the plan was
-  // built, e.g. a WHERE literal. Passed to Context::SetFilterValues (see
-  // core::exec::RowCursor::Open) before each run.
-  const std::vector<core::exec::FilterValue>& filter_values() const {
-    return filter_values_;
-  }
+  // The plan's constant params: the values its operators compare with,
+  // cast when the plan was built from its literals. Passed to
+  // Context::SetParams (see core::exec::RowCursor::Open) before each run.
+  const std::vector<core::exec::ParamValue>& params() const { return params_; }
 
  private:
   friend class Lowering;
@@ -84,7 +82,7 @@
   std::unique_ptr<core::exec::Source> input_;
   std::unique_ptr<core::exec::Pipeline> pipeline_;
   std::vector<Column> columns_;
-  std::vector<core::exec::FilterValue> filter_values_;
+  std::vector<core::exec::ParamValue> params_;
 };
 
 // What lowering needs from whoever runs the plan. Everything here must outlive
@@ -161,10 +159,9 @@
   const core::exec::Source* FinishSide();
 
   // Moves the value condition `condition` of `node` tests with into the plan,
-  // if it has one, and returns its index into the run's filter values (see
-  // PhysicalPlan::filter_values).
-  std::optional<uint32_t> TakeFilterValue(const PlanNode& node,
-                                          uint32_t condition);
+  // if it has one, and returns its index into the run's params (see
+  // PhysicalPlan::params).
+  std::optional<uint32_t> TakeParam(const PlanNode& node, uint32_t condition);
 
   const LoweringContext& context() const;
 
diff --git a/src/trace_processor/perfetto_sql/pipeline/physical_plan_unittest.cc b/src/trace_processor/perfetto_sql/pipeline/physical_plan_unittest.cc
index c6f6644..fdd5f47 100644
--- a/src/trace_processor/perfetto_sql/pipeline/physical_plan_unittest.cc
+++ b/src/trace_processor/perfetto_sql/pipeline/physical_plan_unittest.cc
@@ -169,8 +169,7 @@
     }
     Rows out;
     RowCursor cursor(plan.source());
-    for (bool row = cursor.Open(plan.filter_values()); row;
-         row = cursor.Next()) {
+    for (bool row = cursor.Open(plan.params()); row; row = cursor.Next()) {
       out.emplace_back(*IntAt(cursor, id_column), IntAt(cursor, value_column));
     }
     if (!cursor.status().ok()) {
@@ -344,8 +343,7 @@
   uint32_t cpu_column = (*plan)->columns()[0].index;
   std::vector<int64_t> values;
   RowCursor cursor((*plan)->source());
-  for (bool row = cursor.Open((*plan)->filter_values()); row;
-       row = cursor.Next()) {
+  for (bool row = cursor.Open((*plan)->params()); row; row = cursor.Next()) {
     values.push_back(*IntAt(cursor, cpu_column));
   }
   ASSERT_TRUE(cursor.status().ok()) << cursor.status().message();
@@ -365,8 +363,7 @@
     uint32_t id_column = (*plan)->columns()[0].index;
     std::vector<int64_t> out;
     RowCursor cursor((*plan)->source());
-    for (bool row = cursor.Open((*plan)->filter_values()); row;
-         row = cursor.Next()) {
+    for (bool row = cursor.Open((*plan)->params()); row; row = cursor.Next()) {
       out.push_back(*IntAt(cursor, id_column));
     }
     PERFETTO_CHECK(cursor.status().ok());