You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Hyoungjun Kim (JIRA)" <ji...@apache.org> on 2014/12/09 16:51:12 UTC
[jira] [Created] (TAJO-1239) ORDER BY with null column desc miss
some data.
Hyoungjun Kim created TAJO-1239:
-----------------------------------
Summary: ORDER BY with null column desc miss some data.
Key: TAJO-1239
URL: https://issues.apache.org/jira/browse/TAJO-1239
Project: Tajo
Issue Type: Bug
Reporter: Hyoungjun Kim
Priority: Minor
TAJO-904 fixed the ORDER BY ascending bug. But descending with null column still miss some data. I tested the following code.
{code}
KeyValueSet tableOptions = new KeyValueSet();
tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
Schema schema = new Schema();
schema.addColumn("id", Type.INT4);
schema.addColumn("name", Type.TEXT);
String[] data = new String[]{ "1|111", "2|\\N", "3|333" };
TajoTestingCluster.createTable("table11", schema, tableOptions, data, 1);
try {
ResultSet res = executeString("select * from table11 order by name asc");
String ascExpected = "id,name\n" +
"-------------------------------\n" +
"1,111\n" +
"3,333\n" +
"2,null\n";
assertEquals(ascExpected, resultSetToString(res));
res.close();
res = executeString("select * from table11 order by name desc");
String descExpected = "id,name\n" +
"-------------------------------\n" +
"2,null\n" +
"3,333\n" +
"1,111\n";
assertEquals(descExpected, resultSetToString(res));
res.close();
} finally {
executeString("DROP TABLE table11 PURGE");
}
{code}
The first query is successful, but the second query will fail.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)