Package net.hydromatic.sqllogictest
Class SqlTestQueryOutputDescription
- java.lang.Object
-
- net.hydromatic.sqllogictest.SqlTestQueryOutputDescription
-
public class SqlTestQueryOutputDescription extends Object
A description of the output expected from a test query.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSqlTestQueryOutputDescription.SortOrderHow the results of the query have to be sorted prior to a comparison.
-
Field Summary
Fields Modifier and Type Field Description @Nullable StringcolumnTypesEncoded types of columns expected in result.@Nullable StringhashMD5 checksum of the canonicalized query output.
-
Constructor Summary
Constructors Constructor Description SqlTestQueryOutputDescription()Create a description of the output of a query.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResultLine(String line)Add one more line to the list of expected results.voidclearResults()Initialize the results to empty.intgetExpectedOutputSize()SqlTestQueryOutputDescription.SortOrdergetOrder()@Nullable List<String>getQueryResults()intgetValueCount()voidsetHash(String hash)Set the MD5 checksum expected from the canonicalized query result.voidsetValueCount(int values)Set the number of values expected to be produced by the query.
-
-
-
Method Detail
-
getOrder
public SqlTestQueryOutputDescription.SortOrder getOrder()
- Returns:
- A description of how to sort the output of the query for comparing it with the expected output.
-
getQueryResults
public @Nullable List<String> getQueryResults()
- Returns:
- The list of results produced by the query if they appear in the test file. Some query outputs are instead described through checksums.
-
getValueCount
public int getValueCount()
- Returns:
- The number of values produced by the query.
-
clearResults
public void clearResults()
Initialize the results to empty.
-
addResultLine
public void addResultLine(String line)
Add one more line to the list of expected results.
-
setHash
public void setHash(String hash)
Set the MD5 checksum expected from the canonicalized query result.
-
setValueCount
public void setValueCount(int values)
Set the number of values expected to be produced by the query.
-
getExpectedOutputSize
public int getExpectedOutputSize()
- Returns:
- The expected number of rows produced by the query. Return -1 if the output size is not known.
-
-