Repository: incubator-impala Updated Branches: refs/heads/master 7db2d3064 -> 0e6540992
IMPALA-5259: [DOCS] Doc REFRESH FUNCTIONS The text from impala_common.xml is reused verbatim under the REFRESH page and in the UDFs page by a #include-like mechanism. Change-Id: Ic41fec781396b69e6df06b8de0b29c42ad51ce8f Reviewed-on: http://gerrit.cloudera.org:8080/7044 Reviewed-by: Taras Bobrovytsky <[email protected]> Tested-by: Impala Public Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/0e654099 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/0e654099 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/0e654099 Branch: refs/heads/master Commit: 0e65409926a83c791ba6da78863bfbcdddff8f22 Parents: 7db2d30 Author: John Russell <[email protected]> Authored: Thu Jun 1 10:58:54 2017 -0700 Committer: Impala Public Jenkins <[email protected]> Committed: Thu Jun 8 18:15:08 2017 +0000 ---------------------------------------------------------------------- docs/shared/impala_common.xml | 16 ++++++++++++++++ docs/topics/impala_refresh.xml | 7 ++++++- docs/topics/impala_udf.xml | 4 ++++ 3 files changed, 26 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/0e654099/docs/shared/impala_common.xml ---------------------------------------------------------------------- diff --git a/docs/shared/impala_common.xml b/docs/shared/impala_common.xml index ad86803..4522c9b 100644 --- a/docs/shared/impala_common.xml +++ b/docs/shared/impala_common.xml @@ -1206,6 +1206,22 @@ drop database temp; Prior to <keyword keyref="impala25_full"/> the requirement to reload functions after a restart applied to both C++ and Java functions. </p> + <p rev="2.9.0 IMPALA-5259" id="refresh_functions_tip"> + In <keyword keyref="impala29_full"/> and higher, you can refresh the user-defined functions (UDFs) + that Impala recognizes, at the database level, by running the <codeph>REFRESH FUNCTIONS</codeph> + statement with the database name as an argument. Java-based UDFs can be added to the metastore + database through Hive <codeph>CREATE FUNCTION</codeph> statements, and made visible to Impala + by subsequently running <codeph>REFRESH FUNCTIONS</codeph>. For example: + +<codeblock>CREATE DATABASE shared_udfs; +USE shared_udfs; +...use CREATE FUNCTION statements in Hive to create some Java-based UDFs + that Impala is not initially aware of... +REFRESH FUNCTIONS shared_udfs; +SELECT udf_created_by_hive(c1) FROM ... +</codeblock> + </p> + <p id="current_user_caveat" rev=""> The Hive <codeph>current_user()</codeph> function cannot be called from a Java UDF through Impala. http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/0e654099/docs/topics/impala_refresh.xml ---------------------------------------------------------------------- diff --git a/docs/topics/impala_refresh.xml b/docs/topics/impala_refresh.xml index 031bb2f..7fbb72e 100644 --- a/docs/topics/impala_refresh.xml +++ b/docs/topics/impala_refresh.xml @@ -50,7 +50,9 @@ under the License. <p conref="../shared/impala_common.xml#common/syntax_blurb"/> -<codeblock rev="IMPALA-1683">REFRESH [<varname>db_name</varname>.]<varname>table_name</varname> [PARTITION (<varname>key_col1</varname>=<varname>val1</varname> [, <varname>key_col2</varname>=<varname>val2</varname>...])]</codeblock> +<codeblock rev="IMPALA-1683">REFRESH [<varname>db_name</varname>.]<varname>table_name</varname> [PARTITION (<varname>key_col1</varname>=<varname>val1</varname> [, <varname>key_col2</varname>=<varname>val2</varname>...])] +<ph rev="2.9.0 IMPALA-5259">REFRESH FUNCTIONS <varname>db_name</varname></ph> +</codeblock> <p conref="../shared/impala_common.xml#common/usage_notes_blurb"/> @@ -338,6 +340,9 @@ ERROR: AnalysisException: Items in partition spec must exactly match the partiti <p conref="../shared/impala_common.xml#common/kudu_metadata_intro"/> <p conref="../shared/impala_common.xml#common/kudu_metadata_details"/> + <p conref="../shared/impala_common.xml#common/udf_blurb"/> + <p conref="../shared/impala_common.xml#common/refresh_functions_tip"/> + <p conref="../shared/impala_common.xml#common/related_info"/> <p> <xref href="impala_hadoop.xml#intro_metastore"/>, http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/0e654099/docs/topics/impala_udf.xml ---------------------------------------------------------------------- diff --git a/docs/topics/impala_udf.xml b/docs/topics/impala_udf.xml index 10d98d1..8960d36 100644 --- a/docs/topics/impala_udf.xml +++ b/docs/topics/impala_udf.xml @@ -270,6 +270,10 @@ select real_words(letters) from word_games;</codeblock> </li> </ol> + <note> + <p conref="../shared/impala_common.xml#common/refresh_functions_tip"/> + </note> + <example> <title>Java UDF Example: Reusing lower() Function</title>
