[ 
https://issues.apache.org/jira/browse/CASSANDRA-15046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brad Schoening updated CASSANDRA-15046:
---------------------------------------
    Test and Documentation Plan: 
Original Patch PR: [https://github.com/apache/cassandra/pull/1866/files]

 [NEW - NEEDS REVIEW] 09/22/22: documentation patch 
-[https://github.com/apache/cassandra/commit/31f9a566bb70368dbffddeb672196355efe7ebb0]-
 

Unit tests to be implemented:
1. check "history" command outputs correct length of results

2. check "history" command outputs correct contents & order

 

The current patch implements the feature in its minimally viable form. Here's 
some of my ideas for improvement to current patch:
 # allow an input argument to control how many commands will be listed.
 # showing the timestamp of when each command is executed.
 # showing whether each command is valid/successfully executed, OR, showing 
only the successfully executed commands.

----------------------------

19 May 2023 New Patch 

[https://github.com/apache/cassandra/pull/2354]

This patch is an update of the original PR create by Yundi Chen. It slightly 
revises the HISTORY command syntax by adding a optional argument for the number 
of lines to display. 

A few implementation notes:
 * The parser ensures that the value of <n> is a <wholenumber>, i.e., a 
non-negative integer.  I tried creating a <positiveinteger> type, but that 
caused numerous issues with unit tests.  This is implemented similar to 
'paging', which specifies <wholenumber> also.
 * The number of rows to display is a session setting not a permanent one.  
Typically, a user has a known range of history you wish to look through, such 
as recent queries, or much older queries (larger value of n).  You might want 
to see the last 10 lines for something you just ran a few minutes ago, or 1000 
lines for something you ran last week. 

  was:
Original Patch PR: [https://github.com/apache/cassandra/pull/1866/files]

 [NEW - NEEDS REVIEW] 09/22/22: documentation patch 
[https://github.com/apache/cassandra/commit/31f9a566bb70368dbffddeb672196355efe7ebb0]
 

Unit tests to be implemented:
1. check "history" command outputs correct length of results

2. check "history" command outputs correct contents & order

 

The current patch implements the feature in its minimally viable form. Here's 
some of my ideas for improvement to current patch:
 # allow an input argument to control how many commands will be listed.
 # showing the timestamp of when each command is executed.
 # showing whether each command is valid/successfully executed, OR, showing 
only the successfully executed commands.

----------------------------

19 May 2023 New Patch 

[https://github.com/apache/cassandra/pull/2354]

This patch is an update of the original PR create by Yundi Chen. It slightly 
revises the HISTORY command syntax by adding a optional argument for the number 
of lines to display. 

A few implementation notes:
 * The parser ensures that the value of <n> is a <wholenumber>, i.e., a 
non-negative integer.  I tried creating a <positiveinteger> type, but that 
caused numerous issues with unit tests.  This is implemented similar to 
'paging', which specifies <wholenumber> also.
 * The number of rows to display is a session setting not a permanent one.  
Typically, a user has a known range of history you wish to look through, such 
as recent queries, or much older queries (larger value of n).  You might want 
to see the last 10 lines for something you just ran a few minutes ago, or 1000 
lines for something you ran last week. 


> Add a "history" command to cqlsh.  Perhaps "show history"?
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-15046
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15046
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL/Interpreter
>            Reporter: Wes Peters
>            Assignee: Brad Schoening
>            Priority: Low
>              Labels: lhf
>             Fix For: 5.x
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I was trying to capture some create key space and create table commands from 
> a running cqlsh, and found there was no equivalent to the '\s' history 
> command in Postgres' psql shell.  It's a great tool for figuring out what you 
> were doing yesterday.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to