national language supported sort in Hive

Don't have to much experience with nls in hive. Changing locale in client linux shell doesn't affect the result. Googling also doesn't help to resolve.

Created table in Hive: create table wojewodztwa (kod STRING, nazwa STRING, miasto_woj STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',';

loaded data:

LOAD DATA LOCAL INPATH ./wojewodztwa.txt OVERWRITE INTO TABLE wojewodztwa;

contents of file wojewodztwa.txt:

02,dolnośląskie,Wrocław
04,kujawsko-pomorskie,Bydgoszcz i Toruń
06,lubelskie,Lublin
08,lubuskie,Gorzów Wielkopolski i Zielona Góra
10,łódzkie,Łódź
12,małopolskie,Kraków
14,mazowieckie,Warszawa
16,opolskie,Opole
18,podkarpackie,Rzeszów
20,podlaskie,Białystok
22,pomorskie,Gdańsk
24,śląskie,Katowice
26,świętokrzyskie,Kielce
28,warmińsko-mazurskie,Olsztyn
30,wielkopolskie,Poznań
32,zachodniopomorskie,Szczecin    

beeline>  !connect jdbc:hive2://172.16.45.211:10001 gpadmin changeme org.apache.hive.jdbc.HiveDriver                      
Connecting to jdbc:hive2://172.16.45.211:10001
Connected to: Hive (version 0.11.0-gphd-2.1.1.0)
Driver: Hive (version 0.11.0-gphd-2.1.1.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://172.16.45.211:10001> select kod,nazwa from wojewodztwa order by nazwa;                                          
+------+----------------------+
| kod  |        nazwa         |
+------+----------------------+
| 02   | dolnośląskie         |
| 04   | kujawsko-pomorskie   |
| 06   | lubelskie            |
| 08   | lubuskie             |
| 14   | mazowieckie          |
| 12   | małopolskie          |
| 16   | opolskie             |
| 18   | podkarpackie         |
| 20   | podlaskie            |
| 22   | pomorskie            |
| 28   | warmińsko-mazurskie  |
| 30   | wielkopolskie        |
| 32   | zachodniopomorskie   |
| 10   | łódzkie              |
| 24   | śląskie              |
| 26   | świętokrzyskie       |
+------+----------------------+
16 rows selected (19,702 seconds)

and it's not correct result, all words starting with language specific characters are at the and.

Answers


Hive does not support collations. Strings will sort according to Java String.compareTo rules.


Need Your Help

System.Linq namespace missing even with reference to System.Core.Dll

linq assemblies aspnet-compiler

When I open up a Asp Net web site of mine in Visual Studio 2010 the properties say "Target Framework 3.5", however when I try to using the Linq namespace the compiler complains about it.

Input text box not editable with jQuery Draggable?

javascript jquery html jquery-ui

I call a javascript function that dynamically builds <li>'s with a text input box and drop down inside. The drop down works fine with jQuery's Draggable but I cannot edit the input text box?