<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Hive reflect function is not allowed in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137090#M19054</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/2729/hermanyu.html" nodeid="2729"&gt;@Herman Yu&lt;/A&gt;, on my Sandbox, also HDP-2.3.2 it works, I only changed table name:&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; SELECT reflect("java.lang.String", "valueOf", 1), reflect("java.lang.String", "isEmpty"), reflect("java.lang.Math", "max", 2, 3), reflect("java.lang.Math", "min", 2, 3), reflect("java.lang.Math", "round", 2.5), reflect("java.lang.Math", "exp", 1.0), reflect("java.lang.Math", "floor", 1.9) FROM st2 limit 1;
OK
1	true	3	2	3	2.718281828459045	1.0
Time taken: 1.97 seconds, Fetched: 1 row(s)&lt;/PRE&gt;&lt;P&gt;Do other Hive commands and scripts work? Can you try reflect one by one, or, if you copy/pasted the command from somewhere try typing the first reflect.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2016 16:23:43 GMT</pubDate>
    <dc:creator>pminovic</dc:creator>
    <dc:date>2016-02-11T16:23:43Z</dc:date>
    <item>
      <title>Hive reflect function is not allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137089#M19053</link>
      <description>&lt;P&gt;on Sandbox 2.3.2, the following hive query errors out:&lt;/P&gt;&lt;P&gt;SELECT reflect("java.lang.String", "valueOf", 1),
  reflect("java.lang.String", "isEmpty"),
  reflect("java.lang.Math", "max", 2, 3),
  reflect("java.lang.Math", "min", 2, 3),
  reflect("java.lang.Math", "round", 2.5),
  reflect("java.lang.Math", "exp", 1.0),
  reflect("java.lang.Math", "floor", 1.9)
FROM hyhelp LIMIT 1;&lt;/P&gt;&lt;P&gt;error message is: &lt;/P&gt;&lt;P&gt;Error while compiling statement: FAILED: SemanticException UDF reflect is not allowed&lt;/P&gt;&lt;P&gt;hiveserver2.log shows:&lt;/P&gt;&lt;P&gt;2016-02-10 22:51:23,461 ERROR [HiveServer2-Handler-Pool: Thread-46]: ql.Driver (SessionState.java:printError(960)) - FAILED: SemanticException UDF reflect is not allowed
org.apache.hadoop.hive.ql.parse.SemanticException: UDF reflect is not allowed
  at org.apache.hadoop.hive.ql.exec.Registry.getFunctionInfo(Registry.java:245)
  at org.apache.hadoop.hive.ql.exec.FunctionRegistry.getFunctionInfo(FunctionRegistry.java:463)
  at org.apache.hadoop.hive.ql.exec.FunctionRegistry.impliesOrder(FunctionRegistry.java:1521)
  at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1GetAllAggregations(SemanticAnalyzer.java:530)
  at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1GetAggregationsFromSelect(SemanticAnalyzer.java:465)
  at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1145)
  at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1415)
  at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1415)
  at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10048)
  at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10106)
  at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:211)
  at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:227)
  at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:424)&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;Is this a configuration issue or there are jar files missing?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 12:01:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137089#M19053</guid>
      <dc:creator>TeeupData</dc:creator>
      <dc:date>2016-02-11T12:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hive reflect function is not allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137090#M19054</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/2729/hermanyu.html" nodeid="2729"&gt;@Herman Yu&lt;/A&gt;, on my Sandbox, also HDP-2.3.2 it works, I only changed table name:&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; SELECT reflect("java.lang.String", "valueOf", 1), reflect("java.lang.String", "isEmpty"), reflect("java.lang.Math", "max", 2, 3), reflect("java.lang.Math", "min", 2, 3), reflect("java.lang.Math", "round", 2.5), reflect("java.lang.Math", "exp", 1.0), reflect("java.lang.Math", "floor", 1.9) FROM st2 limit 1;
OK
1	true	3	2	3	2.718281828459045	1.0
Time taken: 1.97 seconds, Fetched: 1 row(s)&lt;/PRE&gt;&lt;P&gt;Do other Hive commands and scripts work? Can you try reflect one by one, or, if you copy/pasted the command from somewhere try typing the first reflect.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 16:23:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137090#M19054</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-02-11T16:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Hive reflect function is not allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137091#M19055</link>
      <description>&lt;P&gt;Does not work for me either.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 03:24:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137091#M19055</guid>
      <dc:creator>lprisock</dc:creator>
      <dc:date>2016-02-12T03:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Hive reflect function is not allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137092#M19056</link>
      <description>&lt;P&gt;Thanks, I think it is a configuration issue. it doesn't work with a customized Hue I installed, doesn't work with Ambari Hive view either, but does work with Hive CLI. I found a walk-around for now, will figure out the configurations later when have time. &lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 09:04:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137092#M19056</guid>
      <dc:creator>TeeupData</dc:creator>
      <dc:date>2016-02-12T09:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hive reflect function is not allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137093#M19057</link>
      <description>&lt;P&gt;It also works with standard Hue-2.6.1 packaged with HDP-2.3.4 (that's the only one I can try; it should also work with Hue coming with 2.3.2 because it's the same version), I tried:&lt;/P&gt;&lt;PRE&gt;SELECT reflect("java.lang.Math","exp",2.0), reflect("java.lang.Math","hypot",3.0,4.0) from t2 limit 1;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2076-reflect1.png" style="width: 1025px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/21990iC9EB62FB1C576794/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2076-reflect1.png" alt="2076-reflect1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 08:46:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137093#M19057</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2019-08-19T08:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Hive reflect function is not allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137094#M19058</link>
      <description>&lt;P&gt;I am still unable to get this to work. All I am doing is trying to run the query, is there something I need to do in order to get this to work?&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2016 02:33:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-reflect-function-is-not-allowed/m-p/137094#M19058</guid>
      <dc:creator>lprisock</dc:creator>
      <dc:date>2016-02-13T02:33:11Z</dc:date>
    </item>
  </channel>
</rss>

