datafusion
                                
                                 datafusion copied to clipboard
                                
                                    datafusion copied to clipboard
                            
                            
                            
                        to_timestamp align with postgresql
Which issue does this PR close?
Closes #2979 .
Rationale for this change
original to_timestamp assume time unit is nanosecond. this pr is to change it to second based (to align with postgresql's to_timestamp)
What changes are included in this PR?
to_timestamp use seconds instead of nanoseconds. a new to_timestamp_nanos expression is added that has the same behavior as the original to_timestamp
Are there any user-facing changes?
Yes. To migrate to new to_timestamp. The original usage for to_timestamp(1_000_000_000) need to be modified to either to_timestamp(1) or to_timestamp_nanos(1_000_000_000)
this pr has the breaking changes to puublic API: to_timestamp
pending due to #2998 . this make SELECT to_timestamp(a) FROM (SELECT to_timestamp(1) as a)A return wrong result
#2998 merged, test cases passed
Closing as this PR is over a year old. Please feel free to reopen it / rebase it if you plan to keep working on it