Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/4014#discussion_r23441619
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala
---
@@ -327,7 +327,49 @@ class HiveQuerySuite extends HiveComparisonTest with
BeforeAndAfter {
createQueryTest("transform",
"SELECT TRANSFORM (key) USING 'cat' AS (tKey) FROM src")
+
+ test("schema-less transform") {
+ val expected = sql("SELECT TRANSFORM (key) USING 'cat' AS (tKey) FROM
src").collect().head
+ val res = sql("SELECT TRANSFORM (key) USING 'cat' FROM
src").collect().head
+
+ assert(expected(0) === res(0))
+
+ val expected2 = sql("SELECT TRANSFORM (*) USING 'cat' AS (tKey,
tValue) FROM src").collect().head
+ val res2 = sql("SELECT TRANSFORM (*) USING 'cat' FROM
src").collect().head
+
+ assert(expected2(0) === res2(0) && expected2(1) === res2(1))
+ }
+
+ test("transform with custom field delimiter") {
+ val expected = sql("SELECT TRANSFORM (key) ROW FORMAT DELIMITED FIELDS
TERMINATED BY '\002' USING 'cat' AS (tKey) ROW FORMAT DELIMITED FIELDS
TERMINATED BY '\002' FROM src").collect().head
--- End diff --
New commit will fix that.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]