Skip to content

Commit e9ba592

Browse files
Luke OsborneLuke Osborne
authored andcommitted
treewide: s/parametrize/parameterize/g
We had different spellings of this word and variations of it, and 'parameterize' was both more frequent and voted as the favorite between the two. This commit consolidates to 'parameterize' Change-Id: If620b059458723bff8d862daf4d0094af8a06c56 Reviewed-on: https://gerrit.readyset.name/c/readyset/+/7140 Tested-by: Buildkite CI Reviewed-by: Jason Brown <[email protected]>
1 parent a604c31 commit e9ba592

File tree

11 files changed

+55
-54
lines changed

11 files changed

+55
-54
lines changed

query-generator/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ pub struct QueryOperationArgs {
12691269
/// [`add_to_query`](QueryOperation::add_to_query)) with the aid of a mutable reference to a
12701270
/// [`GeneratorState`].
12711271
///
1272-
/// Some operations are parametrized on fields that, due to having too large of a state space to
1272+
/// Some operations are parameterized on fields that, due to having too large of a state space to
12731273
/// enumerate exhaustively, are hardcoded when query operations are built from a user-supplied
12741274
/// string on the command-line (via [`Operations`]), and can only be changed when generating queries
12751275
/// randomly via the proptest [`Arbitrary`] implementation. See [this design doc][0] for more

readyset-client/src/view.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl ViewCreateRequest {
112112
#[derive(Hash, Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
113113
pub enum ViewPlaceholder {
114114
/// This key column was generated by ReadySet, and has no mapping to the original query. This
115-
/// is the case, for example, for a "bogokey" column generated for unparametrized queries.
115+
/// is the case, for example, for a "bogokey" column generated for unparameterized queries.
116116
Generated,
117117

118118
/// This key column corresponds one-to-one to a placeholder in the original query. Includes the

readyset-dataflow/src/ops/join.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ impl Ingredient for Join {
350350
// [note: null-join-keys]
351351
// The semantics of NULL in SQL are tri-state - while obviously `1 = 1`, it is *not* the
352352
// case that `null = null`. Usually this is irrelevant for lookups into state since it's
353-
// impossible to upquery for null keys (since IS and IS NOT can't be parametrized,
353+
// impossible to upquery for null keys (since IS and IS NOT can't be parameterized,
354354
// syntactically), but we *do* have to have an extra case here in the case of join
355355
// lookups - two NULL join keys should *not* match each other in the semantics of the
356356
// join, even though they *would* match normally due to the semantics of the DfValue

readyset-errors/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ pub enum ReadySetError {
306306

307307
/// No cache found for the given query parameters.
308308
///
309-
/// This error may occur when attempting to find an inlined cache to satisfy a parametrized
309+
/// This error may occur when attempting to find an inlined cache to satisfy a parameterized
310310
/// query. This error should not reach the client when an upstream database is present.
311311
#[error("Existing caches do not satisfy the given query parameters.")]
312312
NoCacheForQuery,

readyset-mysql/tests/fallback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ async fn range_query() {
175175
shutdown_tx.shutdown().await;
176176
}
177177

178-
// TODO: remove this once we support aggregates on parametrized IN
178+
// TODO: remove this once we support aggregates on parameterized IN
179179
#[tokio::test(flavor = "multi_thread")]
180180
#[serial]
181181
#[slow]

readyset-mysql/tests/integration.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ async fn absurdly_simple_select() {
11601160
}
11611161

11621162
#[tokio::test(flavor = "multi_thread")]
1163-
async fn ad_hoc_unparametrized_select() {
1163+
async fn ad_hoc_unparameterized_select() {
11641164
let (opts, _handle, shutdown_tx) = setup().await;
11651165
let mut conn = mysql_async::Conn::new(opts).await.unwrap();
11661166
conn.query_drop("CREATE TABLE test (x int, y int)")
@@ -1201,7 +1201,7 @@ async fn ad_hoc_unparametrized_select() {
12011201
}
12021202

12031203
#[tokio::test(flavor = "multi_thread")]
1204-
async fn ad_hoc_unparametrized_where_in() {
1204+
async fn ad_hoc_unparameterized_where_in() {
12051205
let (opts, _handle, shutdown_tx) = setup().await;
12061206
let mut conn = mysql_async::Conn::new(opts).await.unwrap();
12071207
conn.query_drop("CREATE TABLE test (x int, y int)")
@@ -1236,7 +1236,7 @@ async fn ad_hoc_unparametrized_where_in() {
12361236
}
12371237

12381238
#[tokio::test(flavor = "multi_thread")]
1239-
async fn prepared_unparametrized_select() {
1239+
async fn prepared_unparameterized_select() {
12401240
let (opts, _handle, shutdown_tx) = setup().await;
12411241
let mut conn = mysql_async::Conn::new(opts).await.unwrap();
12421242
conn.query_drop("CREATE TABLE test (x int, y int)")

readyset-server/src/controller/sql/query_graph.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ pub struct QueryGraph {
295295
}
296296

297297
impl QueryGraph {
298-
/// Returns the set of columns on which this query is parametrized. They can come from
298+
/// Returns the set of columns on which this query is parameterized. They can come from
299299
/// multiple tables involved in the query.
300-
/// Does not include limit or offset parameters on which this query may be parametrized.
300+
/// Does not include limit or offset parameters on which this query may be parameterized.
301301
pub fn parameters(&self) -> Vec<&Parameter> {
302302
self.relations
303303
.values()
@@ -306,7 +306,8 @@ impl QueryGraph {
306306
}
307307

308308
/// Construct a representation of the lookup key of a view for this query graph, based on the
309-
/// parameters in this query and the page number if this query is parametrized on an offset key.
309+
/// parameters in this query and the page number if this query is parameterized on an offset
310+
/// key.
310311
pub(crate) fn view_key(&self, config: &mir::Config) -> ReadySetResult<ViewKey> {
311312
let offset = self.pagination.as_ref().and_then(|p| p.offset);
312313
if self.parameters().is_empty() {
@@ -795,7 +796,7 @@ pub(crate) fn extract_limit_offset(
795796
Literal::Integer(val) => u64::try_from(*val)
796797
.map_err(|_| unsupported_err!("LIMIT field cannot have a negative value"))?,
797798
Literal::Placeholder(_) => {
798-
unsupported!("ReadySet does not support parametrized LIMIT fields")
799+
unsupported!("ReadySet does not support parameterized LIMIT fields")
799800
}
800801
_ => unsupported!("Invalid LIMIT statement"),
801802
};
@@ -813,7 +814,7 @@ pub(crate) fn extract_limit_offset(
813814
limit,
814815
})
815816
}
816-
_ => unsupported!("Numeric OFFSETs must be parametrized"),
817+
_ => unsupported!("Numeric OFFSETs must be parameterized"),
817818
}
818819
})
819820
.transpose()?;

readyset-server/src/integration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4111,8 +4111,8 @@ async fn between() {
41114111
}
41124112

41134113
#[tokio::test(flavor = "multi_thread")]
4114-
async fn between_parametrized() {
4115-
let (mut g, shutdown_tx) = start_simple_unsharded("between_parametrized").await;
4114+
async fn between_parameterized() {
4115+
let (mut g, shutdown_tx) = start_simple_unsharded("between_parameterized").await;
41164116

41174117
g.extend_recipe(
41184118
ChangeList::from_str("CREATE TABLE things (bigness INT);", Dialect::DEFAULT_MYSQL).unwrap(),

readyset-sql-passes/benches/adapter_rewrites.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ use criterion::{black_box, criterion_group, criterion_main, BatchSize, Bencher,
22
use nom_sql::{parse_select_statement, Dialect};
33
use readyset_sql_passes::adapter_rewrites;
44

5-
fn auto_parametrize_query(c: &mut Criterion) {
5+
fn auto_parameterize_query(c: &mut Criterion) {
66
let run_benchmark = |b: &mut Bencher, src: &str| {
77
let q = parse_select_statement(Dialect::MySQL, src).unwrap();
88
b.iter_batched(
99
|| q.clone(),
1010
|mut q| {
11-
adapter_rewrites::auto_parametrize_query(&mut q);
11+
adapter_rewrites::auto_parameterize_query(&mut q);
1212
black_box(q)
1313
},
1414
BatchSize::SmallInput,
1515
)
1616
};
1717

18-
c.benchmark_group("auto_parametrize_query")
18+
c.benchmark_group("auto_parameterize_query")
1919
.bench_with_input("trivial", "SELECT * FROM t", run_benchmark)
2020
.bench_with_input(
2121
"simple",
@@ -40,5 +40,5 @@ fn auto_parametrize_query(c: &mut Criterion) {
4040
);
4141
}
4242

43-
criterion_group!(benches, auto_parametrize_query);
43+
criterion_group!(benches, auto_parameterize_query);
4444
criterion_main!(benches);

0 commit comments

Comments
 (0)