summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_hive.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_hive.py')
-rw-r--r--tests/dialects/test_hive.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/dialects/test_hive.py b/tests/dialects/test_hive.py
index a7f3b8f..bbf00b1 100644
--- a/tests/dialects/test_hive.py
+++ b/tests/dialects/test_hive.py
@@ -339,6 +339,24 @@ class TestHive(Validator):
def test_hive(self):
self.validate_all(
+ "SELECT A.1a AS b FROM test_a AS A",
+ write={
+ "spark": "SELECT A.1a AS b FROM test_a AS A",
+ },
+ )
+ self.validate_all(
+ "SELECT 1_a AS a FROM test_table",
+ write={
+ "spark": "SELECT 1_a AS a FROM test_table",
+ },
+ )
+ self.validate_all(
+ "SELECT a_b AS 1_a FROM test_table",
+ write={
+ "spark": "SELECT a_b AS 1_a FROM test_table",
+ },
+ )
+ self.validate_all(
"PERCENTILE(x, 0.5)",
write={
"duckdb": "QUANTILE(x, 0.5)",
@@ -411,7 +429,7 @@ class TestHive(Validator):
"INITCAP('new york')",
write={
"duckdb": "INITCAP('new york')",
- "presto": "REGEXP_REPLACE('new york', '(\w)(\w*)', x -> UPPER(x[1]) || LOWER(x[2]))",
+ "presto": r"REGEXP_REPLACE('new york', '(\w)(\w*)', x -> UPPER(x[1]) || LOWER(x[2]))",
"hive": "INITCAP('new york')",
"spark": "INITCAP('new york')",
},