Skip to content

[lake/lance] Add Map type support for Lance#2949

Open
XuQianJin-Stars wants to merge 1 commit intoapache:mainfrom
XuQianJin-Stars:feature/lance-map-type-support
Open

[lake/lance] Add Map type support for Lance#2949
XuQianJin-Stars wants to merge 1 commit intoapache:mainfrom
XuQianJin-Stars:feature/lance-map-type-support

Conversation

@XuQianJin-Stars
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #2403

Add Map type support for Lance lake storage. This enables Fluss tables with MAP columns to be tiered into Lance format.

Brief change log

  • LanceArrowUtils.java: Added MapType to Arrow Map type conversion in toArrowField() and toArrowType(). The Arrow Map structure follows the standard layout: Map -> entries(Struct) -> [key, value].
  • ArrowDataConverter.java: Added MapVector data copy logic in copyVectorData(). The MapVector check is placed before ListVector since MapVector extends ListVector. Added copyMapVectorData() method which reuses copyListVectorData() logic due to shared memory layout.
  • ShadedArrowBatchWriter.java: Added MapVector initialization logic in initFieldVector().

Tests

  • LanceArrowUtilsTest#testToArrowSchemaWithMapType - Basic Map type conversion
  • LanceArrowUtilsTest#testToArrowSchemaWithMapOfComplexValueType - Map with Row value type
  • LanceArrowUtilsTest#testToArrowSchemaWithRowContainingMap - Nested Row containing Map
  • LanceTieringTest#testTieringWriteTableWithMapType - Map type write and read unit test
  • LanceTieringITCase#testTieringWithMapType - End-to-end integration test for Map type

API and Format

No API or storage format changes. This only extends the Lance lake storage plugin to support an additional Fluss data type (MAP).

Documentation

No documentation changes needed. This is an internal enhancement to the Lance lake storage plugin.

@XuQianJin-Stars
Copy link
Copy Markdown
Contributor Author

hi @wuchong @leekeiabstraction @luoyuxia Hi, i already updated the pr. Please help review when you got some time.

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.

[lake/lance] Map type support for Lance

1 participant