Failed to recognize predicate 'xxx' Failed rule 'identifie
1. 问题描述
在Hive1.2.2版本运行如下HQL时:
select dt as date, comMap['searchType'] as search_type, comMap['clickType'] as click_typefrom search_clickwhere dt = '20170614';
会抛出如下异常:
Failed to recognize predicate 'date'. Failed rule: 'identifier' in column specification
2. 问题分析
在Hive1.2.0版本开始增加了如下配置选项,默认值为true
:
hive.support.sql11.reserved.keywords
该选项的目的是:是否启用对SQL2011保留关键字的支持。 启用后,将支持部分SQL2011保留关键字。
3. 解决方案
从上面可以知道是因为启用了对保留关键字的支持导致的,上面语句中date
是保留关键字.所以解决方案如下:
- 弃用保留关键字
date
select dt, comMap['searchType'] as search_type, comMap['clickType'] as click_typefrom search_clickwhere dt = '20170614';
- 弃用对保留关键字的支持
sudo -uwirelessdev hive -e " set hive.support.sql11.reserved.keywords = false ; select dt, comMap['searchType'] as search_type, comMap['clickType'] as click_type from search_click where dt = '20170614';" > a.txt
或者在conf
下的hive-site.xml
配置文件中修改配置选项:
<property> <name>hive.support.sql11.reserved.keywords</name> <value>false</value></property>
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow
Failed to recognize predicate 'xxx' Failed rule 'identifie相关推荐
- hive建表报错FAILED: ParseException line 2:0 Failed to recognize predicate ‘date‘. Failed rule: ‘identifi
报错信息 FAILED: ParseException line 2:0 Failed to recognize predicate 'date'. Failed rule: 'identifier' ...
- Hive连接产生笛卡尔集. FAILED: ParseException line 1:18 Failed to recognize predicate 'a'. Failed rule: 'kwIn
我在实际使用时,设置了set hive.mapred.mode=nonstrict; 但是依旧报错.最后只好全部改成了inner join,这样子写起来很费劲. 而且最后算出来的数据跟网上的实例不太一 ...
- ES failed shard on node[XXX]: failed recovery, failure RecoveryFailedException XXX Too many openfile
今天集群挂掉了,状态一直是red,恢复节点之后,开始恢复分片数据,一直都很慢. 直到所有分片都停止分配,但是此时集群状态还是red. 原因是:某节点上的分片尝试恢复5次没有成功,然后就丢弃不管.导致该 ...
- Pyinstaller 打包exe 报错 “failed to execute script XXX“的一种解决方案
Pyinstaller 打包exe 报错 "failed to execute script XXX"的一种解决方案 参考文章: (1)Pyinstaller 打包exe 报错 & ...
- python解决Net Frameword匹配问题及Failed building wheel for XXX
文章目录 1.背景 2.错误描述 2.1 错误关键语句_1 2.2 错误关键语句_2 2.3 错误关键语句_3 3.原因 4.解决问题 5.总结 6.参考链接 1.背景 计划使用NI veristan ...
- Failed to create AppDomain 'xxx'. Exception has been Failed to create AppDomain
原文:Failed to create AppDomain 'xxx'. Exception has been Failed to create AppDomain 一服务器上的数据库全部被置于紧急模 ...
- fatal: unable to access ‘https://github.com/xxx/‘: Failed to connect to 127.0.0.1 port 7890: Connect
git clone 项目的时候遇到报错: fatal: unable to access 'https://github.com/xxx/': Failed to connect to 127.0.0 ...
- SpringBoot启动报错:Failed to introspect Class [XXX] from ClassLoader解决办法
Failed to introspect Class [XXX] from ClassLoader 今天做项目引入一个maven之后项目启动报错,很是无奈.碰到这种引入jar包导致的启动问题很可能是就 ...
- SpringBoot启动报错:Failed to introspect Class [XXX] from ClassLoader
Failed to introspect Class [XXX] from ClassLoader sprintboot依赖之间没有构建好,按报错日志找到A项目依赖的包B,重新编译构建依赖包B的项目. ...
最新文章
- 2 resize 到指定大小_阿里巴巴为什么让初始化集合时必须指定大小?
- OpenCV ORB角点检测
- COM 组件设计与应用(一)
- 从头開始写项目Makefile(三):变量的使用
- 各项兼容坑的记录-持续更新
- Java虚拟机学习总结(2)——性能优化的一般性原则、层次与通用方法
- 一文详解 Serverless 技术选型
- php安装make报错信息及解决方法
- 大前端(全栈)学习路线指南
- Git基础入门(一)Git基础概念
- 日撸代码300行:第九天
- React中input输入框中文输入的问题
- 嵌入式经典面试题总结
- 浴血黑帮第三季/全集Peaky Blinders迅雷下载
- URAL 1028 数星星 题解
- pytorch深度学习笔记(一)
- 关于两个电源串并联的问题
- 2021年全球与中国手动微操纵器行业市场规模及发展前景分析
- win10系统180天试用到期需要激活
- 工业LCD液晶屏注意事项