[jira] [Updated] (HIVE-13311) MetaDataFormatUtils throws NPE when HiveDecimal.create is null
[ https://issues.apache.org/jira/browse/HIVE-13311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-13311: --- Resolution: Fixed Fix Version/s: 2.1.0 Status: Resolved (was: Patch Available) > MetaDataFormatUtils throws NPE when HiveDecimal.create is null > -- > > Key: HIVE-13311 > URL: https://issues.apache.org/jira/browse/HIVE-13311 > Project: Hive > Issue Type: Bug >Reporter: Reuben Kuhnert >Assignee: Reuben Kuhnert >Priority: Minor > Fix For: 2.1.0 > > Attachments: HIVE-13311.01.patch > > > The {{MetadataFormatUtils.convertToString}} functions have guards to validate > for when valid is null, however the {{HiveDecimal.create}} can return null > and will throw exceptions when {{.toString()}} is called. > {code} > private static String convertToString(Decimal val) { > if (val == null) { > return ""; > } > // HERE: Will throw NPE when HiveDecimal.create returns null. > return HiveDecimal.create(new BigInteger(val.getUnscaled()), > val.getScale()).toString(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-13311) MetaDataFormatUtils throws NPE when HiveDecimal.create is null
[ https://issues.apache.org/jira/browse/HIVE-13311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reuben Kuhnert updated HIVE-13311: -- Status: Patch Available (was: Open) > MetaDataFormatUtils throws NPE when HiveDecimal.create is null > -- > > Key: HIVE-13311 > URL: https://issues.apache.org/jira/browse/HIVE-13311 > Project: Hive > Issue Type: Bug >Reporter: Reuben Kuhnert >Assignee: Reuben Kuhnert >Priority: Minor > Attachments: HIVE-13311.01.patch > > > The {{MetadataFormatUtils.convertToString}} functions have guards to validate > for when valid is null, however the {{HiveDecimal.create}} can return null > and will throw exceptions when {{.toString()}} is called. > {code} > private static String convertToString(Decimal val) { > if (val == null) { > return ""; > } > // HERE: Will throw NPE when HiveDecimal.create returns null. > return HiveDecimal.create(new BigInteger(val.getUnscaled()), > val.getScale()).toString(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-13311) MetaDataFormatUtils throws NPE when HiveDecimal.create is null
[ https://issues.apache.org/jira/browse/HIVE-13311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reuben Kuhnert updated HIVE-13311: -- Description: The {{MetadataFormatUtils.convertToString}} functions have guards to validate for when valid is null, however the {{HiveDecimal.create}} can return null and will throw exceptions when {{.toString()}} is called. {code} private static String convertToString(Decimal val) { if (val == null) { return ""; } return HiveDecimal.create(new BigInteger(val.getUnscaled()), val.getScale()).toString(); } {code} was: The {{MetadataFormatUtils.convertToString}} functions have guards to validate for when valid is null, however the {code} private static String convertToString(Decimal val) { if (val == null) { return ""; } return HiveDecimal.create(new BigInteger(val.getUnscaled()), val.getScale()).toString(); } {code} > MetaDataFormatUtils throws NPE when HiveDecimal.create is null > -- > > Key: HIVE-13311 > URL: https://issues.apache.org/jira/browse/HIVE-13311 > Project: Hive > Issue Type: Bug >Reporter: Reuben Kuhnert >Assignee: Reuben Kuhnert > > The {{MetadataFormatUtils.convertToString}} functions have guards to validate > for when valid is null, however the {{HiveDecimal.create}} can return null > and will throw exceptions when {{.toString()}} is called. > {code} > private static String convertToString(Decimal val) { > if (val == null) { > return ""; > } > return HiveDecimal.create(new BigInteger(val.getUnscaled()), > val.getScale()).toString(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-13311) MetaDataFormatUtils throws NPE when HiveDecimal.create is null
[ https://issues.apache.org/jira/browse/HIVE-13311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reuben Kuhnert updated HIVE-13311: -- Description: The {{MetadataFormatUtils.convertToString}} functions have guards to validate for when valid is null, however the {{HiveDecimal.create}} can return null and will throw exceptions when {{.toString()}} is called. {code} private static String convertToString(Decimal val) { if (val == null) { return ""; } // HERE: Will throw NPE when HiveDecimal.create returns null. return HiveDecimal.create(new BigInteger(val.getUnscaled()), val.getScale()).toString(); } {code} was: The {{MetadataFormatUtils.convertToString}} functions have guards to validate for when valid is null, however the {{HiveDecimal.create}} can return null and will throw exceptions when {{.toString()}} is called. {code} private static String convertToString(Decimal val) { if (val == null) { return ""; } return HiveDecimal.create(new BigInteger(val.getUnscaled()), val.getScale()).toString(); } {code} > MetaDataFormatUtils throws NPE when HiveDecimal.create is null > -- > > Key: HIVE-13311 > URL: https://issues.apache.org/jira/browse/HIVE-13311 > Project: Hive > Issue Type: Bug >Reporter: Reuben Kuhnert >Assignee: Reuben Kuhnert > > The {{MetadataFormatUtils.convertToString}} functions have guards to validate > for when valid is null, however the {{HiveDecimal.create}} can return null > and will throw exceptions when {{.toString()}} is called. > {code} > private static String convertToString(Decimal val) { > if (val == null) { > return ""; > } > // HERE: Will throw NPE when HiveDecimal.create returns null. > return HiveDecimal.create(new BigInteger(val.getUnscaled()), > val.getScale()).toString(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-13311) MetaDataFormatUtils throws NPE when HiveDecimal.create is null
[ https://issues.apache.org/jira/browse/HIVE-13311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reuben Kuhnert updated HIVE-13311: -- Attachment: HIVE-13311.01.patch > MetaDataFormatUtils throws NPE when HiveDecimal.create is null > -- > > Key: HIVE-13311 > URL: https://issues.apache.org/jira/browse/HIVE-13311 > Project: Hive > Issue Type: Bug >Reporter: Reuben Kuhnert >Assignee: Reuben Kuhnert >Priority: Minor > Attachments: HIVE-13311.01.patch > > > The {{MetadataFormatUtils.convertToString}} functions have guards to validate > for when valid is null, however the {{HiveDecimal.create}} can return null > and will throw exceptions when {{.toString()}} is called. > {code} > private static String convertToString(Decimal val) { > if (val == null) { > return ""; > } > // HERE: Will throw NPE when HiveDecimal.create returns null. > return HiveDecimal.create(new BigInteger(val.getUnscaled()), > val.getScale()).toString(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-13311) MetaDataFormatUtils throws NPE when HiveDecimal.create is null
[ https://issues.apache.org/jira/browse/HIVE-13311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reuben Kuhnert updated HIVE-13311: -- Priority: Minor (was: Major) > MetaDataFormatUtils throws NPE when HiveDecimal.create is null > -- > > Key: HIVE-13311 > URL: https://issues.apache.org/jira/browse/HIVE-13311 > Project: Hive > Issue Type: Bug >Reporter: Reuben Kuhnert >Assignee: Reuben Kuhnert >Priority: Minor > > The {{MetadataFormatUtils.convertToString}} functions have guards to validate > for when valid is null, however the {{HiveDecimal.create}} can return null > and will throw exceptions when {{.toString()}} is called. > {code} > private static String convertToString(Decimal val) { > if (val == null) { > return ""; > } > // HERE: Will throw NPE when HiveDecimal.create returns null. > return HiveDecimal.create(new BigInteger(val.getUnscaled()), > val.getScale()).toString(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)