forked from duckdb/duckdb-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueryProgress.java
More file actions
53 lines (44 loc) · 1.49 KB
/
QueryProgress.java
File metadata and controls
53 lines (44 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package org.duckdb;
import java.util.Objects;
import java.util.StringJoiner;
public class QueryProgress {
private final double percentage;
private final long rowsProcessed;
private final long totalRowsToProcess;
QueryProgress(double percentage, long rowsProcessed, long totalRowsToProcess) {
this.percentage = percentage;
this.rowsProcessed = rowsProcessed;
this.totalRowsToProcess = totalRowsToProcess;
}
public double getPercentage() {
return percentage;
}
public long getRowsProcessed() {
return rowsProcessed;
}
public long getTotalRowsToProcess() {
return totalRowsToProcess;
}
@Override
public String toString() {
return new StringJoiner(", ", QueryProgress.class.getSimpleName() + "[", "]")
.add("percentage=" + percentage)
.add("rowsProcessed=" + rowsProcessed)
.add("totalRowsToProcess=" + totalRowsToProcess)
.toString();
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
QueryProgress that = (QueryProgress) o;
return Double.compare(that.percentage, percentage) == 0 && rowsProcessed == that.rowsProcessed &&
totalRowsToProcess == that.totalRowsToProcess;
}
@Override
public int hashCode() {
return Objects.hash(percentage, rowsProcessed, totalRowsToProcess);
}
}