public Format getFormatter(PDataType type) { return connection.getFormatter(type); }
private void verifyTimeZoneIDWithConn(PhoenixConnection conn, PDataType dataType, String timeZoneId) { Format formatter = conn.getFormatter(dataType); verifyTimeZoneIDWithFormatter(formatter, timeZoneId); }
private void appendPKColumnValue(StringBuilder buf, byte[] range, Boolean isNull, int slotIndex, boolean changeViewIndexId) { if (Boolean.TRUE.equals(isNull)) { buf.append("null"); return; } if (Boolean.FALSE.equals(isNull)) { buf.append("not null"); return; } if (range.length == 0) { buf.append('*'); return; } ScanRanges scanRanges = context.getScanRanges(); PDataType type = scanRanges.getSchema().getField(slotIndex).getDataType(); SortOrder sortOrder = tableRef.getTable().getPKColumns().get(slotIndex).getSortOrder(); if (sortOrder == SortOrder.DESC) { buf.append('~'); ImmutableBytesWritable ptr = new ImmutableBytesWritable(range); type.coerceBytes(ptr, type, sortOrder, SortOrder.getDefault()); range = ptr.get(); } if (changeViewIndexId) { buf.append(getViewIndexValue(type, range).toString()); } else { Format formatter = context.getConnection().getFormatter(type); buf.append(type.toStringLiteral(range, formatter)); } }
public Format getFormatter(PDataType type) { return connection.getFormatter(type); }
public Format getFormatter(PDataType type) { return connection.getFormatter(type); }
buf.append(s.toString()); } else { Format formatter = context.getConnection().getFormatter(type); buf.append(type.toStringLiteral(range, formatter));
private void appendPKColumnValue(StringBuilder buf, byte[] range, Boolean isNull, int slotIndex, boolean changeViewIndexId) { if (Boolean.TRUE.equals(isNull)) { buf.append("null"); return; } if (Boolean.FALSE.equals(isNull)) { buf.append("not null"); return; } if (range.length == 0) { buf.append('*'); return; } ScanRanges scanRanges = context.getScanRanges(); PDataType type = scanRanges.getSchema().getField(slotIndex).getDataType(); SortOrder sortOrder = tableRef.getTable().getPKColumns().get(slotIndex).getSortOrder(); if (sortOrder == SortOrder.DESC) { buf.append('~'); ImmutableBytesWritable ptr = new ImmutableBytesWritable(range); type.coerceBytes(ptr, type, sortOrder, SortOrder.getDefault()); range = ptr.get(); } if (changeViewIndexId) { buf.append(getViewIndexValue(type, range).toString()); } else { Format formatter = context.getConnection().getFormatter(type); buf.append(type.toStringLiteral(range, formatter)); } }