rjhallsted opened a new issue, #26440:
URL: https://github.com/apache/beam/issues/26440

   ### What happened?
   
   `apache_beam.io.gcp.datastore.v1new.types.Key.from_client_key` does not set 
the parent key. Among other things, this causes queries via the 
`ReadFromDatastore` PTransform to return entities that do not have a parent 
key, making it difficult to do anything that relies on knowledge of this 
Entity's place in the hierarchy.
   
   The current code:
   ```python
   class Key(object)
     ....
     @staticmethod
     def from_client_key(client_key):
       return Key(
           client_key.flat_path,
           project=client_key.project,
           namespace=client_key.namespace)
   ```
   
   should instead be: 
   ```python
   class Key(object)
     ....
     @staticmethod
     def from_client_key(client_key):
       return Key(
           client_key.flat_path,
           parent=client_key.parent,
           project=client_key.project,
           namespace=client_key.namespace)
   ```
   
   ### Issue Priority
   
   Priority: 2 (default / most bugs should be filed as P2)
   
   ### Issue Components
   
   - [X] Component: Python SDK
   - [ ] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [X] Component: IO connector
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Samza Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
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: [email protected]

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

Reply via email to