Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

Commit 7caa05a

Browse files
committed
Merge branch 'release/0.9.1'
2 parents 7d44263 + e49bc85 commit 7caa05a

File tree

6 files changed

+96
-4
lines changed

6 files changed

+96
-4
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Summingbird #
22

3+
## 0.9.1
4+
* Fixes a bug in the LTuple2 class. Add a test for it: https://github.com/twitter/summingbird/pull/632
5+
36
## 0.9.0
47
* Removing internal config setup from scalding platform: https://github.com/twitter/summingbird/pull/629
58
* Remove store that no one seems to use and has no tests: https://github.com/twitter/summingbird/pull/630

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Please feel free to use the beautiful [Summingbird logo](https://drive.google.co
108108

109109
## Maven
110110

111-
Summingbird modules are published on maven central. The current groupid and version for all modules is, respectively, `"com.twitter"` and `0.9.0`.
111+
Summingbird modules are published on maven central. The current groupid and version for all modules is, respectively, `"com.twitter"` and `0.9.1`.
112112

113113
Current published artifacts are
114114

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ object SummingbirdBuild extends Build {
175175
def youngestForwardCompatible(subProj: String) =
176176
Some(subProj)
177177
.filterNot(unreleasedModules.contains(_))
178-
.map { s => "com.twitter" % ("summingbird-" + s + "_2.10") % "0.8.0" }
178+
.map { s => "com.twitter" % ("summingbird-" + s + "_2.10") % "0.9.0" }
179179

180180
def module(name: String) = {
181181
val id = "summingbird-%s".format(name)
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/*
2+
Copyright 2013 Twitter, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package com.twitter.summingbird.scalding.batch
18+
19+
import cascading.flow.{ Flow, FlowDef }
20+
21+
import com.twitter.algebird._
22+
import com.twitter.algebird.monad._
23+
import com.twitter.summingbird.batch._
24+
import com.twitter.summingbird.option.{ Commutative, NonCommutative, Commutativity }
25+
import com.twitter.scalding.{ Source => ScaldingSource, Test => TestMode, _ }
26+
27+
import org.scalacheck._
28+
import org.scalacheck.Prop._
29+
import org.scalacheck.Properties
30+
31+
object LTuple2Properties extends Properties("LTuple2 Properties") {
32+
33+
property("When the contents equal then the LTuple2 equals") = {
34+
forAll { (a1: Int, b1: Int, a2: Int, b2: Int) =>
35+
36+
val ltup1 = LTuple2(a1, b1)
37+
val ltup2 = LTuple2(a2, b2)
38+
39+
if (a1 == a2 && b1 == b2)
40+
ltup1 == ltup2
41+
else
42+
ltup1 != ltup2
43+
}
44+
}
45+
46+
property("Case of always equal values, should equal") = {
47+
forAll { (a1: Int, b1: Int) =>
48+
49+
val ltup1 = LTuple2(a1, b1)
50+
val ltup2 = LTuple2(a1, b1)
51+
52+
ltup1 == ltup2
53+
}
54+
}
55+
56+
property("Case of always equal values, should equal. Different types.") = {
57+
forAll { (a1: Int, b1: String) =>
58+
59+
val ltup1 = LTuple2(a1, b1)
60+
val ltup2 = LTuple2(a1, b1)
61+
62+
ltup1 == ltup2
63+
}
64+
}
65+
66+
property("things when tuple2 of different types equals then LTuple2 equals too") = {
67+
forAll { (a1: Int, b1: String, a2: Int, b2: String) =>
68+
69+
val ltup1 = LTuple2(a1, b1)
70+
val ltup2 = LTuple2(a2, b2)
71+
72+
if (a1 == a2 && b1 == b2)
73+
ltup1 == ltup2
74+
else
75+
ltup1 != ltup2
76+
}
77+
}
78+
79+
property("Hash code of the LTuple2 is the same as a tuple2 would have been") = {
80+
forAll { (a1: Int, b1: String) =>
81+
82+
val ltup1 = LTuple2(a1, b1)
83+
84+
val tup1 = (a1, b1)
85+
tup1.hashCode == ltup1.hashCode
86+
}
87+
}
88+
89+
}

summingbird-scalding/src/main/scala/com/twitter/summingbird/scalding/batch/BatchedStore.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ case class LTuple2[T, U](_1: T, _2: U) {
4545
override val hashCode: Int = scala.runtime.ScalaRunTime._hashCode(this)
4646

4747
override def equals(other: Any): Boolean = other match {
48-
case LTuple2(oT1, oT2) => hashCode == other.hashCode && _1 == oT2 && _2 == oT2
48+
case LTuple2(oT1, oT2) => hashCode == other.hashCode && _1 == oT1 && _2 == oT2
4949
case _ => false
5050
}
5151

version.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version in ThisBuild := "0.9.0"
1+
version in ThisBuild := "0.9.1"

0 commit comments

Comments
 (0)