5a6ca94c30
add gcj support add libreoffice patches [release 1.8.0.10-3mamba;Thu Jan 27 2011]
92 lines
2.9 KiB
Diff
92 lines
2.9 KiB
Diff
--- src/org/hsqldb/Expression.java 2010-06-23 14:49:25.000000000 +0200
|
|
+++ src/org/hsqldb/Expression.java-gil 2011-01-29 09:04:33.000000000 +0100
|
|
@@ -808,11 +808,12 @@
|
|
|
|
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('(');
|
|
@@ -822,47 +823,47 @@
|
|
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);
|
|
@@ -1527,6 +1528,16 @@
|
|
if (exprType == COLUMN) {
|
|
return columnName;
|
|
}
|
|
+ if ( isAggregate(exprType) )
|
|
+ {
|
|
+ try
|
|
+ {
|
|
+ return getDDL();
|
|
+ }
|
|
+ catch(Exception e)
|
|
+ {
|
|
+ }
|
|
+ }
|
|
|
|
return "";
|
|
}
|