blerer commented on code in PR #2125:
URL: https://github.com/apache/cassandra/pull/2125#discussion_r1116686899
##########
src/java/org/apache/cassandra/cql3/selection/Selector.java:
##########
@@ -443,14 +447,21 @@ private <V> ByteBuffer value(Cell<V> c)
}
/**
- * Return the value of the column with the specified index.
+ * Return the value of the column with the specified index. If the
column the value belongs to is masked with a
+ * {@link ColumnMask} and {@link #unmask} hasn't been specified, such
mask will be applied to the value.
*
* @param index the column index
- * @return the value of the column with the specified index
+ * @return the value of the column with the specified index, masked if
its column is masked
*/
public ByteBuffer getValue(int index)
{
- return values[index];
+ ByteBuffer value = values[index];
Review Comment:
I looked into the code and my confusion was coming from the fact that
`SimpleSelection` relies on `InputRow.getValues()`
(https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/selection/Selection.java#L478)
and not `getValue`. Nevertheless, it introduce some weird behavior has one
method will return masked values and not the other one. I think that we should
be consistent. We could either do those operations at the `InputRow` level and
do it when the value is set (which would allow us to simplify the logic at the
SelectStatement level) or keep the logic in `SimpleSelector `.
What is also unclear to me is how do we plan to handle the post ordering
(https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java#L1059)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]