Hi,

> I'm hoping someone can help me shed some light on how Hive deals with virtual columns.

The virtual column impl is not extensible in Hive, it is a fixed set of enums.

https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/metadata/VirtualColumn.java#L64

However, according to the next comment, what you're looking for is a time metadata column, which has a different pathway in the system & is simpler than the complex struct ROW__ID impl.

> We are trying to implement some time travel features in a custom input format we're building and are considering the approach of adding a virtual column

See

https://github.com/apache/hive/blob/master/kafka-handler/src/java/org/apache/hadoop/hive/kafka/MetadataColumn.java#L63

which is used to produce time-travel queries over Kafka streams in Hive.

Cheers,
Gopal

Reply via email to