Sujithra Rajan created HIVE-27891:
-------------------------------------
Summary: Fixed 6 tests due to ordering problem -
getDeclaredFields()
Key: HIVE-27891
URL: https://issues.apache.org/jira/browse/HIVE-27891
Project: Hive
Issue Type: Bug
Components: Test, Tests
Reporter: Sujithra Rajan
The following six tests fail because the _getDeclaredFields()_ used in the
ObjectInspectorUtils.java doesn't maintain a constant order. It is mentioned in
the
[documentation][https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getDeclaredFields--]
1. org.apache.hadoop.hive.serde2.lazy.TestLazySimpleSerDe.testSerDeParameters_
2.org.apache.hadoop.hive.serde2.objectinspector.TestObjectInspectorUtils.testObjectInspectorUtils
3.org.apache.hadoop.hive.serde2.binarysortable.TestBinarySortableSerDe.testBinarySortableSerDe
4.org.apache.hadoop.hive.serde2.columnar.TestLazyBinaryColumnarSerDe.testLazyBinaryColumnarSerDeWithEmptyBinary
5.org.apache.hadoop.hive.serde2.columnar.TestLazyBinaryColumnarSerDe.testSerDeEmpties
6.org.apache.hadoop.hive.serde2.columnar.TestLazyBinaryColumnarSerDe.testSerDeInnerNulls
The fix is to sort the Field[] f array to maintain the constant order.
hive/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector
/ObjectInspectorUtils.java:560
Error messages encountered:
-java.lang.AssertionError: expected:<0:lstring> but was:<1:aint>
-java.lang.ClassCastException: class java.lang.Float cannot be cast to class
org.apache.hadoop.hive.common.type.Date (java.lang.Float is in module java.base
of loader 'bootstrap'; org.apache.hadoop.hive.common.type.Date is in unnamed
module of loader 'app')
Can I raise PR for the same ?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)