trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
9.85k stars 2.85k forks source link

Persist the user into the snapshot summary for iceberg tables #21010

Open nikita-sheremet-java-developer opened 3 months ago

nikita-sheremet-java-developer commented 3 months ago

This feature request very similar to Persist the Trino query ID into the snapshot summary. The idea is the same but add user that running query to summary. For now it is imposible (as I understand) to answer: "Whats user made change for this snapshot in iceberg table".

Note

I have searched usage io.trino.plugin.hive.HiveMetadata#TRINO_QUERY_ID_NAME in the sources - so as I understand:

  1. user of query can be taken from io.trino.spi.connector.ConnectorSession#getUser
  2. user must be set whenevery queryId is set
  3. Code change is "just" add new property "near" queryId setting?

Am I right? If yes may I try to implement the feature? It looks like very simple for implementation.

Thanks in advance

electrum commented 3 months ago

Your understanding sounds correct. This should be very easy to implement. Go for it!