mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Merge pull request #54269 from bharatnc/ncb/update-tldLookup
update tldLookup data
This commit is contained in:
commit
886a6e6e86
@ -22,6 +22,11 @@ if (USE_GPERF)
|
||||
BYPRODUCTS "${CMAKE_CURRENT_SOURCE_DIR}/tldLookup.gperf"
|
||||
)
|
||||
add_custom_target(generate-tldlookup ${GPERF} tldLookup.gperf --output-file=tldLookup.generated.cpp && clang-format -i tldLookup.generated.cpp
|
||||
# apply these clang-tidy fixes to the file generated by gperf:
|
||||
# - use cstring since string.h is deprecated
|
||||
# - return nullptr instead of 0
|
||||
&& sed -i -e 's/\#include <string.h>/\#include <cstring>/g' tldLookup.generated.cpp -e 's/return 0\;/return nullptr\;/g' tldLookup.generated.cpp
|
||||
|
||||
SOURCES tldLookup.gperf
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
# BYPRODUCTS "${CMAKE_CURRENT_SOURCE_DIR}/tldLookup.generated.cpp"
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@
|
||||
[ ! -f public_suffix_list.dat ] && wget -nv -O public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat
|
||||
|
||||
echo '%language=C++
|
||||
%define lookup-function-name is_valid
|
||||
%define class-name tldLookupHash
|
||||
%define lookup-function-name isValid
|
||||
%define class-name TopLevelDomainLookupHash
|
||||
%readonly-tables
|
||||
%includes
|
||||
%compare-strncmp
|
||||
|
@ -26,11 +26,11 @@ select cutToFirstSignificantSubdomainCustom('foo.kernel.biz.ss', 'public_suffix_
|
||||
kernel.biz.ss
|
||||
select '-- difference';
|
||||
-- difference
|
||||
-- biz.ss is not in the default TLD list, hence:
|
||||
select cutToFirstSignificantSubdomain('foo.kernel.biz.ss'); -- biz.ss
|
||||
biz.ss
|
||||
select cutToFirstSignificantSubdomainCustom('foo.kernel.biz.ss', 'public_suffix_list'); -- kernel.biz.ss
|
||||
kernel.biz.ss
|
||||
-- dev.ss is not in the default TLD list, hence:
|
||||
select cutToFirstSignificantSubdomain('foo.kernel.dev.ss'); -- dev.ss
|
||||
dev.ss
|
||||
select cutToFirstSignificantSubdomainCustom('foo.kernel.dev.ss', 'public_suffix_list'); -- kernel.dev.ss
|
||||
dev.ss
|
||||
select '-- 3+level';
|
||||
-- 3+level
|
||||
select cutToFirstSignificantSubdomainCustom('xx.blogspot.co.at', 'public_suffix_list'); -- xx.blogspot.co.at
|
||||
@ -115,11 +115,11 @@ select cutToFirstSignificantSubdomainCustomRFC('foo.kernel.biz.ss', 'public_suff
|
||||
kernel.biz.ss
|
||||
select '-- difference';
|
||||
-- difference
|
||||
-- biz.ss is not in the default TLD list, hence:
|
||||
select cutToFirstSignificantSubdomainRFC('foo.kernel.biz.ss'); -- biz.ss
|
||||
biz.ss
|
||||
select cutToFirstSignificantSubdomainCustomRFC('foo.kernel.biz.ss', 'public_suffix_list'); -- kernel.biz.ss
|
||||
kernel.biz.ss
|
||||
-- dev.ss is not in the default TLD list, hence:
|
||||
select cutToFirstSignificantSubdomainRFC('foo.kernel.dev.ss'); -- dev.ss
|
||||
dev.ss
|
||||
select cutToFirstSignificantSubdomainCustomRFC('foo.kernel.dev.ss', 'public_suffix_list'); -- kernel.dev.ss
|
||||
dev.ss
|
||||
select '-- 3+level';
|
||||
-- 3+level
|
||||
select cutToFirstSignificantSubdomainCustomRFC('xx.blogspot.co.at', 'public_suffix_list'); -- xx.blogspot.co.at
|
||||
|
@ -18,9 +18,9 @@ select firstSignificantSubdomainCustom{{ suffix }}('foo.kernel.biz.ss', 'public_
|
||||
select cutToFirstSignificantSubdomainCustom{{ suffix }}('foo.kernel.biz.ss', 'public_suffix_list'); -- kernel.biz.ss
|
||||
|
||||
select '-- difference';
|
||||
-- biz.ss is not in the default TLD list, hence:
|
||||
select cutToFirstSignificantSubdomain{{ suffix }}('foo.kernel.biz.ss'); -- biz.ss
|
||||
select cutToFirstSignificantSubdomainCustom{{ suffix }}('foo.kernel.biz.ss', 'public_suffix_list'); -- kernel.biz.ss
|
||||
-- dev.ss is not in the default TLD list, hence:
|
||||
select cutToFirstSignificantSubdomain{{ suffix }}('foo.kernel.dev.ss'); -- dev.ss
|
||||
select cutToFirstSignificantSubdomainCustom{{ suffix }}('foo.kernel.dev.ss', 'public_suffix_list'); -- kernel.dev.ss
|
||||
|
||||
select '-- 3+level';
|
||||
select cutToFirstSignificantSubdomainCustom{{ suffix }}('xx.blogspot.co.at', 'public_suffix_list'); -- xx.blogspot.co.at
|
||||
|
@ -1 +1 @@
|
||||
biz.ss kernel.biz.ss
|
||||
dev.ss kernel.dev.ss
|
||||
|
@ -13,9 +13,9 @@ function clickhouse_local()
|
||||
$CLICKHOUSE_LOCAL "${opts[@]}" "$@"
|
||||
}
|
||||
|
||||
# -- biz.ss is not in the default TLD list, hence:
|
||||
# -- dev.ss is not in the default TLD list, hence:
|
||||
clickhouse_local -q "
|
||||
select
|
||||
cutToFirstSignificantSubdomain('foo.kernel.biz.ss'),
|
||||
cutToFirstSignificantSubdomainCustom('foo.kernel.biz.ss', 'public_suffix_list')
|
||||
cutToFirstSignificantSubdomain('foo.kernel.dev.ss'),
|
||||
cutToFirstSignificantSubdomainCustom('foo.kernel.dev.ss', 'public_suffix_list')
|
||||
" |& grep -v -e 'Processing configuration file'
|
||||
|
@ -1 +1 @@
|
||||
biz.ss
|
||||
dev.ss
|
||||
|
Loading…
Reference in New Issue
Block a user