[
https://issues.apache.org/jira/browse/CASSANDRA-19492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907446#comment-17907446
]
Caleb Rackliffe commented on CASSANDRA-19492:
---------------------------------------------
Just making a note here before we all shut down for the holidays...
Looking at the example above, I think my previous statements about this being
solvable in post-filtering are only partially true. For equality queries, we
don't care about the fact that we normalize v4 addresses before we index them.
At query time, if we match equivalent v4/v6 addresses, we can simply
post-filter the values we get from the normal read path and eliminate the false
matches.
Range queries are different though. {{InetAddressType}} uses {{BYTE_ORDER}} but
accommodates both 4-byte (v4) and 16-byte (v6) addresses, and these sort
differently on-disk for the main storage engine than they do in the numeric
index, which normalizes both to 16-byte values by adding the standard prefix to
v4 addresses.
What we may need is a per-column-index option enabling a new on-disk format
option for the numeric index that preserves the ordering used by the main
storage engine. It would still have to be a fixed size if we want to use the
current balanced tree numeric index though, and that might be a challenge in
terms of compression.
> Allow configurable v4/v6 address matching behavior for SAI indexes on CQL
> inet columns
> --------------------------------------------------------------------------------------
>
> Key: CASSANDRA-19492
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19492
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Feature/SAI
> Reporter: Caleb Rackliffe
> Assignee: Ekaterina Dimitrova
> Priority: Normal
> Fix For: 5.0.x, 5.x
>
>
> The {{inet}} type in CQL allows ipv4 and ipv6 address formats to mix in the
> same column, and while there is a standard conversion between v4 and v6,
> equivalent addresses are not considered equal by Cassandra, when it comes to
> their usage in keys or in filtering queries. However, in SAI queries,
> equivalent v4 and v6 addresses ARE considered equal. Even if this behavior is
> useful, it might be a good idea to make the default behavior consistent with
> filtering, and allow the index configuration to control whether or not to
> consider them equal. (We have precedent for this w/ case-insensitive indexing
> of text columns, etc.)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]