Class JdbcToArrowConfigBuilder

java.lang.Object
org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder

public class JdbcToArrowConfigBuilder extends Object
This class builds JdbcToArrowConfigs.
  • Constructor Details

    • JdbcToArrowConfigBuilder

      public JdbcToArrowConfigBuilder()
      Default constructor for the JdbcToArrowConfigBuilder}. Use the setter methods for the allocator and calendar; the allocator must be set. Otherwise, build() will throw a NullPointerException.
    • JdbcToArrowConfigBuilder

      public JdbcToArrowConfigBuilder(BufferAllocator allocator, Calendar calendar)
      Constructor for the JdbcToArrowConfigBuilder. The allocator is required, and a NullPointerException will be thrown if it is null.

      The allocator is used to construct Arrow vectors from the JDBC ResultSet. The calendar is used to determine the time zone of Timestamp fields and convert Date, Time, and Timestamp fields to a single, common time zone when reading from the result set.

      Parameters:
      allocator - The Arrow Vector memory allocator.
      calendar - The calendar to use when constructing timestamp fields.
    • JdbcToArrowConfigBuilder

      public JdbcToArrowConfigBuilder(BufferAllocator allocator, Calendar calendar, boolean includeMetadata)
      Constructor for the JdbcToArrowConfigBuilder. Both the allocator and calendar are required. A NullPointerException will be thrown if either of those arguments is null.

      The allocator is used to construct Arrow vectors from the JDBC ResultSet. The calendar is used to determine the time zone of Timestamp fields and convert Date, Time, and Timestamp fields to a single, common time zone when reading from the result set.

      The includeMetadata argument, if true will cause various information about each database field to be added to the Vector Schema's field metadata.

      Parameters:
      allocator - The Arrow Vector memory allocator.
      calendar - The calendar to use when constructing timestamp fields.
  • Method Details