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

feat: from/to numpy&collect concat #1339

Merged
merged 11 commits into from
Apr 13, 2023
Merged

feat: from/to numpy&collect concat #1339

merged 11 commits into from
Apr 13, 2023

Conversation

discord9
Copy link
Contributor

@discord9 discord9 commented Apr 6, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

  • from/to_numpy for PyVector
  • PyDataFrame now collect to concated batch(So no collect()[0][0] just collect()[0]
  • Added PyRecordBatch type as return values of PyDataFrame.collect() allowing indexing like collected[0] or collected["number"]

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has totally checked 874 files.

Valid Invalid Ignored Fixed
672 1 201 0
Click to see the invalid file list
  • src/script/src/python/ffi_types/py_recordbatch.rs

@discord9 discord9 marked this pull request as ready for review April 6, 2023 09:46
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #1339 (d6afe69) into develop (33dbf72) will decrease coverage by 0.01%.
The diff coverage is 81.08%.

@@             Coverage Diff             @@
##           develop    #1339      +/-   ##
===========================================
- Coverage    86.04%   86.03%   -0.01%     
===========================================
  Files          527      528       +1     
  Lines        78346    78476     +130     
===========================================
+ Hits         67409    67520     +111     
- Misses       10937    10956      +19     

@waynexia waynexia requested review from killme2008 and waynexia April 7, 2023 08:07
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM

@killme2008
Copy link
Contributor

@waynexia Can you take a look?

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

I've skimmed this and it looks good to me

src/script/src/python/engine.rs Show resolved Hide resolved
src/script/src/lib.rs Show resolved Hide resolved
src/script/src/python/ffi_types/copr.rs Show resolved Hide resolved
@killme2008 killme2008 merged commit c20dbda into develop Apr 13, 2023
@killme2008 killme2008 deleted the py_improve branch April 13, 2023 02:46
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: from/to numpy&collect concat

* feat: PyRecordBatch

* test: try import first,allow w/out numpy/pyarrow

* fix: cond compile flag

* doc: license

* feat: sql() ret PyRecordBatch&repr

* fix: after merge

* style: fmt

* chore: CR advices

* docs: update

* chore: resolve conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-required This change requires docs update.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants