SourabhBadhya commented on code in PR #5765: URL: https://github.com/apache/hive/pull/5765#discussion_r2040557331
########## serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java: ########## @@ -557,6 +558,12 @@ public static StructField getStandardStructFieldRef(String fieldName, */ public static Field[] getDeclaredNonStaticFields(Class<?> c) { Field[] f = c.getDeclaredFields(); + Arrays.sort(f, new Comparator<Field>() { + @Override + public int compare(Field a, Field b) { + return a.getName().compareTo(b.getName()); + } + }); Review Comment: This almost seems like a test requirement rather than doing it in production code. Can't we pass the fields in sorted order within the test? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org