Hi

I have a few questions -

   1. Is it possible to have an UNFROZEN UDT in a list ?
   2. Is it possible to execute LWT on the basis of a value contained in
   List of a UDT ?


e.g. Consider a table -

CREATE TABLE test.registration_form3 (

    student_id int PRIMARY KEY,

    name text,

    permanent_add list<frozen<permanent_address>>,

    registration_fees int

) WITH bloom_filter_fp_chance = 0.01

    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}

    AND comment = ''

    AND compaction = {'class':
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy',
'max_threshold': '32', 'min_threshold': '4'}

    AND compression = {'chunk_length_in_kb': '64', 'class':
'org.apache.cassandra.io.compress.LZ4Compressor'}

    AND crc_check_chance = 1.0

    AND dclocal_read_repair_chance = 0.1

    AND default_time_to_live = 0

    AND gc_grace_seconds = 864000

    AND max_index_interval = 2048

    AND memtable_flush_period_in_ms = 0

    AND min_index_interval = 128

    AND read_repair_chance = 0.0

    AND speculative_retry = '99PERCENTILE';


cassandra@cqlsh:test> select * from registration_form3;


 *student_id* | *name*   | *permanent_add*

                                                            |
*registration_fees*

------------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------

        *123* | *Ashish* | *[{**house_no**: **123**, **name**: **'ashish'**,
**city**: **'patna'**, **pin**: **000000**}, {**house_no**: **544**, **name**:
**'ashish'**, **city**: **'california'**, **pin**: **2019**}, {**house_no**:
**124**, **name**: **'rana'**, **city**: **'delhi'**, **pin**: **2020**}]* |
            *2500*

*I want to change the above entry to-*

cassandra@cqlsh:test> select * from registration_form3;


 *student_id* | *name*   | *permanent_add*

                                                            |
*registration_fees*

------------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------

        *123* | *Ashish* | *[{**house_no**: **123**, **name**: **'ashish'**,
**city**: **'patna'**, **pin: 246746**}, {**house_no**: **544**, **name**: *
*'ashish'**, **city**: **'california'**, **pin**: **2019**}, {**house_no**:
**124**, **name**: **'rana'**, **city**: **'delhi'**, **pin**: **2020**}]*
|              *2500*


*and this should happen atomically.*


Thanks!
-- 
Shaurya Gupta

Reply via email to