You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Hyunsik Choi (JIRA)" <ji...@apache.org> on 2014/12/11 06:10:18 UTC
[jira] [Updated] (TAJO-1239) ORDER BY with null column desc miss
some data.
[ https://issues.apache.org/jira/browse/TAJO-1239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyunsik Choi updated TAJO-1239:
-------------------------------
Fix Version/s: 0.9.1
> 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
> Components: physical operator, planner/optimizer
> Reporter: Hyoungjun Kim
> Priority: Minor
> Fix For: 0.9.1
>
>
> 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)