RayetSena opened a new issue, #2869:
URL: https://github.com/apache/drill/issues/2869

   Hello,
   When I make a query, I sometimes get the result I expect, but I usually get 
a timeout error. The result contains only 3000 rows and 3 columns. I use the 
http plugin for my query; you can see its configuration below. I checked for 
network issues and timeout settings, but I keep getting the error. When I use a 
more complex query, I almost always get an error. I added both queries to the 
below.
   
   **Configuration**
   ```
   {
     "type": "http",
     "connections": {
       "feed": {
         "url": "https://opendata.cbs.nl/ODataFeed/odata/";,
         "requireTail": true,
         "method": "GET",
         "authType": "none",
         "inputType": "json",
         "xmlDataLevel": 1,
         "postParameterLocation": "QUERY_STRING",
         "verifySSLCert": true
       }
     },
     "retryDelay": 1000,
     "proxyType": "direct",
     "authMode": "USER_TRANSLATION",
     "enabled": true
   }
   ```
   
   **Expected behavior**
   Query
   ```
   select s.flatdata.ID as ID, s.flatdata.WijkenEnBuurten as WijkenEnBuurten, 
s.flatdata.AantalInwoners_5 as AantalInwoners_5
   from (select flatten(value) as flatdata from 
http.feed.`85039NED/TypedDataSet?$top=3000&$format=json`) as s
   ```
   
![image](https://github.com/apache/drill/assets/55273803/1a74cc9f-4c54-45f5-808b-6ec3b26c568e)
   
   **Error detail, log output or screenshots**
   
![image](https://github.com/apache/drill/assets/55273803/b8d3d0dc-bdf7-44cc-b522-6f346af27377)
   
   **Drill version**
   1.21.1
   
   **Additional context**
   Complex Query
   ```
   select result.AantalInwoners_5 as AantalInwoners_5, 
result.WerkzameBeroepsbevolking_2 as WerkzameBeroepsbevolking_2,
   CAST((CAST(result.AantalInwoners_5 as double) / 
CAST(result.WerkzameBeroepsbevolking_2 as double)) as double)*100 as Percentage 
from (select * from 
   (select s.flatdata.ID as ID, s.flatdata.WijkenEnBuurten as WijkenEnBuurten, 
s.flatdata.AantalInwoners_5 as AantalInwoners_5
   from (select flatten(value) as flatdata from 
http.feed.`85039NED/UntypedDataSet?$top=3000&$format=json`) as s union all 
   select a.flatdata.ID as ID, a.flatdata.WijkenEnBuurten as WijkenEnBuurten, 
a.flatdata.AantalInwoners_5 as AantalInwoners_5
   from (select flatten(value) as flatdata from 
http.feed.`85039NED/UntypedDataSet?$top=3000&$skip=3000&$format=json`) as a  
union all 
   select d.flatdata.ID as ID, d.flatdata.WijkenEnBuurten as WijkenEnBuurten, 
d.flatdata.AantalInwoners_5 as AantalInwoners_5
   from (select flatten(value) as flatdata from 
http.feed.`85039NED/UntypedDataSet?$top=3000&$skip=6000&$format=json`) as d 
union all 
   select f.flatdata.ID as ID, f.flatdata.WijkenEnBuurten as WijkenEnBuurten, 
f.flatdata.AantalInwoners_5 as AantalInwoners_5
   from (select flatten(value) as flatdata from 
http.feed.`85039NED/UntypedDataSet?$top=3000&$skip=9000&$format=json`) as f 
union all 
   select b.flatdata.ID as ID, b.flatdata.WijkenEnBuurten as WijkenEnBuurten, 
b.flatdata.AantalInwoners_5 as AantalInwoners_5
   from (select flatten(value) as flatdata from 
http.feed.`85039NED/UntypedDataSet?$top=3000&$skip=12000&$format=json`) as b 
union all 
   select c.flatdata.ID as ID, c.flatdata.WijkenEnBuurten as WijkenEnBuurten, 
c.flatdata.AantalInwoners_5 as AantalInwoners_5
   from (select flatten(value) as flatdata from 
http.feed.`85039NED/UntypedDataSet?$top=3000&$skip=15000&$format=json`) as c 
union all 
   select v.flatdata.ID as ID, v.flatdata.WijkenEnBuurten as WijkenEnBuurten, 
v.flatdata.AantalInwoners_5 as AantalInwoners_5
   from (select flatten(value) as flatdata from 
http.feed.`85039NED/UntypedDataSet?$top=3000&$skip=18000&$format=json`) as v 
   order by ID) as test INNER JOIN (select 
s.flatdata.WerkzameBeroepsbevolking_2 as WerkzameBeroepsbevolking_2, 
s.flatdata.WijkenEnBuurten as WijkenEnBuurten
   from (select flatten(value) as flatdata from 
http.feed.`85485NED/TypedDataSet?$format=json`) as s where 
s.flatdata.WijkenEnBuurten like 'BU188%') as a
   on test.WijkenEnBuurten=a.WijkenEnBuurten) as result
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to