Skip to content

Conversation

@fexolm
Copy link
Contributor

@fexolm fexolm commented Aug 6, 2019

It's just an initial AddKernel implementation (work in progress). I could not come up with a better implementation of type inference, so I want to hear your thoughts about implementation.

@fsaintjacques fsaintjacques changed the title ARROW-1562: Numeric kernel implementations for add ARROW-1562: [C++] Numeric kernel implementations for add Aug 6, 2019
@fsaintjacques
Copy link
Contributor

fsaintjacques commented Aug 6, 2019

Multiple notes:

  1. The Compare kernels only support comparing the same type, it expects the caller to decide (via Cast kernel) how to deal with mis-matching types. I think this would be the most simple and sane behavior.
  2. The Sum kernels upcast to the widest type. This might be less of an issue here, but I think we should take a decision.
  3. I wouldn't merge this without supporting null, this is too frequent to avoid.
  4. This code is regular enough to support other basic arithmetic operations, i.e Addition, Substraction, Multiplication, Division.
  5. The code is also regular enough to support (array, scalar) operation. See how this is implemented for Compare kernels.

@fsaintjacques fsaintjacques changed the title ARROW-1562: [C++] Numeric kernel implementations for add ARROW-1562: [WIP][C++] Numeric kernel implementations for add Aug 6, 2019
@emkornfield
Copy link
Contributor

@fexolm it looks like @fsaintjacques gave some feedback on implementation do you need more guidance?

@fexolm
Copy link
Contributor Author

fexolm commented Oct 16, 2019

@emkornfield no, I just can not find the time to finish this. I will return to this as soon as I get time.

@fexolm fexolm marked this pull request as ready for review October 18, 2019 11:50
@fexolm
Copy link
Contributor Author

fexolm commented Oct 18, 2019

@fsaintjacques, @emkornfield
I've removed type inference from the code, also add nulls support.
BTW I haven't decided yet how it can be architecturally generalized to support other arithmetic operations. I see, that almost all the code could be reused in other operations, but not sure how to implement it.
Maybe it would be better to do this in other pr, because I'm not sure I have enough time for it now.

@fexolm fexolm changed the title ARROW-1562: [WIP][C++] Numeric kernel implementations for add ARROW-1562: [C++] Numeric kernel implementations for add Oct 18, 2019
@fexolm fexolm force-pushed the ARROW-1562 branch 2 times, most recently from 7a6f7e1 to a60b42f Compare October 18, 2019 12:42
@emkornfield
Copy link
Contributor

Thanks @fexolm @fsaintjacques do you have time to review?

@fsaintjacques
Copy link
Contributor

Will review again.

@fsaintjacques
Copy link
Contributor

I created https://issues.apache.org/jira/browse/ARROW-7017 as a followup.

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.

3 participants