Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a367840
[SPARK-10859] [SQL] fix stats of StringType in columnar cache
Sep 28, 2015
9b3014b
[SPARK-10833] [BUILD] Inline, organize BSD/MIT licenses in LICENSE
srowen Sep 29, 2015
d544932
[SPARK-10825] [CORE] [TESTS] Fix race conditions in StandaloneDynamic…
zsxwing Sep 29, 2015
3b23873
[SPARK-10871] include number of executor failures in error msg
ryan-williams Sep 29, 2015
cbc6aec
[SPARK-10058] [CORE] [TESTS] Fix the flaky tests in HeartbeatReceiver…
zsxwing Oct 1, 2015
8836ac3
[SPARK-10904] [SPARKR] Fix to support `select(df, c("col1", "col2"))`
felixcheung Oct 4, 2015
d323e5e
[SPARK-10889] [STREAMING] Bump KCL to add MillisBehindLatest metric
akatz Oct 4, 2015
c8392cd
[SPARK-10934] [SQL] handle hashCode of unsafe array correctly
cloud-fan Oct 6, 2015
6847be6
[SPARK-10901] [YARN] spark.yarn.user.classpath.first doesn't work
Oct 6, 2015
84f510c
[SPARK-10885] [STREAMING] Display the failed output op in Streaming UI
zsxwing Oct 6, 2015
b6a0933
[SPARK-10952] Only add hive to classpath if HIVE_HOME is set.
kevincox Oct 7, 2015
57978ae
[SPARK-10980] [SQL] fix bug in create Decimal
Oct 7, 2015
ba601b1
[SPARK-10914] UnsafeRow serialization breaks when two machines have d…
rxin Oct 9, 2015
3df7500
[SPARK-10955] [STREAMING] Add a warning if dynamic allocation for Str…
harishreedharan Oct 9, 2015
a3b4b93
Merge branch 'branch-1.5' of github.com:apache/spark into csd-1.5
markhamstra Oct 9, 2015
f95129c
[SPARK-10959] [PYSPARK] StreamingLogisticRegressionWithSGD does not t…
BryanCutler Oct 9, 2015
9a625f3
Merge branch 'branch-1.5' of github.com:apache/spark into csd-1.5
markhamstra Oct 9, 2015
5a10e10
[SPARK-10389] [SQL] support order by non-attribute grouping expressio…
cloud-fan Sep 2, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[SPARK-10859] [SQL] fix stats of StringType in columnar cache
The UTF8String may come from UnsafeRow, then underline buffer of it is not copied, so we should clone it in order to hold it in Stats.

cc yhuai

Author: Davies Liu <[email protected]>

Closes apache#8929 from davies/pushdown_string.

(cherry picked from commit ea02e55)
Signed-off-by: Yin Huai <[email protected]>
  • Loading branch information
Davies Liu authored and yhuai committed Sep 28, 2015
commit a367840834b97cd6a9ecda568bb21ee6dc35fcde
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ private[sql] class StringColumnStats extends ColumnStats {
super.gatherStats(row, ordinal)
if (!row.isNullAt(ordinal)) {
val value = row.getUTF8String(ordinal)
if (upper == null || value.compareTo(upper) > 0) upper = value
if (lower == null || value.compareTo(lower) < 0) lower = value
if (upper == null || value.compareTo(upper) > 0) upper = value.clone()
if (lower == null || value.compareTo(lower) < 0) lower = value.clone()
sizeInBytes += STRING.actualSize(row, ordinal)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,11 @@ class InMemoryColumnarQuerySuite extends QueryTest with SharedSQLContext {
// Drop the cache.
cached.unpersist()
}

test("SPARK-10859: Predicates pushed to InMemoryColumnarTableScan are not evaluated correctly") {
val data = sqlContext.range(10).selectExpr("id", "cast(id as string) as s")
data.cache()
assert(data.count() === 10)
assert(data.filter($"s" === "3").count() === 1)
}
}