[ 
https://issues.apache.org/jira/browse/BEAM-6861?focusedWorklogId=216058&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-216058
 ]

ASF GitHub Bot logged work on BEAM-6861:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Mar/19 09:19
            Start Date: 20/Mar/19 09:19
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on pull request #8090: [BEAM-6861] 
Select fields and computed fields in CassandraIO.Read
URL: https://github.com/apache/beam/pull/8090#discussion_r267236024
 
 

 ##########
 File path: 
sdks/java/io/cassandra/src/main/java/org/apache/beam/sdk/io/cassandra/CassandraIO.java
 ##########
 @@ -483,6 +508,11 @@ private CassandraIO() {}
               .collect(Collectors.joining(","));
 
       List<BoundedSource<T>> sources = new ArrayList<>();
+      String selectFields = "*";
+      if (spec.selectFields() != null) {
+        selectFields = String.join(",", spec.selectFields().get());
 
 Review comment:
   Can you please ensure that this produces a valid string e.g. "*" if 
`selectFields` is an empty List. I know this won't happen because of the 
precondition but better to make the code more robust.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 216058)
    Time Spent: 0.5h  (was: 20m)

> Select fields and computed fields in CassandraIO.Read 
> ------------------------------------------------------
>
>                 Key: BEAM-6861
>                 URL: https://issues.apache.org/jira/browse/BEAM-6861
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-cassandra
>            Reporter: Radosław Stankiewicz
>            Assignee: Radosław Stankiewicz
>            Priority: Minor
>              Labels: features
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> CassandraIO.Read currently selects all fields and maps them to POJO.
> To make this component more flexible, it should be possible to select only 
> subset of fields or computed fields to allow reading things like write 
> Timestamp or using other functions.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to