You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
filter_lua: new 'time_as_table' property for timestamp handling (#641#2519#2015)
Long time ago we got some reports that using timestamps as double/floats might lost
precision when the values are converted back from Lua. Actually there is no exact
way to have 100% precision in doubles in our use case 'C > Lua > C'. Community
suggested that we might workaround this with another solution.
This patch considering backward compatibility, implements a new configuration
property called 'time_as_table', which passes the timestamp as a Lua table
with the following keys
['sec'] => timestamp seconds
['nsec'] => timestamp nanoseconds
for users looking for 100% timestamp precision and specifically when dealing
with nanoseconds, this option ensures timestamp integrity. If the option is enabled
the user just need to adjust the script to use the new format if they touch or
use the timestamp value.
By default the option 'time_as_table' is disabled and in the future we might
consider to enable it by default.
Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
0 commit comments