Oracle支持Sample Clause

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@149 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-05-19 15:47:07 +00:00
parent e13df989bb
commit 7cf8fbfa9c
3 changed files with 7 additions and 1 deletions
@@ -1468,8 +1468,9 @@ public class OracleOutputVisitor extends SQLASTOutputVisitor implements OracleAS
print(")");
if (x.getSeedValue() != null) {
print(" SEED ");
print(" SEED (");
x.getSeedValue().accept(this);
print(")");
}
return false;
@@ -24,6 +24,7 @@ public class OracleSQLParserResourceTest extends TestCase {
exec_test("bvt/parser/oracle-5.txt");
//exec_test("bvt/parser/oracle-6.txt"); PARTITION
exec_test("bvt/parser/oracle-7.txt");
exec_test("bvt/parser/oracle-8.txt");
}
@@ -0,0 +1,4 @@
SELECT COUNT(*) * 10 FROM orders SAMPLE(10) SEED (1);
---------------------------
SELECT COUNT(*) * 10
FROM orders SAMPLE (10) SEED (1);