[
https://issues.apache.org/jira/browse/BEAM-5852?focusedWorklogId=161338&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-161338
]
ASF GitHub Bot logged work on BEAM-5852:
----------------------------------------
Author: ASF GitHub Bot
Created on: 31/Oct/18 21:45
Start Date: 31/Oct/18 21:45
Worklog Time Spent: 10m
Work Description: akedin commented on a change in pull request #6898:
[BEAM-5852] [BEAM-5892] BeamSQL functions
URL: https://github.com/apache/beam/pull/6898#discussion_r229878799
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/udf/BeamBuiltinFunctionClass.java
##########
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.extensions.sql.impl.udf;
+
+/** BeamBuiltinFunctionClass interface. */
+interface BeamBuiltinFunctionClass {}
Review comment:
I think this should be called `BuiltinFunctionsProvider` so that it doesn't
look weird if there are multiple functions implemented here. Plus it somewhat
aligns with service loader/provider terminology this way.
I would also make it an abstract class that can extract UDFs from itself:
```
abstract BuiltinFunctionsProvider {
protected List<UDF> loadUDFs() {
this.getClass().getDeclaredMethods().stream().filter(BuiltinFunctionsProvider::isUDF).map(BuiltinFunctionsProvider::toUDF).collect(toList());
}
}
```
----------------------------------------------------------------
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: 161338)
Time Spent: 1h 10m (was: 1h)
> 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 10m
> 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)