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

DX-100503: new arrow type and vector TimestampWithPrecision #83

Open
wants to merge 7 commits into
base: dremio_26.0_18.1.0
Choose a base branch
from

Conversation

xxlaykxx
Copy link

No description provided.

@xxlaykxx xxlaykxx marked this pull request as draft February 13, 2025 12:40
Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

(ArrowType.TimestampWithPrecision) vector.getField().getType();
switch (type.getPrecision()) {
case 0:
this.unitsPerSecond = 1;

Choose a reason for hiding this comment

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

Why this have to be a member of the class? I feel these should be part of some kind of static lookup list.

@@ -306,13 +306,17 @@ public void write(${name}Holder holder) {
ArrowType arrowType = new ArrowType.FixedSizeBinary(holder.byteWidth);
get${name}Writer(arrowType).setPosition(idx());
get${name}Writer(arrowType).write(holder);
<#elseif minor.class == "TimestampWithPrecision">
ArrowType arrowType = new ArrowType.TimeStampWithPrecision(holder.precision, null);

Choose a reason for hiding this comment

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

nit: Timestamp instead of TimeStamp

Choose a reason for hiding this comment

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

Since this also has timezone we might need a different name?

@gszadovszky
Copy link

@xxlaykxx, do we think this change is something that the upstream community would accept? I'm not sure we want long term divergence from the upstream code base. I'm not a maintainer of this repo, though.

@xxlaykxx
Copy link
Author

Not sure about about community, we can try in any way. And if we want to support timestamps with arbitrary precision - we need this changes

@xxlaykxx xxlaykxx marked this pull request as ready for review February 18, 2025 13:31
@@ -129,7 +129,6 @@ jobs:
for python_package in $(brew list | grep python@); do

Choose a reason for hiding this comment

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

Let's try and make this change in dremio repo only.

We want to just add the Holder + Vector in Dremio and wire it up through the stack. Let's get just literals working as proof of concept.

Choose a reason for hiding this comment

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

We also don't want to manage this fork in the arrow repo.

Choose a reason for hiding this comment

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

Perhaps it will be similar to what we did for wiring VARIANT through the stack: https://github.com/dremio/dremio/pull/7291/files#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment