yuzelin commented on issue #1038:
URL: 
https://github.com/apache/incubator-paimon/issues/1038#issuecomment-1537978983

   My idea is:
   1. We can add a new argument for specifying computed column, for example:
   ```
   --partition-keys dt,hr
   --computed-column dt=date(ts)
   --computed-column hr=hour(ts)
   ```
   `ts` is exsiting column, we can specify that `dt` is day of ts and `hr` is 
hour of ts.
   2. The newly computed column can be specified as partition key and will be 
auto created in Paimon table.
   3. Introduce two class to handle computed column:
   class `ComputedColumn`: store column's name, type, argument column names, 
and a`ColumnValueComputer` to compute value from given argument.
   
   interface `ColumnValueComputer`:  has a method `Object 
computeValue(Object... input)` to compute value. We can implement several 
concrete computers.
   
   4. Pass `ComputedColumn`s to `EventParser`. Every time `extractRow` is 
invoked, generate computed column values.


-- 
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