Class QueryDataSet
- java.lang.Object
-
- org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet
-
- Direct Known Subclasses:
DataSetWithoutTimeGenerator,DataSetWithTimeGenerator
public abstract class QueryDataSet extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueryDataSet.EndPointFor redirect query.
-
Field Summary
Fields Modifier and Type Field Description protected intalreadyReturnedRowNumprotected booleanascendingprotected intcolumnNumprotected java.util.List<TSDataType>dataTypesprotected QueryDataSet.EndPointendPointprotected intfetchSizeprotected java.util.List<Path>pathsprotected introwLimitprotected introwOffsetprotected booleanwithoutAllNullOnly if all columns are null, we don't need that rowprotected booleanwithoutAnyNullif any column is null, we don't need that rowprotected java.util.Set<java.lang.Integer>withoutNullColumnsIndexindex set that withoutNullColumns for output data columns
-
Constructor Summary
Constructors Modifier Constructor Description protectedQueryDataSet()protectedQueryDataSet(java.util.List<Path> paths, java.util.List<TSDataType> dataTypes)protectedQueryDataSet(java.util.List<Path> paths, java.util.List<TSDataType> dataTypes, boolean ascending)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddecreaseAlreadyReturnedRowNum()intgetColumnNum()java.util.List<TSDataType>getDataTypes()QueryDataSet.EndPointgetEndPoint()java.util.List<Path>getPaths()intgetRowLimit()intgetRowOffset()java.util.Set<java.lang.Integer>getWithoutNullColumnsIndex()booleanhasLimit()booleanhasNext()abstract booleanhasNextWithoutConstraint()protected voidinitQueryDataSetFields(java.util.List<Path> paths, java.util.List<TSDataType> dataTypes, boolean ascending)booleanisWithoutAllNull()booleanisWithoutAnyNull()RowRecordnext()This method is used for batch query, return RowRecord.abstract RowRecordnextWithoutConstraint()voidsetColumnNum(int columnNum)voidsetDataTypes(java.util.List<TSDataType> dataTypes)voidsetEndPoint(QueryDataSet.EndPoint endPoint)voidsetFetchSize(int fetchSize)voidsetRowLimit(int rowLimit)voidsetRowOffset(int rowOffset)voidsetWithoutAllNull(boolean withoutAllNull)voidsetWithoutAnyNull(boolean withoutAnyNull)voidsetWithoutNullColumnsIndex(java.util.Set<java.lang.Integer> withoutNullColumnsIndex)booleanwithoutNullFilter(RowRecord rowRecord)check rowRecord whether satisfy without null condition
-
-
-
Field Detail
-
paths
protected java.util.List<Path> paths
-
dataTypes
protected java.util.List<TSDataType> dataTypes
-
rowLimit
protected int rowLimit
-
rowOffset
protected int rowOffset
-
alreadyReturnedRowNum
protected int alreadyReturnedRowNum
-
fetchSize
protected int fetchSize
-
ascending
protected boolean ascending
-
endPoint
protected QueryDataSet.EndPoint endPoint
-
withoutAnyNull
protected boolean withoutAnyNull
if any column is null, we don't need that row
-
withoutAllNull
protected boolean withoutAllNull
Only if all columns are null, we don't need that row
-
withoutNullColumnsIndex
protected java.util.Set<java.lang.Integer> withoutNullColumnsIndex
index set that withoutNullColumns for output data columns
-
columnNum
protected int columnNum
-
-
Constructor Detail
-
QueryDataSet
protected QueryDataSet()
-
QueryDataSet
protected QueryDataSet(java.util.List<Path> paths, java.util.List<TSDataType> dataTypes)
-
QueryDataSet
protected QueryDataSet(java.util.List<Path> paths, java.util.List<TSDataType> dataTypes, boolean ascending)
-
-
Method Detail
-
initQueryDataSetFields
protected void initQueryDataSetFields(java.util.List<Path> paths, java.util.List<TSDataType> dataTypes, boolean ascending)
-
getWithoutNullColumnsIndex
public java.util.Set<java.lang.Integer> getWithoutNullColumnsIndex()
-
setWithoutNullColumnsIndex
public void setWithoutNullColumnsIndex(java.util.Set<java.lang.Integer> withoutNullColumnsIndex)
-
hasNext
public boolean hasNext() throws java.io.IOException- Throws:
java.io.IOException
-
withoutNullFilter
public boolean withoutNullFilter(RowRecord rowRecord)
check rowRecord whether satisfy without null condition- Parameters:
rowRecord- rowRecord- Returns:
- true satisfy false don't satisfy
-
hasNextWithoutConstraint
public abstract boolean hasNextWithoutConstraint() throws java.io.IOException- Throws:
java.io.IOException
-
next
public RowRecord next() throws java.io.IOException
This method is used for batch query, return RowRecord.- Throws:
java.io.IOException
-
setFetchSize
public void setFetchSize(int fetchSize)
-
nextWithoutConstraint
public abstract RowRecord nextWithoutConstraint() throws java.io.IOException
- Throws:
java.io.IOException
-
getPaths
public java.util.List<Path> getPaths()
-
getDataTypes
public java.util.List<TSDataType> getDataTypes()
-
setDataTypes
public void setDataTypes(java.util.List<TSDataType> dataTypes)
-
getRowLimit
public int getRowLimit()
-
setRowLimit
public void setRowLimit(int rowLimit)
-
getRowOffset
public int getRowOffset()
-
setRowOffset
public void setRowOffset(int rowOffset)
-
hasLimit
public boolean hasLimit()
-
getEndPoint
public QueryDataSet.EndPoint getEndPoint()
-
setEndPoint
public void setEndPoint(QueryDataSet.EndPoint endPoint)
-
isWithoutAnyNull
public boolean isWithoutAnyNull()
-
setWithoutAnyNull
public void setWithoutAnyNull(boolean withoutAnyNull)
-
isWithoutAllNull
public boolean isWithoutAllNull()
-
setWithoutAllNull
public void setWithoutAllNull(boolean withoutAllNull)
-
decreaseAlreadyReturnedRowNum
public void decreaseAlreadyReturnedRowNum()
-
getColumnNum
public int getColumnNum()
-
setColumnNum
public void setColumnNum(int columnNum)
-
-