Feature summary (what you would like to be able to do and where):
For timestamp fields of MediaWiki tables that are replicated into Wikireplica databases, add a column that shows the timestamp in datetime format. For example, we could have an rc_timestamp and an rc_timestamp_datetime field for the recentchanges table.
Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Wikireplica databases are frequently used for analytical queries. These queries often include a component in which a data or time comparison or aggregation is performed. Examples include counting edits by a user or on a page after a certain date, or counting the number of actions on the wiki broken down by the hours of the day, etc.
Benefits (why should this be implemented?):
- Instead of wasting compute on casting the timestamp string into datetime fields many times across many tools and queries, we can do it once at the time data is added or updated on Wikireplica databases
- Features such as timezone conversion or date/time diff can be easily used via SQL.
- Specific indexes can be created on the datetime field to accelerate queries that use it for joins or filters.
Downsides (what are the barriers to implementation?)
There will be a difference between the schema of the tables on Wikireplica and on MediaWiki itself. This already happens to some degree, but with this proposal it becomes more common.