我尝试使用以下代码 -
a = load 'some_loc';
b = foreach a generate '' as first,
null as second,
NULL as third,
'null' as forth;
你能告诉我哪一个是正确的还是我必须添加 用于生成null的脚本中的其他内容。
答案 0 :(得分:2)
null
是保留关键字且不区分大小写,您可以自由使用null或NULL。
A = LOAD 'data' AS (a, b, c).
B = FOREACH A GENERATE a, null;
答案 1 :(得分:1)
以下应该没问题
null as second,
NULL as third,