Support Questions

Find answers, ask questions, and share your expertise

HDP 3.0.1 - Error when selecting rows: : java.lang.IllegalArgumentException: bucket Id out of range: -1

Explorer

All is in the title 🙂

When I do a select count(*) .... or select distinct <field> ... for instance, no problem.
But a select * from..... or select <field> from.... fails with this error. Any clues??

I'm in Sandbox

3 REPLIES 3

Expert Contributor

Is this a managed or external table? If managed, do you have any files in the table that don't match 0000_0, 0000_0_copy_1 or bucket_0 pattern?

Explorer

@Eugene Koifman managed table. format of the 2 files in there (small table for test) is
part0-00000-0000-......-c000.snappy.orc and
part1-00000-0000-......-c000.snappy.orc

Btw, I'm not creating it in hive - but from spark in zeppelin.

Expert Contributor

The contents of a managed table should be manage by Hive, you cannot just write files there. To do that you have to use External table. To add data to a managed table you should use Insert or Load Data or some other Hive command, but not just drop files there.