Skip to content

Commit 0692d24

Browse files
committed
Update TPCC results and clean clippy warnings
1 parent 23e2dcc commit 0692d24

4 files changed

Lines changed: 141 additions & 130 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ Recent 720-second local comparison on the machine above:
200200
201201
| Backend | TpmC | New-Order p90 | Payment p90 | Order-Status p90 | Delivery p90 | Stock-Level p90 |
202202
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
203-
| KiteSQL LMDB | 68394 | 0.001s | 0.001s | 0.001s | 0.002s | 0.001s |
204-
| KiteSQL RocksDB | 30387 | 0.001s | 0.001s | 0.001s | 0.015s | 0.002s |
205-
| SQLite balanced | 41690 | 0.001s | 0.001s | 0.001s | 0.001s | 0.001s |
206-
| SQLite practical | 38861 | 0.001s | 0.001s | 0.001s | 0.001s | 0.001s |
203+
| KiteSQL LMDB | 61723 | 0.001s | 0.001s | 0.001s | 0.002s | 0.001s |
204+
| KiteSQL RocksDB | 30446 | 0.001s | 0.001s | 0.001s | 0.016s | 0.002s |
205+
| SQLite balanced | 42989 | 0.001s | 0.001s | 0.001s | 0.001s | 0.001s |
206+
| SQLite practical | 42276 | 0.001s | 0.001s | 0.001s | 0.001s | 0.001s |
207207
208208
The detailed raw outputs are recorded in [tpcc/README.md](tpcc/README.md).
209209
#### 👉[check more](tpcc/README.md)

src/binder/select.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ where
285285
T: Transaction,
286286
A: AsRef<[(&'static str, DataValue)]>,
287287
{
288+
#[cfg(feature = "orm")]
288289
pub(crate) fn typed<N>(self) -> BindPlanFrom<'s, 'a, 'b, 'arena, T, A, N> {
289290
BindPlanFrom {
290291
binder: self.binder,
@@ -294,6 +295,7 @@ where
294295
}
295296
}
296297

298+
#[cfg(feature = "orm")]
297299
pub(crate) fn filter_expr(
298300
mut self,
299301
predicate: ScalarExpression,
@@ -304,6 +306,7 @@ where
304306
Ok(self)
305307
}
306308

309+
#[cfg(feature = "orm")]
307310
pub(crate) fn join_plan(
308311
mut self,
309312
right_plan: LogicalPlan,
@@ -337,11 +340,13 @@ where
337340
T: Transaction,
338341
A: AsRef<[(&'static str, DataValue)]>,
339342
{
343+
#[cfg(feature = "orm")]
340344
pub(crate) fn set_select_list(mut self, select_list: Vec<ScalarExpression>) -> Self {
341345
self.select_list = select_list;
342346
self
343347
}
344348

349+
#[cfg(feature = "orm")]
345350
pub(crate) fn group_by_expr(self, expr: ScalarExpression) -> Result<Self, DatabaseError> {
346351
let sorted = self
347352
.filter_expr(None)?
@@ -363,6 +368,7 @@ where
363368
})
364369
}
365370

371+
#[cfg(feature = "orm")]
366372
pub(crate) fn aggregate_without_group(self) -> Result<Self, DatabaseError> {
367373
let sorted = self
368374
.filter_expr(None)?
@@ -384,16 +390,19 @@ where
384390
})
385391
}
386392

393+
#[cfg(feature = "orm")]
387394
pub(crate) fn having_expr(mut self, expr: ScalarExpression) -> Result<Self, DatabaseError> {
388395
self.plan = self.binder.bind_having(self.plan, expr, self.arena)?;
389396
Ok(self)
390397
}
391398

399+
#[cfg(feature = "orm")]
392400
pub(crate) fn sort_field(mut self, field: SortField) -> Result<Self, DatabaseError> {
393401
self.plan = self.binder.bind_sort(self.plan, vec![field], self.arena)?;
394402
Ok(self)
395403
}
396404

405+
#[cfg(feature = "orm")]
397406
pub fn distinct(mut self) -> Result<Self, DatabaseError> {
398407
let distinct_outputs = self.select_list.clone();
399408
self.binder.bind_distinct_output_exprs(
@@ -405,20 +414,23 @@ where
405414
Ok(self)
406415
}
407416

417+
#[cfg(feature = "orm")]
408418
pub fn limit(mut self, limit: usize) -> Result<Self, DatabaseError> {
409419
self.plan = self
410420
.binder
411421
.bind_limit_values(self.plan, None, Some(limit))?;
412422
Ok(self)
413423
}
414424

425+
#[cfg(feature = "orm")]
415426
pub fn offset(mut self, offset: usize) -> Result<Self, DatabaseError> {
416427
self.plan = self
417428
.binder
418429
.bind_limit_values(self.plan, Some(offset), None)?;
419430
Ok(self)
420431
}
421432

433+
#[cfg(feature = "orm")]
422434
pub fn finish(self) -> Result<LogicalPlan, DatabaseError> {
423435
if self.select_list.iter().any(ScalarExpression::has_agg_call) {
424436
return self.aggregate_without_group()?.finish();

src/db.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ pub(crate) trait BindSource {
8181
&mut PlanArena<'_>,
8282
) -> Result<LogicalPlan, DatabaseError>;
8383

84+
#[cfg(feature = "orm")]
8485
fn explain<A, F>(self, params: A, build: F) -> Result<String, DatabaseError>
8586
where
8687
A: AsRef<[(&'static str, DataValue)]>,
@@ -890,6 +891,7 @@ impl<'a, S: Storage> BindSource for &'a Database<S> {
890891
Ok(DatabaseIter { transaction, inner })
891892
}
892893

894+
#[cfg(feature = "orm")]
893895
fn explain<A, F>(self, params: A, build: F) -> Result<String, DatabaseError>
894896
where
895897
A: AsRef<[(&'static str, DataValue)]>,
@@ -1103,6 +1105,7 @@ impl<'a, 'txn, S: Storage> BindSource for &'a mut DBTransaction<'txn, S> {
11031105
))
11041106
}
11051107

1108+
#[cfg(feature = "orm")]
11061109
fn explain<A, F>(self, params: A, build: F) -> Result<String, DatabaseError>
11071110
where
11081111
A: AsRef<[(&'static str, DataValue)]>,

0 commit comments

Comments
 (0)