1. 程式人生 > >Failed to recognize predicate 'xxx'. Failed rule: 'identifier' in column specification

Failed to recognize predicate 'xxx'. Failed rule: 'identifier' in column specification

1. 問題描述

在Hive1.2.2版本執行如下HQL時:

select dt as date, comMap['searchType'] as search_type, comMap['clickType'] as click_type
from search_click
where 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_type
from search_click
where 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>

相關推薦

Failed to recognize predicate 'xxx'. Failed rule: 'identifier' in column specification

1. 問題描述 在Hive1.2.2版本執行如下HQL時: select dt as date, comMap['searchType'] as search_type, comMap['clickType'] as click_type from search_cli

ParseException line 20:7 Failed to recognize predicate 'timestamp'. Failed rule: 'identifier' in tab

      今天在執行 hive ql 時,突然出現了這個錯誤,之前沒遇到過。就自己在網上找原因,看了幾篇回覆都是不搭邊的,都不想繼續了,不過也給自己了個思路,有一篇英文貼是有效的。         就嘗試了修改操作,SE

maven 本地倉庫存在jar包但是專案依舊提示 Failed to read artifact XXX missing artifact XXX的問題

今天從svn匯入一個專案後缺少一個org.restlet.2.1.2.jar 的jar包,而且用無法從官網下載下來,每次update project 後只下載一些 .lastupdate 字尾的檔案。無奈只能自己手動下載jar包到倉庫。下載下來後重新update project 還是會報錯(如題),

pyinstaller打包python檔案後,執行出現"Failed to execute script xxx.exe"錯誤的解決方式(No module named 'xxx')

一、問題定位:         windows+r進入cmd命令列視窗         cd exe檔案所在路徑;如cd C:\Users\user\Desktop\test\dist  

flask呼叫get方式介面報錯Failed to decode JSON object: Expecting value: line 1 column 1

專案寫完get介面後用postman做測試時,發現請求頭header中加入content-type:application/json後會發生報錯Failed to decode JSON object: Expecting value: line 1 column 1,但是去

Failed to load GpuProgram from binary shader data in 'XXXXXX'.的解決方法

在開發的過程中,執行專案出現了Failed to load GpuProgram from binary shader data in 'XXXXX'.的警告。經過排查發現是由於自己的資源在製作的時候採

Failed to resolve: multidexultidex和Failed to resolve: multidex-instrumentation

Failed to resolve: multidexultidex和Failed to resolve: multidex-instrumentation Gradle 編譯出現以下問題: 點選OpenFile會到app的gradle下,觀察發現與multdex有關的只有這兩個

Mac下安裝mongoldb 報錯 Failed to set up listener: SocketException: Address already in use

錯誤日誌2018-06-08T22:25:09.118+0800 E STORAGE [initandlisten] Failed to set up listener: SocketExceptio

ES錯誤Error:Failed to parse mapping [data]:[_ttl] is removed in 5.0

error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Failed to parse mapping [data]: [_

Failed to read artifact descriptor for xxx:jar 的Maven項目jar包依賴配置的問題解決

描述 tin ava 打開 文件 我們 記事本 last .com 在開發的過程中,尤其是新手,我們經常遇到Maven下載依賴jar包的問題,也就是遇到“Failed to read artifact descriptor for xxx:jar”的

LR回放https協議腳本失敗:[GENERAL_MSG_CAT_SSL_ERROR]connect to host "XXX" failed:[10054] Connection reset by peer [MsgId:MERR-27780]

網絡連接 advance sgid 服務器 vuser con run load sgi 最近做一個負載均衡項目的性能測試,使用LR錄制腳本協議為https協議,回放腳本時出現報錯: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "

artifactdescriptorexception:Failed to read artifact descriptor for xxx:jar ”

eas date 下載 解決 upd cep snap ots exceptio 在Eclipse中執行Maven的install命令時,報“Failed to read artifact descriptor for xxx:jar ”的錯誤。這可能是在下載過程中文件出現

刪除Mysql錯誤-- 3664 - Failed to set SDI 'xxx' in tablespace 'joinus/aut

有一個mysql資料庫刪除不了,一直提示以下錯誤 這其實是mysql的一個bug,如果你一直出現這個提示,就把mysql刪除重下,但也有其他方法能刪除。 方法1 詳見以下連結 https://cloud.tencent.com/developer/ask/177930 https://s

adb: failed to install xxx.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.xxx.deliveryrobot signatures do not match the previously inst

  解決方法:我是在安裝軟體時出現的這個錯誤,先解除安裝再安裝即可   解除安裝: adb uninstall "com.yourapp.yourapp"   安裝: adb install yourapp.apk    

解決:Connect to xx.xx.xxx.xx :8081 [/xx.xx.xx.xx] failed: Connection refu sed: connect -> [H

1. 自行啟動了個  Nenux 服務。想把本地工程推送到 個人私服,執行命令:mvn deploy 報錯: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (def

Failed to unregister the JMX name: org.apache.commons.dbcp2:name=xxx,type=BasicDataSource

 把datesource的bean的class由 org.apache.commons.dbcp2.BasicDataSource 改成  org.apache.tomcat.dbcp.dbcp.BasicDataSource並引入相應的jar包 <dependency>

小程式執行報錯:“Failed to load local image resource xxx.png the server responded with?

錯誤原因: 由於這是因為初始化的時候,變數還沒渲染進去導致的。 解決方法: 在src前面加個: wx:if<image wx:if='{{customerLevel.value}}' class

IDEA maven編譯專案報錯: Failed to execute goal on project XXX

1.問題現象 使用maven install(編譯)專案報錯: [ERROR] Failed to execute goal on project basic-logic: Could not resolve dependencies for project com.basic.management

Controller呼叫service報錯:com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote service :XXX

Controller呼叫service報錯:com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote service :XXX 1.錯誤原因:sevice方法中傳遞引數沒有序列化 RPC(遠端過程呼叫協議)是通過底層

ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule

ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule:  (iptables failed: iptables --wait -t nat -I DOCKER -i br-2add1a39bc5d -j RETU