@@ -56,6 +56,15 @@ public JdbcToArrowConfig(BaseAllocator allocator, Calendar calendar) {
56
56
this .includeMetadata = false ;
57
57
}
58
58
59
+ /**
60
+ * Constructs a new configuration from the provided allocator and calendar. The <code>allocator</code>
61
+ * is used when constructing the Arrow vectors from the ResultSet, and the calendar is used to define
62
+ * Arrow Timestamp fields, and to read time-based fields from the JDBC <code>ResultSet</code>.
63
+ *
64
+ * @param allocator The memory allocator to construct the Arrow vectors with.
65
+ * @param calendar The calendar to use when constructing Timestamp fields and reading time-based results.
66
+ * @param includeMetadata Whether to include JDBC field metadata in the Arrow Schema Field metadata.
67
+ */
59
68
public JdbcToArrowConfig (BaseAllocator allocator , Calendar calendar , boolean includeMetadata ) {
60
69
this (allocator , calendar );
61
70
this .includeMetadata = includeMetadata ;
@@ -75,6 +84,7 @@ public Calendar getCalendar() {
75
84
* Arrow schema, and reading time-based fields from the JDBC <code>ResultSet</code>.
76
85
*
77
86
* @param calendar the calendar to set.
87
+ * @return This instance of the <code>JdbcToArrowConfig</code>, for chaining.
78
88
* @exception NullPointerExeption if <code>calendar</code> is <code>null</code>.
79
89
*/
80
90
public JdbcToArrowConfig setCalendar (Calendar calendar ) {
@@ -95,6 +105,7 @@ public BaseAllocator getAllocator() {
95
105
* Sets the memory allocator to use when construting the Arrow vectors from the ResultSet.
96
106
*
97
107
* @param allocator the allocator to set.
108
+ * @return This instance of the <code>JdbcToArrowConfig</code>, for chaining.
98
109
* @exception NullPointerException if <code>allocator</code> is null.
99
110
*/
100
111
public JdbcToArrowConfig setAllocator (BaseAllocator allocator ) {
@@ -103,10 +114,26 @@ public JdbcToArrowConfig setAllocator(BaseAllocator allocator) {
103
114
return this ;
104
115
}
105
116
106
- public boolean includeMetadata () {
117
+ /**
118
+ * Whether to include JDBC ResultSet field metadata in the Arrow Schema field metadata.
119
+ *
120
+ * @return <code>true</code> to include field metadata, <code>false</code> to exclude it.
121
+ */
122
+ public boolean getIncludeMetadata () {
107
123
return includeMetadata ;
108
124
}
109
125
126
+ /**
127
+ * Sets whether to include JDBC ResultSet field metadata in the Arrow Schema field metadata.
128
+ *
129
+ * @param includeMetadata Whether to include or exclude JDBC metadata in the Arrow Schema field metadata.
130
+ * @return This instance of the <code>JdbcToArrowConfig</code>, for chaining.
131
+ */
132
+ public JdbcToArrowConfig setIncludeMetadata (boolean includeMetadata ) {
133
+ this .includeMetadata = includeMetadata ;
134
+ return this ;
135
+ }
136
+
110
137
/**
111
138
* Whether this configuration is valid. The configuration is valid when:
112
139
* <ul>
0 commit comments