Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[arrow] Introduce paimon-arrow module to provide utils to convert paimon Row to Arrow FieldVector #3969

Merged
merged 6 commits into from
Aug 16, 2024

Conversation

yuzelin
Copy link
Contributor

@yuzelin yuzelin commented Aug 15, 2024

Purpose

Arrow is wild-used in different languages (C++, Python) for data Ser/De. It is necessary to provide conversion utils for Paimon and Arrow.

Tests

API and Format

Documentation

case TIMESTAMP_WITHOUT_TIME_ZONE:
case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
// transfer Timestamp to LocalDateTime string
sb.append(((Timestamp) value).toLocalDateTime());
Copy link
Contributor

Choose a reason for hiding this comment

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

case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
java.sql.Timestamp.from(value.toInstant()).toLocalDateTime()

int precision = localZonedTimestampType.getPrecision();
TimeUnit timeUnit = getTimeUnit(precision);
ArrowType arrowType =
new ArrowType.Timestamp(timeUnit, TimeZone.getDefault().toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

ZoneId.systemDefault().toString

@JingsongLi
Copy link
Contributor

+1

@JingsongLi JingsongLi merged commit b493215 into apache:master Aug 16, 2024
9 of 10 checks passed
@yuzelin yuzelin deleted the arrow_module branch November 19, 2024 07:55
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