tarray's People
tarray's Issues
::tarray::table delete causes a column shift
Hello Ashok,
thank you for this great package! I stumbled upon a bug with the table delete functions.
If you delete the first row of a table with at least one boolean column the columns of the last table row will shift, omitting the values of the boolean column.
Steps to Reproduce
Consider the simple table table
with two columns, the first being a boolean column.
Deleting the row with index 0
causes the column shift. Deleting with low and high indexes, eg. 0
and 1
also results in the same problem. If the row gets deleted with an index list, no column shift occurs. Following example demonstrates the problem:
set table [::tarray::table create {
A boolean B boolean C int
} {
{0 1 10}
{0 1 20}
{0 1 30}
}]
# column shift
set table [::tarray::table delete $table 0]
# column shift
# set table [::tarray::table delete $table 0 1]
# no column shift
# set table [::tarray::table delete $table {0 1}]
set pretty [::tarray::table prettify $table]
Expected Behavior
I expect the content of the variable pretty
to look like this:
+--+-+--+
|A|B| C|
+--+-+--+
|0|1|20|
+--+-+--+
|0|1|30|
+--+-+--+
Current Behavior
Currently pretty
looks like this:
+--+-+--+
| A|B| C|
+--+-+--+
| 0|1|20|
+--+-+--+
|30| | |
+--+-+--+
Context (Environment)
I am running tcl 8.6.10 and the package version 1.0.0 on Windows 11.
My C-knowledge is not so great, but I suspect the problem could be in thdr_delete_range and/or thdr_delete_indices. If there is anything else I can help you with, feel free to let me know.
Best regards
Lukas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.