@Override public boolean isNull(int field) { int mappedField = mapping(field); return mappedField >= 0 && currentRow.isNull(mappedField); }
public static Object getObject(Type type, RowResult row, int field) if (row.isNull(field)) { return null;
if (result.isNull(pci.index)) { continue;
if (result.isNull(jpaColumnName))
@Override public boolean isNull(int field) { int mappedField = mapping(field); return mappedField >= 0 && currentRow.isNull(mappedField); }
@Override public boolean isNull(int field) { int mappedField = mapping(field); return mappedField >= 0 && currentRow.isNull(mappedField); }
/** * Get if the specified column is NULL * @param columnName name of the column in the schema * @return true if the column cell is null and the column is nullable, * false otherwise * @throws IndexOutOfBoundsException if the column doesn't exist */ public boolean isNull(String columnName) { return isNull(this.schema.getColumnIndex(columnName)); }
@Override public Object call(RowResultIterator arg) throws Exception { if (arg == null) return null; for (RowResult row : arg) { if (row.isNull(3)) { ai.incrementAndGet(); } } return null; } };
/** * @throws IllegalArgumentException if the column is null */ private void checkNull(int columnIndex) { if (!schema.hasNullableColumns()) { return; } if (isNull(columnIndex)) { ColumnSchema columnSchema = schema.getColumnByIndex(columnIndex); throw new IllegalArgumentException("The requested column (name: " + columnSchema.getName() + ", index: " + columnIndex + ") is null"); } }
private static CINode getCINode(RowResult result, CINode node) { node.key = getStringFromKeys(result.getLong(0), result.getLong(1)); if (result.isNull(2) || result.isNull(3)) { node.prev = "NO_REFERENCE"; } else { node.prev = getStringFromKeys(result.getLong(2), result.getLong(3)); } node.rowId = result.getInt(4); node.client = result.getString(5); node.updateCount = result.getInt(6); return node; }
private void walk(long headKeyOne, long headKeyTwo, int maxNumNodes) throws KuduException { CommandLineParser parser = new CommandLineParser(getConf()); client = parser.getClient(); table = client.openTable(getTableName(getConf())); long prevKeyOne = headKeyOne; long prevKeyTwo = headKeyTwo; CINode node = new CINode(); int nodesCount = 0; do { RowResult rr = nextNode(prevKeyOne, prevKeyTwo); if (rr == null) { System.err.println(getStringFromKeys(prevKeyOne, prevKeyTwo) + " doesn't exist!"); break; } getCINode(rr, node); printCINodeString(node); if (rr.isNull(2) || rr.isNull(3)) { System.err.println("Last node didn't have a reference, breaking"); break; } prevKeyOne = rr.getLong(2); prevKeyTwo = rr.getLong(3); nodesCount++; } while ((headKeyOne != prevKeyOne && headKeyTwo != prevKeyTwo) && (nodesCount < maxNumNodes)); }
if (isNull(i)) { buf.append("NULL"); } else {
@Override protected void map(NullWritable key, RowResult value, Mapper.Context context) throws IOException, InterruptedException { Bytes.setLong(rowKey, value.getLong(0)); Bytes.setLong(rowKey, value.getLong(1), 8); row.set(rowKey, 0, rowKey.length); // Emit that the row is defined context.write(row, DEF); if (value.isNull(2)) { LOG.warn(String.format("Prev is not set for: %s", Bytes.pretty(rowKey))); } else { Bytes.setLong(prev, value.getLong(2)); Bytes.setLong(prev, value.getLong(3), 8); ref.set(prev, 0, prev.length); // Emit which row is referenced by this row. context.write(ref, row); } } }
for (String aColumnName : columnsUsed) { ColumnSchema schemaForThisColumn = tableSchema.get(aColumnName); if (aRow.isNull(aColumnName)) { continue;
String columnName = columnSchema.getName(); if (result.isNull(columnName)) { values.add(null); continue;
public static Object getObject(Type type, RowResult row, int field) { if (row.isNull(field)) { return null; } else {
public static Object getObject(Type type, RowResult row, int field) if (row.isNull(field)) { return null;
for (int i = 0; i < columns.size(); i++) { String name = schema.getColumnByIndex(i).getName(); if(row.isNull(i)) { values.setField(i, name, null); } else {