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 2022/06/04 13:50:25 UTC

[GitHub] [beam] damccorm opened a new issue, #19875: Queries that attempt to write to pubsub publish time should fail at construction time

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

   Currently it's possible to perform a query like:
   
   ```
   
   CREATE TABLE pubsub (
     event_timestamp TIMESTAMP,
     id VARCHAR
   ) ...
   
   INSERT INTO pubsub (event_timestamp,
   id) VALUES (...)
   
   ```
   
   
   But when this is executed, the event_timestamp will be dropped, because on read it will be instead be populated with pubsub's publish time.
   
   A couple of ideas:
   - We could indicate that this is a VIRTUAL GENERATED column, and is therefore read-only. Calcite seems to have some support for this concept, see [ColumnStrategy.java](https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/schema/ColumnStrategy.java).
   - We could just throw an exception in the Pubsub JSON Table Provider if the query's output schema contains event_timestamp.
   
   Imported from Jira [BEAM-8741](https://issues.apache.org/jira/browse/BEAM-8741). Original Jira may contain additional context.
   Reported by: bhulette.


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

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