Description of problem: wrong output seen for query "select trim(LEADING '1' from '111abcdef111') from s3object;" "LEADING" and "TRAILING" in caps are removing characters from both sides [cephuser@ceph-hmaheswa-reef-v0q7fq-node6 ~]$ aws s3api --endpoint-url http://10.0.210.182:80 select-object-content --bucket bkt1 --key polarion_data.csv --expression-type 'SQL' --input-serialization '{"CSV": {}, "CompressionType": "NONE"}' --output-serialization '{"CSV": {}}' --expression "select trim(LEADING '1' from '111abcdef111') from s3object;" /dev/stdout abcdef abcdef abcdef abcdef abcdef abcdef [cephuser@ceph-hmaheswa-reef-v0q7fq-node6 ~]$ [cephuser@ceph-hmaheswa-reef-v0q7fq-node6 ~]$ aws s3api --endpoint-url http://10.0.210.182:80 select-object-content --bucket bkt1 --key polarion_data.csv --expression-type 'SQL' --input-serialization '{"CSV": {}, "CompressionType": "NONE"}' --output-serialization '{"CSV": {}}' --expression "select trim(TRAILING '1' from '111abcdef111') from s3object;" /dev/stdout abcdef abcdef abcdef abcdef abcdef abcdef [cephuser@ceph-hmaheswa-reef-v0q7fq-node6 ~]$ but "leading" and "trailing" are working fine: [cephuser@ceph-hmaheswa-reef-v0q7fq-node6 ~]$ aws s3api --endpoint-url http://10.0.210.182:80 select-object-content --bucket bkt1 --key polarion_data.csv --expression-type 'SQL' --input-serialization '{"CSV": {}, "CompressionType": "NONE"}' --output-serialization '{"CSV": {}}' --expression "select trim(trailing '1' from '111abcdef111') from s3object;" /dev/stdout 111abcdef 111abcdef 111abcdef 111abcdef 111abcdef 111abcdef [cephuser@ceph-hmaheswa-reef-v0q7fq-node6 ~]$ [cephuser@ceph-hmaheswa-reef-v0q7fq-node6 ~]$ [cephuser@ceph-hmaheswa-reef-v0q7fq-node6 ~]$ aws s3api --endpoint-url http://10.0.210.182:80 select-object-content --bucket bkt1 --key polarion_data.csv --expression-type 'SQL' --input-serialization '{"CSV": {}, "CompressionType": "NONE"}' --output-serialization '{"CSV": {}}' --expression "select trim(leading '1' from '111abcdef111') from s3object;" /dev/stdout abcdef111 abcdef111 abcdef111 abcdef111 abcdef111 abcdef111 [cephuser@ceph-hmaheswa-reef-v0q7fq-node6 ~]$ Version-Release number of selected component (if applicable): ceph version 18.2.0-86.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 trim(LEADING '1' from '111abcdef111') from s3object;" and verify the results Actual results: "LEADING" and "TRAILING" in caps are removing characters from both sides but "leading" and "trailing" are working fine Expected results: should work correctly in caps as well: "LEADING", "TRAILING" Additional info: rgw node: 10.0.210.182 creds: root/passwd ; cephuser/cephuser
the issue is resolved in the following PR https://github.com/ceph/ceph/pull/54298
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
Rivka, this BZ describes the fix for syntax-issue that causes a wrong output (trim operator). (type checking is a different issue)