Permalink
Commits on Jun 18, 2013
  1. metatable for tuple lineage

    committed Jun 18, 2013
Commits on May 18, 2013
  1. @neilconway
Commits on May 17, 2013
  1. @neilconway

    Fix rescan/invalidate logic for Zk collections.

    Fixes #317.
    
    The previous coding did not mark Zk-backed collections as always needing
    rescan. That is wrong to begin with -- the Zk code only put new tuples into
    @storage, yet in non-rescan mode we might not examine @storage. Also, Zk
    collections could change in arbitrary ways between ticks, so we can't always use
    incremental mode safely.
    
    We are now conservative and mark them as always needing rescan. We could perhaps
    be more intelligent and only rescan when we notice that a previous tuple has
    disappeared or changed, but for now this should at least produce the correct
    behavior.
    
    Note that in the #317 test case, inserting the "print" call is just another way
    of triggering a rescan -- the use of "print" is an unsafe (side-effecting)
    function, so we mark the scanned collection as needing a rescan.
    neilconway committed May 17, 2013
Commits on May 10, 2013
  1. @neilconway
Commits on May 1, 2013
  1. @neilconway
Commits on Apr 23, 2013
  1. @neilconway
  2. @neilconway

    Prep release notes for 0.9.7

    neilconway committed Apr 23, 2013
Commits on Apr 19, 2013
  1. @neilconway

    Code cleanup.

    neilconway committed Apr 19, 2013
  2. @neilconway
  3. @neilconway

    Whitespace cleanup.

    neilconway committed Apr 19, 2013
  4. @neilconway
  5. @neilconway

    Another join perf tweak.

    neilconway committed Apr 19, 2013
  6. @neilconway

    Tweak join perf.

    Avoid a conditional branch in a fast path.
    neilconway committed Apr 19, 2013
  7. @neilconway

    Tweak notin perf.

    neilconway committed Apr 19, 2013
  8. @neilconway

    Fix bug in outer joins w/ multiple predicates.

    In the previous coding, we only used the first join predicate to probe the
    join's hash table; the rest of the predicates were checked manually
    (`test_locals`). The outer join code incorrectly assumed that finding a match on
    the hash table probe was equivalent to finding a matching tuple for a given join
    input.
    
    To fix this, we could apply `test_locals` in the outer join code. However, the
    previous coding also imposes a performance penalty on join operators with
    multiple predicates. So instead, check all the join predicates by probing the
    hash table.
    
    One consequence is that the keys of the join hash table are now arrays, rather
    than scalar values. This results in a ~10% slowdown for a join microbenchmark
    (test/perf/join_bench.rb), which just does a ton of hash table probes. I'll look
    into addressing that shortly.
    
    Fixes #315.
    neilconway committed Apr 19, 2013
  9. @neilconway

    Code cleanup for outer join.

    neilconway committed Apr 19, 2013
  10. @neilconway
Commits on Apr 18, 2013
  1. @neilconway

    Optimization for notin evaluation.

    Hoist a hash table lookup outside of a loop.
    neilconway committed Apr 18, 2013
Commits on Apr 12, 2013
  1. @neilconway

    Micro-optimization for PushElement#push_out.

    We shouldn't need to check whether the input tuple is `nil`; if it is, we
    shouldn't be trying to emit it via `push_out` in the first place. Since
    `push_out` is a hotspot, this discipline seems worth enforcing -- on a simple
    test case, it avoided ~100k of the ~225k calls to Kernel#nil? that were made,
    not to mention the conditional branch itself.
    neilconway committed Apr 12, 2013
  2. @neilconway

    Perf tweak for joins.

    Seems safe to remove this error check from the pred evaluation inner loop: for
    one thing, we already check such a condition when we setup @localpreds in the
    first place. And in any case, we shouldn't be doing sanity checks during an
    inner loop.
    neilconway committed Apr 12, 2013
  3. @neilconway

    Optimize join evaluation.

    Play various precomputation tricks to improve efficiency of evaluating
    localpreds (i.e., the join predicates that are checked by hand, rather than by
    probing the hash table). For a concurrent editing test case, this improves
    overall performance by about 50%.
    neilconway committed Apr 12, 2013
  4. @neilconway

    Code cleanup for joins.

    neilconway committed Apr 12, 2013
Commits on Apr 8, 2013
  1. @neilconway

    Allow `nil` for column list in `argagg`.

    Previously `[]` was accepted but `nil` was not. Supporting `nil` as well is
    harmless and is consistent with `group`.
    neilconway committed Apr 8, 2013
  2. @neilconway
  3. @neilconway

    Code cleanup for argagg.

    neilconway committed Apr 8, 2013
Commits on Apr 6, 2013
  1. @neilconway

    Tweak join code.

    Hoist a conditional outside a loop.
    neilconway committed Apr 6, 2013
  2. @neilconway

    Fix typo in release notes.

    neilconway committed Apr 6, 2013
  3. @neilconway

    Fix error in join processing.

    When the same table + column name appeared on the LHS of multiple qualifiers in
    the same join operator, the previous coding produced the wrong results. That is:
    
        (foo * bar).pairs(foo.x => bar.y, foo.x => bar.z)
    
    The problem was that `foo.x` was implemented by calling a class method that
    returned a `[tbl_name, column_offset, column_name]` triple. Using the syntax
    above, the set of join qualifiers is given as a hash literal, with the LHS of
    the join qualifiers as the keys. Hence the rule above yields two equal keys;
    Ruby just picks the key/value pair that appears last, so we would effectively
    ignore the `foo.x` qualifier in the rule above.
    
    Fix this by having schema accessors return an additional unique identifier; this
    ensures that calling a schema accessor multiple times yields values that do not
    compare as equal. Not terribly elegant, but I couldn't see a better fix.
    
    Fixes #313.
    neilconway committed Apr 6, 2013
  4. @neilconway

    Code cleanup.

    neilconway committed Apr 6, 2013
Commits on Apr 4, 2013
  1. @neilconway

    Update README for Ruby 2.0

    neilconway committed Apr 4, 2013
Commits on Mar 29, 2013
  1. @neilconway
  2. @neilconway

    Avoid raising an exception with Ruby 2.0

    Proper Ruby 2.0 support depends on RubyParser being updated. In the mean time,
    with this change it seems as though bud and Ruby 2.0 seems to work fine, except
    that you can't use 2.0-specific syntax in Bloom rules.
    neilconway committed Mar 29, 2013
  3. @neilconway

    Improve chaining of notin operators.

    Preserve the schema of the lhs relation (the receiver of the `notin` method
    call) in the output of the notin. This makes it easier to chain together
    multiple notin operators.
    neilconway committed Mar 29, 2013
Commits on Mar 25, 2013
  1. @neilconway
  2. @neilconway