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
Currently, Materialized View queries do not support Common Table Expressions (CTEs) as source tables in the FROM clause. The issue stems from prevalidation logic, which fails to properly handle the table name extraction.
How can one reproduce the bug?
CREATE MATERIALIZED VIEW mv_test AS
WITH aggregated AS (
SELECT
...
FROM http_logs
WHERE year = 1998 AND month = 5 AND day = 18
GROUP BY TUMBLE(`@timestamp`, '1 Day')
)
SELECT
...
FROM aggregated AS agg1;
What is the expected behavior?
The materialized view should be created successfully without any errors.
Do you have any additional context?
Error encountered:
java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:529)
at scala.None$.get(Option.scala:527)
at org.opensearch.flint.spark.FlintSparkValidationHelper.$anonfun$isTableProviderSupported$1(FlintSparkValidationHelper.scala:49)
at org.opensearch.flint.spark.FlintSparkValidationHelper.$anonfun$isTableProviderSupported$1$adapted(FlintSparkValidationHelper.scala:47)
at scala.collection.IndexedSeqOptimized.prefixLengthImpl(IndexedSeqOptimized.scala:41)
at scala.collection.IndexedSeqOptimized.exists(IndexedSeqOptimized.scala:49)
at scala.collection.IndexedSeqOptimized.exists$(IndexedSeqOptimized.scala:49)
The text was updated successfully, but these errors were encountered:
What is the bug?
Currently, Materialized View queries do not support Common Table Expressions (CTEs) as source tables in the
FROM
clause. The issue stems from prevalidation logic, which fails to properly handle the table name extraction.How can one reproduce the bug?
What is the expected behavior?
The materialized view should be created successfully without any errors.
Do you have any additional context?
Error encountered:
The text was updated successfully, but these errors were encountered: