У меня есть таблица в улье со структурой ниже:
CREATE TABLE `deathanalysis.deaths`(
`time` int,
`sex` string,
`cause` string,
`value` int)
Столбец времени здесь определен как int, я хочу знать, почему приведенный ниже запрос возвращает результат, даже если значение столбца заключено в одиночная кавычка '' и двойная кавычка "" в запросе.
hive> select * from deathanalysis.deaths where time='2005' limit 5;
OK
2005 Males Meningococcal infection 12
2005 Females Meningococcal infection 19
2005 Females "Drug dependence NULL
2005 Females "Pregnancy NULL
2005 Females Congenital malformations of the nervous system 59
Time taken: 0.057 seconds, Fetched: 5 row(s)
hive> select * from deathanalysis.deaths where time=2005 limit 5;
OK
2005 Males Meningococcal infection 12
2005 Females Meningococcal infection 19
2005 Females "Drug dependence NULL
2005 Females "Pregnancy NULL
2005 Females Congenital malformations of the nervous system 59
Time taken: 0.053 seconds, Fetched: 5 row(s)
hive> select * from deathanalysis.deaths where time="2005" limit 5;
OK
2005 Males Meningococcal infection 12
2005 Females Meningococcal infection 19
2005 Females "Drug dependence NULL
2005 Females "Pregnancy NULL
2005 Females Congenital malformations of the nervous system 59
Time taken: 0.054 seconds, Fetched: 5 row(s)