Re: Re: TIMESTAMPDIFF and datetime subtraction can not work well with JDBC adapter

2020-04-03 Thread TANG Wen-hui
As I known, MySQL supports timestampdiff directly, PG and Oracle allow datetime subtraction that the format of the result is "XX days HH:mm:ss", Spark SQL and Hive SQL support datediff function. And maybe we can use unix_timestamp instead to get datetime subtraction result in seconds for Spark

Re: TIMESTAMPDIFF and datetime subtraction can not work well with JDBC adapter

2020-04-02 Thread Julian Hyde
I think you have identified the issues correctly. I prefer SqlDatetimeSubtractionOperator to SqlTimestampDiffFunction because it is standard and more powerful. But some work is needed to make SQL generation run smoothly. Especially with data types, as you point out. I would approach this by