Repository navigation
Description
Limited geobase languages support causes failure while trying to load dictionaries when not all the supported language files exists.
So, when you don't have regions_names_*.txt files for all the languages, dictionaries loading for region_names fails, and you get no languages at all.
In file https://github.com/yandex/ClickHouse/blob/f9eb536825ae3cfab65b1d8d37a2bdd67c58010d/dbms/include/DB/Dictionaries/Embedded/RegionsNames.h There are no errors checks for the cases when some of the language files doesn't exist.
for (size_t language_id = 0; language_id < SUPPORTED_LANGUAGES_COUNT; ++language_id)
{
const std::string & language = getSupportedLanguages()[language_id];
std::string path = directory + "/regions_names_" + language + ".txt";
Poco::File file(path);
So, I should have a file for every language, even I don't need it (at least empty one).
Also, languages list is strictly fixed to
{ "ru", "en", "ua", "by", "kz", "tr" }
but why can't I use some other languages, or even other suffixes? It's easy. Moreover, this mechanism is already implemented in "regions_hierarchy" dictionary, cause it looks for any files in the directory with specified kinda mask (looking for files with the same name + suffixes).
Moreover, we have some inconsistent config files because of that.
<!-- Path to file with region hierarchy. -->
<path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file>
<!-- Path to directory with files containing names of regions -->
<path_to_regions_names_files>/opt/geo</path_to_regions_names_files>
So, in the first case we have some kind of mask, while in the second case we have a path and fixed file names in it. Please see
const std::string & language = getSupportedLanguages()[language_id];
std::string path = directory + "/regions_names_" + language + ".txt";
Moreover, configuration format for external dictionaries differs too. It is a file mask with asterisks.
<!-- Configuration of external dictionaries. See: https://clickhouse.yandex/reference_en.html#External%20Dictionaries
-->
<dictionaries_config>*_dictionary.xml</dictionaries_config>
Do you have any plans about making dictionary file masks for config files more consistent and flexible?
Activity
[-]Limited geobase languages support causes failure while trying to load when not all the support languages files exists[/-][+]Limited geobase languages support causes failure while trying to load dictionaries when not all the support languages files exists[/+][-]Limited geobase languages support causes failure while trying to load dictionaries when not all the support languages files exists[/-][+]Limited geobase languages support causes failure while trying to load dictionaries when not all the supported languages files exists[/+][-]Limited geobase languages support causes failure while trying to load dictionaries when not all the supported languages files exists[/-][+]Limited geobase languages support causes failure while trying to load dictionaries when not all the supported language files exists[/+][-]Limited geobase languages support causes failure while trying to load dictionaries when not all the supported language files exists[/-][+]Problems with external dictionaries, geobase, and etc[/+][-]Problems with external dictionaries, geobase, and etc[/-][+]FR: configurable set of supported languages[/+]alexey-milovidov commentedon Mar 30, 2020
This task is easy to do but there is very low demand for this feature.
[ClickHouse#154][ClickHouse#158] increase timeout and modify parse su…
Merge branch 'increase_timeout_and_modify_parse_summary' into 'dev-22'