gpt4 book ai didi

hadoop - Hive 函数 quarter() 返回 'invalid function'

转载 作者:可可西里 更新时间:2023-11-01 16:31:03 26 4
gpt4 key购买 nike

这表示函数 quarter() 是在 Hive 1.3 中引入的

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DateFunctions

我正在使用默认版本的 HDInsight (3.1) 来运行 Hadoop:

https://azure.microsoft.com/en-us/documentation/articles/hdinsight-component-versioning/

当我尝试使用 quarter 函数时,我得到:

使用文件中的配置初始化日志记录:/C:/apps/dist/hive-0.13.0.2.1.15.1-0001/conf/hive-log4j.propertiesSLF4J:类路径包含多个 SLF4J 绑定(bind)。SLF4J:在 [jar:file:/C:/apps/dist/hadoop-2.4.0.2.1.15.1-0001/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org 中发现绑定(bind)/slf4j/impl/StaticLoggerBinder.class]SLF4J:在 [jar:file:/C:/apps/dist/hbase-0.98.0.2.1.15.1-0001-hadoop2/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl 中发现绑定(bind)/StaticLoggerBinder.class]SLF4J:参见http://www.slf4j.org/codes.html#multiple_bindings寻求解释。SLF4J:实际绑定(bind)类型为 [org.slf4j.impl.Log4jLoggerFactory]失败:SemanticException [错误 10011]:第 10:1 行无效函数“quarter”

我错过了什么?

最佳答案

如果您使用的是不支持 quarter() 的旧版 Hive,请尝试以下操作:

ceil(month(date) / 3.0)

关于hadoop - Hive 函数 quarter() 返回 'invalid function',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31688532/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com