Closed mkrcah closed 9 years ago
This is the standard for databases however, NULL is the only special case so should probably avoided as a string e.g.
mysql> select null as c1, 'NULL' as c2; +------+------+ | c1 | c2 | +------+------+ | NULL | NULL | +------+------+ 1 row in set (0.01 sec)
I understand and agree that "NULL" strings should be avoided. My use-case is that I have ETL/Sqoop scripts which incorrectly ingested null
values as "NULL"
strings. Having the null
values displayed differently, would greatly help with debugging of those scripts.
This is more a Sqoop issue so, they should send the correct values? http://sqoop.apache.org/mail-lists.html
My use-case was that I needed to debug and tweak Sqoop parameters to ensure proper null values and I found it cumbersome to rely on select * from table where c is null
all the time. However, this is not a big issue at all, just a nice-to-have to save a couple of key strokes.
Yes, see with them or maybe do something like "if(boolean testCondition, T valueTrue, T valueFalseOrNull)" to detect the real NULLs https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF
The table with results of Hive/Impala queries currently shows
null
values and"NULL"
strings identically. For example, results for the queryselect null as c1, 'NULL' as c2;
looks as follows:It would be great to have
null
values displayed differently, e.g. with a different colour, so it's easier to debug sql queries, ETL scripts, etc.