[ https://issues.apache.org/jira/browse/HIVE-16881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16048199#comment-16048199 ]
Hive QA commented on HIVE-16881: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12872881/HIVE-16881.2.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 8 failed/errored test(s), 10830 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[orc_ppd_basic] (batchId=140) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[columnstats_part_coltype] (batchId=157) org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainanalyze_2] (batchId=99) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query14] (batchId=232) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query16] (batchId=232) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query23] (batchId=232) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query94] (batchId=232) org.apache.hadoop.hive.metastore.TestMetaStoreAuthorization.testMetaStoreAuthorization (batchId=205) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5637/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5637/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5637/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 8 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12872881 - PreCommit-HIVE-Build > Make extractSqlBoolean More Consistent > -------------------------------------- > > Key: HIVE-16881 > URL: https://issues.apache.org/jira/browse/HIVE-16881 > Project: Hive > Issue Type: Improvement > Components: Metastore > Affects Versions: 2.1.1, 3.0.0 > Reporter: BELUGA BEHR > Priority: Trivial > Attachments: HIVE-16881.1.patch, HIVE-16881.2.patch > > > {code:title=org.apache.hadoop.hive.metastore.MetaStoreDirectSql|borderStyle=solid} > private static Boolean extractSqlBoolean(Object value) throws MetaException { > // MySQL has booleans, but e.g. Derby uses 'Y'/'N' mapping. People using > derby probably > // don't care about performance anyway, but let's cover the common case. > if (value == null) return null; > if (value instanceof Boolean) return (Boolean)value; > Character c = null; > if (value instanceof String && ((String)value).length() == 1) { > c = ((String)value).charAt(0); > } > if (c == null) return null; > if (c == 'Y') return true; > if (c == 'N') return false; > throw new MetaException("Cannot extract boolean from column value " + > value); > } > {code} > It's not very clear here what the code intends. For example, if the _value_ > is "YE" then the code returns _null_. If the _value_ is "Z" then an > exception is thrown. > # Change this to throw an exception when any invalid value is encountered > # Add comments > # Use Apache Commons Library for parsing -- This message was sent by Atlassian JIRA (v6.4.14#64029)