@Override public void onClose() { // In some case like GROUP BY a counter need to know when the processing is completed. counter.onClose(); recordLast(lastKey, lastRow); remaining -= counter.counted(); // If the clustering of the last row returned is a static one, it means that the partition was only // containing data within the static columns. If the clustering of the last row returned is empty // it means that there is only one row per partition. Therefore, in both cases there are no data remaining // within the partition. if (lastRow != null && (lastRow.clustering() == Clustering.STATIC_CLUSTERING || lastRow.clustering() == Clustering.EMPTY)) { remainingInPartition = 0; } else { remainingInPartition -= counter.countedInCurrentPartition(); } exhausted = pageLimits.isExhausted(counter); }
@Override public void onClose() { // In some case like GROUP BY a counter need to know when the processing is completed. counter.onClose(); recordLast(lastKey, lastRow); remaining -= counter.counted(); // If the clustering of the last row returned is a static one, it means that the partition was only // containing data within the static columns. If the clustering of the last row returned is empty // it means that there is only one row per partition. Therefore, in both cases there are no data remaining // within the partition. if (lastRow != null && (lastRow.clustering() == Clustering.STATIC_CLUSTERING || lastRow.clustering() == Clustering.EMPTY)) { remainingInPartition = 0; } else { remainingInPartition -= counter.countedInCurrentPartition(); } exhausted = pageLimits.isExhausted(counter); }
@Override public void onClose() { // In some case like GROUP BY a counter need to know when the processing is completed. counter.onClose(); recordLast(lastKey, lastRow); remaining -= counter.counted(); // If the clustering of the last row returned is a static one, it means that the partition was only // containing data within the static columns. If the clustering of the last row returned is empty // it means that there is only one row per partition. Therefore, in both cases there are no data remaining // within the partition. if (lastRow != null && (lastRow.clustering() == Clustering.STATIC_CLUSTERING || lastRow.clustering() == Clustering.EMPTY)) { remainingInPartition = 0; } else { remainingInPartition -= counter.countedInCurrentPartition(); } exhausted = pageLimits.isExhausted(counter); }
@Override public void onClose() { // Groups are only counted when the end of the group is reached. // The end of a group is detected by 2 ways: // 1) a new group is reached // 2) the end of the data is reached // We know that the end of the data is reached if the group limit has not been reached // and the number of rows counted is smaller than the internal page size. if (hasGroupStarted && groupCounted < groupLimit && rowCounted < rowLimit) { incrementGroupCount(); incrementGroupInCurrentPartitionCount(); } super.onClose(); } }
@Override public void onClose() { // Groups are only counted when the end of the group is reached. // The end of a group is detected by 2 ways: // 1) a new group is reached // 2) the end of the data is reached // We know that the end of the data is reached if the group limit has not been reached // and the number of rows counted is smaller than the internal page size. if (hasGroupStarted && groupCounted < groupLimit && rowCounted < rowLimit) { incrementGroupCount(); incrementGroupInCurrentPartitionCount(); } super.onClose(); } }
@Override public void onClose() { // Groups are only counted when the end of the group is reached. // The end of a group is detected by 2 ways: // 1) a new group is reached // 2) the end of the data is reached // We know that the end of the data is reached if the group limit has not been reached // and the number of rows counted is smaller than the internal page size. if (hasGroupStarted && groupCounted < groupLimit && rowCounted < rowLimit) { incrementGroupCount(); incrementGroupInCurrentPartitionCount(); } super.onClose(); } }