huanghanyu-vungle commented on issue #9018:
URL: https://github.com/apache/iceberg/issues/9018#issuecomment-1819237615
` def saveReport(data: DataFrame, targetTable: String, isPublisherReport:
Boolean): Unit = {
val tmpTableName = "__tmp"
data.createOrReplaceTempView(tmpTableName)
val (min_event_time, max_event_time, min_ingest_time, max_ingest_time) =
{
val timeStatRow = spark.sql(s"""
SELECT
date_format(MIN(event_time), 'yyyy-MM-dd HH') min_event_time,
date_format(MAX(event_time), 'yyyy-MM-dd HH') max_event_time,
date_format(MIN(ingest_time), 'yyyy-MM-dd HH') min_ingest_time,
date_format(MAX(ingest_time), 'yyyy-MM-dd HH') max_ingest_time
FROM $tmpTableName
""").collect()(0)
(timeStatRow.getString(0), timeStatRow.getString(1),
timeStatRow.getString(2), timeStatRow.getString(3))
}`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]