Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-8994

Make keyspace handling in FunctionName less fragile

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Won't Fix
    • 4.1-alpha1, 4.1
    • None
    • None

    Description

      FunctionName keyspace field can be null because it can be omitted by the user (in which case we search both the system keyspace and the one of the statement). The handling of that is imo a tad fragile: the equals method should typically probably complain if one of its operand has no keyspace since in that case, we can't really properly answer. The code currently work around that in Functions by avoiding equals when this matter but it would still be pretty easy to get that wrong, especially since FunctionName is used in maps. For instance, you could argue that Functions#find is broken if its argument has no keyspace (it happens to be only use when that's not the case, but again, pretty easy to get wrong in the future).

      Attachments

        Activity

          People

            slebresne Sylvain Lebresne
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: