[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-17 Thread Aleksei Zotov (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416681#comment-17416681
 ] 

Aleksei Zotov commented on CASSANDRA-16806:
---

[~blerer] thank you so much for getting this merged and your support!

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.1
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-17 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416667#comment-17416667
 ] 

Benjamin Lerer commented on CASSANDRA-16806:


Thanks [~azotcsit].

CI looks good 
[j8|https://app.circleci.com/pipelines/github/blerer/cassandra/210/workflows/627e4a13-e083-47b1-95c7-c238e7fb060d],
 
[j11|https://app.circleci.com/pipelines/github/blerer/cassandra/210/workflows/9121931b-3c34-4de1-a6e7-c585ea08223c].

 

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-16 Thread Aleksei Zotov (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416241#comment-17416241
 ] 

Aleksei Zotov commented on CASSANDRA-16806:
---

Great catch [~blerer]! I did not know about such a syntax in CQL. Now I 
understand what the origin of your questions about 
{{clusteringColumnValuesPrefix}} is.

I checked your changes and left a few minor comments (like missing spaces). In 
general the code LGTM.

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-16 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416174#comment-17416174
 ] 

Benjamin Lerer commented on CASSANDRA-16806:


Sorry, for the delay [~azotcsit] while looking into the patch I realized that I 
forgot about multi-column restrictions. I added some tests and unfortunately 
the current logic for range deletion could not work on some of the scenarios 
(e.g. {{c1 >= 1 AND (c1, c2) <= (2, 3)}}). I reworked the patch to solve that 
problem and ended up refactoring different part of it. The changes are 
[here|https://github.com/apache/cassandra/compare/trunk...blerer:CASSANDRA-16806-review?expand=1].
 Tell me if those changes make sense to you. 

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-10 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17413044#comment-17413044
 ] 

Benjamin Lerer commented on CASSANDRA-16806:


[~stefan.miklosovic] In my opinion the patch should be ready. I just want to 
give it a last look + run CI before committing it. 

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-10 Thread Stefan Miklosovic (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17413016#comment-17413016
 ] 

Stefan Miklosovic commented on CASSANDRA-16806:
---

Is there anything else remaining to be done as Chris +1'ed this? I would love 
to see this merged as this is exactly what I need for other tickets to move 
forward.

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-08 Thread Chris Lohfink (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17412182#comment-17412182
 ] 

Chris Lohfink commented on CASSANDRA-16806:
---

I am +1 to change. From looks of it it was pretty unnecessary to restrict them 
in first place.

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-08 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17411897#comment-17411897
 ] 

Benjamin Lerer commented on CASSANDRA-16806:


{quote}Firing an exception with the message DELETE statements must restrict all 
PRIMARY KEY columns with equality relations in order to use IF condition on non 
static columns when it is not supported by the table seems a bit weird to 
me.{quote}

Sorry, for the confusion. What is not supported on Virtual tables is 
conditional updates/deletions. Static columns are. We just do not have any 
virtual tables that use them so far.

[~cnlwsu] We are looking for a second reviewer. Would you have the time for it?

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-02 Thread Aleksei Zotov (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17409137#comment-17409137
 ] 

Aleksei Zotov commented on CASSANDRA-16806:
---

[~blerer]
{quote}It is ensured by the fact that virtual keyspaces are not user modifiable.
{quote}
Ok, good to know. Thanks for clarifying!
{quote}I do not think that there are any reason to restrict static columns. Why 
do you want to do it?
{quote}
I thought that static columns are not supposed to be supported based on your 
comment:
{quote}Firing an exception with the message {{DELETE statements must restrict 
all PRIMARY KEY columns with equality relations in order to use IF condition on 
non static columns}} *when it is not supported by the table* seems a bit weird 
to me.
{quote}
Are they? If yes, I'm wondering what are the use cases and expectations on the 
data source ({{DataSet}})? I feel it is a bit confusing and complicated to work 
with static columns assuming a regular data sources (like system properties, 
basic in-memory data structures, etc), however, it is theoretically possible. 
If there are no such usages at the moment, I'd probably restrict them (not in 
this ticket though). Please, let me know your thoughts.

PS:

Thanks for the feedback on the PR, that was valuable and helpful! I addressed 
all the comments, please, check sometime.

 

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-02 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17408823#comment-17408823
 ] 

Benjamin Lerer commented on CASSANDRA-16806:


{quote}restrictions for static columns, secondary indexes and materialized 
views (at least need to check that they exist, I found none of them){quote}

It is not possible to create index or Materialized view on Virtual table. It is 
ensured by the fact that virtual keyspaces are not user modifiable.
I do not think that there are any reason to restrict static columns. Why do you 
want to do it?

{quote}support for complex type cell deletes{quote}
I am not sure that we need that for the moment as we have not been using 
complex columns in virtual tables for now.
We can implement that the day were we will have this need. 


> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-08-31 Thread Aleksei Zotov (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17407236#comment-17407236
 ] 

Aleksei Zotov commented on CASSANDRA-16806:
---

[~blerer]

I updated the PR with all the changes. Could you please take a look and provide 
some feedback.

 

Summary of the PR:
 * implemented TRUNCATE support
 * implemented DELETE support
 * added a restriction for custom timestamps
 * updated unit tests
 * added {{SimpleWritableVirtualTable}} for easier implementation of new VTs

 

What is not in the PR:
 * support for complex type cell deletes 
 * restrictions for static columns, secondary indexes and materialized views 
(at least need to check that they exist, I found none of them)

I'd like to address these items while working on VTs for auth caches.

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-08-30 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17406593#comment-17406593
 ] 

Benjamin Lerer commented on CASSANDRA-16806:


It is clearly an oversight. Thank for spotting that. :-)

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-08-29 Thread Aleksei Zotov (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17406470#comment-17406470
 ] 

Aleksei Zotov commented on CASSANDRA-16806:
---

[~blerer]

That makes sense to me. I'm almost done with the change, the only remaining 
part is to update the tests to work with multiple partition keys and clustering 
columns to ensure the current conversion logic is convenient for composite 
types.

In the meantime, I have a question on the VTs design. Currently TTL is not 
supported on VTs (restricted on the query level) which makes perfect sense to 
me. Similarly, I expected to see that custom timestamp ({{USING TIMESTAMP}} 
statement) is restricted on the query level. However, it seems to be supported. 
If it is just an oversight, I'd like to fix it as a part of the current ticket. 
If it is a part of the original design, I'd like to understand the use cases to 
incorporate it to  the current change. Please, let me know your thoughts.

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-08-27 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17405692#comment-17405692
 ] 

Benjamin Lerer commented on CASSANDRA-16806:


[~azotcsit] The current design of {{VirtualTable}} allow the person 
implementing it to easily convert its internal data (that are usually String 
and Numbers) into some Partitions and Rows through the use of a 
{{SimpleDataSet}}. The current code of {{AbstractWritableVirtualTable}} is good 
but force every person implementing it to have to deal with the conversion from 
the Cassandra objects to some internal data. An example of it is the unit test 
where a big part of the new code is conversion code. It would be nice if the 
patch could provide that conversion layer, in a similar way to what was done 
with {{SimpleDataSet}}.
What do you think? 

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-16806) Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-08-24 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-16806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17403907#comment-17403907
 ] 

Benjamin Lerer commented on CASSANDRA-16806:


[~azotcsit] I had a look at your changes and I need to think a bit about them. 
I have forgotten a bit that part of the code and need to refresh my memory. I 
will be back to you as soon as I can. 

> Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
> allows it
> ---
>
> Key: CASSANDRA-16806
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16806
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Feature/Virtual Tables
>Reporter: Benjamin Lerer
>Assignee: Aleksei Zotov
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> {{TRUNCATE}} statements are currently not supported by Virtual Tables. For 
> some Virtual Tables it makes sense to allow it.
> It can be done by adding a {{truncate}} method to the {{VirtualTable}} 
> interface and calling that method from {{TruncateStatement}}. The default 
> implementation of the method should be to fire an {{InvalidRequestException}} 
> saying that truncate is not supported on that specific table.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org