diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/TablePartitionValues.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/TablePartitionValues.java index d5e8a39e605a8b..c7f2ce6f712d6b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/TablePartitionValues.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/TablePartitionValues.java @@ -34,11 +34,7 @@ import com.google.common.collect.RangeMap; import lombok.Data; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.nio.charset.StandardCharsets; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -80,11 +76,6 @@ public TablePartitionValues(List partitionNames, List> part addPartitions(partitionNames, partitionValues, types); } - public TablePartitionValues(List partitionNames, List types) { - this(); - addPartitions(partitionNames, types); - } - public void addPartitions(List partitionNames, List> partitionValues, List types) { Preconditions.checkState(partitionNames.size() == partitionValues.size()); List addPartitionNames = new ArrayList<>(); @@ -105,10 +96,6 @@ public void addPartitions(List partitionNames, List> partit addPartitionItems(addPartitionNames, addPartitionItems, types); } - public void addPartitions(List partitionNames, List types) { - addPartitions(partitionNames, - partitionNames.stream().map(this::getHivePartitionValues).collect(Collectors.toList()), types); - } private void addPartitionItems(List partitionNames, List partitionItems, List types) { Preconditions.checkState(partitionNames.size() == partitionItems.size()); @@ -196,23 +183,6 @@ private ListPartitionItem toListPartitionItem(List partitionValues, List } } - private List getHivePartitionValues(String partitionName) { - // Partition name will be in format: nation=cn/city=beijing - // parse it to get values "cn" and "beijing" - return Arrays.stream(partitionName.split("/")).map(part -> { - String[] kv = part.split("="); - Preconditions.checkState(kv.length == 2, partitionName); - String partitionValue; - try { - // hive partition value maybe contains special characters like '=' and '/' - partitionValue = URLDecoder.decode(kv[1], StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - // It should not be here - throw new RuntimeException(e); - } - return partitionValue; - }).collect(Collectors.toList()); - } @Data public static class TablePartitionKey { diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java index fbfd7dd2798668..ea42dfa2f52a01 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java @@ -244,7 +244,7 @@ public Long getValue() { } private HivePartitionValues loadPartitionValues(PartitionValueCacheKey key) { - // partition name format: nation=cn/city=beijing + // partition name format: nation=cn/city=beijing,`listPartitionNames` returned string is the encoded string. List partitionNames = catalog.getClient().listPartitionNames(key.dbName, key.tblName); if (LOG.isDebugEnabled()) { LOG.debug("load #{} partitions for {} in catalog {}", partitionNames.size(), key, catalog.getName()); @@ -281,11 +281,10 @@ private HivePartitionValues loadPartitionValues(PartitionValueCacheKey key) { public ListPartitionItem toListPartitionItem(String partitionName, List types) { // Partition name will be in format: nation=cn/city=beijing // parse it to get values "cn" and "beijing" - String[] parts = partitionName.split("/"); - Preconditions.checkState(parts.length == types.size(), partitionName + " vs. " + types); + List partitionValues = HiveUtil.toPartitionValues(partitionName); + Preconditions.checkState(partitionValues.size() == types.size(), partitionName + " vs. " + types); List values = Lists.newArrayListWithExpectedSize(types.size()); - for (String part : parts) { - String partitionValue = HiveUtil.getHivePartitionValue(part); + for (String partitionValue : partitionValues) { values.add(new PartitionValue(partitionValue, HIVE_DEFAULT_PARTITION.equals(partitionValue))); } try { @@ -325,9 +324,9 @@ private Map loadPartitions(Iterable List(["c1","a"], ["c2","b"], ["c3","c"]) + // Similar to the `toPartitionValues` method, except that it adds the partition column name. + public static List toPartitionColNameAndValues(String partitionName) { + + String[] parts = partitionName.split("/"); + List result = new ArrayList<>(parts.length); + for (String part : parts) { + String[] kv = part.split("="); + Preconditions.checkState(kv.length == 2, String.format("Malformed partition name %s", part)); + + result.add(new String[] { + FileUtils.unescapePathName(kv[0]), + FileUtils.unescapePathName(kv[1]) + }); } + return result; } // "c1=a/c2=b/c3=c" ---> List("a","b","c") @@ -151,6 +154,8 @@ public static List toPartitionValues(String partitionName) { if (start > partitionName.length()) { break; } + //Ref: common/src/java/org/apache/hadoop/hive/common/FileUtils.java + //makePartName(List partCols, List vals,String defaultStr) resultBuilder.add(FileUtils.unescapePathName(partitionName.substring(start, end))); start = end + 1; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java index 6c584f7255a5ca..9d814fd081ad31 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java @@ -1933,6 +1933,11 @@ private void handleShowHMSTablePartitions(ShowPartitionsStmt showStmt) throws An Map filterMap = showStmt.getFilterMap(); List orderByPairs = showStmt.getOrderByPairs(); + // catalog.getClient().listPartitionNames() returned string is the encoded string. + // example: insert into tmp partition(pt="1=3/3") values( xxx ); + // show partitions from tmp: pt=1%3D3%2F3 + // Need to consider whether to call `HiveUtil.toPartitionColNameAndValues` method + if (limit != null && limit.hasLimit() && limit.getOffset() == 0 && (orderByPairs == null || !orderByPairs.get(0).isDesc())) { // hmsClient returns unordered partition list, hence if offset > 0 cannot pass limit diff --git a/fe/fe-core/src/main/java/org/apache/doris/statistics/HMSAnalysisTask.java b/fe/fe-core/src/main/java/org/apache/doris/statistics/HMSAnalysisTask.java index 7b807b4661cdc2..06009b381778c2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/statistics/HMSAnalysisTask.java +++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/HMSAnalysisTask.java @@ -104,10 +104,11 @@ private void getPartitionColumnStats() { for (String names : partitionNames) { // names is like "date=20230101" for one level partition // and like "date=20230101/hour=12" for two level partition - String[] parts = names.split("/"); - for (String part : parts) { - if (part.startsWith(col.getName())) { - String value = HiveUtil.getHivePartitionValue(part); + List parts = HiveUtil.toPartitionColNameAndValues(names); + for (String[] part : parts) { + String colName = part[0]; + String value = part[1]; + if (colName != null && colName.equals(col.getName())) { // HIVE_DEFAULT_PARTITION hive partition value when the partition name is not specified. if (value == null || value.isEmpty() || value.equals(HiveMetaStoreCache.HIVE_DEFAULT_PARTITION)) { numNulls += 1; diff --git a/regression-test/data/external_table_p0/hive/test_hive_special_char_partition.out b/regression-test/data/external_table_p0/hive/test_hive_special_char_partition.out index f81719d2d0e1c7..13c1d2c155542b 100644 --- a/regression-test/data/external_table_p0/hive/test_hive_special_char_partition.out +++ b/regression-test/data/external_table_p0/hive/test_hive_special_char_partition.out @@ -49,6 +49,204 @@ name6 2023%01%01 -- !13 -- name# 2023#01#01 +-- !sql1 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +1 %100, @@@@@@ , %100 , !!asd!!, A%%Z +2 abc:xyz, 1123,1222, ::::::: +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z +200 abc:xyz, 1123,1222, ::::::: + +-- !sql2 -- +pt= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A + +-- !sql_where1 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 + +-- !sql_where1 -- +1 %100, @@@@@@ , %100 , !!asd!!, A%%Z +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z + +-- !sql_where1 -- +2 abc:xyz, 1123,1222, ::::::: +200 abc:xyz, 1123,1222, ::::::: + +-- !sql3 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 %100, @@@@@@ , %100 , !!asd!!, A%%Z +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 abc:xyz, 1123,1222, ::::::: +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z %100, @@@@@@ , %100 , !!asd!!, A%%Z +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z abc:xyz, 1123,1222, ::::::: +200 abc:xyz, 1123,1222, ::::::: 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +201 abc:xyz, 1123,1222, ::::::: %100, @@@@@@ , %100 , !!asd!!, A%%Z +202 abc:xyz, 1123,1222, ::::::: abc:xyz, 1123,1222, ::::::: + +-- !sql4 -- +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%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E%253=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A + +-- !sql_where2 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +200 abc:xyz, 1123,1222, ::::::: 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 + +-- !sql_where2 -- +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 %100, @@@@@@ , %100 , !!asd!!, A%%Z +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z %100, @@@@@@ , %100 , !!asd!!, A%%Z +201 abc:xyz, 1123,1222, ::::::: %100, @@@@@@ , %100 , !!asd!!, A%%Z + +-- !sql_where2 -- +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 abc:xyz, 1123,1222, ::::::: +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z abc:xyz, 1123,1222, ::::::: +202 abc:xyz, 1123,1222, ::::::: abc:xyz, 1123,1222, ::::::: + +-- !sql5 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 abc:xyz, 1123,1222, ::::::: 1 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 abc:xyz, 1123,1222, ::::::: 1 +200 abc:xyz, 1123,1222, ::::::: 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +201 abc:xyz, 1123,1222, ::::::: 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +202 abc:xyz, 1123,1222, ::::::: 1 1 abc:xyz, 1123,1222, ::::::: 1 + +-- !sql6 -- +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt5=1 +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt5=1 +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt5=1 +pt1=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%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 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +200 abc:xyz, 1123,1222, ::::::: 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 + +-- !sql_where3 -- +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +201 abc:xyz, 1123,1222, ::::::: 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 + +-- !sql_where3 -- +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 abc:xyz, 1123,1222, ::::::: 1 +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 abc:xyz, 1123,1222, ::::::: 1 +202 abc:xyz, 1123,1222, ::::::: 1 1 abc:xyz, 1123,1222, ::::::: 1 + +-- !sql1 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +1 %100, @@@@@@ , %100 , !!asd!!, A%%Z +2 abc:xyz, 1123,1222, ::::::: +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z +200 abc:xyz, 1123,1222, ::::::: + +-- !sql2 -- +pt= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A + +-- !sql_where1 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 + +-- !sql_where1 -- +1 %100, @@@@@@ , %100 , !!asd!!, A%%Z +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z + +-- !sql_where1 -- +2 abc:xyz, 1123,1222, ::::::: +200 abc:xyz, 1123,1222, ::::::: + +-- !sql3 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 %100, @@@@@@ , %100 , !!asd!!, A%%Z +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 abc:xyz, 1123,1222, ::::::: +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z %100, @@@@@@ , %100 , !!asd!!, A%%Z +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z abc:xyz, 1123,1222, ::::::: +200 abc:xyz, 1123,1222, ::::::: 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +201 abc:xyz, 1123,1222, ::::::: %100, @@@@@@ , %100 , !!asd!!, A%%Z +202 abc:xyz, 1123,1222, ::::::: abc:xyz, 1123,1222, ::::::: + +-- !sql4 -- +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A +pt1=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt1=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt1=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A +pt1=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt1=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt1=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A + +-- !sql_where2 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +200 abc:xyz, 1123,1222, ::::::: 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 + +-- !sql_where2 -- +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 %100, @@@@@@ , %100 , !!asd!!, A%%Z +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z %100, @@@@@@ , %100 , !!asd!!, A%%Z +201 abc:xyz, 1123,1222, ::::::: %100, @@@@@@ , %100 , !!asd!!, A%%Z + +-- !sql_where2 -- +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 abc:xyz, 1123,1222, ::::::: +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z abc:xyz, 1123,1222, ::::::: +202 abc:xyz, 1123,1222, ::::::: abc:xyz, 1123,1222, ::::::: + +-- !sql5 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 abc:xyz, 1123,1222, ::::::: 1 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 abc:xyz, 1123,1222, ::::::: 1 +200 abc:xyz, 1123,1222, ::::::: 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +201 abc:xyz, 1123,1222, ::::::: 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +202 abc:xyz, 1123,1222, ::::::: 1 1 abc:xyz, 1123,1222, ::::::: 1 + +-- !sql6 -- +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%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3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt5=1 +pt1=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt5=1 +pt1=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt5=1 + +-- !sql_where3 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +200 abc:xyz, 1123,1222, ::::::: 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 + +-- !sql_where3 -- +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +201 abc:xyz, 1123,1222, ::::::: 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 + +-- !sql_where3 -- +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 abc:xyz, 1123,1222, ::::::: 1 +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 abc:xyz, 1123,1222, ::::::: 1 +202 abc:xyz, 1123,1222, ::::::: 1 1 abc:xyz, 1123,1222, ::::::: 1 + -- !1 -- name# 2023#01#01 name1 2023/01/01 @@ -99,3 +297,201 @@ name6 2023%01%01 -- !13 -- name# 2023#01#01 +-- !sql1 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +1 %100, @@@@@@ , %100 , !!asd!!, A%%Z +2 abc:xyz, 1123,1222, ::::::: +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z +200 abc:xyz, 1123,1222, ::::::: + +-- !sql2 -- +pt= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A + +-- !sql_where1 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 + +-- !sql_where1 -- +1 %100, @@@@@@ , %100 , !!asd!!, A%%Z +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z + +-- !sql_where1 -- +2 abc:xyz, 1123,1222, ::::::: +200 abc:xyz, 1123,1222, ::::::: + +-- !sql3 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 %100, @@@@@@ , %100 , !!asd!!, A%%Z +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 abc:xyz, 1123,1222, ::::::: +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z %100, @@@@@@ , %100 , !!asd!!, A%%Z +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z abc:xyz, 1123,1222, ::::::: +200 abc:xyz, 1123,1222, ::::::: 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +201 abc:xyz, 1123,1222, ::::::: %100, @@@@@@ , %100 , !!asd!!, A%%Z +202 abc:xyz, 1123,1222, ::::::: abc:xyz, 1123,1222, ::::::: + +-- !sql4 -- +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=abc%3Axyz, 1123,1222, %3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/1=2 +1 -1,2/1=2 *3 /3 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +200 abc:xyz, 1123,1222, ::::::: 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 + +-- !sql_where2 -- +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 %100, @@@@@@ , %100 , !!asd!!, A%%Z +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z %100, @@@@@@ , %100 , !!asd!!, A%%Z +201 abc:xyz, 1123,1222, ::::::: %100, @@@@@@ , %100 , !!asd!!, A%%Z + +-- !sql_where2 -- +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 abc:xyz, 1123,1222, ::::::: +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z abc:xyz, 1123,1222, ::::::: +202 abc:xyz, 1123,1222, ::::::: abc:xyz, 1123,1222, ::::::: + +-- !sql5 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 abc:xyz, 1123,1222, ::::::: 1 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 abc:xyz, 1123,1222, ::::::: 1 +200 abc:xyz, 1123,1222, ::::::: 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +201 abc:xyz, 1123,1222, ::::::: 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +202 abc:xyz, 1123,1222, ::::::: 1 1 abc:xyz, 1123,1222, ::::::: 1 + +-- !sql6 -- +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt5=1 +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt5=1 +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt5=1 +pt1=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4= %25100, @@@@@@ ,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/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +200 abc:xyz, 1123,1222, ::::::: 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 + +-- !sql_where3 -- +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +201 abc:xyz, 1123,1222, ::::::: 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 + +-- !sql_where3 -- +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 abc:xyz, 1123,1222, ::::::: 1 +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 abc:xyz, 1123,1222, ::::::: 1 +202 abc:xyz, 1123,1222, ::::::: 1 1 abc:xyz, 1123,1222, ::::::: 1 + +-- !sql1 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +1 %100, @@@@@@ , %100 , !!asd!!, A%%Z +2 abc:xyz, 1123,1222, ::::::: +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z +200 abc:xyz, 1123,1222, ::::::: + +-- !sql2 -- +pt= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A + +-- !sql_where1 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 + +-- !sql_where1 -- +1 %100, @@@@@@ , %100 , !!asd!!, A%%Z +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z + +-- !sql_where1 -- +2 abc:xyz, 1123,1222, ::::::: +200 abc:xyz, 1123,1222, ::::::: + +-- !sql3 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 %100, @@@@@@ , %100 , !!asd!!, A%%Z +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 abc:xyz, 1123,1222, ::::::: +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z %100, @@@@@@ , %100 , !!asd!!, A%%Z +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z abc:xyz, 1123,1222, ::::::: +200 abc:xyz, 1123,1222, ::::::: 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +201 abc:xyz, 1123,1222, ::::::: %100, @@@@@@ , %100 , !!asd!!, A%%Z +202 abc:xyz, 1123,1222, ::::::: abc:xyz, 1123,1222, ::::::: + +-- !sql4 -- +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A +pt1=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt1=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt1=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A +pt1=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z +pt1=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3 +pt1=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A + +-- !sql_where2 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 +200 abc:xyz, 1123,1222, ::::::: 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 + +-- !sql_where2 -- +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 %100, @@@@@@ , %100 , !!asd!!, A%%Z +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z %100, @@@@@@ , %100 , !!asd!!, A%%Z +201 abc:xyz, 1123,1222, ::::::: %100, @@@@@@ , %100 , !!asd!!, A%%Z + +-- !sql_where2 -- +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 abc:xyz, 1123,1222, ::::::: +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z abc:xyz, 1123,1222, ::::::: +202 abc:xyz, 1123,1222, ::::::: abc:xyz, 1123,1222, ::::::: + +-- !sql5 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 abc:xyz, 1123,1222, ::::::: 1 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 abc:xyz, 1123,1222, ::::::: 1 +200 abc:xyz, 1123,1222, ::::::: 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +201 abc:xyz, 1123,1222, ::::::: 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +202 abc:xyz, 1123,1222, ::::::: 1 1 abc:xyz, 1123,1222, ::::::: 1 + +-- !sql6 -- +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25Z/pt5=1 +pt1= %25100, @@@@@@ , %25100 , !!asd!!, A%25%25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, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4=1,1%3D1, 3%3D2+1, 1%3D3-2, 3%2F3%3D1, 2%2F2%3D1, 2%2F1%3D2, 2%2F1%3D2 +1 -1,2%2F1%3D2 %2A3 %2F3/pt5=1 +pt1=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt2%3Dx!!!! %2A%2A1+1%2F&%5E%253=1/pt3=1/pt4=abc%3Axyz, 1123,1222, %3A%3A%3A%3A%3A%3A%3A/pt5=1 + +-- !sql_where3 -- +0 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +100 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 +200 abc:xyz, 1123,1222, ::::::: 1 1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 + +-- !sql_where3 -- +1 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +101 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 +201 abc:xyz, 1123,1222, ::::::: 1 1 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 + +-- !sql_where3 -- +2 1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3 1 1 abc:xyz, 1123,1222, ::::::: 1 +102 %100, @@@@@@ , %100 , !!asd!!, A%%Z 1 1 abc:xyz, 1123,1222, ::::::: 1 +202 abc:xyz, 1123,1222, ::::::: 1 1 abc:xyz, 1123,1222, ::::::: 1 + diff --git a/regression-test/suites/external_table_p0/hive/test_hive_special_char_partition.groovy b/regression-test/suites/external_table_p0/hive/test_hive_special_char_partition.groovy index 8b78ab2e3ce9b4..d22041459d5ae5 100644 --- a/regression-test/suites/external_table_p0/hive/test_hive_special_char_partition.groovy +++ b/regression-test/suites/external_table_p0/hive/test_hive_special_char_partition.groovy @@ -23,14 +23,18 @@ suite("test_hive_special_char_partition", "p0,external,hive,external_docker,exte } for (String hivePrefix : ["hive2", "hive3"]) { + + setHivePrefix(hivePrefix) String hms_port = context.config.otherConfigs.get(hivePrefix + "HmsPort") + String hdfs_port = context.config.otherConfigs.get(hivePrefix + "HdfsPort") String catalog_name = "${hivePrefix}_test_hive_special_char_partition" String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") sql """drop catalog if exists ${catalog_name}""" sql """create catalog if not exists ${catalog_name} properties ( - "type"="hms", - 'hive.metastore.uris' = 'thrift://${externalEnvIp}:${hms_port}' + 'type'='hms', + 'hive.metastore.uris' = 'thrift://${externalEnvIp}:${hms_port}', + 'fs.defaultFS' = 'hdfs://${externalEnvIp}:${hdfs_port}' );""" logger.info("catalog " + catalog_name + " created") sql """switch ${catalog_name};""" @@ -49,6 +53,197 @@ suite("test_hive_special_char_partition", "p0,external,hive,external_docker,exte qt_11 "select * from special_character_1_partition where part='2023\\\\01\\\\01'" qt_12 "select * from special_character_1_partition where part='2023%01%01'" qt_13 "select * from special_character_1_partition where part='2023#01#01'" + + + + // append some case. + String table_name_1 = "partition_special_characters_1" + String table_name_2 = "partition_special_characters_2" + String table_name_3 = "partition_special_characters_3" + + hive_docker """ set hive.stats.column.autogather=false """ + hive_docker """ use `default`""" + def special_characters = [ + "1,1=1, 3=2+1, 1=3-2, 3/3=1, 2/2=1, 2/1=2, 2/1=2 +1 -1,2/1=2 *3 /3", + " %100, @@@@@@ , %100 , !!asd!!, A%%Z", + "abc:xyz, 1123,1222, :::::::" + ] + + + logger.info(""" docker insert 1""") + + hive_docker """ drop table if exists ${table_name_1} """ + hive_docker """ create table ${table_name_1} (id int) partitioned by (pt string) """ + special_characters.eachWithIndex { item, index -> + hive_docker """ insert into ${table_name_1} partition(pt="${item}") values ("${index}"); """ + hive_docker """ insert into ${table_name_1} partition(pt="${item}") values ("${index*100}"); """ + println("Index: ${index}, Item: ${item}") + } + + + sql """refresh catalog ${catalog_name} """ + sql """switch ${catalog_name} """ + sql """ use `default` """ + + qt_sql1 """ select * from ${table_name_1} order by id """ + qt_sql2 """ show partitions from ${table_name_1} """ + + special_characters.eachWithIndex { item, index -> + qt_sql_where1 """ select * from ${table_name_1} where pt = "${item}" order by id""" + } + + + + logger.info(""" docker insert 2""") + hive_docker """ drop table if exists ${table_name_2} """ + hive_docker """ create table ${table_name_2} (id int) partitioned by (pt1 string, `pt2=x!!!! **1+1/&^%3` string) """ + + special_characters.eachWithIndex { outerItem, outerIndex -> + special_characters.eachWithIndex { innerItem, innerIndex -> + + def insert_value = outerIndex * 100 + innerIndex; + + hive_docker """ insert into ${table_name_2} partition(pt1="${outerItem}",`pt2=x!!!! **1+1/&^%3`="${innerItem}") values ("${insert_value}"); """ + println(" Outer Item: ${outerItem}, Inner Item: ${innerItem}, value = ${insert_value}") + } + } + + + sql """refresh catalog ${catalog_name} """ + sql """switch ${catalog_name} """ + sql """ use `default` """ + + qt_sql3 """ select * from ${table_name_2} order by id """ + qt_sql4 """ show partitions from ${table_name_2} """ + + special_characters.eachWithIndex { item, index -> + qt_sql_where2 """ select * from ${table_name_2} where `pt2=x!!!! **1+1/&^%3` = "${item}" order by id""" + } + + + logger.info(""" docker insert 3""") + hive_docker """ drop table if exists ${table_name_3} """ + hive_docker """ create table ${table_name_3} (id int) partitioned by (pt1 string, `pt2=x!!!! **1+1/&^%3` string,pt3 string,pt4 string,pt5 string) """ + + + special_characters.eachWithIndex { outerItem, outerIndex -> + special_characters.eachWithIndex { innerItem, innerIndex -> + + def insert_value = outerIndex * 100 + innerIndex; + hive_docker """ insert into ${table_name_3} partition(pt1="${outerItem}", `pt2=x!!!! **1+1/&^%3`="1", pt3="1",pt4="${innerItem}",pt5="1") values ("${insert_value}"); """ + println(" Outer Item: ${outerItem}, Inner Item: ${innerItem}, value = ${insert_value}") + } + } + + + sql """refresh catalog ${catalog_name} """ + sql """switch ${catalog_name} """ + sql """ use `default` """ + + qt_sql5 """ select * from ${table_name_3} order by id """ + qt_sql6 """ show partitions from ${table_name_3} """ + + special_characters.eachWithIndex { item, index -> + qt_sql_where3 """ select * from ${table_name_3} where pt4 = "${item}" order by id""" + } + + + + + + + logger.info(""" ---------- doris insert -------------""") + + logger.info(""" doris insert 1""") + hive_docker """ drop table if exists ${table_name_1} """ + hive_docker """ create table ${table_name_1} (id int) partitioned by (pt string) """ + sql """refresh catalog ${catalog_name} """ + sql """switch ${catalog_name} """ + sql """ use `default` """ + special_characters.eachWithIndex { item, index -> + sql """ insert into ${table_name_1} (pt,id) values ("${item}","${index}"); """ + sql """ insert into ${table_name_1} (pt,id) values ("${item}","${index*100}"); """ + + println("Index: ${index}, Item: ${item}") + } + + + sql """refresh catalog ${catalog_name} """ + sql """switch ${catalog_name} """ + sql """ use `default` """ + + qt_sql1 """ select * from ${table_name_1} order by id """ + qt_sql2 """ show partitions from ${table_name_1} """ + + special_characters.eachWithIndex { item, index -> + qt_sql_where1 """ select * from ${table_name_1} where pt = "${item}" order by id """ + } + + + + logger.info(""" doris insert 2""") + hive_docker """ drop table if exists ${table_name_2} """ + hive_docker """ create table ${table_name_2} (id int) partitioned by (pt1 string, `pt2=x!!!! **1+1/&^%3` string) """ + sql """refresh catalog ${catalog_name} """ + sql """switch ${catalog_name} """ + sql """ use `default` """ + + special_characters.eachWithIndex { outerItem, outerIndex -> + special_characters.eachWithIndex { innerItem, innerIndex -> + + def insert_value = outerIndex * 100 + innerIndex; + + sql """ insert into ${table_name_2} (pt1,`pt2=x!!!! **1+1/&^%3`,id) values ("${outerItem}","${innerItem}","${insert_value}"); """ + println(" Outer Item: ${outerItem}, Inner Item: ${innerItem}, value = ${insert_value}") + } + } + + + sql """refresh catalog ${catalog_name} """ + sql """switch ${catalog_name} """ + sql """ use `default` """ + + qt_sql3 """ select * from ${table_name_2} order by id """ + qt_sql4 """ show partitions from ${table_name_2} """ + + special_characters.eachWithIndex { item, index -> + qt_sql_where2 """ select * from ${table_name_2} where `pt2=x!!!! **1+1/&^%3` = "${item}" order by id""" + } + + + + + logger.info(""" docker insert 3""") + hive_docker """ drop table if exists ${table_name_3} """ + hive_docker """ create table ${table_name_3} (id int) partitioned by (pt1 string, `pt2=x!!!! **1+1/&^%3` string,pt3 string,pt4 string,pt5 string) """ + sql """refresh catalog ${catalog_name} """ + sql """switch ${catalog_name} """ + sql """ use `default` """ + + special_characters.eachWithIndex { outerItem, outerIndex -> + special_characters.eachWithIndex { innerItem, innerIndex -> + + def insert_value = outerIndex * 100 + innerIndex; + sql """ insert into ${table_name_3} (pt1, `pt2=x!!!! **1+1/&^%3`, pt3,pt4,pt5,id) values ("${outerItem}","1","1","${innerItem}","1","${insert_value}"); """ + println(" Outer Item: ${outerItem}, Inner Item: ${innerItem}, value = ${insert_value}") + } + } + + + sql """refresh catalog ${catalog_name} """ + sql """switch ${catalog_name} """ + sql """ use `default` """ + + qt_sql5 """ select * from ${table_name_3} order by id """ + qt_sql6 """ show partitions from ${table_name_3} """ + + special_characters.eachWithIndex { item, index -> + qt_sql_where3 """ select * from ${table_name_3} where pt4 = "${item}" order by id""" + } + + + + } }