private void setResult(int i, VectorizedRowBatch b) { // get arguments for (int j = 0; j < argDescs.length; j++) { deferredChildren[j] = argDescs[j].getDeferredJavaObject(i, b, j, writers); } // call function Object result; try { result = genericUDF.evaluate(deferredChildren); } catch (HiveException e) { /* For UDFs that expect primitive types (like int instead of Integer or IntWritable), * this will catch the the exception that happens if they are passed a NULL value. * Then the default NULL handling logic will apply, and the result will be NULL. */ result = null; } // set output column vector entry if (result == null) { b.cols[outputColumn].noNulls = false; b.cols[outputColumn].isNull[i] = true; } else { b.cols[outputColumn].isNull[i] = false; setOutputCol(b.cols[outputColumn], i, result); } }
private void setResult(int i, VectorizedRowBatch b) { // get arguments for (int j = 0; j < argDescs.length; j++) { deferredChildren[j] = argDescs[j].getDeferredJavaObject(i, b, j, writers); } // call function Object result; try { result = genericUDF.evaluate(deferredChildren); } catch (HiveException e) { /* For UDFs that expect primitive types (like int instead of Integer or IntWritable), * this will catch the the exception that happens if they are passed a NULL value. * Then the default NULL handling logic will apply, and the result will be NULL. */ result = null; } // set output column vector entry if (result == null) { b.cols[outputColumn].noNulls = false; b.cols[outputColumn].isNull[i] = true; } else { b.cols[outputColumn].isNull[i] = false; setOutputCol(b.cols[outputColumn], i, result); } }