private SelectorFactories(List<Selectable> selectables, List<AbstractType<?>> expectedTypes, CFMetaData cfm, List<ColumnDefinition> defs, VariableSpecifications boundNames) throws InvalidRequestException { factories = new ArrayList<>(selectables.size()); for (int i = 0; i < selectables.size(); i++) { Selectable selectable = selectables.get(i); AbstractType<?> expectedType = expectedTypes == null ? null : expectedTypes.get(i); Factory factory = selectable.newSelectorFactory(cfm, expectedType, defs, boundNames); containsWritetimeFactory |= factory.isWritetimeSelectorFactory(); containsTTLFactory |= factory.isTTLSelectorFactory(); if (factory.isAggregateSelectorFactory()) ++numberOfAggregateFactories; factories.add(factory); } }
private SelectorFactories(List<Selectable> selectables, List<AbstractType<?>> expectedTypes, CFMetaData cfm, List<ColumnDefinition> defs, VariableSpecifications boundNames) throws InvalidRequestException { factories = new ArrayList<>(selectables.size()); for (int i = 0; i < selectables.size(); i++) { Selectable selectable = selectables.get(i); AbstractType<?> expectedType = expectedTypes == null ? null : expectedTypes.get(i); Factory factory = selectable.newSelectorFactory(cfm, expectedType, defs, boundNames); containsWritetimeFactory |= factory.isWritetimeSelectorFactory(); containsTTLFactory |= factory.isTTLSelectorFactory(); if (factory.isAggregateSelectorFactory()) ++numberOfAggregateFactories; factories.add(factory); } }
private SelectorFactories(List<Selectable> selectables, List<AbstractType<?>> expectedTypes, CFMetaData cfm, List<ColumnDefinition> defs, VariableSpecifications boundNames) throws InvalidRequestException { factories = new ArrayList<>(selectables.size()); for (int i = 0; i < selectables.size(); i++) { Selectable selectable = selectables.get(i); AbstractType<?> expectedType = expectedTypes == null ? null : expectedTypes.get(i); Factory factory = selectable.newSelectorFactory(cfm, expectedType, defs, boundNames); containsWritetimeFactory |= factory.isWritetimeSelectorFactory(); containsTTLFactory |= factory.isTTLSelectorFactory(); if (factory.isAggregateSelectorFactory()) ++numberOfAggregateFactories; factories.add(factory); } }
public Selector.Factory newSelectorFactory(CFMetaData cfm, AbstractType<?> expectedType, List<ColumnDefinition> defs, VariableSpecifications boundNames) { Selector.Factory factory = selected.newSelectorFactory(cfm, null, defs, boundNames); AbstractType<?> type = factory.getColumnSpecification(cfm).type; if (!type.isUDT()) { throw new InvalidRequestException( String.format("Invalid field selection: %s of type %s is not a user type", selected, type.asCQL3Type())); } UserType ut = (UserType) type; int fieldIndex = ut.fieldPosition(field); if (fieldIndex == -1) { throw new InvalidRequestException(String.format("%s of type %s has no field %s", selected, type.asCQL3Type(), field)); } return FieldSelector.newFactory(ut, fieldIndex, factory); }
public Selector.Factory newSelectorFactory(CFMetaData cfm, AbstractType<?> expectedType, List<ColumnDefinition> defs, VariableSpecifications boundNames) { Selector.Factory factory = selected.newSelectorFactory(cfm, null, defs, boundNames); AbstractType<?> type = factory.getColumnSpecification(cfm).type; if (!type.isUDT()) { throw new InvalidRequestException( String.format("Invalid field selection: %s of type %s is not a user type", selected, type.asCQL3Type())); } UserType ut = (UserType) type; int fieldIndex = ut.fieldPosition(field); if (fieldIndex == -1) { throw new InvalidRequestException(String.format("%s of type %s has no field %s", selected, type.asCQL3Type(), field)); } return FieldSelector.newFactory(ut, fieldIndex, factory); }
public Selector.Factory newSelectorFactory(CFMetaData cfm, AbstractType<?> expectedType, List<ColumnDefinition> defs, VariableSpecifications boundNames) { Selector.Factory factory = selected.newSelectorFactory(cfm, null, defs, boundNames); AbstractType<?> type = factory.getColumnSpecification(cfm).type; if (!type.isUDT()) { throw new InvalidRequestException( String.format("Invalid field selection: %s of type %s is not a user type", selected, type.asCQL3Type())); } UserType ut = (UserType) type; int fieldIndex = ut.fieldPosition(field); if (fieldIndex == -1) { throw new InvalidRequestException(String.format("%s of type %s has no field %s", selected, type.asCQL3Type(), field)); } return FieldSelector.newFactory(ut, fieldIndex, factory); }