[Feature](IP) support ipv4/ipv6 with inverted index and conjuncts for query (#35734)

support data type ipv4/ipv6 with inverted index 
and then we can query like "> or < or >= or <= or in/not in " this
conjuncts expr for ip with inverted index speeding up
This commit is contained in:
amory
2024-06-03 20:49:17 +08:00
committed by yiguolei
parent ba0161c8b9
commit fe1a4c4136
11 changed files with 1020 additions and 13 deletions

View File

@ -220,7 +220,7 @@ public class IndexDef {
}
if (!(colType.isDateType() || colType.isDecimalV2Type() || colType.isDecimalV3Type()
|| colType.isFixedPointType() || colType.isStringType() || colType == PrimitiveType.BOOLEAN
|| colType.isVariantType())) {
|| colType.isVariantType()) || colType.isIPType()) {
throw new AnalysisException(colType + " is not supported in " + indexType.toString() + " index. "
+ "invalid index: " + indexName);
}

View File

@ -105,7 +105,7 @@ public class IndexDefinition {
}
if (!(colType.isDateLikeType() || colType.isDecimalLikeType()
|| colType.isIntegralType() || colType.isStringLikeType()
|| colType.isBooleanType() || colType.isVariantType())) {
|| colType.isBooleanType() || colType.isVariantType() || colType.isIPType())) {
// TODO add colType.isAggState()
throw new AnalysisException(colType + " is not supported in " + indexType.toString()
+ " index. " + "invalid index: " + name);

View File

@ -579,6 +579,10 @@ public abstract class DataType {
return this instanceof IPv4Type;
}
public boolean isIPType() {
return isIPv4Type() || isIPv6Type();
}
public boolean isIPv6Type() {
return this instanceof IPv6Type;
}