piotr-szuberski commented on pull request #12611:
URL: https://github.com/apache/beam/pull/12611#issuecomment-686447747


   @TheNeuralBit I've upgraded it a bit.
   - Checking schemas equality is redundant because it will throw an exception 
with a good message anyway (class cast failure or unknown column).
   - I managed to unify addArray and addIterable code duplication with a bit 
ugly casts (needed SuppressWarning("unchecked")) but I don't think it can be 
easily achieved otherwise.
   - Nothing comes to my mind to remove duplication in 
addIterableToMutationBuilder and addIterableToStructBuilder methods. These are 
unrelated classes (Struct.Builder and Mutation.WriteBuilder. Maybe my Java 
knowledge is insufficient here. I could make an interface that simulates 
.setInt64Array, setStructArray etc but it would be even more boilerplate.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to