Skip to content

Commit

Permalink
fix statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyyes committed Oct 18, 2024
1 parent dbb71d6 commit 45e3af3
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public class IoTDBConfig {
private long cacheFileReaderClearPeriod = 100000;

/** the max executing time of query in ms. Unit: millisecond */
private long queryTimeoutThreshold = 60000000;
private long queryTimeoutThreshold = 60000;

/** the max time to live of a session in ms. Unit: millisecond */
private int sessionTimeoutThreshold = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public boolean hasFinalResult() {

@Override
public void addStatistics(Statistics[] statistics) {
if (statistics == null) {
if (statistics == null || statistics[0] == null) {
return;
}
initResult = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ public boolean hasFinalResult() {

@Override
public void addStatistics(Statistics[] statistics) {
if (statistics[0] == null) {
if (statistics == null || statistics[0] == null) {
return;
}

countState += statistics[0].getCount();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public boolean hasFinalResult() {

@Override
public void addStatistics(Statistics[] statistics) {
if (statistics[0] == null) {
if (statistics == null || statistics[0] == null) {
return;
}
switch (seriesDataType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,10 @@ public boolean hasFinalResult() {

@Override
public void addStatistics(Statistics[] statistics) {
if (statistics[0] == null) {
if (statistics == null || statistics[0] == null) {
return;
}

switch (seriesDataType) {
case INT32:
case DATE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public boolean hasFinalResult() {

@Override
public void addStatistics(Statistics[] statistics) {
if (statistics[0] == null) {
if (statistics == null || statistics[0] == null) {
return;
}
switch (seriesDataType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public boolean hasFinalResult() {

@Override
public void addStatistics(Statistics[] statistics) {
if (statistics[0] == null) {
if (statistics == null || statistics[0] == null) {
return;
}
switch (seriesDataType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ public boolean hasFinalResult() {

@Override
public void addStatistics(Statistics[] statistics) {
if (statistics == null) {
if (statistics == null || statistics[0] == null) {
return;
}

initResult = true;
if (statistics[0] instanceof IntegerStatistics) {
sumValue += statistics[0].getSumLongValue();
Expand Down

0 comments on commit 45e3af3

Please sign in to comment.