You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "Maxwell-Guo (via GitHub)" <gi...@apache.org> on 2023/09/28 02:58:17 UTC
[GitHub] [cassandra] Maxwell-Guo commented on a diff in pull request #2746: CASSANDRA-18876 trunk: Vector type shouldn't support empty value
Maxwell-Guo commented on code in PR #2746:
URL: https://github.com/apache/cassandra/pull/2746#discussion_r1339458277
##########
src/java/org/apache/cassandra/db/marshal/VectorType.java:
##########
@@ -215,7 +217,8 @@ public <V> ByteSource asComparableBytes(ValueAccessor<V> accessor, V value, Byte
public <V> V fromComparableBytes(ValueAccessor<V> accessor, ByteSource.Peekable comparableBytes, ByteComparable.Version version)
{
if (comparableBytes == null)
- return accessor.empty();
+ rejectEmptyValue();
Review Comment:
why do not throw a MarshalException directly instead of execute a function which just only throw an exception ?
Beside If the purpose is to use common code , I think we can use some code like this [throw ire](https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/schema/AlterTableStatement.java#L307)
which can express the exception throwing and rejection behaviors more intuitively. wdyt ?
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org