private static List<String> functionArgumentsList(AbstractFunction fun) { return fun.argTypes() .stream() .map(AbstractType::asCQL3Type) .map(CQL3Type::toString) .collect(toList()); }
@Override public String columnNameCQL3(List<String> columnNames) { return new StrBuilder(name().toString()).append('(') .appendWithSeparators(columnNames.stream().map(c->ColumnIdentifier.maybeQuote(c)).toArray(String[]::new), ", ") .append(')') .toString(); } }
public final AssignmentTestable.TestResult testAssignment(String keyspace, ColumnSpecification receiver) { // We should ignore the fact that the receiver type is frozen in our comparison as functions do not support // frozen types for return type AbstractType<?> returnType = returnType(); if (receiver.type.isFreezable() && !receiver.type.isMultiCell()) returnType = returnType.freeze(); if (receiver.type.equals(returnType)) return AssignmentTestable.TestResult.EXACT_MATCH; if (receiver.type.isValueCompatibleWith(returnType)) return AssignmentTestable.TestResult.WEAKLY_ASSIGNABLE; return AssignmentTestable.TestResult.NOT_ASSIGNABLE; }
@Override public String columnName(List<String> columnNames) { return new StrBuilder(name().toString()).append('(') .appendWithSeparators(columnNames, ", ") .append(')') .toString(); } }
public final AssignmentTestable.TestResult testAssignment(String keyspace, ColumnSpecification receiver) { // We should ignore the fact that the receiver type is frozen in our comparison as functions do not support // frozen types for return type AbstractType<?> returnType = returnType(); if (receiver.type.isFreezable() && !receiver.type.isMultiCell()) returnType = returnType.freeze(); if (receiver.type.equals(returnType)) return AssignmentTestable.TestResult.EXACT_MATCH; if (receiver.type.isValueCompatibleWith(returnType)) return AssignmentTestable.TestResult.WEAKLY_ASSIGNABLE; return AssignmentTestable.TestResult.NOT_ASSIGNABLE; }
@Override public String columnName(List<String> columnNames) { return new StrBuilder(name().toString()).append('(') .appendWithSeparators(columnNames, ", ") .append(')') .toString(); } }
public final AssignmentTestable.TestResult testAssignment(String keyspace, ColumnSpecification receiver) { // We should ignore the fact that the receiver type is frozen in our comparison as functions do not support // frozen types for return type AbstractType<?> returnType = returnType(); if (receiver.type.isFreezable() && !receiver.type.isMultiCell()) returnType = returnType.freeze(); if (receiver.type.equals(returnType)) return AssignmentTestable.TestResult.EXACT_MATCH; if (receiver.type.isValueCompatibleWith(returnType)) return AssignmentTestable.TestResult.WEAKLY_ASSIGNABLE; return AssignmentTestable.TestResult.NOT_ASSIGNABLE; }
private static List<String> functionArgumentsList(AbstractFunction fun) { return fun.argTypes() .stream() .map(AbstractType::asCQL3Type) .map(CQL3Type::toString) .collect(toList()); }
@Override public String columnName(List<String> columnNames) { return new StrBuilder(name().toString()).append('(') .appendWithSeparators(columnNames, ", ") .append(')') .toString(); } }
public final AssignmentTestable.TestResult testAssignment(String keyspace, ColumnSpecification receiver) { // We should ignore the fact that the receiver type is frozen in our comparison as functions do not support // frozen types for return type AbstractType<?> returnType = returnType(); if (receiver.type.isFreezable() && !receiver.type.isMultiCell()) returnType = returnType.freeze(); if (receiver.type.equals(returnType)) return AssignmentTestable.TestResult.EXACT_MATCH; if (receiver.type.isValueCompatibleWith(returnType)) return AssignmentTestable.TestResult.WEAKLY_ASSIGNABLE; return AssignmentTestable.TestResult.NOT_ASSIGNABLE; }
private static List<String> functionArgumentsList(AbstractFunction fun) { return fun.argTypes() .stream() .map(AbstractType::asCQL3Type) .map(CQL3Type::toString) .collect(toList()); }
@Override public String columnName(List<String> columnNames) { return new StrBuilder(name().toString()).append('(') .appendWithSeparators(columnNames, ", ") .append(')') .toString(); }