Package com.databricks.jdbc.api.impl.arrow

## Class LazyThriftInlineArrowResult

- java.lang.Object
- - com.databricks.jdbc.api.impl.arrow.LazyThriftInlineArrowResult

All Implemented Interfaces:
  `IExecutionResult`

    public class LazyThriftInlineArrowResult
    extends Object
    implements IExecutionResult

Lazy implementation for thrift-based inline Arrow results that fetches arrow batches on demand. Similar to LazyThriftResult but processes Arrow data instead of columnar thrift data.

### Constructor Summary

Constructors
`LazyThriftInlineArrowResult​(TFetchResultsResp initialResponse, IDatabricksStatementInternal statement, IDatabricksSession session)` Creates a new LazyThriftInlineArrowResult that lazily fetches arrow data on demand.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()` Closes this result and releases associated resources.
`List<String>` `getArrowMetadata()` Gets the Arrow metadata for the current chunk.
`long` `getChunkCount()` Gets the chunk count.
`long` `getCurrentRow()` Gets the current row index (0-based).
`Object` `getObject​(int columnIndex)` Gets the value at the specified column index for the current row.
`long` `getRowCount()` Gets the number of rows in the current chunk.
`boolean` `hasNext()` Checks if there are more rows available without advancing the cursor.
`boolean` `next()` Moves the cursor to the next row.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LazyThriftInlineArrowResult

    public LazyThriftInlineArrowResult​(TFetchResultsResp initialResponse,
                                       IDatabricksStatementInternal statement,
                                       IDatabricksSession session)
                                throws DatabricksSQLException

Creates a new LazyThriftInlineArrowResult that lazily fetches arrow data on demand.

Parameters:
  `initialResponse` - the initial response from the server
  `statement` - the statement that generated this result
  `session` - the session to use for fetching additional data
Throws:
  `DatabricksSQLException` - if the initial response cannot be processed

### Method Detail

#### getObject

    public Object getObject​(int columnIndex)
                     throws DatabricksSQLException

Gets the value at the specified column index for the current row.

Specified by:
  `getObject` in interface `IExecutionResult`
Parameters:
  `columnIndex` - the zero-based column index
Returns:
  the value at the specified column
Throws:
  `DatabricksSQLException` - if the result is closed, cursor is invalid, or column index is out of bounds

#### getCurrentRow

    public long getCurrentRow()

Gets the current row index (0-based). Returns -1 if before the first row.

Specified by:
  `getCurrentRow` in interface `IExecutionResult`
Returns:
  the current row index

#### next

    public boolean next()
                 throws SQLException

Moves the cursor to the next row. Fetches additional data from server if needed.

Specified by:
  `next` in interface `IExecutionResult`
Returns:
  true if there is a next row, false if at the end
Throws:
  `DatabricksSQLException` - if an error occurs while fetching data
  `SQLException`

#### hasNext

    public boolean hasNext()

Checks if there are more rows available without advancing the cursor.

Specified by:
  `hasNext` in interface `IExecutionResult`
Returns:
  true if there are more rows, false otherwise

#### close

    public void close()

Closes this result and releases associated resources.

Specified by:
  `close` in interface `IExecutionResult`

#### getRowCount

    public long getRowCount()

Gets the number of rows in the current chunk.

Specified by:
  `getRowCount` in interface `IExecutionResult`
Returns:
  the number of rows in the current chunk

#### getChunkCount

    public long getChunkCount()

Gets the chunk count. Always returns 0 for lazy thrift inline arrow results.

Specified by:
  `getChunkCount` in interface `IExecutionResult`
Returns:
  0 (lazy results don't use chunks in the same sense as buffered results)

#### getArrowMetadata

    public List<String> getArrowMetadata()
                                  throws DatabricksSQLException

Gets the Arrow metadata for the current chunk.

Returns:
  list of arrow metadata strings, or null if no chunk is loaded
Throws:
  `DatabricksSQLException` - if an error occurs