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 2017/06/19 00:28:55 UTC
[4/4] calcite git commit: Fix for Windows
Fix for Windows
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/395d3791
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/395d3791
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/395d3791
Branch: refs/heads/master
Commit: 395d379127c7407827246614bd61253152c15805
Parents: e57c737
Author: Julian Hyde <jh...@apache.org>
Authored: Thu May 25 17:58:38 2017 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Sun Jun 18 17:23:21 2017 -0700
----------------------------------------------------------------------
core/src/test/java/org/apache/calcite/util/SourceTest.java | 5 ++++-
pig/pom.xml | 5 +++++
.../java/org/apache/calcite/test/PigRelBuilderStyleTest.java | 8 ++++++++
3 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/395d3791/core/src/test/java/org/apache/calcite/util/SourceTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/util/SourceTest.java b/core/src/test/java/org/apache/calcite/util/SourceTest.java
index 142543b..8473c36 100644
--- a/core/src/test/java/org/apache/calcite/util/SourceTest.java
+++ b/core/src/test/java/org/apache/calcite/util/SourceTest.java
@@ -18,6 +18,8 @@ package org.apache.calcite.util;
import org.junit.Test;
+import java.io.File;
+
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
@@ -29,7 +31,8 @@ public class SourceTest {
final Source foo = Sources.file(null, "/foo");
final Source bar = Sources.file(null, "bar");
final Source fooBar = foo.append(bar);
- assertThat(fooBar.file().toString(), is("/foo/bar"));
+ assertThat(fooBar.file().toString(),
+ is("/foo/bar".replace('/', File.separatorChar)));
}
@Test public void testRelative() {
http://git-wip-us.apache.org/repos/asf/calcite/blob/395d3791/pig/pom.xml
----------------------------------------------------------------------
diff --git a/pig/pom.xml b/pig/pom.xml
index fbf5e07..b07e8f4 100644
--- a/pig/pom.xml
+++ b/pig/pom.xml
@@ -98,6 +98,11 @@ limitations under the License.
<artifactId>pigunit</artifactId>
</dependency>
<dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/calcite/blob/395d3791/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java
----------------------------------------------------------------------
diff --git a/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java b/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java
index c75a8ae..583b441 100644
--- a/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java
+++ b/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java
@@ -42,14 +42,18 @@ import org.apache.pig.pigunit.PigTest;
import org.apache.pig.test.Util;
import org.junit.After;
+import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
+import java.io.File;
+
import static org.apache.calcite.rel.rules.FilterJoinRule.TRUE_PREDICATE;
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.EQUALS;
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.GREATER_THAN;
+import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertEquals;
/**
@@ -59,6 +63,10 @@ import static org.junit.Assert.assertEquals;
*/
public class PigRelBuilderStyleTest extends AbstractPigTest {
+ public PigRelBuilderStyleTest() {
+ Assume.assumeThat("Pigs don't like Windows", File.separatorChar, is('/'));
+ }
+
@Test
public void testScanAndFilter() throws Exception {
final SchemaPlus schema = createTestSchema();