phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aravind <aravindkumar.ra...@gmail.com>
Subject TO_DATE function fails in Phoenix 4.3.1
Date Wed, 22 Jul 2015 21:22:51 GMT
The following query which uses TO_DATE function, does not work in Phoenix
4.3.1

SELECT DATE_STRING FROM testtable WHERE TO_DATE(DATE_STRING) >
TO_DATE('2001-01-01 05:00:00')

The query intends to convert varchar to to_date.

This problem has already existed and been resolved in Phoenix 4.3.0

https://issues.apache.org/jira/browse/PHOENIX-1769

The test class for the patch is also failing in Phoenix 4.3.1

https://issues.apache.org/jira/secure/attachment/12725402/PHOENIX-1769.patch

*Throws the following exception after several attempts*

Caused by: org.apache.hadoop.hbase.exceptions.DeserializationException:
org.apache.hadoop.hbase.DoNotRetryIOException: BooleanExpressionFilter
failed during reading: Could not initialize class
org.apache.phoenix.util.DateUtil$ISODateFormatParser

                at
org.apache.phoenix.filter.MultiCQKeyValueComparisonFilter.parseFrom(MultiCQKeyValueComparisonFilter.java:70)

                ... 17 more

Caused by: org.apache.hadoop.hbase.DoNotRetryIOException:
BooleanExpressionFilter failed during reading: Could not initialize class
org.apache.phoenix.util.DateUtil$ISODateFormatParser

                at
org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)

                at
org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:52)

                at
org.apache.phoenix.filter.BooleanExpressionFilter.readFields(BooleanExpressionFilter.java:108)

                at
org.apache.phoenix.filter.MultiKeyValueComparisonFilter.readFields(MultiKeyValueComparisonFilter.java:256)

                at
org.apache.hadoop.hbase.util.Writables.getWritable(Writables.java:131)

                at
org.apache.hadoop.hbase.util.Writables.getWritable(Writables.java:101)

                at
org.apache.phoenix.filter.MultiCQKeyValueComparisonFilter.parseFrom(MultiCQKeyValueComparisonFilter.java:68)

                ... 17 more

Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.apache.phoenix.util.DateUtil$ISODateFormatParser

                at
org.apache.phoenix.util.DateUtil$ISODateFormatParserFactory.getParser(DateUtil.java:255)

                at
org.apache.phoenix.util.DateUtil.getDateTimeParser(DateUtil.java:134)

                at
org.apache.phoenix.expression.function.ToDateFunction.init(ToDateFunction.java:69)

                at
org.apache.phoenix.expression.function.ToDateFunction.readFields(ToDateFunction.java:155)

                at
org.apache.phoenix.expression.BaseCompoundExpression.readFields(BaseCompoundExpression.java:110)

                at
org.apache.phoenix.expression.ComparisonExpression.readFields(ComparisonExpression.java:341)

                at
org.apache.phoenix.expression.BaseCompoundExpression.readFields(BaseCompoundExpression.java:110)

                at
org.apache.phoenix.expression.BaseCompoundExpression.readFields(BaseCompoundExpression.java:110)

                at
org.apache.phoenix.filter.BooleanExpressionFilter.readFields(BooleanExpressionFilter.java:106)


Regards,

Aravind

Mime
View raw message