@@ -80,7 +80,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
8080 }
8181 }
8282
83- private def testLongColumnVector [T ](num : Int )
83+ private def testLongColumnVector [T ](num : Int , dt : DataType )
8484 (genExpected : (Seq [Long ] => Seq [T ]))
8585 (genActual : (OrcColumnVector , Int ) => Seq [T ]): Unit = {
8686 val seed = System .currentTimeMillis()
@@ -96,12 +96,12 @@ class OrcColumnVectorSuite extends SparkFunSuite {
9696
9797 val expected = genExpected(data)
9898
99- val orcCol = new OrcColumnVector (lv)
99+ val orcCol = new OrcColumnVector (lv, dt )
100100 val actual = genActual(orcCol, num)
101101 assert(actual === expected)
102102 }
103103
104- private def testDoubleColumnVector [T ](num : Int )
104+ private def testDoubleColumnVector [T ](num : Int , dt : DataType )
105105 (genExpected : (Seq [Double ] => Seq [T ]))
106106 (genActual : (OrcColumnVector , Int ) => Seq [T ]): Unit = {
107107 val seed = System .currentTimeMillis()
@@ -117,12 +117,12 @@ class OrcColumnVectorSuite extends SparkFunSuite {
117117
118118 val expected = genExpected(data)
119119
120- val orcCol = new OrcColumnVector (lv)
120+ val orcCol = new OrcColumnVector (lv, dt )
121121 val actual = genActual(orcCol, num)
122122 assert(actual === expected)
123123 }
124124
125- private def testBytesColumnVector [T ](num : Int )
125+ private def testBytesColumnVector [T ](num : Int , dt : DataType )
126126 (genExpected : (Seq [Seq [Byte ]] => Seq [T ]))
127127 (genActual : (OrcColumnVector , Int ) => Seq [T ]): Unit = {
128128 val seed = System .currentTimeMillis()
@@ -139,7 +139,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
139139
140140 val expected = genExpected(data)
141141
142- val orcCol = new OrcColumnVector (lv)
142+ val orcCol = new OrcColumnVector (lv, dt )
143143 val actual = genActual(orcCol, num)
144144 actual.zip(expected).foreach { case (a, e) =>
145145 assert(a === e)
@@ -168,7 +168,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
168168
169169 val expected = genExpected(data)
170170
171- val orcCol = new OrcColumnVector (lv)
171+ val orcCol = new OrcColumnVector (lv, decimalType )
172172 val actual = genActual(orcCol, num, decimalType.precision, decimalType.scale)
173173 actual.zip(expected).foreach { case (a, e) =>
174174 assert(a.compareTo(e) == 0 )
@@ -183,7 +183,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
183183 col.getBoolean(rowId)
184184 }
185185 }
186- testLongColumnVector(100 )(genExpected)(genActual)
186+ testLongColumnVector(100 , BooleanType )(genExpected)(genActual)
187187 }
188188
189189 test(" Hive LongColumnVector: Int" ) {
@@ -193,7 +193,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
193193 col.getInt(rowId)
194194 }
195195 }
196- testLongColumnVector(100 )(genExpected)(genActual)
196+ testLongColumnVector(100 , IntegerType )(genExpected)(genActual)
197197 }
198198
199199 test(" Hive LongColumnVector: Byte" ) {
@@ -203,7 +203,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
203203 col.getByte(rowId)
204204 }
205205 }
206- testLongColumnVector(100 )(genExpected)(genActual)
206+ testLongColumnVector(100 , ByteType )(genExpected)(genActual)
207207 }
208208
209209 test(" Hive LongColumnVector: Short" ) {
@@ -213,7 +213,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
213213 col.getShort(rowId)
214214 }
215215 }
216- testLongColumnVector(100 )(genExpected)(genActual)
216+ testLongColumnVector(100 , ShortType )(genExpected)(genActual)
217217 }
218218
219219 test(" Hive LongColumnVector: Long" ) {
@@ -223,7 +223,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
223223 col.getLong(rowId)
224224 }
225225 }
226- testLongColumnVector(100 )(genExpected)(genActual)
226+ testLongColumnVector(100 , LongType )(genExpected)(genActual)
227227 }
228228
229229 test(" Hive DoubleColumnVector: Float" ) {
@@ -233,7 +233,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
233233 col.getFloat(rowId)
234234 }
235235 }
236- testDoubleColumnVector(100 )(genExpected)(genActual)
236+ testDoubleColumnVector(100 , FloatType )(genExpected)(genActual)
237237 }
238238
239239 test(" Hive DoubleColumnVector: Double" ) {
@@ -243,7 +243,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
243243 col.getDouble(rowId)
244244 }
245245 }
246- testDoubleColumnVector(100 )(genExpected)(genActual)
246+ testDoubleColumnVector(100 , DoubleType )(genExpected)(genActual)
247247 }
248248
249249 test(" Hive BytesColumnVector: Binary" ) {
@@ -253,7 +253,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
253253 col.getBinary(rowId).toSeq
254254 }
255255 }
256- testBytesColumnVector(100 )(genExpected)(genActual)
256+ testBytesColumnVector(100 , BinaryType )(genExpected)(genActual)
257257 }
258258
259259 test(" Hive BytesColumnVector: String" ) {
@@ -266,7 +266,7 @@ class OrcColumnVectorSuite extends SparkFunSuite {
266266 col.getUTF8String(rowId)
267267 }
268268 }
269- testBytesColumnVector(100 )(genExpected)(genActual)
269+ testBytesColumnVector(100 , StringType )(genExpected)(genActual)
270270 }
271271
272272 test(" Hive DecimalColumnVector" ) {
0 commit comments