[
https://issues.apache.org/jira/browse/TRAFODION-3152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Wayne Birdsall closed TRAFODION-3152.
-------------------------------------------
> UPDATE STATISTICS ... CREATE SAMPLE failure on Hive table
> ---------------------------------------------------------
>
> Key: TRAFODION-3152
> URL: https://issues.apache.org/jira/browse/TRAFODION-3152
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Reporter: David Wayne Birdsall
> Assignee: David Wayne Birdsall
> Priority: Minor
> Fix For: 2.3
>
>
> On a fresh Trafodion instance where the "_HIVESTATS_" schema does not yet
> exist, if one does an UPDATE STATISTICS ... CREATE SAMPLE (or REMOVE SAMPLE)
> on a Hive table, it fails with an ugly error, as the following example shows:
> {quote}>>get schemas;
>
> Schemas in Catalog TRAFODION
> ============================
>
> SEABASE
> _LIBMGR_
> _MD_
> _PRIVMGR_MD_
> _REPOS_
>
> --- SQL operation complete.
> >>update statistics for table hive.hive.customer create sample random 10
> >>percent;
>
> *** ERROR[4082] Object TRAFODION."_HIVESTATS_".SB_PERSISTENT_SAMPLES does not
> exist or is inaccessible.
>
> *** ERROR[1003] Schema TRAFODION._HIVESTATS_ does not exist.
>
> *** ERROR[8839] Transaction was aborted.
>
> *** ERROR[9200] UPDATE STATISTICS for table HIVE.HIVE.CUSTOMER encountered an
> error (8609) from statement Process_Query.
>
> *** ERROR[8609] Waited rollback performed without starting a transaction.
>
> --- SQL operation failed with errors.
> >>update statistics for table hive.hive.customer remove sample;
>
> *** ERROR[4082] Object TRAFODION."_HIVESTATS_".SB_PERSISTENT_SAMPLES does not
> exist or is inaccessible.
>
> *** ERROR[1003] Schema TRAFODION._HIVESTATS_ does not exist.
>
> *** ERROR[8839] Transaction was aborted.
>
> *** ERROR[9200] UPDATE STATISTICS for table HIVE.HIVE.CUSTOMER encountered an
> error (8609) from statement Process_Query.
>
> *** ERROR[8609] Waited rollback performed without starting a transaction.
>
> --- SQL operation failed with errors.
> {quote}
> There is a simple work-around. Just perform a normal UPDATE STATISTICS on any
> Hive table, then Trafodion will create the "_HIVESTATS_" schema under the
> covers. Alternatively, perform a REGISTER command for any Hive table; again
> Trafodion will create "_HIVESTATS_" under the covers. The CREATE SAMPLE /
> REMOVE SAMPLE commands will now work.
> To reproduce, you need a fresh Trafodion instance (e.g. created using
> INITIALIZE TRAFODION).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)