phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystal (JIRA)" <>
Subject [jira] [Created] (PHOENIX-970) COUNT function against character column fails with "cast function for type BIT is not defined"
Date Mon, 05 May 2014 22:23:14 GMT
Krystal created PHOENIX-970:

             Summary: COUNT function against character column fails with "cast function for
type BIT is not defined"
                 Key: PHOENIX-970
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 1.0
            Reporter: Krystal

The following query failed:
select count(distinct(name)) from voter;

2014-05-05 14:59:18 INFO  DrillTestBase:191 - Query dispatch start time: 2014/05/05 14:59:18.0018
java.sql.SQLException: exception while executing query
	at net.hydromatic.avatica.Helper.createException(
	at net.hydromatic.avatica.AvaticaConnection.executeQueryInternal(
	at net.hydromatic.avatica.AvaticaStatement.executeQueryInternal(
	at net.hydromatic.avatica.AvaticaStatement.executeQuery(
	at org.apache.drill.test.framework.GenericQueryDispatcher.dispatchQueryJDBC(
	at org.apache.drill.test.framework.DrillTestBase$
Caused by: java.sql.SQLException: Failure while trying to get next result batch.
	at org.apache.drill.jdbc.DrillResultSet.execute(
	at org.apache.drill.jdbc.DrillResultSet.execute(
	at net.hydromatic.avatica.AvaticaConnection.executeQueryInternal(
	... 4 more

Explicitly cast the "name" column to a varchar (select count(distinct(cast(name as varchar(25))))
from voter;) gave the same error.

Also, casting an integer column to a varchar with count resulted in the same error:
select count(cast(age as varchar(5))) from student;
Failure while running fragment. < RuntimeException:[ cast function for type BIT is not

This message was sent by Atlassian JIRA

View raw message