File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed
main/scala/org/apache/spark/sql/execution
test/scala/org/apache/spark/sql Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ case class TakeOrderedAndProject(
225225 private def collectData (): Array [InternalRow ] = {
226226 val data = child.execute().map(_.copy()).takeOrdered(limit)(ord)
227227 if (projection.isDefined) {
228- projection.map(p => data.map(p(_).copy(). asInstanceOf [InternalRow ])).get
228+ projection.map(p => data.map(p(_).asInstanceOf [InternalRow ])).get
229229 } else {
230230 data
231231 }
Original file line number Diff line number Diff line change @@ -571,12 +571,6 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext {
571571 mapData.collect().take(1 ).map(Row .fromTuple).toSeq)
572572 }
573573
574- test(" sort and limit" ) {
575- checkAnswer(
576- sql(" SELECT * FROM arrayData ORDER BY data[0] ASC LIMIT 1" ),
577- arrayData.collect().sortBy(_.data(0 )).map(Row .fromTuple).take(1 ).toSeq)
578- }
579-
580574 test(" CTE feature" ) {
581575 checkAnswer(
582576 sql(" with q1 as (select * from testData limit 10) select * from q1" ),
You can’t perform that action at this time.
0 commit comments