Class ArrowStreamResult
- java.lang.Object
-
- com.databricks.jdbc.api.impl.arrow.ArrowStreamResult
-
- All Implemented Interfaces:
IExecutionResult
public class ArrowStreamResult extends Object implements IExecutionResult
Result container for Arrow-based query results.
-
-
Constructor Summary
Constructors Constructor Description ArrowStreamResult(TFetchResultsResp resultsResp, boolean isInlineArrow, IDatabricksStatementInternal parentStatementId, IDatabricksSession session)ArrowStreamResult(ResultManifest resultManifest, ResultData resultData, StatementId statementId, IDatabricksSession session)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the result set and releases any in-memory chunks or dataList<String>getArrowMetadata()longgetChunkCount()longgetCurrentRow()Gets the current row position, starting with 0.ObjectgetObject(int columnIndex)Get the object for given column index.longgetRowCount()booleanhasNext()Returns if there is next row in the result setstatic booleanisComplexType(com.databricks.sdk.service.sql.ColumnInfoTypeName type)Checks if the given type is a complex type (ARRAY, MAP, or STRUCT).booleannext()Moves the cursor to next row and returns true if this can be done
-
-
-
Constructor Detail
-
ArrowStreamResult
public ArrowStreamResult(ResultManifest resultManifest, ResultData resultData, StatementId statementId, IDatabricksSession session) throws DatabricksSQLException
- Throws:
DatabricksSQLException
-
ArrowStreamResult
public ArrowStreamResult(TFetchResultsResp resultsResp, boolean isInlineArrow, IDatabricksStatementInternal parentStatementId, IDatabricksSession session) throws DatabricksSQLException
- Throws:
DatabricksSQLException
-
-
Method Detail
-
getArrowMetadata
public List<String> getArrowMetadata() throws DatabricksSQLException
- Throws:
DatabricksSQLException
-
getObject
public Object getObject(int columnIndex) throws DatabricksSQLException
Get the object for given column index. Here index starts with 0.- Specified by:
getObjectin interfaceIExecutionResult- Parameters:
columnIndex- index of column starting with 0- Returns:
- object at given index
- Throws:
DatabricksSQLException- if there is any error in getting object
-
isComplexType
public static boolean isComplexType(com.databricks.sdk.service.sql.ColumnInfoTypeName type)
Checks if the given type is a complex type (ARRAY, MAP, or STRUCT).- Parameters:
type- The type to check- Returns:
- true if the type is a complex type, false otherwise
-
getCurrentRow
public long getCurrentRow()
Gets the current row position, starting with 0.- Specified by:
getCurrentRowin interfaceIExecutionResult- Returns:
- the current row position
-
next
public boolean next() throws DatabricksSQLExceptionMoves the cursor to next row and returns true if this can be done- Specified by:
nextin interfaceIExecutionResult- Returns:
- true if cursor is moved at next row
- Throws:
DatabricksSQLException
-
hasNext
public boolean hasNext()
Returns if there is next row in the result set- Specified by:
hasNextin interfaceIExecutionResult
-
close
public void close()
Closes the result set and releases any in-memory chunks or data- Specified by:
closein interfaceIExecutionResult
-
getRowCount
public long getRowCount()
- Specified by:
getRowCountin interfaceIExecutionResult
-
getChunkCount
public long getChunkCount()
- Specified by:
getChunkCountin interfaceIExecutionResult
-
-