richtia opened a new issue, #9950:
URL: https://github.com/apache/arrow-datafusion/issues/9950

   ### Describe the bug
   
   Converting a dataframe into a python list, makes the result a higher 
precision (float32 to float64)
   
   ### To Reproduce
   
   ```
   import datafusion
   import pyarrow as pa
   ctx = datafusion.SessionContext()
   batch = pa.RecordBatch.from_arrays([pa.array([2.55], pa.float32())], 
names=['arg0'])
   ctx.register_record_batches("my_table", [[batch]])
   expr = 'SELECT abs(arg0) FROM my_table;'
   ctx.sql(expr)
   DataFrame()
   +--------------------+
   | abs(my_table.arg0) |
   +--------------------+
   | 2.55               |
   +--------------------+
   ctx.sql(expr).collect()[0].columns[0].to_pylist()
   [2.549999952316284]
   ```
   
   ### Expected behavior
   
   My expectation was that I should still get 2.55
   
   ### Additional context
   
   Seems like the python standard float is a C double


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to