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

Unable to create Materialized View on UDT fields saeperately

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

Details

    • Improvement
    • Status: Open
    • Low
    • Resolution: Unresolved
    • None
    • None

    Description

      We are unable to create index on UDT fields individually and there were suggestions/recommendations to create Materialized Views for these UDT individually. Unfortunately we are unable to create Materialized Views by providing part of UDT fields.

      It would be better if indexing is supported on UDT fields, if not possible providing support in Materialized View will be helpful. We want support on non frozen as well as frozen UDT.

      Example:
      CREATE TYPE mytype (
      id int,
      value text
      )

      CREATE TABLE mytable (
      key int PRIMARY KEY,
      mytype frozen<mytype>,
      val text
      )

      And then creating a materialized view with the UDT

      CREATE MATERIALIZED VIEW mv AS SELECT key, val, mytype.id, mytype.value FROM mytable WHERE key IS NOT NULL AND mytype IS NOT NULL PRIMARY KEY (key, mytype);

      The error I get is the following :

      [Invalid query] message="Cannot select out a part of type when defining a materialized view"

      Attachments

        Activity

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

          People

            Unassigned Unassigned Assign to me
            sathish_alwar SathishKumar Alwar

            Dates

              Created:
              Updated:

              Slack

                Issue deployment