GitHub user maropu opened a pull request:
https://github.com/apache/incubator-hivemall/pull/95
[HIVEMALL-119] Fix type cast issues in XGBoostUDTF
## What changes were proposed in this pull request?
This pr fixed the type cast issue below in `XGBoostUDTF`;
```
hive> SELECT train_xgboost_classifier(1.0, array("1:0.2"));
Failed with exception java.io.IOException:java.lang.ClassCastException:
org.apache.hadoop.io.Text cannot be cast to java.lang.String
[20:51:33] dmlc-core/include/dmlc/logging.h:235: [20:51:33]
src/objective/regression_obj.cc:89: Check failed: (info.labels.size()) != (0)
label set cannot be empty
org.apache.hadoop.hive.ql.metadata.HiveException: [20:51:33]
src/objective/regression_obj.cc:89: Check failed: (info.labels.size()) != (0)
label set cannot be empty
Check failed: (info.labels.size()) != (0) label set cannot be empty
at hivemall.xgboost.XGBoostUDTF.close(XGBoostUDTF.java:313)
at
org.apache.hadoop.hive.ql.exec.UDTFOperator.closeOp(UDTFOperator.java:152)
at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:683)
...
```
## What type of PR is it?
Bug Fix
## What is the Jira issue?
https://issues.apache.org/jira/browse/HIVEMALL-119
## How was this patch tested?
Manually tested.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/maropu/incubator-hivemall HIVEMALL-119
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-hivemall/pull/95.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #95
----
commit d193adb3e48b35fb354faa7cc06deec190ac8d26
Author: Takeshi Yamamuro <[email protected]>
Date: 2017-07-05T08:45:24Z
Fix issues in the Hive engine
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---