You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "João Reis (Jira)" <ji...@apache.org> on 2026/01/30 16:21:00 UTC
[jira] [Updated] (CASSGO-105) Nil pointer dereference in compileMetadata when custom aggregate has no final func defined
[ https://issues.apache.org/jira/browse/CASSGO-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
João Reis updated CASSGO-105:
-----------------------------
Bug Category: Parent values: Availability(12983)Level 1 values: Process Crash(12992)
Complexity: Normal
Component/s: Core
Discovered By: User Report
Fix Version/s: 2.1.0
Reviewers: João Reis
Severity: Normal
Status: Open (was: Triage Needed)
> Nil pointer dereference in compileMetadata when custom aggregate has no final func defined
> ------------------------------------------------------------------------------------------
>
> Key: CASSGO-105
> URL: https://issues.apache.org/jira/browse/CASSGO-105
> Project: Apache Cassandra Go driver
> Issue Type: Bug
> Components: Core
> Reporter: Bohdan Siryk
> Priority: Normal
> Fix For: 2.1.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> A nil pointer dereference occurs when a custom aggregate is defined without a FINALFUNC. Cassandra states that the final func is optional, so Gocql should correctly handle such a case.
> Discovered during the implementation of CASSGO-101.
> The root cause is [this piece of code|https://github.com/apache/cassandra-gocql-driver/blob/f1e31a58f7e0c25e58e2e2a0a0c6de358e643e8b/metadata.go#L362], which tries to get function metadata from the Functions map by finalFunc name. As there is no final function for the created aggregate, _AggregateMetadata.finalFunc_ is an empty string. Trying to get the function metadata from _KeyspaceMetadata.Functions_ map by that empty string value result in a return of a nil value, which is being dereferenced after.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org