Bug 2254125 - [rgw][s3select]: wrong output seen for query "select (34.56 % 3.4) from s3object;"
Summary: [rgw][s3select]: wrong output seen for query "select (34.56 % 3.4) from s3ob...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RGW
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 7.1
Assignee: gal salomon
QA Contact: Hemanth Sai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-12 05:08 UTC by Hemanth Sai
Modified: 2024-06-13 14:18 UTC (History)
5 users (show)

Fixed In Version: ceph-18.2.1-119.el9cp
Doc Type: Bug Fix
Doc Text:
.Modulo operation on float numbers now return correct results Previously, modulo operation on float numbers returned wrong results. With this fix, the SQL engine is enhanced to handle modulo operations on floats and return correct results.
Clone Of:
Environment:
Last Closed: 2024-06-13 14:18:40 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-8025 0 None None None 2023-12-12 05:10:04 UTC
Red Hat Product Errata RHSA-2024:3925 0 None None None 2024-06-13 14:18:43 UTC

Description Hemanth Sai 2023-12-12 05:08:58 UTC
Description of problem:
returning empty result for modulo operation with floating point values

[cephuser@extensa022 ~]$ time venv/bin/aws s3api --endpoint-url http://extensa027.ceph.redhat.com:80 select-object-content  --bucket query-validation-bkt1 --key csv_file1 --expression-type 'SQL' --input-serialization '{"CSV": {}, "CompressionType": "NONE"}' --output-serialization '{"CSV": {}}' --expression "select  (34.56 % 3.4) from s3object;" /dev/stdout

real	0m0.447s
user	0m0.363s
sys	0m0.076s
[cephuser@extensa022 ~]$



executing query-25: select ( 201.21514520976947 % cast( _3 as float ) ) from s3object;
Stats
{'Details': {'BytesProcessed': 145,
             'BytesReturned': 0,
             'BytesScanned': 145}}
End
{}



expected result
0.6151452097694796
3.2151452097694744
5.215145209769487


Version-Release number of selected component (if applicable):
ceph version 18.2.0-128.el9cp

How reproducible:
always

Steps to Reproduce:
1.deploy rhcs7.0 cluster with rgw daemon
2.upload an s3select object
3.execute the above queries and verify the results are correct

Actual results:
modulo operation with floating point numbers is giving empty output

Expected results:
expected correct output for modulo operation on float values as well

Additional info:
query result validation script: https://docs.google.com/document/d/1UT8zTizHHVTWYmfXZdgChYJh7rT4bovOJmsecS86qYU/edit?usp=sharing

Comment 1 gal salomon 2024-03-21 13:21:45 UTC
fixed at https://github.com/ceph/ceph/pull/55891 (including reef and squid)

Comment 2 tserlin 2024-04-02 20:21:27 UTC
Gal, just getting confirmation that we're awaiting downstream cherry-picks to ceph-7.1-rhel-patches for this BZ? Including a submodule update like you did in the ceph-7.0-rhel-patches branch (for the 7.0 z2 release)?

Thanks,

Thomas

Comment 6 errata-xmlrpc 2024-06-13 14:18:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Critical: Red Hat Ceph Storage 7.1 security, enhancements, and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2024:3925


Note You need to log in before you can comment on or make changes to this bug.