2

当我运行我的猪脚本时,我有很多

Encountered Warning IMPLICIT_CAST_TO_LONG ... time(s).
Encountered Warning IMPLICIT_CAST_TO_FLOAT ... time(s).
Encountered Warning IMPLICIT_CAST_TO_DOUBLE ... time(s).

我想知道 PigServer 在什么情况下会发出这些警告以及这些隐式强制转换是否会减慢进程?

谢谢!

4

1 回答 1

2

You'll get the warnings when Pig has to implicitly cast from one type to another, for instance when you pass a field as an argument to a function that requires some type but the field is another type.

AFAIK implicit casts aren't slowing down the process more than explicit casts (i.e. (long)field1) - you get warnings because you should know that you're casting implicitly - you can't cast any type to any other type, and casts always cost, so you should try to eliminate data type casting as much as you can.

于 2013-06-06T13:36:31.367 回答