Skip to content

[Variant] Refactor cast_to_variant #8234

@liamzwbao

Description

@liamzwbao

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

As mentioned here, most data types for cast_to_variant have already been implemented. However, the current implementation could be refactored to improve readability and maintainability.

Describe the solution you'd like

Proposed refactor includes:

  • Grouping related data types together (e.g., numeric types, temporal types).
  • Extracting large code snippets from match branches into helper functions.
  • Reordering tests to align with the data type order.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Labels

enhancementAny new improvement worthy of a entry in the changelog

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions