Search in sources :

Example 1 with DseAggregateMetadata

use of com.datastax.dse.driver.api.core.metadata.schema.DseAggregateMetadata in project java-driver by datastax.

the class DseAggregateParser method parseAggregate.

public DseAggregateMetadata parseAggregate(AdminRow row, CqlIdentifier keyspaceId, Map<CqlIdentifier, UserDefinedType> userDefinedTypes) {
    AggregateMetadata aggregate = aggregateParser.parseAggregate(row, keyspaceId, userDefinedTypes);
    // parse the DSE extended columns
    final Boolean deterministic = row.contains("deterministic") ? row.getBoolean("deterministic") : null;
    return new DefaultDseAggregateMetadata(aggregate.getKeyspace(), aggregate.getSignature(), aggregate.getFinalFuncSignature().orElse(null), aggregate.getInitCond().orElse(null), aggregate.getReturnType(), aggregate.getStateFuncSignature(), aggregate.getStateType(), context.getCodecRegistry().codecFor(aggregate.getStateType()), deterministic);
}
Also used : DefaultDseAggregateMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseAggregateMetadata) AggregateMetadata(com.datastax.oss.driver.api.core.metadata.schema.AggregateMetadata) DseAggregateMetadata(com.datastax.dse.driver.api.core.metadata.schema.DseAggregateMetadata) DefaultDseAggregateMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseAggregateMetadata)

Aggregations

DseAggregateMetadata (com.datastax.dse.driver.api.core.metadata.schema.DseAggregateMetadata)1 DefaultDseAggregateMetadata (com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseAggregateMetadata)1 AggregateMetadata (com.datastax.oss.driver.api.core.metadata.schema.AggregateMetadata)1