Conversation
…n. Tests added all dialects that support APPROX_TOP_K_ACCUMULATE
https://spark.apache.org/docs/preview/api/sql/index.html#approx_top_k_accumulate |
…APPROX_TOP_K_ACCUMULATE function.
…APPROX_TOP_K_ACCUMULATE function.
I see - does it exist in Databricks? I tried to run a test but it fails. |
tests/dialects/test_databricks.py
Outdated
| self.assertEqual(null_type.sql(), "NULL") | ||
| self.assertEqual(null_type.sql("databricks"), "VOID") | ||
|
|
||
| self.validate_identity("SELECT APPROX_TOP_K_ACCUMULATE(col, 10)") |
There was a problem hiding this comment.
I also believe that DBX should be compatible with Spark but I'll go ahead and remove this test for now since it's not documented properly and @geooo109 mentioned it doesn't seem to work.
We can always revisit when we iterate through DBX
| self.validate_identity("SELECT APPROX_TOP_K_ACCUMULATE(col, 10)") |
https://docs.databricks.com/aws/en/sql/language-manual/functions/approx_top_k |
|
Annotates APPROXIMATE_TOP_K_ACCUMULATE expressions as returning VARIANT.
Updates the type mapping in the Snowflake dialect.
Includes generic tests in snowflake, databricks and spark to validate type inference for this function.