Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - FAILED: Error in semantic analysis: Unable to fetch table test_table


Copy link to this message
-
Re: FAILED: Error in semantic analysis: Unable to fetch table test_table
Stephen Sprague 2013-06-04, 01:40
well. There lies your answer.  So. what you might consider doing is
altering that table column and change it to tinyint.  That might be just
enough to trick it since i think the java code is expecting either a 0 or 1
- not 'false'.

might be worth a try.
On Mon, Jun 3, 2013 at 5:47 PM, Jamal B <[EMAIL PROTECTED]> wrote:

> It treats it as a boolean.
>
> http://www.h2database.com/html/datatypes.html#boolean_type
>
>
> On Mon, Jun 3, 2013 at 8:16 PM, Stephen Sprague <[EMAIL PROTECTED]>wrote:
>
>> it does.  so its a bit datatype.  that's a tad non-standard i'd say.
>> what does your backend store (H2) do with that?
>>
>> {code}
>> | SDS   | CREATE TABLE `SDS` (
>>
>>   `SD_ID` bigint(20) NOT NULL,
>>   `INPUT_FORMAT` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin
>> DEFAULT NULL,
>>   `IS_COMPRESSED` bit(1) NOT NULL,
>>   `LOCATION` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin
>> DEFAULT NULL,
>>   `NUM_BUCKETS` int(11) NOT NULL,
>>   `OUTPUT_FORMAT` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin
>> DEFAULT NULL,
>>   `SERDE_ID` bigint(20) DEFAULT NULL,
>>   PRIMARY KEY (`SD_ID`),
>>   KEY `SDS_N49` (`SERDE_ID`),
>>   CONSTRAINT `SDS_FK1` FOREIGN KEY (`SERDE_ID`) REFERENCES `SERDES`
>> (`SERDE_ID`)
>> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
>> {code}
>>
>>
>> On Mon, Jun 3, 2013 at 4:57 PM, Jamal B <[EMAIL PROTECTED]> wrote:
>>
>>> I gave that a shot, but it didn't work.  Could you run a describe table
>>> to see if it matches this schema  (assuming mysql):
>>> --
>>> -- Table structure for table `SDS`
>>> --
>>>
>>> /*!40101 SET @saved_cs_client     = @@character_set_client */;
>>> /*!40101 SET character_set_client = utf8 */;
>>> CREATE TABLE IF NOT EXISTS `SDS` (
>>>   `SD_ID` bigint(20) NOT NULL,
>>>   `INPUT_FORMAT` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin
>>> DEFAULT NULL,
>>>   `IS_COMPRESSED` bit(1) NOT NULL,
>>>   `LOCATION` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin
>>> DEFAULT NULL,
>>>   `NUM_BUCKETS` int(11) NOT NULL,
>>>   `OUTPUT_FORMAT` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin
>>> DEFAULT NULL,
>>>   `SERDE_ID` bigint(20) DEFAULT NULL,
>>>   PRIMARY KEY (`SD_ID`),
>>>   KEY `SDS_N49` (`SERDE_ID`),
>>>   CONSTRAINT `SDS_FK1` FOREIGN KEY (`SERDE_ID`) REFERENCES `SERDES`
>>> (`SERDE_ID`)
>>> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
>>>
>>>
>>>
>>> On Mon, Jun 3, 2013 at 4:20 PM, Stephen Sprague <[EMAIL PROTECTED]>wrote:
>>>
>>>> not that this is any consolation but on my mysql instance, same cdh
>>>> release, i have the following for IS_COMPRESSED where you have 'false':
>>>>
>>>> {code}
>>>> {metastore@etl1 root 13:13}>select SD_ID, is_compressed from SDS limit
>>>> 10;
>>>> +-------+---------------+
>>>> | SD_ID | is_compressed |
>>>> +-------+---------------+
>>>> |     1 |               |
>>>> |     2 |               |
>>>> |     6 |               |
>>>> |    11 |               |
>>>> |    26 |               |
>>>> |    31 |               |
>>>> |    36 |               |
>>>> |    41 |               |
>>>> |    46 |               |
>>>> |    47 |               |
>>>> +-------+---------------+
>>>> 10 rows in set (0.00 sec)
>>>> {code}
>>>>
>>>> so *maybe* that 'false' value there is something specific to your
>>>> backend store?  might you experiment and change it to a null string? and
>>>> see if that changes anything?   Something to think about anyway.
>>>>
>>>>
>>>>
>>>> On Mon, Jun 3, 2013 at 12:49 PM, Jamal B <[EMAIL PROTECTED]> wrote:
>>>>
>>>>> Please forgive the cross post, but I could really use some help.
>>>>>
>>>>> I have Hive setup using a remote metastore, backed by H2, and am able
>>>>> to create tables, load data, and query them without issue.  However, when I
>>>>> restart the remote metastore, I can no longer query previously created
>>>>> tables.  'show tables' shows them, but when I perform a simple select
>>>>> 'select * from test_table limit 5' I receive a FAILED: Error in semantic
>>>>> analysis: Unable to fetch table test_table error.  When I look at the logs