• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uwescience / myria / 396
59%
master: 27%

Build:
Build:
LAST BUILD BRANCH: blob_expr_UDF
DEFAULT BRANCH: master
Ran 06 Mar 2015 12:22AM UTC
Jobs 3
Files 398
Run time 14min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
396

push

travis-ci

dhalperi
UserDefinedAggregate: combine expressions into a script

In many cases, the updaters for user-defined aggregates share code. E.g., for
an argmax, you may do something like this:

def higher(max1, max2, val1, val2):
   case when max1 > max2 then val1 else val2 end;

And then if I have a table Student(name, gpa), I may define argmax using this
updater to pick the {name,gpa} of the student with the highest gpa.

update = [higher(s.gpa, state.gpa, s.name, state.name),
          higher(s.gpa, state.gpa, s.gpa, state.gpa)]

Currently, we compile each of the update expressions individually and then
execute them in series. Unless Java's JIT is really awesome, this likely leads
to redundant execution. (Performance results indicate that the JIT does not
optimize this redundancy away.)

Instead, we should generate the entire updater script as a single block of
code, and compile it as a single method. The execution code gets simpler and we
expose more optimization opportunities to the compiler. In my experiments, the
time of UDA execution decreases by ~20% or better.

- Add a new ScriptEvalInterface for compiled script objects, and clean up the
  name of the old EvalInterface -> ExpressionEvalInterface
- Rename Evaluator.getJavaExpression() to reflect the fact that it always
  includes code to append to an input column.
- Refactor UserDefinedAggregator (and associated Factory) to use the new script
  interface.
- Add the AppendableTable interface to Tuple so that we can use it with the new
  ScriptEvalInterface.

55 of 55 new or added lines in 5 files covered. (100.0%)

13647 of 23051 relevant lines covered (59.2%)

1.74 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
src/edu/washington/escience/myria/expression/evaluate/GenericEvaluator.java
3
100.0
src/edu/washington/escience/myria/operator/agg/UserDefinedAggregator.java
6
100.0
src/edu/washington/escience/myria/operator/agg/UserDefinedAggregatorFactory.java
13
100.0
src/edu/washington/escience/myria/storage/Tuple.java
Jobs
ID Job ID Ran Files Coverage
1 396.1 06 Mar 2015 12:36AM UTC 0
59.29
Travis Job 396.1
2 396.2 06 Mar 2015 12:22AM UTC 0
59.14
Travis Job 396.2
3 396.3 06 Mar 2015 12:24AM UTC 0
58.94
Travis Job 396.3
Source Files on build 396
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #396
  • 8338c70b on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc