Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/518#discussion_r11935835
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
---
@@ -28,6 +28,18 @@ class SQLQuerySuite extends QueryTest {
// Make sure the tables are loaded.
TestData
+ test("index into array") {
+ checkAnswer(
+ sql("SELECT data, data[0], data[0] + data[1], data[0 + 1] FROM
arrayData"),
+ arrayData.map(d => (d.data, d.data(0), d.data(0) + d.data(1),
d.data(1))).collect().toSeq)
+ }
+
+ test("index into array of arrays") {
+ checkAnswer(
+ sql("SELECT nestedData, nestedData[0][0], nestedData[0][0] +
nestedData[0][1] FROM arrayData"),
--- End diff --
need to refit the lines to not exceed 100 chars.
otherwise the pr lgtm
---
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.
---