apache/drill

Http Storage Plugins need reorder "tail" and paginator parameters

Closed this issue · 1 comments

xqgzh commented

Describe the bug
append the paginator parameters after tail (when requireTail = true)

To Reproduce

  1. set the HTTP Storage Plugins configuration as follows:
    {
    "type": "http",
    "connections": {
    "sunrise": {
    "url": "https://api.sunrise-sunset.org/json",
    "requireTail": true,
    .....
    "paginator": {
    "limitParam": "limit",
    "offsetParam": "offset",
    "pageSize": 100,
    "method": "OFFSET"
    }
    }
    }
    }

  2. when i exec sql like this:
    select * from http.sunrise./test/123.json limit 10 offset 20;

  3. I get the error request url from drill:
    "GET https://api.sunrise-sunset.org/json?offset=20&limit=10/test/123.json"

  4. but I expect the request is:
    "GET https://api.sunrise-sunset.org/json/test/123.json?offset=20&limit=10"

Hi @xqgzh
I just submitted a bug fix for this. If you could take a look and review, I'd really appreciate it.