94 lines
3 KiB
Diff
94 lines
3 KiB
Diff
--- misc/hsqldb/src/org/hsqldb/Expression.java 2008-05-27 17:15:05.000000000 +0200
|
|
+++ misc/build/hsqldb/src/org/hsqldb/Expression.java 2009-01-27 11:42:16.890625000 +0100
|
|
@@ -803,61 +803,62 @@
|
|
|
|
case EXISTS :
|
|
buf.append(' ').append(Token.T_EXISTS).append(' ');
|
|
- break;
|
|
+
|
|
+ return buf.toString();
|
|
|
|
case COUNT :
|
|
buf.append(' ').append(Token.T_COUNT).append('(');
|
|
- break;
|
|
+ if ( "(*)".equals(left))buf.append('*');else buf.append(left); buf.append(')'); return buf.toString();
|
|
|
|
case SUM :
|
|
buf.append(' ').append(Token.T_SUM).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
|
|
case MIN :
|
|
buf.append(' ').append(Token.T_MIN).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
|
|
case MAX :
|
|
buf.append(' ').append(Token.T_MAX).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
|
|
case AVG :
|
|
buf.append(' ').append(Token.T_AVG).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
|
|
case EVERY :
|
|
buf.append(' ').append(Token.T_EVERY).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
|
|
case SOME :
|
|
buf.append(' ').append(Token.T_SOME).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
|
|
case STDDEV_POP :
|
|
buf.append(' ').append(Token.T_STDDEV_POP).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
|
|
case STDDEV_SAMP :
|
|
buf.append(' ').append(Token.T_STDDEV_SAMP).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
|
|
case VAR_POP :
|
|
buf.append(' ').append(Token.T_VAR_POP).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
|
|
case VAR_SAMP :
|
|
buf.append(' ').append(Token.T_VAR_SAMP).append('(');
|
|
buf.append(left).append(')');
|
|
- break;
|
|
+ return buf.toString();
|
|
}
|
|
|
|
throw Trace.error(Trace.EXPRESSION_NOT_SUPPORTED);
|
|
@@ -1522,6 +1523,16 @@
|
|
if (exprType == COLUMN) {
|
|
return columnName;
|
|
}
|
|
+ if ( isAggregate(exprType) )
|
|
+ {
|
|
+ try
|
|
+ {
|
|
+ return getDDL();
|
|
+ }
|
|
+ catch(Exception e)
|
|
+ {
|
|
+ }
|
|
+ }
|
|
|
|
return "";
|
|
}
|