[
https://issues.apache.org/jira/browse/HIVE-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
caofangkun updated HIVE-4135:
-----------------------------
Attachment: HIVE-4135-1.patch
A quick fix
> When using PostgreSQL as stats database ,there's a type cast bug
> -------------------------------------------------------------------
>
> Key: HIVE-4135
> URL: https://issues.apache.org/jira/browse/HIVE-4135
> Project: Hive
> Issue Type: Bug
> Components: Statistics
> Affects Versions: 0.9.0, 0.10.0
> Reporter: caofangkun
> Priority: Minor
> Attachments: HIVE-4135-1.patch
>
>
> When using PostgreSQL as stats database ,there's a type cast bug.
> tasktrack log :
> 2013-03-01 16:03:08,973 INFO
> org.apache.hadoop.hive.ql.exec.TableScanOperator: 0 forwarded 17598 rows
> 2013-03-01 16:03:09,040 INFO
> org.apache.hadoop.hive.ql.stats.jdbc.JDBCStatsPublisher: Stats publishing for
> key dim_pub_date/000000
> 2013-03-01 16:03:09,045 ERROR
> org.apache.hadoop.hive.ql.stats.jdbc.JDBCStatsPublisher: Error during
> publishing statistics.
> org.postgresql.util.PSQLException: ERROR: column "row_count" is of type
> bigint but expression is of type character varying
> Hint: You will need to rewrite or cast the expression.
> Position: 126
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2101)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1834)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:332)
> at
> org.apache.hadoop.hive.ql.stats.jdbc.JDBCStatsPublisher$2.run(JDBCStatsPublisher.java:136)
> at
> org.apache.hadoop.hive.ql.stats.jdbc.JDBCStatsPublisher$2.run(JDBCStatsPublisher.java:133)
> at
> org.apache.hadoop.hive.ql.exec.Utilities.executeWithRetry(Utilities.java:2093)
> at
> org.apache.hadoop.hive.ql.stats.jdbc.JDBCStatsPublisher.publishStat(JDBCStatsPublisher.java:149)
> at
> org.apache.hadoop.hive.ql.exec.TableScanOperator.publishStats(TableScanOperator.java:260)
> at
> org.apache.hadoop.hive.ql.exec.TableScanOperator.closeOp(TableScanOperator.java:198)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:557)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:566)
> at org.apache.hadoop.hive.ql.exec.ExecMapper.close(ExecMapper.java:193)
> at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
> at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:373)
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:323)
> at org.apache.hadoop.mapred.Child.main(Child.java:167)
> 2013-03-01 16:03:09,046 INFO
> org.apache.hadoop.hive.ql.exec.TableScanOperator: publishing :
> dim_pub_date/000000 : {numRows=17598, rawDataSize=2626518}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira