Bug 2248157 - [rgw][s3select]: wrong output seen for query "select * from s3object[*].phonenumbers where _1.type is NOT null;"
Summary: [rgw][s3select]: wrong output seen for query "select * from s3object[*].phone...
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
high
Target Milestone: ---
: 7.0
Assignee: gal salomon
QA Contact: Hemanth Sai
Rivka Pollack
URL:
Whiteboard:
Depends On:
Blocks: 2237662
TreeView+ depends on / blocked
 
Reported: 2023-11-06 14:35 UTC by Hemanth Sai
Modified: 2024-01-25 22:08 UTC (History)
6 users (show)

Fixed In Version: ceph-18.2.0-127.el9cp
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-12-13 15:24:51 UTC
Embargoed:
gsalomon: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-7855 0 None None None 2023-11-06 14:35:57 UTC
Red Hat Product Errata RHBA-2023:7780 0 None None None 2023-12-13 15:24:56 UTC

Description Hemanth Sai 2023-11-06 14:35:29 UTC
Description of problem:
wrong output seen for query "select * from s3object[*].phonenumbers where _1.type is NOT null;"
NOT or NULL in caps is giving wrong output


[cephuser@ceph-hmaheswa-reef-jlswrx-node5 ~]$ aws --endpoint-url http://10.0.207.204:80 s3api select-object-content --bucket bkt1 --key doc_example.json --expression-type 'SQL' --input-serialization '{"JSON": {"Type": "DOCUMENT"}, "CompressionType": "NONE"}' --output-serialization '{"CSV": {}}' --expression "select * from s3object[*].phonenumbers where _1.type is not null;" /dev/stdout
phoneNumbers.type. : home1
phoneNumbers.number. : 734928_1
phoneNumbers.addr. : 11
#=== 0 ===#
phoneNumbers.type. : home2
phoneNumbers.number. : 734928_2
phoneNumbers.addr. : 22
#=== 1 ===#
phoneNumbers.type. : home3
phoneNumbers.number. : 734928_3
phoneNumbers.addr. : 33
#=== 2 ===#
phoneNumbers.type. : home4
phoneNumbers.number. : 734928_4
phoneNumbers.addr. : 44
#=== 3 ===#
phoneNumbers.type. : home5
phoneNumbers.number. : 734928_5
phoneNumbers.addr. : 55
#=== 4 ===#
phoneNumbers.type. : home6
phoneNumbers.number. : 734928_6
phoneNumbers.addr. : 66
#=== 5 ===#
phoneNumbers.type. : home7
phoneNumbers.number. : 734928_7
phoneNumbers.addr. : 77
#=== 6 ===#
phoneNumbers.type. : home8
phoneNumbers.number. : 734928_8
phoneNumbers.addr. : 88
#=== 7 ===#
phoneNumbers.type. : home9
phoneNumbers.number. : 734928_9
phoneNumbers.addr. : 99
#=== 8 ===#
phoneNumbers.type. : home10
phoneNumbers.number. : 734928_10
phoneNumbers.addr. : 100
#=== 9 ===#
[cephuser@ceph-hmaheswa-reef-jlswrx-node5 ~]$  
[cephuser@ceph-hmaheswa-reef-jlswrx-node5 ~]$ aws --endpoint-url http://10.0.207.204:80 s3api select-object-content --bucket bkt1 --key doc_example.json --expression-type 'SQL' --input-serialization '{"JSON": {"Type": "DOCUMENT"}, "CompressionType": "NONE"}' --output-serialization '{"CSV": {}}' --expression "select * from s3object[*].phonenumbers where _1.type is NOT null;" /dev/stdout
[cephuser@ceph-hmaheswa-reef-jlswrx-node5 ~]$ 
[cephuser@ceph-hmaheswa-reef-jlswrx-node5 ~]$ aws --endpoint-url http://10.0.207.204:80 s3api select-object-content --bucket bkt1 --key doc_example.json --expression-type 'SQL' --input-serialization '{"JSON": {"Type": "DOCUMENT"}, "CompressionType": "NONE"}' --output-serialization '{"CSV": {}}' --expression "select * from s3object[*].phonenumbers where _1.type is not NULL;" /dev/stdout
[cephuser@ceph-hmaheswa-reef-jlswrx-node5 ~]$


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

How reproducible:
always

Steps to Reproduce:
1.deploy rhcs7.0 ceph cluster
2.upload an s3select object using aws-cli
3.execute the query "select * from s3object[*].phonenumbers where _1.type is not NULL;" and verify the results

Actual results:
NOT or NULL in caps is giving wrong output
but "not null" is giving correct output

Expected results:
should work correctly in caps as well: "NOT", "NULL"

Comment 1 gal salomon 2023-11-14 15:07:11 UTC
it is fixed in https://github.com/ceph/ceph/pull/54298

Comment 6 errata-xmlrpc 2023-12-13 15:24:51 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 (Red Hat Ceph Storage 7.0 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/RHBA-2023:7780


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