Permalink
Browse files

check for null input in fromcassandrabag

  • Loading branch information...
1 parent aa3f492 commit e450d75d52fb3356975a79cc2f041fcabb321b47 @thedatachef thedatachef committed Sep 13, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 udf/src/main/java/org/pygmalion/udf/FromCassandraBag.java
@@ -46,6 +46,8 @@ public Tuple exec(Tuple input) throws IOException {
// Size must be two (column_selector,cassandra_bag)
if (input == null || input.size() < 2)
throw new IOException("Invalid input. Please pass in both a list of column names and the columns themselves.");
+ if (input.isNull(0) || input.isNull(1))
+ return null;
String columnSelector = input.get(0).toString();
DataBag cassandraBag = (DataBag)input.get(1);

0 comments on commit e450d75

Please sign in to comment.