[
https://issues.apache.org/jira/browse/CASSANDRA-20102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17916012#comment-17916012
]
Stefan Miklosovic commented on CASSANDRA-20102:
-----------------------------------------------
It is a little bit flaky here and there but nothing what I have not seen
recently or what would be related to this ticket.
[CASSANDRA-20102|https://github.com/instaclustr/cassandra/tree/CASSANDRA-20102]
{noformat}
java17_pre-commit_tests
✓ j17_build 4m 8s
✓ j17_cqlsh_dtests_py311 7m 40s
✓ j17_cqlsh_dtests_py311_vnode 7m 54s
✓ j17_cqlsh_dtests_py38 7m 16s
✓ j17_cqlsh_dtests_py38_vnode 7m 27s
✓ j17_cqlshlib_cython_tests 11m 0s
✓ j17_cqlshlib_tests 7m 44s
✓ j17_unit_tests 13m 42s
✓ j17_unit_tests_repeat 3m 26s
✓ j17_utests_latest 15m 10s
✓ j17_utests_latest_repeat 3m 18s
✓ j17_utests_oa 14m 9s
✓ j17_utests_oa_repeat 3m 13s
✕ j17_dtests 34m 11s
compaction_test.TestCompaction test_compaction_throughput
refresh_test.TestRefresh test_refresh_deadlock_startup
✕ j17_dtests_latest 40m 40s
read_repair_test.TestSpeculativeReadRepair
test_quorum_requirement_on_speculated_read
read_repair_test.TestSpeculativeReadRepair test_speculative_data_request
✕ j17_dtests_vnode 38m 35s
compaction_test.TestCompaction test_compaction_throughput
✕ j17_jvm_dtests 17m 59s
org.apache.cassandra.fuzz.ring.ConsistentBootstrapTest
coordinatorIsBehindTest
✕ j17_jvm_dtests_latest_vnode 16m 49s
org.apache.cassandra.distributed.test.ReadRepairTest
testBlockingReadRepair
java17_separate_tests
java11_pre-commit_tests
✓ j11_build 8m 30s
✓ j11_cqlsh_dtests_py311_vnode 7m 56s
✓ j11_cqlsh_dtests_py38 10m 14s
✓ j11_cqlsh_dtests_py38_vnode 10m 23s
✓ j11_cqlshlib_cython_tests 11m 41s
✓ j11_cqlshlib_tests 10m 29s
✓ j11_jvm_dtests_latest_vnode 21m 57s
✓ j11_simulator_dtests 9m 41s
✓ j11_unit_tests 16m 55s
✓ j11_unit_tests_repeat 7m 51s
✓ j11_utests_latest_repeat 8m 9s
✓ j11_utests_oa 16m 45s
✓ j11_utests_oa_repeat 8m 46s
✓ j11_utests_system_keyspace_directory_repeat 6m 41s
✓ j17_cqlsh_dtests_py311 6m 53s
✓ j17_cqlsh_dtests_py311_vnode 7m 29s
✓ j17_cqlsh_dtests_py38 6m 43s
✓ j17_cqlsh_dtests_py38_vnode 7m 28s
✓ j17_cqlshlib_cython_tests 7m 53s
✓ j17_cqlshlib_tests 7m 16s
✓ j17_jvm_dtests_latest_vnode 16m 15s
✓ j17_unit_tests 17m 45s
✓ j17_unit_tests_repeat 3m 43s
✓ j17_utests_latest 15m 27s
✓ j17_utests_latest_repeat 3m 28s
✓ j17_utests_oa 16m 53s
✓ j17_utests_oa_repeat 3m 53s
✕ j11_cqlsh_dtests_py311 8m 46s
cqlsh_tests.test_cqlsh_copy.TestCqlshCopy
test_bulk_round_trip_with_timeouts
✕ j11_dtests 57m 8s
compaction_test.TestCompaction test_compaction_throughput
refresh_test.TestRefresh test_refresh_deadlock_startup
counter_test.TestCounters test_counter_node_down
✕ j11_dtests_latest 43m 23s
read_repair_test.TestSpeculativeReadRepair
test_quorum_requirement_on_speculated_read
✕ j11_dtests_vnode 41m 2s
compaction_test.TestCompaction test_compaction_throughput
✕ j11_jvm_dtests 22m 49s
org.apache.cassandra.fuzz.ring.ConsistentBootstrapTest
coordinatorIsBehindTest
org.apache.cassandra.distributed.test.tcm.SplitBrainTest
testFilterGossipStatesWithMismatchingMetadataId
org.apache.cassandra.distributed.test.tcm.SplitBrainTest
testSplitBrainStartup
✕ j11_utests_latest 15m 25s
org.apache.cassandra.cql3.SimpleQueryTest test2ndaryIndexBug
✕ j11_utests_system_keyspace_directory 16m 34s
org.apache.cassandra.auth.GrantAndRevokeTest testGrantOnAllKeyspaces
✕ j17_dtests 33m 57s
compaction_test.TestCompaction test_compaction_throughput
refresh_test.TestRefresh test_refresh_deadlock_startup
✕ j17_dtests_latest 39m 25s
read_repair_test.TestSpeculativeReadRepair test_failed_read_repair
read_repair_test.TestSpeculativeReadRepair test_quorum_requirement
read_repair_test.TestSpeculativeReadRepair test_speculative_data_request
topology_test.TestTopology test_resumable_decommission
✕ j17_dtests_vnode 39m 47s
compaction_test.TestCompaction test_compaction_throughput
✕ j17_jvm_dtests 20m 16s
org.apache.cassandra.fuzz.ring.ConsistentBootstrapTest
coordinatorIsBehindTest
java11_separate_tests
{noformat}
[java17_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/5247/workflows/a11bd4d4-984e-4ea0-8a09-b5cd96ab8261]
[java11_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/5247/workflows/6764430d-fbde-48ad-bf46-b010c231cedc]
> Support simple length functions for blob and string
> ---------------------------------------------------
>
> Key: CASSANDRA-20102
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20102
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: CQL/Semantics
> Reporter: Joey Lynch
> Assignee: Joey Lynch
> Priority: Low
> Fix For: 5.x
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> A common question from users is how to query for the length of {{blob}} and
> {{text}} columns, and the answer is often for users to enable UDFs and then
> write their own
> ([1|https://stackoverflow.com/questions/49674114/cassandra-query-string-length],
>
> [2|https://stackoverflow.com/questions/58401750/how-can-i-get-size-of-blob-column-of-cassandra-using-user-defined-functions],
> ...). I think it would make sense for Cassandra to support a subset of the
> SQL99 [binary length
> functions|https://sql-99.readthedocs.io/en/latest/chapters/05.html#octet-length-expression]
> and a UTF8 codepoint aware {{length}} function similar to PostgreSQL's
> [{{length}}|https://www.postgresql.org/docs/9.1/functions-string.html]
> function.
> Specifically I propose two new system functions:
> # {{octet_length}} - Defined on all types and returns the number of
> underlying bytes in the bytebuffer representation of the column. Does _not_
> account for storage overhead (e.g. does not account for metadata)
> # {{length}} - Defined on UTF8 strings, and returns the number of UTF8
> codepoints in the string, equivalent to Java's
> [{{String.length}}|https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html#length()]
> function.
> Patch coming shortly. Particularly interested in feedback if we A) think
> these functions are reasonable to have inside Cassandra, and B) like the
> names of the functions to align with SQL or if we want to go nonstandard and
> do like {{blength}} instead of octet length.
> An example of the difference between octet length and string length
> {code}
> // A table with text key and blob value
> cqlsh> select key, value from test.test;
> key | value
> -------+--------
> hello | 0x12af
> cqlsh> select length(key), octet_length(value) from test.test;
> system.length(key) | system.octet_length(value)
> --------------------+---------------------------
> 5 | 2
> cqlsh> INSERT INTO test.test (key, value) VALUES ('こんにちは世界', 0x12AF);
> cqlsh> select length(key), octet_length(key), octet_length(value) from
> test.test where key = 'こんにちは世界';
> system.length(key) | system.octet_length(key) | system.octet_length(value)
> --------------------+-------------------------+---------------------------
> 7 | 21 | 2
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]