-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74719/
-----------------------------------------------------------

Review request for ranger, Anand Nadar, Ankita Sinha, Madhan Neethiraj, Monika 
Kachhadiya, Subhrat Chaudhary, and Vanita Ubale.


Bugs: RANGER-4514
    https://issues.apache.org/jira/browse/RANGER-4514


Repository: ranger


Description
-------

The values of sort parameters sortBy and sortType are interchanged in the 
response received for the GDS APIs.

Steps to reproduce:

Create 2 datasets
Fetch them using GET API - /service/gds/dataset?sortBy=id&sortType=ASC
Expected: in response the sort params: sortBy=id, sortType=ASC
Actual response:  sort params: sortBy=ASC, sortType=id


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/biz/GdsDBStore.java 4249b1121 


Diff: https://reviews.apache.org/r/74719/diff/1/


Testing
-------

Testing Steps
1)Create 2 datasets
2)Fetch them using GET API - /service/gds/dataset?sortBy=id&sortType=ASC
3)In Response we get sortBy=ASC, sortType=id correctly
Response
{
    "startIndex": 0,
    "pageSize": 1,
    "totalCount": 3,
    "resultSize": 1,
    "sortType": "asc",
    "sortBy": "datasetId",
    "queryTimeMS": 1699273018014,
    "list": [
        {
            "id": 1,
            "guid": "51990db5-533e-4358-9fba-96758f93387f",
            "isEnabled": true,
            "createdBy": "Admin",
            "updatedBy": "Admin",
            "createTime": 1699010197633,
            "updateTime": 1699011093627,
            "version": 4,
            "description": "This is GDS description",
            "options": {
                "property1": "GDS_1_options",
                "property2": "GDS_2_options"
            },
            "additionalInfo": {
                "property1": "GDS_1_additionalInfo",
                "property2": "GDS_2_additionalInfo"
            },
            "name": "Test_GDS_Dataset1",
            "acl": {
                "users": {
                    "admin": "ADMIN",
                    "Test-User-1": "AUDIT"
                }
            },
            "termsOfUse": "Gds Terms of Use"
        }
    ],
    "listSize": 1
}


Thanks,

Prashant Satam

Reply via email to