This is an automated email from the ASF dual-hosted git repository.

myui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hivemall.git


The following commit(s) were added to refs/heads/master by this push:
     new f9919ef  [HIVEMALL-312] Changed default constructor accessor to public 
for Spark
f9919ef is described below

commit f9919ef13a1e74bca261f22ca176158991243c79
Author: Makoto Yui <[email protected]>
AuthorDate: Thu May 6 17:18:22 2021 +0900

    [HIVEMALL-312] Changed default constructor accessor to public for Spark
    
    ## What changes were proposed in this pull request?
    
    Changed default constructor accessor to public for Spark
    
    ```
    Exception in thread "main" org.apache.spark.sql.AnalysisException: No 
handler for UDF/UDAF/UDTF 'hivemall.factorization.fm.FMPredictGenericUDAF': 
java.lang.IllegalAccessException: Class 
org.apache.spark.sql.hive.HiveShim$HiveFunctionWrapper can not access a member 
of class hivemall.factorization.fm.FMPredictGenericUDAF with modifiers 
"private"; line 6 pos 0Exception in thread "main" 
org.apache.spark.sql.AnalysisException: No handler for UDF/UDAF/UDTF 
'hivemall.factorization.fm.FMPredi [...]
    ```
    
    ## What type of PR is it?
    
    Bug Fix, Hot fix
    
    ## What is the Jira issue?
    
    https://issues.apache.org/jira/browse/HIVEMALL-312
    
    ## How was this patch tested?
    
    unit tests
    
    Author: Makoto Yui <[email protected]>
    
    Closes #242 from myui/HIVEMALL-312.
---
 .../main/java/hivemall/factorization/fm/FFMPredictGenericUDAF.java    | 4 +++-
 .../src/main/java/hivemall/factorization/fm/FMPredictGenericUDAF.java | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/core/src/main/java/hivemall/factorization/fm/FFMPredictGenericUDAF.java 
b/core/src/main/java/hivemall/factorization/fm/FFMPredictGenericUDAF.java
index b1c99c1..e0acc7f 100644
--- a/core/src/main/java/hivemall/factorization/fm/FFMPredictGenericUDAF.java
+++ b/core/src/main/java/hivemall/factorization/fm/FFMPredictGenericUDAF.java
@@ -49,7 +49,9 @@ import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
                 + " - Returns a prediction value in Double")
 public final class FFMPredictGenericUDAF extends AbstractGenericUDAFResolver {
 
-    private FFMPredictGenericUDAF() {}
+    public FFMPredictGenericUDAF() {
+        super();
+    }
 
     @Override
     public Evaluator getEvaluator(@Nonnull TypeInfo[] typeInfo) throws 
SemanticException {
diff --git 
a/core/src/main/java/hivemall/factorization/fm/FMPredictGenericUDAF.java 
b/core/src/main/java/hivemall/factorization/fm/FMPredictGenericUDAF.java
index fd49eec..4f81f41 100644
--- a/core/src/main/java/hivemall/factorization/fm/FMPredictGenericUDAF.java
+++ b/core/src/main/java/hivemall/factorization/fm/FMPredictGenericUDAF.java
@@ -60,7 +60,9 @@ import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
         value = "_FUNC_(Float Wj, array<float> Vjf, float Xj) - Returns a 
prediction value in Double")
 public final class FMPredictGenericUDAF extends AbstractGenericUDAFResolver {
 
-    private FMPredictGenericUDAF() {}
+    public FMPredictGenericUDAF() {
+        super();
+    }
 
     @Override
     public Evaluator getEvaluator(TypeInfo[] typeInfo) throws 
SemanticException {

Reply via email to