forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from marmbrus/goldenGen
A bunch of work mostly to ensure catalyst does not return wrong answers.
- Loading branch information
Showing
28 changed files
with
500 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,21 @@ | ||
all: a b c d e f g h i j k l m n o p q r s t u v w x y" z | ||
all: s1 s2 s3 s4 s5 s6 s7 s8 | ||
|
||
buildWhiteList: | ||
sbt -Dshark.hive.alltests "test-only catalyst.execution.HiveCompatibility" | ||
compile: | ||
sbt test:compile | ||
|
||
findBroken: | ||
sbt -Dshark.hive.alltests -Dshark.hive.failFast "test-only catalyst.execution.HiveCompatibility" | ||
|
||
a: | ||
sbt -Dshark.hive.whitelist=a.* "test-only catalyst.execution.HiveCompatibility" | ||
b: | ||
sbt -Dshark.hive.whitelist=b.* "test-only catalyst.execution.HiveCompatibility" | ||
c: | ||
sbt -Dshark.hive.whitelist=c.* "test-only catalyst.execution.HiveCompatibility" | ||
d: | ||
sbt -Dshark.hive.whitelist=d.* "test-only catalyst.execution.HiveCompatibility" | ||
e: | ||
sbt -Dshark.hive.whitelist=e.* "test-only catalyst.execution.HiveCompatibility" | ||
f: | ||
sbt -Dshark.hive.whitelist=f.* "test-only catalyst.execution.HiveCompatibility" | ||
g: | ||
sbt -Dshark.hive.whitelist=g.* "test-only catalyst.execution.HiveCompatibility" | ||
h: | ||
sbt -Dshark.hive.whitelist=h.* "test-only catalyst.execution.HiveCompatibility" | ||
i: | ||
sbt -Dshark.hive.whitelist=i.* "test-only catalyst.execution.HiveCompatibility" | ||
j: | ||
sbt -Dshark.hive.whitelist=j.* "test-only catalyst.execution.HiveCompatibility" | ||
k: | ||
sbt -Dshark.hive.whitelist=k.* "test-only catalyst.execution.HiveCompatibility" | ||
l: | ||
sbt -Dshark.hive.whitelist=l.* "test-only catalyst.execution.HiveCompatibility" | ||
m: | ||
sbt -Dshark.hive.whitelist=m.* "test-only catalyst.execution.HiveCompatibility" | ||
n: | ||
sbt -Dshark.hive.whitelist=n.* "test-only catalyst.execution.HiveCompatibility" | ||
o: | ||
sbt -Dshark.hive.whitelist=o.* "test-only catalyst.execution.HiveCompatibility" | ||
p: | ||
sbt -Dshark.hive.whitelist=p.* "test-only catalyst.execution.HiveCompatibility" | ||
q: | ||
sbt -Dshark.hive.whitelist=q.* "test-only catalyst.execution.HiveCompatibility" | ||
r: | ||
sbt -Dshark.hive.whitelist=r.* "test-only catalyst.execution.HiveCompatibility" | ||
s: | ||
sbt -Dshark.hive.whitelist=s.* "test-only catalyst.execution.HiveCompatibility" | ||
t: | ||
sbt -Dshark.hive.whitelist=t.* "test-only catalyst.execution.HiveCompatibility" | ||
u: | ||
sbt -Dshark.hive.whitelist=u.* "test-only catalyst.execution.HiveCompatibility" | ||
v: | ||
sbt -Dshark.hive.whitelist=v.* "test-only catalyst.execution.HiveCompatibility" | ||
w: | ||
sbt -Dshark.hive.whitelist=w.* "test-only catalyst.execution.HiveCompatibility" | ||
x: | ||
sbt -Dshark.hive.whitelist=x.* "test-only catalyst.execution.HiveCompatibility" | ||
y: | ||
sbt -Dshark.hive.whitelist=y.* "test-only catalyst.execution.HiveCompatibility" | ||
z: | ||
sbt -Dshark.hive.whitelist=z.* "test-only catalyst.execution.HiveCompatibility" | ||
s1: compile | ||
sbt ${ARGS} -Dshark.hive.shard=0:8 "test-only catalyst.execution.HiveCompatibility" | ||
s2: compile | ||
sbt ${ARGS} -Dshark.hive.shard=1:8 "test-only catalyst.execution.HiveCompatibility" | ||
s3: compile | ||
sbt ${ARGS} -Dshark.hive.shard=2:8 "test-only catalyst.execution.HiveCompatibility" | ||
s4: compile | ||
sbt ${ARGS} -Dshark.hive.shard=3:8 "test-only catalyst.execution.HiveCompatibility" | ||
s5: compile | ||
sbt ${ARGS} -Dshark.hive.shard=4:8 "test-only catalyst.execution.HiveCompatibility" | ||
s6: compile | ||
sbt ${ARGS} -Dshark.hive.shard=5:8 "test-only catalyst.execution.HiveCompatibility" | ||
s7: compile | ||
sbt ${ARGS} -Dshark.hive.shard=6:8 "test-only catalyst.execution.HiveCompatibility" | ||
s8: compile | ||
sbt ${ARGS} -Dshark.hive.shard=7:8 "test-only catalyst.execution.HiveCompatibility" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package catalyst | ||
package expressions | ||
|
||
import types._ | ||
|
||
/** | ||
* Returns the item at `ordinal` in the Array `child`. | ||
*/ | ||
case class GetItem(child: Expression, ordinal: Expression) extends Expression { | ||
val children = child :: ordinal :: Nil | ||
/** `Null` is returned for invalid ordinals. */ | ||
override def nullable = true | ||
override def references = children.flatMap(_.references).toSet | ||
def dataType = child.dataType match { | ||
case ArrayType(dt) => dt | ||
} | ||
override lazy val resolved = childrenResolved && child.dataType.isInstanceOf[ArrayType] | ||
override def toString = s"$child[$ordinal]" | ||
} | ||
|
||
/** | ||
* Returns the value of fields in the Struct `child`. | ||
*/ | ||
case class GetField(child: Expression, fieldName: String) extends UnaryExpression { | ||
def dataType = field.dataType | ||
def nullable = field.nullable | ||
lazy val field = child.dataType match { | ||
case s: StructType => | ||
s.fields | ||
.find(_.name == fieldName) | ||
.getOrElse(sys.error(s"No such field $fieldName in ${child.dataType}")) | ||
} | ||
override lazy val resolved = childrenResolved && child.dataType.isInstanceOf[StructType] | ||
override def toString = s"$child.$fieldName" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.