[
https://issues.apache.org/jira/browse/DERBY-5466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14710287#comment-14710287
]
Rick Hillegas commented on DERBY-5466:
--------------------------------------
Hi Scott,
I think that it would be adequate to add a battery of tests for each of the new
aggregates to
java/testing/org/apache/derbyTesting/functionTests/tests/lang/AggBuiltinTest.java,
following the pattern for the old aggregates tested there. You'll want to test
both the grouped and ungrouped usages.
Instructions for running a Derby JUnit test can be found here:
http://wiki.apache.org/db-derby/DerbyJUnitTesting. Here's a script which runs
AggBuiltinTest standalone. You'll need to customize it for your environment:
{noformat}
#! /bin/bash
#
# Run a single derby junit test.
#
TEST_DIR=testRun
rm -rf $TEST_DIR
mkdir $TEST_DIR
cd $TEST_DIR
DERBY_TRUNK=/Users/rhillegas/derby/mainline/trunk
DERBY_JAR_DIR=$DERBY_TRUNK/tools/java
BUILT_JAR_DIR=$DERBY_TRUNK/jars/sane
for jarFile in $DERBY_JAR_DIR/*.jar
do
export CLASSPATH=$CLASSPATH:$jarFile
done
for jarFile in $BUILT_JAR_DIR/*
do
export CLASSPATH=$CLASSPATH:$jarFile
done
java -Xmx512m junit.textui.TestRunner
org.apache.derbyTesting.functionTests.tests.lang.AggBuiltinTest
{noformat}
Thanks for volunteering to write these tests.
-Rick
> Add support for SQL Standard statistics functions, such as STDDEV_POP,
> STDDEV_SAMP, VAR_POP, VAR_SAMP
> -----------------------------------------------------------------------------------------------------
>
> Key: DERBY-5466
> URL: https://issues.apache.org/jira/browse/DERBY-5466
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.8.1.2
> Reporter: Lukas Eder
> Priority: Minor
> Labels: derby_triage10_10
> Attachments: DERBY-5466.stats.patch,
> derby-5466-01-aa-aggregatorClasses.diff, derby-5466-02-aa-bindLogic.diff,
> derby-5466-02-ab-bindLogic.diff, derby-5466-03-aa-distinctError.diff,
> var_pop_formulas.txt
>
>
> Any of these RDBMS support the SQL standard statistics functions STDDEV_POP,
> STDDEV_SAMP, VAR_POP, VAR_SAMP:
> - DB2 (only STDDEV, VARIANE)
> - H2
> - HSQLDB
> - Ingres
> - MySQL
> - Oracle
> - Postgres
> - SQL Server (named STDEVP, STDEV, VARP, VAR)
> - Sybase ASE
> - Sybase SQL Anywhere
> These don't:
> - Derby
> - SQLite
> This would be a useful addition for Derby, I think.
> An even larger example list of possible statistics aggregate functions is
> listed in the Postgres documentation:
> http://www.postgresql.org/docs/9.0/static/functions-aggregate.html#FUNCTIONS-AGGREGATE-STATISTICS-TABLE
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)