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

NPE when passing wrong argument in ALTER TABLE statement

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.1.3
    • Legacy/CQL
    • None
    • Cassandra 2.1.2

    • Low

    Description

      When I tried to change the caching strategy of a table, I provided a wrong argument 'rows_per_partition' : ALL with unquoted ALL. Cassandra returned a SyntaxError, which is good, but it seems it was because of a NullPointerException.

      Howto

      CREATE TABLE foo (k int primary key);
      ALTER TABLE foo WITH caching = {'keys' : 'all', 'rows_per_partition' : ALL};
      

      Output

      <ErrorMessage code=2000 [Syntax error in CQL query] message="Failed parsing statement: [ALTER TABLE foo WITH caching = {'keys' : 'all', 'rows_per_partition' : ALL};] reason: NullPointerException null">
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            blerer Benjamin Lerer Assign to me
            pingtimeout Pierre Laporte
            Benjamin Lerer
            Robert Stupp
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment