Skip to content

Conversation

@Quafadas
Copy link
Owner

@Quafadas Quafadas commented Sep 7, 2025

Turns the Iterable[NamedTuple[K,V]] into a NamedTuple[K, CC[V_]]

Copilot AI review requested due to automatic review settings September 7, 2025 19:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces column-oriented data transformation functionality to the scautable library, implementing toColumnOriented and toColumnOrientedAs methods that convert row-oriented named tuple collections into column-oriented structures.

  • Adds toColumnOriented method that preserves the original collection type when transposing data
  • Adds toColumnOrientedAs[Target[_]] method that allows specifying a target collection type during transposition
  • Implements comprehensive test coverage for both methods including edge cases like empty collections and mixed data types

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scautable/src/columnExtensions.scala Implements the core transposition logic with two new extension methods and helper functions for handling empty collections and value mapping
scautable/test/src/CollectionGenericExtensionsSuite.scala Adds extensive test suite covering basic functionality, collection type preservation, mixed types, empty collections, and target type specification

@Quafadas Quafadas merged commit c2f487b into main Sep 8, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants