hive string comparison is not returning any values

vi_ral

When trying to select only columns where a string is equal to a value in Hive I am returned an empty value.

The schema of the table is as follows:

DESCRIBE table_name;
a                       string                                  
b                       int                                     
c                       int

The contents of the table are as follows:

SELECT * FROM table_name;
"more"  10  30
"dur"   11  30
"vowww" 13  30

Now I try to query for where a="more"

The SELECT ... WHERE query I am running is:

SELECT * FROM table_name WHERE a='more'

The returned value is empty

I have also tried:

To see if double quotes work, if querying for other column values work (it doesnt)

saravanatn

1st try wild card to see whether it is fetching records or not

SELECT * FROM table_name WHERE a like '%more%'

then if it is fetching records

SELECT * FROM table_name WHERE a='"more"'

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related