表commit_time
中的BIGINT值与20190508143744
类似
当我尝试与commit_time > 1000
比较时,它可以正常工作
但是当我尝试使用commit_time > 20190508143743
时,它给出了如下错误
2019-05-29 17:35:38,390 [main]错误org.apache.pig.tools.grunt.Grunt-错误1200:对于输入字符串:“ 20190508143743”
步骤:
pig -useHCatalog
custProf = LOAD 'alisy3p.cust_change' using org.apache.hive.hcatalog.pig.HCatLoader();
// this step gives error
deviceChange= filter custProf by (commit_time > 20190508143743);
也尝试过:
deviceChange= filter custProf by (commit_time > (bigint)20190508143743);
deviceChange= filter custProf by (commit_time > (long)20190508143743);
答案 0 :(得分:0)
根据Pig documentation,您应该能够通过在数字的末尾添加BI
来指定biginteger常数。试试这个:
deviceChange = filter custProf by (commit_time > 20190508143743BI);
答案 1 :(得分:0)
答案: deviceChange =通过(commit_time> 20190508143743 L )过滤custProf;
不支持BIGINT,并且BIGINTEGER与我们可以使用Long的蜂巢文档不同。
https://pig.apache.org/docs/r0.17.0/basic.html#constants
感谢Savagedata的投入!