statisticsnorway / java-vtl

An Open Source Java implementation of the Validation Transformation Language, based on the VTL 1.1 draft specification. The implementation follows the JSR-223 Java Scripting API and exposes a simple connector interface one can implement in order to integrate with any data stores. VTL is a standard language for defining validation and transformation rules (set of operators, their syntax and semantics) for any kind of statistical data.
http://java-vtl.org
Apache License 2.0
21 stars 7 forks source link

Refactored inner and outer join #105

Closed bjornandre closed 5 years ago

bjornandre commented 5 years ago

This PR fixes inner and outer joins as described in the VTL 1.1 specification (1810-1818):

If the ON clause is specified then the join is possibly defined on a subset of the common Identifier Components of the Datasets. If the Datasets have common Identifier Components (i.e. with identical names, data type and values domain) that are not specified in the on clause then it is mandatory to refer to those Identifier Components by specifying both the Dataset name and the measure name.

For example, if ds1 and ds2 have some common Identifier Components d1, d2 and d3, the following expression: [ ds1,ds2 on d1, d2 ] returns a Dataset with the following Identifier Components: d1, d2, 'ds1.d3', 'ds2.d3'

codecov[bot] commented 5 years ago

Codecov Report

Merging #105 into develop will increase coverage by 0.12%. The diff coverage is 98.59%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #105      +/-   ##
===========================================
+ Coverage    81.26%   81.38%   +0.12%     
===========================================
  Files          159      160       +1     
  Lines         4452     4465      +13     
  Branches       583      587       +4     
===========================================
+ Hits          3618     3634      +16     
+ Misses         654      652       -2     
+ Partials       180      179       -1
Impacted Files Coverage Δ
...vtl/script/operations/join/InnerJoinOperation.java 75.92% <ø> (-2.41%) :arrow_down:
...vtl/script/operations/join/OuterJoinOperation.java 80.43% <ø> (-1.92%) :arrow_down:
...sb/vtl/script/operations/join/OuterJoinMerger.java 64.44% <100%> (+0.8%) :arrow_up:
...ript/operations/join/CommonIdentifierBindings.java 100% <100%> (ø)
...tl/script/visitors/join/JoinDefinitionVisitor.java 88% <100%> (+16%) :arrow_up:
.../script/operations/join/AbstractJoinOperation.java 95.62% <100%> (-0.13%) :arrow_down:
.../vtl/script/operations/join/ComponentBindings.java 98.48% <66.66%> (-1.52%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 463706a...7cb9390. Read the comment docs.