Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

TAJO-904: ORDER BY with a null column miss some data.#70

Closed
babokim wants to merge 2 commits into
apache:masterfrom
babokim:TAJO-904
Closed

TAJO-904: ORDER BY with a null column miss some data.#70
babokim wants to merge 2 commits into
apache:masterfrom
babokim:TAJO-904

Conversation

@babokim
Copy link
Copy Markdown
Contributor

@babokim babokim commented Jul 14, 2014

Currently Tajo ignores null value when calculates range partition range. I added a MaxValueNull flag variable in ColumnStats. If ColumnStats's max value is null, ColumnStats's max value is a non-null value and MaxValueNull flag is true. So Repartitioner calculates range cardinality with non-null value. Finally Repartitioner set null value to last range.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be DROP TABLE IF EXISTS table1 PURGE. Otherwise, it will cause 'no such table error' when a developer executes this test separately.

@hyunsik
Copy link
Copy Markdown
Member

hyunsik commented Jul 15, 2014

It works well for null first case. But, in null last case, the query results in empty rows.

In my view, null last supports is not trivial and requires a bunch of codes. In contrast, the current patch looks reasonable for only null first.

If there is no objection, I'll change the issue name to 'ORDER BY NULL FIRST support', and I'll create another issue for null last.

@babokim
Copy link
Copy Markdown
Contributor Author

babokim commented Jul 15, 2014

Hyunsik, I agree your opinion. Please go ahead

@hyunsik
Copy link
Copy Markdown
Member

hyunsik commented Jul 15, 2014

+1

@asfgit asfgit closed this in 47d4fe2 Jul 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants