Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0D24B200BB6 for ; Fri, 21 Oct 2016 04:21:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0BA02160AF2; Fri, 21 Oct 2016 02:21:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 52E96160AE0 for ; Fri, 21 Oct 2016 04:20:59 +0200 (CEST) Received: (qmail 71443 invoked by uid 500); 21 Oct 2016 02:20:58 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 71432 invoked by uid 99); 21 Oct 2016 02:20:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2016 02:20:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5A2DA2C0D53 for ; Fri, 21 Oct 2016 02:20:58 +0000 (UTC) Date: Fri, 21 Oct 2016 02:20:58 +0000 (UTC) From: "Darwin Airola (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-12463) Unable to create Materialized View on UDT fields saeperately MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 21 Oct 2016 02:21:00 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15593711#comment-15593711 ] Darwin Airola commented on CASSANDRA-12463: ------------------------------------------- It would also be really nice to have something like these: CREATE TYPE xtype ( id timeuuid, v1 double, v2 double); CREATE TABLE thetable ( id timeuuid PRIMARY KEY, val text, xtype xtype); and be able to create a materialized view like this: CREATE MATERIALIZED VIEW mv AS SELECT id, xtype.v1, xtype.v2 FROM thetable WHERE id IS NOT NULL AND xtype.v1 IS NOT NULL AND xtype.v2 IS NOT NULL PRIMARY KEY (id, v1, v2); Might that ever be an option? > Unable to create Materialized View on UDT fields saeperately > ------------------------------------------------------------ > > Key: CASSANDRA-12463 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12463 > Project: Cassandra > Issue Type: Improvement > Reporter: SathishKumar Alwar > Priority: Minor > > 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, > 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" -- This message was sent by Atlassian JIRA (v6.3.4#6332)