When loading data into HBase with HBaseStorage, there is unexpected behavior regarding record schema and casting.
Here is the relevant code snippet:
At this point the schema for C is unknown, so I declare a schema with a foreach statement
Even though I've declared C.$4 as an int, it is still a long (from the COUNT). When I go to insert into HBase I get a ClassCastException since the schema (int) does not match the actual tuple value (long). I can fix this by explicitly casting when I declare the schema.
Is this expected behavior? If not, is this an HBaseStorage issue - not honoring the schema before going off casting things?