Skip to content
Snippets Groups Projects
Commit 6a1f527b authored by Paolo Guagliardo's avatar Paolo Guagliardo
Browse files

Merge branch 'hotfix/0.5.3'

parents e49a971a 1f838f7e
No related branches found
No related tags found
No related merge requests found
# REAL changelog # REAL changelog
## Version [0.5.3](https://git.ecdf.ed.ac.uk/pguaglia/real/tags/0.5.3) (2021-10-21)
#### Bug fixes
- Fixed a bug in the implementation of intersection (issue #11).
## Version [0.5.2](https://git.ecdf.ed.ac.uk/pguaglia/real/tags/0.5.2) (2021-10-08) ## Version [0.5.2](https://git.ecdf.ed.ac.uk/pguaglia/real/tags/0.5.2) (2021-10-08)
#### Bug fixes #### Bug fixes
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<groupId>uk.ac.ed.pguaglia</groupId> <groupId>uk.ac.ed.pguaglia</groupId>
<artifactId>real</artifactId> <artifactId>real</artifactId>
<version>0.5.2</version> <version>0.5.3</version>
<name>real</name> <name>real</name>
<url>https://git.ecdf.ed.ac.uk/pguaglia/real</url> <url>https://git.ecdf.ed.ac.uk/pguaglia/real</url>
......
...@@ -210,7 +210,7 @@ public class Table { ...@@ -210,7 +210,7 @@ public class Table {
public static Table intersectAll(Table t1, Table t2) { public static Table intersectAll(Table t1, Table t2) {
RowComparator c = new RowComparator(); RowComparator c = new RowComparator();
List<String[]> rec1 = t1.getRecords(); List<String[]> rec1 = t1.getRecords();
List<String[]> rec2 = t2.getRecords(); List<String[]> rec2 = t2.getRecords().stream().map(x -> permute(x,t2.attributes,t1.attributes)).collect(Collectors.toList());
rec1.sort(c); rec1.sort(c);
rec2.sort(c); rec2.sort(c);
...@@ -231,7 +231,7 @@ public class Table { ...@@ -231,7 +231,7 @@ public class Table {
} }
if (cmp > 0) { if (cmp > 0) {
if (it2.hasNext()) { if (it2.hasNext()) {
curr2 = permute(it2.next(),t2.attributes,t1.attributes); curr2 = it2.next();
} else { } else {
break; break;
} }
...@@ -239,7 +239,7 @@ public class Table { ...@@ -239,7 +239,7 @@ public class Table {
if (cmp == 0) { if (cmp == 0) {
if (it1.hasNext() && it2.hasNext()) { if (it1.hasNext() && it2.hasNext()) {
curr1 = it1.next(); curr1 = it1.next();
curr2 = permute(it2.next(),t2.attributes,t1.attributes); curr2 = it2.next();
} else { } else {
break; break;
} }
......
┌──────────────────────────────────────────────────────────────────────────────┐ ┌──────────────────────────────────────────────────────────────────────────────┐
│ REAL: an interpreter for Relational Algebra (v0.5.2) │ │ REAL: an interpreter for Relational Algebra (v0.5.3) │
│ Released under the MIT License │ │ Released under the MIT License │
│ Copyright © 2019-2021 Paolo Guagliardo │ │ Copyright © 2019-2021 Paolo Guagliardo │
└──────────────────────────────────────────────────────────────────────────────┘ └──────────────────────────────────────────────────────────────────────────────┘
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment