You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "smiklosovic (via GitHub)" <gi...@apache.org> on 2023/02/03 22:41:04 UTC

[GitHub] [cassandra] smiklosovic opened a new pull request, #2141: FILTERING ON|OFF in cqlsh

smiklosovic opened a new pull request, #2141:
URL: https://github.com/apache/cassandra/pull/2141

   Thanks for sending a pull request! Here are some tips if you're new here:
    
    * Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR.
    * Be sure to keep the PR description updated to reflect all changes.
    * Write your PR title to summarize what this PR proposes.
    * If possible, provide a concise example to reproduce the issue for a faster review.
    * Read our [contributor guidelines](https://cassandra.apache.org/_/development/index.html)
    * If you're making a documentation change, see our [guide to documentation contribution](https://cassandra.apache.org/_/development/documentation.html)
    
   Commit messages should follow the following format:
   
   ```
   <One sentence description, usually Jira title or CHANGES.txt summary>
   
   <Optional lengthier description (context on patch)>
   
   patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####
   
   Co-authored-by: Name1 <email1>
   Co-authored-by: Name2 <email2>
   
   ```
   
   The [Cassandra Jira](https://issues.apache.org/jira/projects/CASSANDRA/issues/)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] clohfink commented on a diff in pull request #2141: FILTERING ON|OFF in cqlsh

Posted by "clohfink (via GitHub)" <gi...@apache.org>.
clohfink commented on code in PR #2141:
URL: https://github.com/apache/cassandra/pull/2141#discussion_r1096348914


##########
pylib/cqlshlib/cqlshmain.py:
##########
@@ -967,7 +968,10 @@ def perform_simple_statement(self, statement):
         if not statement:
             return False, None
 
-        future = self.session.execute_async(statement, trace=self.tracing_enabled)
+        query_to_execute = statement.query_string
+        if self.filtering_enabled:
+            query_to_execute = statement.query_string[:-1] + " ALLOW FILTERING;"

Review Comment:
   would this be added to like ALTER and DESCRIBE commands?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on a diff in pull request #2141: FILTERING ON|OFF in cqlsh

Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic commented on code in PR #2141:
URL: https://github.com/apache/cassandra/pull/2141#discussion_r1096516850


##########
pylib/cqlshlib/cqlshmain.py:
##########
@@ -967,7 +968,10 @@ def perform_simple_statement(self, statement):
         if not statement:
             return False, None
 
-        future = self.session.execute_async(statement, trace=self.tracing_enabled)
+        query_to_execute = statement.query_string
+        if self.filtering_enabled:
+            query_to_execute = statement.query_string[:-1] + " ALLOW FILTERING;"

Review Comment:
   @clohfink possibly to ALTER, hardly to DECRIBE as that is kind of done differently as we are just getting what Cassandra gives us ... well ... I think that returning to having a property (not schema property!) on TableMetadata and tweaked comment about enabling ALLOW FILTERING is just better after all.
   
   BTW I would not modify comments for each vtable being able to be filtered on. That would be a default state. We would mention that only if _ALLOW FILTERING is not possible_.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on a diff in pull request #2141: FILTERING ON|OFF in cqlsh

Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic commented on code in PR #2141:
URL: https://github.com/apache/cassandra/pull/2141#discussion_r1096516850


##########
pylib/cqlshlib/cqlshmain.py:
##########
@@ -967,7 +968,10 @@ def perform_simple_statement(self, statement):
         if not statement:
             return False, None
 
-        future = self.session.execute_async(statement, trace=self.tracing_enabled)
+        query_to_execute = statement.query_string
+        if self.filtering_enabled:
+            query_to_execute = statement.query_string[:-1] + " ALLOW FILTERING;"

Review Comment:
   @clohfink possibly to ALTER, hardly to DECRIBE as that is kind of done differently as we are just getting what Cassandra gives us ... well ... I think that returning to having a property (not table schema property!) on TableMetadata and tweaked comment about enabling ALLOW FILTERING is just better after all.
   
   BTW I would not modify comments for each vtable being able to be filtered on. That would be a default state. We would mention that only if _ALLOW FILTERING is not possible_.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic closed pull request #2141: FILTERING ON|OFF in cqlsh

Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic closed pull request #2141: FILTERING ON|OFF in cqlsh
URL: https://github.com/apache/cassandra/pull/2141


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org