Description
I ran into this trying to add a Date type field to nifi-kudu-controller-service (https://issues.apache.org/jira/browse/NIFI-7551). The following code throws java.lang.IllegalArgumentException if sql_date column is defined as DATE and value is either java.sql.Date or int
KuduPredicate.newComparisonPredicate(tableSchema.getColumn("sql_date"), KuduPredicate.ComparisonOp.EQUAL, value)
If value is DATE, IllegalArgumentException is thrown by this code in KuduPredicate class:
static long minIntValue(Type type) {
switch (type)
}
if value is an integer, then IllegalArgumentException is thrown by this code
public static KuduPredicate newComparisonPredicate(ColumnSchema column, ComparisonOp op, long value) { checkColumn(column, Type.INT8, Type.INT16, Type.INT32, Type.INT64, Type.UNIXTIME_MICROS, Type.DATE);
as a result, if you have a table with DATE column, you cannot scan for it using the java client.