ogma icon indicating copy to clipboard operation
ogma copied to clipboard

[FEATURE] Joining columns of tables should use `*`

Open kurtlawrence opened this issue 3 years ago • 0 comments

Description

Using a flag --cols to delineate joining tables by row or column confuses the use of +. If we consider + to be acting like a 'sum' category, and * to be acting like a 'product' category, + represents the sum of Tables and * represents the product of Tables.

Now, sum is analogous to or, so summing tables would be representing adding more options as rows to the table:

| i |     | i |     |   i    |     | i |
| 1 |  +  | 3 |  =  | 1 OR 3 |  =  | 1 |
                                   | 3 |

Product is analogous to and, so it follows that multiplying tables (that is, their product) would be representing adding more combinations to the table:

| i |     |  j  |     |    ij     |     | i |  j  |
| 1 |  *  | foo |  =  | 1 AND foo |  =  | 1 | foo |

This change would lay groundwork for future implementations, such as sum and product which would rely on implementations of + and *.

This would be a breaking change.

  • [ ] Add implementation on *, taken from + --cols
  • [ ] Remove + --cols flag
  • [ ] Add in help messages
  • [ ] Test
  • [ ] Alter documentation and code examples which use + --cols

kurtlawrence avatar Oct 31 '21 05:10 kurtlawrence