Reputation: 2977
When I run my pig script, I have a lot of
Encountered Warning IMPLICIT_CAST_TO_LONG ... time(s).
Encountered Warning IMPLICIT_CAST_TO_FLOAT ... time(s).
Encountered Warning IMPLICIT_CAST_TO_DOUBLE ... time(s).
I was wondering under what circumstance PigServer will emit these warnings and whether these implicit castings will slow down the process?
Thanks!
Upvotes: 2
Views: 6199
Reputation: 1177
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.
Upvotes: 2