Merge pull request #45867 from Algunenano/improve_obfuscator

Improve how the obfuscator deals with queries
This commit is contained in:
Alexey Milovidov 2023-02-02 04:23:06 +03:00 committed by GitHub
commit 099532ecc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 589 additions and 151 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,16 @@
SELECT 116, 'Qqfu://2020-02-10isqkc1203 sp 2000-05-27T18:38:01', 13e100, Obsidian_id_diverTeam, sweets(Workplace), avgIf(remote('128.0.0.1'))
SELECT treasury_mammoth_hazelnut between nutmeg and span, case when chive >= 116 then switching else null end
SELECT 116, 'Qqfu://2020-02-10isqkc1203 sp 2000-05-27T18:38:01', 13e100, Jewelry_id_studyBeast, algebra(Stable), avgIf(remote('128.0.0.1'))
SELECT surfboard_solitaire_crunch between understanding and populist, case when instrument >= 116 then poverty else null end
SELECT
EarthquakeID,
Workout.ID, Workout.CoupleThrill,
MedalEMPIRE,
HOPE.ListingName, HOPE.ListingBomb, HOPE.ListingRamen, HOPE.ListingResult, HOPE.CoupleThrill, HOPE.Smile
FROM merge.marsh_agreement
BugleID,
Reliability.ID, Reliability.ExperiencePrevalence,
DepressiveTURKEY,
SPARK.RainmakerName, SPARK.RainmakerReligion, SPARK.RainmakerMisfit, SPARK.RainmakerAardvark, SPARK.ExperiencePrevalence, SPARK.Type
FROM merge.invader_schizophrenic
WHERE
RecapitulationLeaver >= '2020-10-13' AND RecapitulationLeaver <= '2020-10-21'
AND MasonryID = 30750384
AND intHash32(EyeballID) = 448362928 AND intHash64(EyeballID) = 12572659331310383983
AND EarthquakeID IN (8195672321757027078, 7079643623150622129, 5057006826979676478, 7886875230160484653, 7494974311229040743)
AND Aide = 1
PortraitInvasion >= '2020-10-13' AND PortraitInvasion <= '2020-10-21'
AND FrownID = 30750384
AND intHash32(HaversackID) = 448362928 AND intHash64(HaversackID) = 12572659331310383983
AND BugleID IN (8195672321757027078, 7079643623150622129, 5057006826979676478, 7886875230160484653, 7494974311229040743)
AND Hostel = 1

View File

@ -0,0 +1,3 @@
select 1 order by 1 with fill step 1
SELECT id, untuple(id) FROM id
SELECT 1 IS NULL

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
obf="$CLICKHOUSE_FORMAT --obfuscate"
echo "select 1 order by 1 with fill step 1" | $obf
echo "SELECT id, untuple(id) FROM id" | $obf
echo "SELECT 1 IS NULL" | $obf

View File

@ -27,5 +27,12 @@ set -x
touch ${TESTS_PATH}/${NEW_TEST_NO}_${FILENAME}.${FILEEXT}
if [[ $FILEEXT == "sh" ]] ; then
chmod +x ${TESTS_PATH}/${NEW_TEST_NO}_${FILENAME}.${FILEEXT}
# shellcheck disable=SC2016
echo '#!/usr/bin/env bash
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
' >> ${TESTS_PATH}/${NEW_TEST_NO}_${FILENAME}.${FILEEXT}
fi
touch ${TESTS_PATH}/${NEW_TEST_NO}_${FILENAME}.reference