You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/08/12 21:58:20 UTC

[GitHub] [beam] reuvenlax commented on pull request #15327: [BEAM-12754] Only call getValue once per field per row

reuvenlax commented on pull request #15327:
URL: https://github.com/apache/beam/pull/15327#issuecomment-897994708


   It looks like Row.getValues is often used to do a raw copy - e.g. return Row.withSchema(schema).attachValues(row.getValues());
   
   If you want to do a larger refactor (and intelliJ should make this easy), you can rename getValues() -> getRawValues(), and add a new getValues() that does what you want; this might make the Row methods a bit less confusing. Otherwise you can simply do it inline here - e.g. IntStream.range(row.getSize()).map(i -> row.get(i)).collect(Collectors.toList());


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org