From e3188c2874b5d9f93ea49fb7d253631f0cb1dd91 Mon Sep 17 00:00:00 2001 From: anlowee Date: Wed, 10 Sep 2025 18:24:09 +0000 Subject: [PATCH 1/3] Bump velox version with two extra end-to-end queries to test pushdown --- .../TestPrestoNativeClpGeneralQueries.java | 45 +++++++++++++++++++ presto-native-execution/velox | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java index e7fe5da57bbfe..a1c5010b11360 100644 --- a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java +++ b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java @@ -126,6 +126,51 @@ public void test() " ARRAY[ARRAY[NULL]]" + " ]," + " NULL"); + assertQuery( + format("SELECT" + + " msg," + + " format_datetime(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + + " id," + + " attr," + + " tags" + + " FROM %s" + + " WHERE t.dollar_sign_date > from_unixtime(1679441694.576)" + + " ORDER BY id" + + " LIMIT 1", DEFAULT_TABLE_NAME), + "SELECT" + + " 'There were no users to pin, not starting tracker thread'," + + " TIMESTAMP '2023-03-22 12:34:55.821'," + + " 20227," + + " ARRAY[" + + " NULL," + + " ARRAY[ARRAY[ARRAY[ARRAY[ARRAY[NULL]]]]]," + + " NULL," + + " ARRAY[ARRAY[NULL]]" + + " ]," + + " NULL"); + assertQuery( + format("SELECT" + + " msg," + + " format_datetime(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + + " id," + + " attr," + + " tags" + + " FROM %s" + + " WHERE t.dollar_sign_date > from_unixtime(1679441694.576)" + + " AND msg like '%%user%%'" + + " ORDER BY id" + + " LIMIT 1", DEFAULT_TABLE_NAME), + "SELECT" + + " 'There were no users to pin, not starting tracker thread'," + + " TIMESTAMP '2023-03-22 12:34:55.821'," + + " 20227," + + " ARRAY[" + + " NULL," + + " ARRAY[ARRAY[ARRAY[ARRAY[ARRAY[NULL]]]]]," + + " NULL," + + " ARRAY[ARRAY[NULL]]" + + " ]," + + " NULL"); } @AfterTest diff --git a/presto-native-execution/velox b/presto-native-execution/velox index ab8f44627de6a..7ae5119842455 160000 --- a/presto-native-execution/velox +++ b/presto-native-execution/velox @@ -1 +1 @@ -Subproject commit ab8f44627de6ac2fe46fb5ca8ed3af09ee477b42 +Subproject commit 7ae51198424559a7ed6d245ce4c4214ef7047d9d From 0451d133475672c803792db9208d3430e8de8692 Mon Sep 17 00:00:00 2001 From: anlowee Date: Wed, 10 Sep 2025 18:53:02 +0000 Subject: [PATCH 2/3] Address coderabbitai comments --- .../TestPrestoNativeClpGeneralQueries.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java index a1c5010b11360..bf6ff8b856dcd 100644 --- a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java +++ b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java @@ -108,7 +108,7 @@ public void test() assertQuery( format("SELECT" + " msg," + - " format_datetime(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + + " FORMAT_DATETIME(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + " id," + " attr," + " tags" + @@ -129,12 +129,12 @@ public void test() assertQuery( format("SELECT" + " msg," + - " format_datetime(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + + " FORMAT_DATETIME(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + " id," + " attr," + " tags" + " FROM %s" + - " WHERE t.dollar_sign_date > from_unixtime(1679441694.576)" + + " WHERE t.dollar_sign_date > FROM_UNIXTIME(1679441694.576)" + " ORDER BY id" + " LIMIT 1", DEFAULT_TABLE_NAME), "SELECT" + @@ -151,13 +151,13 @@ public void test() assertQuery( format("SELECT" + " msg," + - " format_datetime(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + + " FORMAT_DATETIME(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + " id," + " attr," + " tags" + " FROM %s" + - " WHERE t.dollar_sign_date > from_unixtime(1679441694.576)" + - " AND msg like '%%user%%'" + + " WHERE t.dollar_sign_date > FROM_UNIXTIME(1679441694.576)" + + " AND msg LIKE '%%user%%'" + " ORDER BY id" + " LIMIT 1", DEFAULT_TABLE_NAME), "SELECT" + From e9b0a88f97916ee3ef121262938b40d2ba752c34 Mon Sep 17 00:00:00 2001 From: anlowee Date: Wed, 10 Sep 2025 21:04:53 +0000 Subject: [PATCH 3/3] Revert unrelated chagnes --- .../TestPrestoNativeClpGeneralQueries.java | 47 +------------------ 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java index bf6ff8b856dcd..e7fe5da57bbfe 100644 --- a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java +++ b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeClpGeneralQueries.java @@ -108,7 +108,7 @@ public void test() assertQuery( format("SELECT" + " msg," + - " FORMAT_DATETIME(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + + " format_datetime(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + " id," + " attr," + " tags" + @@ -126,51 +126,6 @@ public void test() " ARRAY[ARRAY[NULL]]" + " ]," + " NULL"); - assertQuery( - format("SELECT" + - " msg," + - " FORMAT_DATETIME(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + - " id," + - " attr," + - " tags" + - " FROM %s" + - " WHERE t.dollar_sign_date > FROM_UNIXTIME(1679441694.576)" + - " ORDER BY id" + - " LIMIT 1", DEFAULT_TABLE_NAME), - "SELECT" + - " 'There were no users to pin, not starting tracker thread'," + - " TIMESTAMP '2023-03-22 12:34:55.821'," + - " 20227," + - " ARRAY[" + - " NULL," + - " ARRAY[ARRAY[ARRAY[ARRAY[ARRAY[NULL]]]]]," + - " NULL," + - " ARRAY[ARRAY[NULL]]" + - " ]," + - " NULL"); - assertQuery( - format("SELECT" + - " msg," + - " FORMAT_DATETIME(t.dollar_sign_date, 'yyyy-MM-dd HH:mm:ss.SSS')," + - " id," + - " attr," + - " tags" + - " FROM %s" + - " WHERE t.dollar_sign_date > FROM_UNIXTIME(1679441694.576)" + - " AND msg LIKE '%%user%%'" + - " ORDER BY id" + - " LIMIT 1", DEFAULT_TABLE_NAME), - "SELECT" + - " 'There were no users to pin, not starting tracker thread'," + - " TIMESTAMP '2023-03-22 12:34:55.821'," + - " 20227," + - " ARRAY[" + - " NULL," + - " ARRAY[ARRAY[ARRAY[ARRAY[ARRAY[NULL]]]]]," + - " NULL," + - " ARRAY[ARRAY[NULL]]" + - " ]," + - " NULL"); } @AfterTest