summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_spark.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_spark.py')
-rw-r--r--tests/dialects/test_spark.py58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/dialects/test_spark.py b/tests/dialects/test_spark.py
index 8377e47..9a7e64c 100644
--- a/tests/dialects/test_spark.py
+++ b/tests/dialects/test_spark.py
@@ -111,12 +111,70 @@ TBLPROPERTIES (
"SELECT /*+ COALESCE(3) */ * FROM x",
write={
"spark": "SELECT /*+ COALESCE(3) */ * FROM x",
+ "bigquery": "SELECT * FROM x",
},
)
self.validate_all(
"SELECT /*+ COALESCE(3), REPARTITION(1) */ * FROM x",
write={
"spark": "SELECT /*+ COALESCE(3), REPARTITION(1) */ * FROM x",
+ "bigquery": "SELECT * FROM x",
+ },
+ )
+ self.validate_all(
+ "SELECT /*+ BROADCAST(table) */ cola FROM table",
+ write={
+ "spark": "SELECT /*+ BROADCAST(table) */ cola FROM table",
+ "bigquery": "SELECT cola FROM table",
+ },
+ )
+ self.validate_all(
+ "SELECT /*+ BROADCASTJOIN(table) */ cola FROM table",
+ write={
+ "spark": "SELECT /*+ BROADCASTJOIN(table) */ cola FROM table",
+ "bigquery": "SELECT cola FROM table",
+ },
+ )
+ self.validate_all(
+ "SELECT /*+ MAPJOIN(table) */ cola FROM table",
+ write={
+ "spark": "SELECT /*+ MAPJOIN(table) */ cola FROM table",
+ "bigquery": "SELECT cola FROM table",
+ },
+ )
+ self.validate_all(
+ "SELECT /*+ MERGE(table) */ cola FROM table",
+ write={
+ "spark": "SELECT /*+ MERGE(table) */ cola FROM table",
+ "bigquery": "SELECT cola FROM table",
+ },
+ )
+ self.validate_all(
+ "SELECT /*+ SHUFFLEMERGE(table) */ cola FROM table",
+ write={
+ "spark": "SELECT /*+ SHUFFLEMERGE(table) */ cola FROM table",
+ "bigquery": "SELECT cola FROM table",
+ },
+ )
+ self.validate_all(
+ "SELECT /*+ MERGEJOIN(table) */ cola FROM table",
+ write={
+ "spark": "SELECT /*+ MERGEJOIN(table) */ cola FROM table",
+ "bigquery": "SELECT cola FROM table",
+ },
+ )
+ self.validate_all(
+ "SELECT /*+ SHUFFLE_HASH(table) */ cola FROM table",
+ write={
+ "spark": "SELECT /*+ SHUFFLE_HASH(table) */ cola FROM table",
+ "bigquery": "SELECT cola FROM table",
+ },
+ )
+ self.validate_all(
+ "SELECT /*+ SHUFFLE_REPLICATE_NL(table) */ cola FROM table",
+ write={
+ "spark": "SELECT /*+ SHUFFLE_REPLICATE_NL(table) */ cola FROM table",
+ "bigquery": "SELECT cola FROM table",
},
)