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

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

                Author: ASF GitHub Bot
            Created on: 31/Oct/18 23:25
            Start Date: 31/Oct/18 23:25
    Worklog Time Spent: 10m 
      Work Description: amaliujia commented on a change in pull request #6898: 
[BEAM-5852] [BEAM-5892] BeamSQL functions
URL: https://github.com/apache/beam/pull/6898#discussion_r229900036
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/BeamSqlEnv.java
 ##########
 @@ -75,6 +77,14 @@ public static BeamSqlEnv inMemory(TableProvider... 
tableProviders) {
     return withTableProvider(inMemoryMetaStore);
   }
 
+  public void registerBuiltinUdf(Map<String, List<Method>> methods) {
+    for (Map.Entry<String, List<Method>> entry : methods.entrySet()) {
+      for (Method method : entry.getValue()) {
+        defaultSchema.add(entry.getKey(), ScalarFunctionImpl.create(method));
 
 Review comment:
   Beside from support Joda in UDF, what other benefits that implementing our 
own subclass of `Function` has?
   
   During implementing this PR, I could use Java generic to help reduce code 
duplication. Also the annotation help more clearly to register overloaded 
functions. Neither benefit is relevant to implement `Function`.  

----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 161384)
    Time Spent: 1h 40m  (was: 1.5h)

> Function extension in BeamSQL
> -----------------------------
>
>                 Key: BEAM-5852
>                 URL: https://issues.apache.org/jira/browse/BEAM-5852
>             Project: Beam
>          Issue Type: New Feature
>          Components: dsl-sql
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> We could add more functions to BeamSQL (as UDFs) to provide rich 
> functionalities than standard/Calcite functions.



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

Reply via email to