You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Tim Thorpe (Jira)" <ji...@apache.org> on 2024/01/23 18:39:00 UTC
[jira] [Work started] (HIVE-28021) Attempting to create a table with a percent symbol fails
[ https://issues.apache.org/jira/browse/HIVE-28021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on HIVE-28021 started by Tim Thorpe.
-----------------------------------------
> Attempting to create a table with a percent symbol fails
> --------------------------------------------------------
>
> Key: HIVE-28021
> URL: https://issues.apache.org/jira/browse/HIVE-28021
> Project: Hive
> Issue Type: Bug
> Components: Iceberg integration
> Affects Versions: 4.0.0-beta-1
> Reporter: Tim Thorpe
> Assignee: Tim Thorpe
> Priority: Minor
> Labels: pull-request-available
>
> This occurred while attempting to test creating a table
> "[|]#&%_@"."[|]#&%_@"
> The stack trace is as follows:
>
> {code:java}
> java.util.UnknownFormatConversionException: Conversion = '_'
> org.apache.hadoop.hive.ql.metadata.HiveException: java.util.UnknownFormatConversionException: Conversion = '_'
> at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:1383) ~[hive-exec-4.0.0-beta-1.jar:4.0.0-beta-1]
> at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:1388) ~[hive-exec-4.0.0-beta-1.jar:4.0.0-beta-1]
> at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:1278) ~[hive-exec-4.0.0-beta-1.jar:4.0.0-beta-1]
> …
> Caused by: java.util.UnknownFormatConversionException: Conversion = '_'
> at java.util.Formatter.checkText(Formatter.java:2590) ~[?:1.8.0]
> at java.util.Formatter.parse(Formatter.java:2566) ~[?:1.8.0]
> at java.util.Formatter.format(Formatter.java:2512) ~[?:1.8.0]
> at java.util.Formatter.format(Formatter.java:2466) ~[?:1.8.0]
> at java.lang.String.format(String.java:4268) ~[?:2.9 (05-29-2023)]
> at org.apache.iceberg.relocated.com.google.common.util.concurrent.ThreadFactoryBuilder.format(ThreadFactoryBuilder.java:186) ~[hive-iceberg-handler-4.0.0-beta-1.jar:4.0.0-beta-1]
> at org.apache.iceberg.relocated.com.google.common.util.concurrent.ThreadFactoryBuilder.setNameFormat(ThreadFactoryBuilder.java:73) ~[hive-iceberg-handler-4.0.0-beta-1.jar:4.0.0-beta-1]
> at org.apache.iceberg.hive.MetastoreLock.<init>(MetastoreLock.java:129) ~[hive-iceberg-handler-4.0.0-beta-1.jar:4.0.0-beta-1] {code}
>
>
> This was fixed by making a change to [https://github.com/apache/hive/blob/branch-4.0.0-beta-1/iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/MetastoreLock.java#L129]
>
> {code:java}
> - .setNameFormat("iceberg-hive-lock-heartbeat-" + fullName + "-%d")
> + .setNameFormat("iceberg-hive-lock-heartbeat-" + fullName.replace("%", "%%") + "-%d"){code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)