You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/06/14 13:39:53 UTC

[GitHub] [incubator-druid] dinsaw opened a new issue #7895: Confusing Scan Query example

dinsaw opened a new issue #7895: Confusing Scan Query example
URL: https://github.com/apache/incubator-druid/issues/7895
 
 
   As a beginner user of Druid, I find [Scan Query Example
   ](https://druid.apache.org/docs/latest/querying/scan-query.html) confusing.
   
   The example scan query is 
   
   > {
      "queryType": "scan",
      "dataSource": "wikipedia",
      "resultFormat": "list",
      "columns":[],
      "intervals": [
        "2013-01-01/2013-01-02"
      ],
      "batchSize":20480,
      "limit":5
    }
   
   Here, `batchSize` is greater than `limit`, which does not make sense. Why will we load  20480 records in memory to return just 5 records. I guess adding filter to this example will add more clarity.
   
   We can change the query to 
   > {
     "queryType": "scan",
     "dataSource": "wikipedia",
     "resultFormat": "list",
     "columns": [],
     "intervals": [
       "2013-01-01/2013-01-02"
     ],
     "filter": {
       "type": "in",
       "dimension": "page",
       "values": [
         "Justin Bieber"
       ]
     },
     "batchSize": 20480,
     "limit": 50
   }
   
   With filter criteria, The reader can infer that **filtering criteria will be applied on batch of 20480 records and result will be returned to client. If first batch filtering does not return 50 records then the next batch of 20480 records will be fetched to fulfil limit parameter. This process will happen again and again until the returned rows count is 50 or all rows are scanned**
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org