GitHub user maropu opened a pull request:

    https://github.com/apache/spark/pull/18768

    [SPARK-21533][SQL] Print warning messages when override function 
`configure` found in Hive UDFs

    ## What changes were proposed in this pull request?
    This pr added code to print warning messages when an unsupported function 
`public void configure(MapredContext mapredContext)` used in `GenericUDF` and 
`GenericUDF`. This is because Spark does not call `configure` internally and 
this is error-prone.
    
    ## How was this patch tested?
    Manually checked. If this pr applied, you hit a warning message below;
    ```
    scala> sql("CREATE TEMPORARY FUNCTION test AS 'test.TestUDTF'")
    17/07/29 11:57:08 WARN HiveShim: Found an overridden method `configure` in 
TestUDTF, but Spark does not call the method during initialization because 
Spark does not use MapredContext inside (See SPARK-21533). So, you might 
reconsider the implementation of TestUDTF.
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/maropu/spark SPARK-21533

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18768.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 #18768
    
----
commit ff1b88be6095da4a4628134691ebfc05876bc83b
Author: Takeshi Yamamuro <yamam...@apache.org>
Date:   2017-07-29T03:01:34Z

    Print warning messages when override function `configure` found

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to