[ https://issues.apache.org/jira/browse/HIVE-23480?focusedWorklogId=434448&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-434448 ]
ASF GitHub Bot logged work on HIVE-23480: ----------------------------------------- Author: ASF GitHub Bot Created on: 18/May/20 15:33 Start Date: 18/May/20 15:33 Worklog Time Spent: 10m Work Description: pgaref opened a new pull request #1024: URL: https://github.com/apache/hive/pull/1024 use the JsonPropertyOrder annotation to ensure the ordering of serialized properties. Change-Id: I2f2b3f1d9eec1e26b5b6e445efe6f0106f4ea15d ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 434448) Remaining Estimate: 0h Time Spent: 10m > Test may fail due to a incorrect usage of a third party library > --------------------------------------------------------------- > > Key: HIVE-23480 > URL: https://issues.apache.org/jira/browse/HIVE-23480 > Project: Hive > Issue Type: Bug > Components: HBase Metastore > Reporter: contextshuffling > Assignee: Panagiotis Garefalakis > Priority: Minor > Attachments: HIVE-23480.01.patch > > Time Spent: 10m > Remaining Estimate: 0h > > Tests > {{org.apache.hadoop.hive.common.TestStatsSetupConst#testStatColumnEntriesCompat}} > replies on Jackson to serialize the params to string. However, Jackson > library uses reflection API {{getDeclaredFields}} but it does not guarantee > any specific order of returned field so the order of fields in the json > string might change, and thus, test can fail or pass without any changes to > the code. > An example error message: > {code:java} > org.junit.ComparisonFailure: > expected:<{"[BASIC_STATS":"true","COLUMN_STATS":{"Foo":"true"}]}> but > was:<{"[COLUMN_STATS":{"Foo":"true"},"BASIC_STATS":"true"]}> > at > org.apache.hadoop.hive.common.TestStatsSetupConst.testStatColumnEntriesCompat(TestStatsSetupConst.java:76) > {code} > Ideally, this test should not reply on the order returned by this API so that > it generates a deterministic result. > An potential solution is to use library like > https://github.com/skyscreamer/JSONassert to compare string in a > order-agnostic way. -- This message was sent by Atlassian Jira (v8.3.4#803005)