Hive XML Serde - boolean xpath不解析

时间:2018-05-18 13:21:23

标签: xml hive hive-serde

我正在使用this XML Serde创建一个简单的配置单元表,但在尝试解析下面的XPath时会抛出异常。

我尝试将VTD和Javax处理器用于以下xpath: <Msg> <Header> <Type>APP</Type> </Header> </Msg> 但它引发了以下异常:

VTD:

  

java.lang.RuntimeException:com.ximpleware.XPathEvalException:BinaryExpr无法评估节点集!

Javax.xml:

  

引起:javax.xml.xpath.XPathExpressionException:com.sun.org.apache.xpath.internal.XPathException:无法将#BOOLEAN转换为NodeList!

示例XML文档

DECLARE @T TABLE (ID INT,CertID INT, DueDate DATE)
INSERT INTO @T(ID,CertID,DueDate) SELECT 676790,48983,'2018-05-03'
INSERT INTO @T(ID,CertID,DueDate) SELECT 678064,48983,'2018-05-02'
INSERT INTO @T(ID,CertID,DueDate) SELECT 678086,48983,'2018-05-01'
INSERT INTO @T(ID,CertID,DueDate) SELECT 678107,48983,'2018-05-01'
INSERT INTO @T(ID,CertID,DueDate) SELECT 678061,48983,'2018-05-01'


DELETE t
FROM @T t
INNER JOIN (
    SELECT
        *
        ,Row_number() OVER(PARTITION BY CertID,DueDate ORDER BY ID ASC) AS [Row]
    FROM @T
) Ordered ON Ordered.ID=t.ID
WHERE [Row]<>1

SELECT * FROM @T

我做错了什么?

0 个答案:

没有答案