isl / x3ml

X3ML Engine supports the data transformation which is part of the data provisioning and aggregation process.
Apache License 2.0
20 stars 7 forks source link

Intented behaviour for range -> source_node #167

Closed aindlq closed 2 months ago

aindlq commented 2 months ago

My understanding was that when range source node doesn't equal path.source_relation then range source node should be used as xpath that will produce range nodes. Is my thinking correct?

If so then there is a bug here - https://github.com/isl/x3ml/blob/f660cb2f39d37b24c22a02e1419b201382e8f9e0/src/main/java/gr/forth/ics/isl/x3ml/engine/Path.java#L117

Currently range.source_node is simply ignored when generating range node.

I guess it should be like this:

        String expression = path.source_relation.relation.get(0).expression;
        if (range.source_node.expression.equals(expression)) {
            expression = "";
        } else {
            expression = range.source_node.expression;
        }
ymark commented 2 months ago

Thanks for spotting that. Yes, you are right (usually both source node and relation are the same). I'll update it accordingly.

ymark commented 2 months ago

Fixed and included in Version 2.2.1 (https://github.com/isl/x3ml/releases/tag/2.2.1)