@Override public Boolean visit(KeyValueColumnExpression node) { try { this.position = table.getColumnFamily(node.getColumnFamily()).getPColumnForColumnQualifier(node.getColumnQualifier()).getPosition(); } catch (SQLException e) { throw new RuntimeException(e); // Impossible } return Boolean.TRUE; }
private Void addDataColInfo(final PTable dataTable, Expression expression) { Preconditions.checkArgument(expression instanceof SingleCellColumnExpression || expression instanceof KeyValueColumnExpression); KeyValueColumnExpression colExpression = null; if (expression instanceof SingleCellColumnExpression) { colExpression = ((SingleCellColumnExpression) expression).getKeyValueExpression(); } else { colExpression = ((KeyValueColumnExpression) expression); } byte[] cf = colExpression.getColumnFamily(); byte[] cq = colExpression.getColumnQualifier(); try { PColumn dataColumn = cf == null ? dataTable.getColumnForColumnQualifier(null, cq) : dataTable.getColumnFamily(cf) .getPColumnForColumnQualifier(cq); indexedColumnsInfo.add(new Pair<>(dataColumn.getFamilyName() .getString(), dataColumn.getName().getString())); } catch (ColumnNotFoundException | ColumnFamilyNotFoundException | AmbiguousColumnException e) { throw new RuntimeException(e); } return null; } };
PColumn column = family.getPColumnForColumnQualifier(cq); Integer maxLength = column.getMaxLength(); int byteSize = column.getDataType().isFixedWidth() ? maxLength == null ? column.getDataType().getByteSize() : maxLength : RowKeySchema.ESTIMATED_VARIABLE_LENGTH_SIZE;
if (Bytes.compareTo(emptyKVQualifier, cq) != 0) { try { PColumn dataColumn = family.getPColumnForColumnQualifier(cq); PColumn indexColumn = indexTable.getColumnForColumnName(IndexUtil.getIndexColumnName(family.getName().getString(), dataColumn.getName().getString())); ptr.set(kv.getValueArray(),kv.getValueOffset(),kv.getValueLength());
@Override public Boolean visit(KeyValueColumnExpression node) { try { this.position = table.getColumnFamily(node.getColumnFamily()).getPColumnForColumnQualifier(node.getColumnQualifier()).getPosition(); } catch (SQLException e) { throw new RuntimeException(e); // Impossible } return Boolean.TRUE; }
@Override public Boolean visit(KeyValueColumnExpression node) { try { this.position = table.getColumnFamily(node.getColumnFamily()).getPColumnForColumnQualifier(node.getColumnQualifier()).getPosition(); } catch (SQLException e) { throw new RuntimeException(e); // Impossible } return Boolean.TRUE; }
private Void addDataColInfo(final PTable dataTable, Expression expression) { Preconditions.checkArgument(expression instanceof SingleCellColumnExpression || expression instanceof KeyValueColumnExpression); KeyValueColumnExpression colExpression = null; if (expression instanceof SingleCellColumnExpression) { colExpression = ((SingleCellColumnExpression) expression).getKeyValueExpression(); } else { colExpression = ((KeyValueColumnExpression) expression); } byte[] cf = colExpression.getColumnFamily(); byte[] cq = colExpression.getColumnQualifier(); try { PColumn dataColumn = cf == null ? dataTable.getColumnForColumnQualifier(null, cq) : dataTable.getColumnFamily(cf) .getPColumnForColumnQualifier(cq); indexedColumnsInfo.add(new Pair<>(dataColumn.getFamilyName() .getString(), dataColumn.getName().getString())); } catch (ColumnNotFoundException | ColumnFamilyNotFoundException | AmbiguousColumnException e) { throw new RuntimeException(e); } return null; } };
private Void addDataColInfo(final PTable dataTable, Expression expression) { Preconditions.checkArgument(expression instanceof SingleCellColumnExpression || expression instanceof KeyValueColumnExpression); KeyValueColumnExpression colExpression = null; if (expression instanceof SingleCellColumnExpression) { colExpression = ((SingleCellColumnExpression) expression).getKeyValueExpression(); } else { colExpression = ((KeyValueColumnExpression) expression); } byte[] cf = colExpression.getColumnFamily(); byte[] cq = colExpression.getColumnQualifier(); try { PColumn dataColumn = cf == null ? dataTable.getColumnForColumnQualifier(null, cq) : dataTable.getColumnFamily(cf) .getPColumnForColumnQualifier(cq); indexedColumnsInfo.add(new Pair<>(dataColumn.getFamilyName() .getString(), dataColumn.getName().getString())); } catch (ColumnNotFoundException | ColumnFamilyNotFoundException | AmbiguousColumnException e) { throw new RuntimeException(e); } return null; } };
PColumn column = family.getPColumnForColumnQualifier(cq); Integer maxLength = column.getMaxLength(); int byteSize = column.getDataType().isFixedWidth() ? maxLength == null ? column.getDataType().getByteSize() : maxLength : RowKeySchema.ESTIMATED_VARIABLE_LENGTH_SIZE;
PColumn column = family.getPColumnForColumnQualifier(cq); Integer maxLength = column.getMaxLength(); int byteSize = column.getDataType().isFixedWidth() ? maxLength == null ? column.getDataType().getByteSize() : maxLength : RowKeySchema.ESTIMATED_VARIABLE_LENGTH_SIZE;