Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

[WIP] Table in awk-cpp #146

Open
wants to merge 98 commits into
base: master
Choose a base branch
from
Open

[WIP] Table in awk-cpp #146

wants to merge 98 commits into from

Conversation

duynht
Copy link
Collaborator

@duynht duynht commented Jun 17, 2019

Initial PR

cescott and others added 29 commits May 31, 2019 12:06
- Added parents2startsstops_int64 and *_int32
- Added positive tests for both
- Added uniques2offsetsparents
- Fixed some warnings about signed/unsigned ints in for loops
- Added test for uniques2offsetsparents
I think this works?
- Changed _jagged.cpp src file to hold a struct called "JaggedArraySrc"
- Changed jagged.py to inherit from JaggedArraySrc before
awkward.array.jagged.JaggedArray
- Changed all methods to templated methods, where each argument type is
specified in the pybind11 module at the bottom.
- Removed positive tests for different types, because that could get
unnecessarily large for other methods
- Removed most of the jagged.py methods except for the ones which
require python-side functionality (arbitrary types, none-type
parameters... basically stuff that's much much easier in python)
I've been debugging for hours - I'm just gonna put this down and pick it
up tomorrow
I learned a lot today, but tomorrow I'm probably going to scrap most of
what I wrote and follow the pybind11 numpy guide on accepting py::buffer
types into a custom c++ type.
I need to reset and try again... I can't get around the fact that every
function needs to be compiled for every data type, and that C++ doesn't
have a data type class
This reverts commit 075fb96.
Well I learned a lot today. I figured template metaprogramming was a
little complicated for this, but I might see if I can implement it
later. This one is more straightforward to understand.
- Added a macro to compile each method for signed and unsigned ints from
8-bit to 64-bit
- TODO: handle incompatible sizes in-method
- TODO: handle multidimensional array input in-method
- TODO: handle array strides
Applied type casts for warnings which pointed out 8-bit and 16-bit int
conversions
Just going to put this here to see if it fixes that
- Added support for strides >1
Something went wrong with travis a couple commits back, so I'm cleaning
out the unnecessary code
oops, forgot to build before committing
- Fixed some syntax errors
All input types are still handled, but output is now only int64, so that
nothing is lost on conversion for index-oriented functions
- changed all size_t instances to ssize_t
- removed some unnecessary casts from ssize_t to ssize_t
not sure if this will work but I'll figure it out eventually
I really didn't think this one would be easy but I guess this works
That strategy didn't work. This one does... not very elegant but if it
fits it ships I guess
- Moved some stuff around to make the code cleaner
- Started work on __getitem__
- Added starts setter/getter
- Added stops setter/getter
- Added a VERY limited getitem function, just for 1d 1-stride int array
contents and single integer argument
-Added some exception throws in cases where the JaggedArray is invalid
- Added getter for content_type
- Added getter/setter for content_array
- Added getter/setter for content_jagged
- Added __repr__ with limited functionality
@duynht duynht requested a review from jpivarski June 17, 2019 16:21
EscottC and others added 26 commits June 25, 2019 17:30
…ting the offsets to int32 because Arrow treats it as an uninterpreted buffer)
Fix choose on non-offsetsaliased jagged arrays
Proposal: class-ify persists.serialize
Return JaggedArray index with correct dtype if empty
#156
- default constructors for Table and Table.Row
- added missing changes: version.py and tests
@jpivarski
Copy link
Member

Welcome back! At first, I thought this was a huge backlog, but now I see that it's just merging to get up-to-date with master.

@duynht
Copy link
Collaborator Author

duynht commented Jul 2, 2019

Yes, I just rebased with master, and sorry for the delay. I have been trying to figure things out using the specs but still confuse about the content and views. I think I need some clarification. For now I will try with c-side setters and getters to see if I can use them in magic methods.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants