This may be from traveling all day, but I am running the query below and
the error, I think it should work with the subquery, but yet, it is
failing. This is via JDBC
select date_part('year', s.cdate) as ydate from (
select
to_date(createdon, 'yyyy-MM-dd HH:mm:ss') as `cdate`, count(*) as
num_creates
from
view_mytable
where
createdon <> '0000-00-00 00:00:00' and createdon >= '2010-01-10'
group by
to_date(createdon, 'yyyy-MM-dd HH:mm:ss')
order by cdate ASC
) s limit 100
SYSTEM ERROR: AssertionError: Internal error: Type 'RecordType(ANY $f0,
BIGINT num_creates)' has no field 'cdate'
[Error Id: 50caacaf-0b9b-4c1c-a3e1-53248bc385c0 on
hadoopmapr6.brewingintel.com:31010]
It's like my alias for the grouped field isn't actually taking.... this
seems odd to me, or am I just really doing something weird here?