diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedBatchUtil.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedBatchUtil.java index 514c6d6..7b9c0a7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedBatchUtil.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedBatchUtil.java @@ -401,7 +401,7 @@ private static void setVector(Object row, BytesWritable bw = (BytesWritable) writableCol; byte[] bytes = bw.getBytes(); int start = buffer.getLength(); - int length = bytes.length; + int length = bw.getLength(); try { buffer.write(bytes, 0, length); } catch (IOException ioe) { diff --git ql/src/test/results/clientpositive/tez/vector_data_types.q.out ql/src/test/results/clientpositive/tez/vector_data_types.q.out index a3bf59d..0e7663d 100644 --- ql/src/test/results/clientpositive/tez/vector_data_types.q.out +++ ql/src/test/results/clientpositive/tez/vector_data_types.q.out @@ -239,23 +239,23 @@ POSTHOOK: query: SELECT t, si, i, b, f, d, bo, s, ts, dec, bin FROM over1korc OR POSTHOOK: type: QUERY POSTHOOK: Input: default@over1korc #### A masked pattern was here #### -108 301 65536 4294967357 90.05 17.59 true ethan johnson 1860-11-12 20:05:55.011470936 75.70 undecided -118 497 65536 4294967381 50.32 12.72 false david nixon 1860-11-12 20:05:55.011484936 83.48 values clariffication -18 280 65536 4294967320 32.92 45.94 false holly white 1860-11-12 20:05:55.011285936 58.86 topologyariffication -69 489 65536 4294967404 33.52 17.99 false oscar ichabod 1860-11-12 20:05:55.011446936 32.68 topologyariffication -27 405 65536 4294967508 82.24 29.41 true oscar ovid 1860-11-12 20:05:55.011365936 16.85 biologyariffication -42 495 65536 4294967431 43.57 46.81 false tom johnson 1860-11-12 20:05:55.011444936 62.25 american historytion -NULL 409 65536 4294967490 46.97 25.92 false fred miller 1860-11-12 20:05:55.011315936 33.45 history historytion -59 431 65537 4294967326 11.34 2.9 true oscar robinson 1860-11-12 20:05:55.011360936 81.04 zync studiesorytion -63 458 65537 4294967463 21.94 49.71 true fred van buren 1860-11-12 20:05:55.011477936 99.34 wind surfingorytion -121 355 65537 4294967437 85.9 10.99 true calvin brown 1860-11-12 20:05:55.011453936 4.49 yard dutyngorytion -72 267 65537 4294967460 55.2 42.89 false oscar carson 1860-11-12 20:05:55.011352936 51.91 topologyngorytion -22 264 65537 4294967419 8.07 10.71 false david xylophone 1860-11-12 20:05:55.011335936 11.87 undecidedngorytion -101 283 65538 4294967527 84.03 27.29 true yuri brown 1860-11-12 20:05:55.011505936 44.24 biologydngorytion -109 376 65538 4294967453 59.61 35.62 true priscilla xylophone 1860-11-12 20:05:55.011485936 9.53 study skillsorytion -83 353 65538 4294967339 0.08 23.91 true holly thompson 1860-11-12 20:05:55.011356936 30.27 quiet hoursorytion -29 331 65539 4294967420 73.18 28.96 true ethan brown 1860-11-12 20:05:55.011293936 58.85 zync studiesorytion -70 430 65539 4294967534 18.89 43.84 true tom carson 1860-11-12 20:05:55.011381936 21.93 joggyingiesorytion -120 331 65539 4294967324 88.02 40.94 true holly nixon 1860-11-12 20:05:55.011461936 96.64 yard dutyesorytion -71 298 65540 4294967510 91.63 9.6 false gabriella zipper 1860-11-12 20:05:55.011339936 68.14 geologyyesorytion -114 385 65541 4294967458 73.48 34.97 true oscar quirinius 1860-11-12 20:05:55.011342936 72.33 xylophone bandytion +108 301 65536 4294967357 90.05 17.59 true ethan johnson 1860-11-12 20:05:55.011470936 75.70 undecided +118 497 65536 4294967381 50.32 12.72 false david nixon 1860-11-12 20:05:55.011484936 83.48 values clariffication +18 280 65536 4294967320 32.92 45.94 false holly white 1860-11-12 20:05:55.011285936 58.86 topology +69 489 65536 4294967404 33.52 17.99 false oscar ichabod 1860-11-12 20:05:55.011446936 32.68 topology +27 405 65536 4294967508 82.24 29.41 true oscar ovid 1860-11-12 20:05:55.011365936 16.85 biology +42 495 65536 4294967431 43.57 46.81 false tom johnson 1860-11-12 20:05:55.011444936 62.25 american history +NULL 409 65536 4294967490 46.97 25.92 false fred miller 1860-11-12 20:05:55.011315936 33.45 history +59 431 65537 4294967326 11.34 2.9 true oscar robinson 1860-11-12 20:05:55.011360936 81.04 zync studies +63 458 65537 4294967463 21.94 49.71 true fred van buren 1860-11-12 20:05:55.011477936 99.34 wind surfing +121 355 65537 4294967437 85.9 10.99 true calvin brown 1860-11-12 20:05:55.011453936 4.49 yard duty +72 267 65537 4294967460 55.2 42.89 false oscar carson 1860-11-12 20:05:55.011352936 51.91 topology +22 264 65537 4294967419 8.07 10.71 false david xylophone 1860-11-12 20:05:55.011335936 11.87 undecided +101 283 65538 4294967527 84.03 27.29 true yuri brown 1860-11-12 20:05:55.011505936 44.24 biology +109 376 65538 4294967453 59.61 35.62 true priscilla xylophone 1860-11-12 20:05:55.011485936 9.53 study skills +83 353 65538 4294967339 0.08 23.91 true holly thompson 1860-11-12 20:05:55.011356936 30.27 quiet hour +29 331 65539 4294967420 73.18 28.96 true ethan brown 1860-11-12 20:05:55.011293936 58.85 zync studies +70 430 65539 4294967534 18.89 43.84 true tom carson 1860-11-12 20:05:55.011381936 21.93 joggying +120 331 65539 4294967324 88.02 40.94 true holly nixon 1860-11-12 20:05:55.011461936 96.64 yard duty +71 298 65540 4294967510 91.63 9.6 false gabriella zipper 1860-11-12 20:05:55.011339936 68.14 geology +114 385 65541 4294967458 73.48 34.97 true oscar quirinius 1860-11-12 20:05:55.011342936 72.33 xylophone band