Package io.trino.testing
Class MaterializedResult
java.lang.Object
io.trino.testing.MaterializedResult
- All Implemented Interfaces:
Iterable<MaterializedRow>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMaterializedResult(List<MaterializedRow> rows, List<? extends Type> types) MaterializedResult(List<MaterializedRow> rows, List<? extends Type> types, List<String> columnNames, Map<String, String> setSessionProperties, Set<String> resetSessionProperties, Optional<String> updateType, OptionalLong updateCount, List<Warning> warnings, Optional<StatementStats> statementStats) MaterializedResult(List<MaterializedRow> rows, List<? extends Type> types, Optional<List<String>> columnNames) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexceptColumns(String... columnNamesToExclude) intgetTypes()inthashCode()iterator()static MaterializedResultmaterializeSourceDataStream(ConnectorSession session, ConnectorPageSource pageSource, List<Type> types) static MaterializedResult.BuilderresultBuilder(Session session, Type... types) static MaterializedResult.BuilderresultBuilder(Session session, Iterable<? extends Type> types) static MaterializedResult.BuilderresultBuilder(ConnectorSession session, Type... types) static MaterializedResult.BuilderresultBuilder(ConnectorSession session, Iterable<? extends Type> types) toPage()toString()Converts thisMaterializedResultto a new one, representing the data using the same type domain as returned byTestingTrinoClient.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
DEFAULT_PRECISION
public static final int DEFAULT_PRECISION- See Also:
-
-
Constructor Details
-
MaterializedResult
-
MaterializedResult
-
MaterializedResult
public MaterializedResult(List<MaterializedRow> rows, List<? extends Type> types, List<String> columnNames, Map<String, String> setSessionProperties, Set<String> resetSessionProperties, Optional<String> updateType, OptionalLong updateCount, List<Warning> warnings, Optional<StatementStats> statementStats)
-
-
Method Details
-
getRowCount
public int getRowCount() -
iterator
- Specified by:
iteratorin interfaceIterable<MaterializedRow>
-
getMaterializedRows
-
getTypes
-
getColumnNames
-
getSetSessionProperties
-
getResetSessionProperties
-
getUpdateType
-
getUpdateCount
-
getWarnings
-
getStatementStats
-
equals
-
hashCode
public int hashCode() -
toString
-
exceptColumns
-
project
-
getOnlyColumn
-
getOnlyColumnAsSet
-
getOnlyValue
-
toPage
-
toTestTypes
Converts thisMaterializedResultto a new one, representing the data using the same type domain as returned byTestingTrinoClient. -
materializeSourceDataStream
public static MaterializedResult materializeSourceDataStream(ConnectorSession session, ConnectorPageSource pageSource, List<Type> types) -
resultBuilder
-
resultBuilder
public static MaterializedResult.Builder resultBuilder(Session session, Iterable<? extends Type> types) -
resultBuilder
-
resultBuilder
public static MaterializedResult.Builder resultBuilder(ConnectorSession session, Iterable<? extends Type> types)
-