Thanks for the quick reply Gopal. - We are using same versions for CLI and HS2 2.1.1 - COUNT(build) gave the same error.
Any other ideas? Regards, Pratik On Mon, Apr 24, 2017 at 3:36 PM Gopal Vijayaraghavan <gop...@apache.org> wrote: > > > But on Hue or JDBC interface to Hive Server 2, the following error > occurs while SELECT querying the view. > > You should be getting identical errors for HS2 and CLI, so that suggests > you might be running different CLI and HS2 versions. > > > SELECT COUNT(1) FROM pk_test where ds='2017-04-20'; > > > org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveRelFieldTrimmer.trimFields(org.apache.calcite.rel.core.Project,org.apache.calcite.util.ImmutableBitSet,java.util.Set)' > … > > Does anyone know whats going on here? > > My guess is that the CBO fieldtrimmer is getting confused that we're > reading 0 columns from a partitioned table. > > Try doing > > SELECT COUNT(build) from pk_test where ds='2017-04-20'; > > If that works, but the count(1) fails - then we can dig a bit deeper into > the problem. > > Cheers, > Gopal > > >