There is a JIRA for this: https://issues.apache.org/jira/browse/DRILL-4618 and a pull request for the fix https://github.com/apache/drill/pull/509
Thanks. On Mon, Aug 15, 2016 at 10:59 PM, Argenis Leon <[email protected]> wrote: > Hi guys, > > I am trying to get a sample from a database using, > > select * from table where rand() <= .3 > > but it seems that in drill the same random number is used in every row > > vars(drill.query('''SELECT rand() FROM `dfs`.`/home/argenisleon/rep.csv` > LIMIT 10''', timeout)) > > {'columns': ['EXPR$0'], 'data': {'columns': ['EXPR$0'], 'rows': [{'EXPR$0': > '0.9510525762405785'}, {'EXPR$0': '0.9510525762405785'}, {'EXPR$0': > '0.9510525762405785'}, {'EXPR$0': '0.9510525762405785'}, {'EXPR$0': > '0.9510525762405785'}]}, 'duration': 0.05265951156616211, 'response': > <Response [200]>, 'rows': [{'EXPR$0': '0.9510525762405785'}, {'EXPR$0': > '0.9510525762405785'}, {'EXPR$0': '0.9510525762405785'}, {'EXPR$0': > '0.9510525762405785'}, {'EXPR$0': '0.9510525762405785'}]} > > is this the expected behavior? >
