예제 #1
0
        protected override bool CanGenerateColumnar()
        {
            var typeOfTKey    = typeof(TKey);
            var typeOfTInput  = typeof(TInput);
            var typeOfTOutput = typeof(TOutput);

            if (!typeOfTInput.CanRepresentAsColumnar())
            {
                return(false);
            }
            if (typeOfTKey.GetPartitionType() != null)
            {
                return(false);
            }
            if (!typeOfTOutput.CanRepresentAsColumnar())
            {
                return(false);
            }

            var lookupKey = CacheKey.Create(this.apt, GetAggregateFunctionsHashCode(this.Aggregate));

            var tuple             = cachedPipes.GetOrAdd(lookupKey, key => AggregateTemplate.Generate(this, this.apt));
            var generatedPipeType = tuple.Item1;

            this.errorMessages = tuple.Item2;

            return(generatedPipeType != null);
        }
예제 #2
0
        private Tuple <Type, string> GetPipe()
        {
            var lookupKey = CacheKey.Create(this.apt, GetAggregateFunctionsHashCode(this.Aggregate));

            var tuple = cachedPipes.GetOrAdd(lookupKey, key => AggregateTemplate.Generate(this, this.apt));

            return(tuple);
        }