[ 
https://issues.apache.org/jira/browse/BEAM-4194?focusedWorklogId=113448&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-113448
 ]

ASF GitHub Bot logged work on BEAM-4194:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Jun/18 23:39
            Start Date: 19/Jun/18 23:39
    Worklog Time Spent: 10m 
      Work Description: amaliujia commented on a change in pull request #5682: 
[BEAM-4194] support unbounded limit
URL: https://github.com/apache/beam/pull/5682#discussion_r196610533
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamEnumerableConverter.java
 ##########
 @@ -95,13 +107,37 @@ public Result implement(EnumerableRelImplementor 
implementor, Prefer prefer) {
       
Thread.currentThread().setContextClassLoader(BeamEnumerableConverter.class.getClassLoader());
       if (node instanceof BeamIOSinkRel) {
         return count(options, node);
+      } else if (isLimitQuery(node)) {
+        return limitCollect(options, node);
       }
+
       return collect(options, node);
     } finally {
       Thread.currentThread().setContextClassLoader(originalClassLoader);
     }
   }
 
+  enum LimitState {
 
 Review comment:
   Yep. Using enum to have descriptive state than true/false.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 113448)
    Time Spent: 8h 10m  (was: 8h)

> [SQL] Support LIMIT on Unbounded Data
> -------------------------------------
>
>                 Key: BEAM-4194
>                 URL: https://issues.apache.org/jira/browse/BEAM-4194
>             Project: Beam
>          Issue Type: New Feature
>          Components: dsl-sql
>            Reporter: Anton Kedin
>            Assignee: Rui Wang
>            Priority: Major
>          Time Spent: 8h 10m
>  Remaining Estimate: 0h
>
> We need to support queries with "LIMIT xxx".
> Problem is that we don't know when aggregates will trigger, they can 
> potentially accumulate values in global window and never trigger.
> If we have some trigger syntax (BEAM-4193), then the use case becomes similar 
> to what we have at the moment, where the user defines the trigger upstream 
> for all inputs. In this case LIMIT probably can be implemented as 
> sample.any(5) with trigger at count.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to