Questions tagged [user-defined-aggregate]

38 questions
0
votes
1 answer

Updating column by calculation in cassandra

I am trying to add a new column in cassandra table to aid in some client side operations. The table is already there, and it has data in it. The primary key is a bigint. The idea is to add a column on the table that would create domains of the…
0
votes
2 answers

Creating User defined aggregation for SQL

Here’s a sample of what I have in mind. When you query tbl with the aggregation function you should be this Result Tally Agregation function Table: tbl Tag length abc 8 cde 8 fgh 10 …
0
votes
1 answer

Aggregates in PostgreSQL

Write an aggregate to count the number of times the number 40 is seen in a column. Use your aggregate to count the number of 40 year olds in the directory table. This is what I was doing: Create function aggstep(curr int) returns int as $$ begin …
Sean
  • 11
  • 3
0
votes
1 answer

Rounding error with SQL CLR extension (user-defined aggregate)

I'm writing some custom .Net extensions for SQL Server 2008. One of them is a user-defined aggregate that should aggregate a set of decimal numbers to a decimal value. To narrow down my problem, I'm using a simple Const aggregate, that simply…
jeroenh
  • 26,362
  • 10
  • 73
  • 104
0
votes
1 answer

Wrong result of user defined aggregate in SQL Server

I have been trying to create custom aggregate function in SQL Server. I finally got it working (wrote assembly in C#). The goal is to concatenate all strings within a group, but the result is empty string. Here is my class in…
Michał Turczyn
  • 32,028
  • 14
  • 47
  • 69
0
votes
1 answer

Spark UDAF generics type mismatch

I'm trying to create an UDAF on Spark (2.0.1, Scala 2.11) as below. This is to essentially aggregates tuples and output a Map import org.apache.spark.sql.expressions._ import org.apache.spark.sql.types._ import…
mrbrahman
  • 455
  • 5
  • 18
0
votes
0 answers

cassandra aggregate query timeout

I am new to Cassandra and running User-defined Aggregate on a Cassandra 3-node cluster on local machine. Issue is that when i am running this aggregate on a smaller data set, result is fine and as expected. But when data is too large, query fails…
0
votes
2 answers

SQLCLR custom aggregate with multiple parameters

I have trouble understanding of how CLR User-Defined Aggregates work. I have to create some custom CLR aggregates with multiple parameters. The point is to get the value of the first parameter depending on the second. For example, I have the…
1 2
3