Skip to content
Snippets Groups Projects
Commit a47a3aad authored by Daniel Hornung's avatar Daniel Hornung
Browse files

FIX: Fixed compilation errors.

parent 37b18801
No related branches found
No related tags found
2 merge requests!66REL: prepare release 0.8.0,!62Fix large integer queries
Pipeline #24614 failed
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
package org.caosdb.server.query; package org.caosdb.server.query;
import static java.sql.Types.DOUBLE; import static java.sql.Types.DOUBLE;
import static java.sql.Types.INTEGER;
import static java.sql.Types.VARCHAR; import static java.sql.Types.VARCHAR;
import static org.caosdb.server.database.DatabaseUtils.bytes2UTF8; import static org.caosdb.server.database.DatabaseUtils.bytes2UTF8;
...@@ -216,8 +215,8 @@ public class POV implements EntityFilterInterface { ...@@ -216,8 +215,8 @@ public class POV implements EntityFilterInterface {
} }
final long t1 = System.currentTimeMillis(); final long t1 = System.currentTimeMillis();
// Add type-converted substitutes for ints/doubles. // Add type-converted substitutes for ints/doubles.
final Integer vIntSubst = (this.vDouble != null && this.vDouble % 1 == 0) final Integer vIntSubst =
? (int) Math.rint(this.vDouble) : null; (this.vDouble != null && this.vDouble % 1 == 0) ? (int) Math.rint(this.vDouble) : null;
final Double vDoubleSubst = (this.vInt != null) ? (double) this.vInt : null; final Double vDoubleSubst = (this.vInt != null) ? (double) this.vInt : null;
try { try {
...@@ -508,7 +507,7 @@ public class POV implements EntityFilterInterface { ...@@ -508,7 +507,7 @@ public class POV implements EntityFilterInterface {
/** Return the Int value, which may be null. */ /** Return the Int value, which may be null. */
public Integer getVInt() { public Integer getVInt() {
if (this.vInt != null) { if (this.vInt != null) {
return vInt.clone(); return Integer.valueOf(vInt);
} }
return null; return null;
} }
...@@ -516,17 +515,14 @@ public class POV implements EntityFilterInterface { ...@@ -516,17 +515,14 @@ public class POV implements EntityFilterInterface {
/** Return the Double value, which may be null. */ /** Return the Double value, which may be null. */
public Double getVDouble() { public Double getVDouble() {
if (this.vDouble != null) { if (this.vDouble != null) {
return this.vDouble.clone(); return Double.valueOf(vDouble);
} }
return null; return null;
} }
/** Return the Datetime value, which may be null. */ /** Return the Datetime value, which may be null. */
public DateTimeInterface getVDatetime() { public DateTimeInterface getVDatetime() {
if (this.vDatetime != null) { return this.vDatetime;
return DateTimeFactory2.valueOf(this.vDatetime.toDateTimeString());
}
return null;
} }
public String getAggregate() { public String getAggregate() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment