You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2015/06/13 02:38:07 UTC
[3/7] incubator-calcite git commit: Test case for [CALCITE-754]
Validator error when resolving OVER clause of JOIN query (Hsuan-Yi Chu)
Test case for [CALCITE-754] Validator error when resolving OVER clause of JOIN query (Hsuan-Yi Chu)
Close apache/incubator-calcite#93
Project: http://git-wip-us.apache.org/repos/asf/incubator-calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/ebce955d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-calcite/tree/ebce955d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-calcite/diff/ebce955d
Branch: refs/heads/master
Commit: ebce955d700602720882aa01b6ddead9ab10bde0
Parents: 4cc539f
Author: Hsuan-Yi Chu <hs...@usc.edu>
Authored: Mon Jun 8 15:04:54 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu Jun 11 23:10:30 2015 -0700
----------------------------------------------------------------------
.../org/apache/calcite/test/SqlValidatorTest.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/ebce955d/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java b/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
index 2bf64c7..4b7c1f8 100644
--- a/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
+++ b/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
@@ -4259,6 +4259,22 @@ public class SqlValidatorTest extends SqlValidatorTestCase {
"Column 'HIREDATE' not found in any table");
}
+ /** Test case for
+ * <a href="https://issues.apache.org/jira/browse/CALCITE-754">[CALCITE-754]
+ * Validator error when resolving OVER clause of JOIN query</a>. */
+ @Ignore
+ @Test public void testPartitionByColumnInJoinAlias() {
+ sql("select sum(1) over(partition by t1.ename) \n"
+ + "from emp t1, emp t2")
+ .ok();
+ sql("select sum(1) over(partition by emp.ename) \n"
+ + "from emp, dept")
+ .ok();
+ sql("select sum(1) over(partition by ^deptno^) \n"
+ + "from emp, dept")
+ .fails("Column 'DEPTNO' is ambiguous");
+ }
+
@Test public void testWindowNegative() {
// Do not fail when window has negative size. Allow
final String negSize = null;