[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:
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user