Hello,

I have created a regular view on a partitioned table. The view CREATION and
SELECT query works fine on Hive CLI.

hive> CREATE VIEW pk_test
PARTITIONED ON (ds)
  AS SELECT build, ds
  FROM agg_build;

But on Hue or JDBC interface to Hive Server 2, the following error occurs
while SELECT querying the view.

*Hue UI*:
SELECT COUNT(1) FROM pk_test where ds='2017-04-20';


   - Error running query: java.lang.AssertionError: Internal error: While
   invoking method 'public
   org.apache.calcite.sql2rel.RelFieldTrimmer$TrimResult
   
org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveRelFieldTrimmer.trimFields(org.apache.calcite.rel.core.Project,org.apache.calcite.util.ImmutableBitSet,java.util.Set)'


This error is only pertaining to partitioned views. Also when i check the
created view definition in hive cli, it does not show the partition column.

hive> SHOW CREATE TABLE pk_test;
CREATE VIEW `pk_test` AS SELECT `agg_build`.`build`, `agg_build`.`ds` from
`agg_build`;

Does anyone know whats going on here?

Thanks,
Pratik

Reply via email to