Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3095#discussion_r95753596
--- Diff:
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/sql/SortITCase.scala
---
@@ -55,14 +55,8 @@ class SortITCase(
tEnv.registerDataSet("MyTable", ds)
val expected = sortExpectedly(tupleDataSetStrings)
- val results = tEnv.sql(sqlQuery).toDataSet[Row].mapPartition(rows =>
Seq(rows.toSeq)).collect()
-
- val result = results
- .filterNot(_.isEmpty)
- .sortBy(_.head)(Ordering.by(f=> f.toString))
--- End diff --
The problem here is the string conversion which results in a
lexicographical order ("21,....." sorts before "5,...").
We should change this to `.sortBy(_.head)(Ordering.by(r => (r.getField(0),
r.getField(1))))`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---