Sounds like there are two issues. 1. random() delivers the same value when used multiple times in each returned row. This seems to be caused by a bug in common subexpression (CSE) reduction, which identify the two appearances of random() are CSE. As a result, the generated code share the only instance of random().
2. rand(). Looks like Drill does not recognize hive's rand() as 'isRandom'=true. As such, rand() is regarded as a constant expression in generated code. Both of them are bugs that we should fix.
