Skip to content

Commit

Permalink
Include alias in catalog find_by_name (#397)
Browse files Browse the repository at this point in the history
This is a missing implementation from #395 which allows
finding catalog enteries by alias.
  • Loading branch information
am357 authored Jun 15, 2023
1 parent a3f64f5 commit fd60ab3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion partiql-catalog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ impl<T> CatalogEntrySet<T> {

fn find_by_name(&self, name: &str) -> Option<(EntryId, &T)> {
let name = UniCase::from(name);
if let Some(eid) = self.by_name.get(&name) {

let eid = self.by_name.get(&name).or(self.by_alias.get(&name));

if let Some(eid) = eid {
self.entries.get(eid).map(|e| (*eid, e))
} else {
None
Expand Down

1 comment on commit fd60ab3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PartiQL (rust) Benchmark

Benchmark suite Current: fd60ab3 Previous: a3f64f5 Ratio
parse-1 5866 ns/iter (± 10) 6798 ns/iter (± 111) 0.86
parse-15 56327 ns/iter (± 325) 66347 ns/iter (± 1046) 0.85
parse-30 109739 ns/iter (± 653) 129394 ns/iter (± 1955) 0.85
compile-1 4963 ns/iter (± 26) 5914 ns/iter (± 92) 0.84
compile-15 35386 ns/iter (± 31) 42800 ns/iter (± 656) 0.83
compile-30 71439 ns/iter (± 115) 86598 ns/iter (± 1181) 0.82
plan-1 19707 ns/iter (± 35) 23847 ns/iter (± 341) 0.83
plan-15 360530 ns/iter (± 678) 437411 ns/iter (± 10127) 0.82
plan-30 726676 ns/iter (± 2432) 878109 ns/iter (± 9840) 0.83
eval-1 24591855 ns/iter (± 665164) 26414000 ns/iter (± 657182) 0.93
eval-15 121105626 ns/iter (± 484672) 144335716 ns/iter (± 1177810) 0.84
eval-30 228895093 ns/iter (± 397360) 271022392 ns/iter (± 2417086) 0.84
join 14304 ns/iter (± 73) 17922 ns/iter (± 417) 0.80
simple 6756 ns/iter (± 14) 8049 ns/iter (± 112) 0.84
simple-no 691 ns/iter (± 1) 787 ns/iter (± 9) 0.88
numbers 144 ns/iter (± 0) 171 ns/iter (± 2) 0.84
parse-simple 728 ns/iter (± 0) 891 ns/iter (± 32) 0.82
parse-ion 2613 ns/iter (± 11) 3104 ns/iter (± 38) 0.84
parse-group 8571 ns/iter (± 65) 10132 ns/iter (± 113) 0.85
parse-complex 21975 ns/iter (± 45) 26420 ns/iter (± 370) 0.83
parse-complex-fexpr 34815 ns/iter (± 82) 41890 ns/iter (± 787) 0.83

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.