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

Added javadocs to CastStrings.fromIntegersWithBase method [skip ci] #1452

Merged
merged 5 commits into from
Sep 28, 2023

Conversation

razajafri
Copy link
Collaborator

@razajafri razajafri commented Sep 27, 2023

This PR just adds some javadocs to the method

fixes #1451

@@ -109,6 +109,21 @@ public static ColumnVector toIntegersWithBase(ColumnView cv, int base,
type.getTypeId().getNativeId()));
}

/**
* Converts an integer column to a strings column with either decimal or hexadecimal values
Copy link
Collaborator

Choose a reason for hiding this comment

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

Eventually, the full base range [2;36] will be supported. I think the current limitation to decimal/hexadecimal should be just a note towards the end but not the opening sentence

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right now we only support 2 bases and it's ok to have it in the main description. We can make it more generic when time comes and we support more bases

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for taking time out to review this. If you still feel strongly I can make the change. PTAL

Comment on lines 114 to 115
* based on the base provided. The hexadecimal value will be returned with the leading
* zeros dropped
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again maybe in a "Note:" say that there are no leading zeros or padding of digits to a particular bit width

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

PR updated

@razajafri
Copy link
Collaborator Author

build

@razajafri
Copy link
Collaborator Author

build

@razajafri
Copy link
Collaborator Author

@gerashegalov I have updated the PR based on our discussion offline

@razajafri
Copy link
Collaborator Author

build

* Example:
* input = [123, -1, 0, 27, 342718233]
* s = fromIntegersWithBase(input, 16)
* s is [ '4D2', 'FFFFFFFF', '0', '1B', '146D7719']
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this accurate? 123 should map to "7B"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, you are right. I copied this from cudf doc here.

I have created a ticket in cudf rapidsai/cudf#14232

Copy link
Collaborator

@gerashegalov gerashegalov left a comment

Choose a reason for hiding this comment

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

LGTM

@razajafri
Copy link
Collaborator Author

build

@razajafri razajafri changed the title Added javadocs to CastStrings.fromIntegersWithBase method [skipci] Added javadocs to CastStrings.fromIntegersWithBase method [skip ci] Sep 28, 2023
@razajafri
Copy link
Collaborator Author

build

1 similar comment
@razajafri
Copy link
Collaborator Author

build

@razajafri razajafri merged commit d0d058e into NVIDIA:branch-23.10 Sep 28, 2023
2 checks passed
@razajafri razajafri deleted the JNI-1451-javadocs branch September 28, 2023 20:13
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.

[DOC] Add javadoc headers to fromIntegersWithBase method in CastStrings.java
2 participants