<p dir="auto">If the user waits for few minutes before giving pageoffset to get more results then user is getting duplicated results .This happens as the pageoffset we use for pagination becomes invalid due to merging of druid segments and search starts from offset 0 in new segment. Is there any way to know the pageoffset is valid or not</p>
<p dir="auto">How should I handle the below query in Druid?</p>
<p dir="auto">In classic sql, it would be a simple sub-query &amp; a JOIN. (Don't worry, I understand the reasons we don't support JOINs in Druid explained in the spec doc) So I'm wondering, for those experienced with Druid and faced with this problem, what would you do?</p>
<h3 dir="auto">Desired Query: For each active user, what is their total purchase amount?</h3>
<h3 dir="auto">Data Sources</h3>
<p dir="auto"><strong>user_purchases</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="first_name   last_name    purchase_amount
--------------------------------------
james        smith        1234
kate         johnson      444"><pre class="notranslate"><code class="notranslate">first_name   last_name    purchase_amount
--------------------------------------
james        smith        1234
kate         johnson      444
</code></pre></div>
<p dir="auto"><strong>user_events</strong> (an active user is one with a "sign_up", but no "deactivate" event.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="first_name   last_name    event
--------------------------------------
james        smith        sign_up
kate         johson       sign_up
james        smith        deactivate"><pre class="notranslate"><code class="notranslate">first_name   last_name    event
--------------------------------------
james        smith        sign_up
kate         johson       sign_up
james        smith        deactivate
</code></pre></div>
<h3 dir="auto">Queries:</h3>
<p dir="auto">Here is the sloppy way I would currently do it:</p>
<ol dir="auto">
<li>Get all "first_name" + "last_name" combinations from user_events that do NOT have a deactivate event.</li>
<li>Use some code and turn the resulting (first_name, last_name) pairs into a giant filter clause, possibly with 1000's of conditions. Then do a query on <code class="notranslate">user_purchases</code> using this filter clause.</li>
</ol>