SuccessChanges

Summary

  1. [SPARK-30267][SQL] Avro arrays can be of any List (details)
  2. Revert "[SPARK-23264][SQL] Make INTERVAL keyword optional when ANSI (details)
Commit e64512558f4b9455a7758c20de129a03203fddb1 by gengliang.wang
[SPARK-30267][SQL] Avro arrays can be of any List
The Deserializer assumed that avro arrays are always of type
`GenericData$Array` which is not the case. Assuming they are from
java.util.List is safer and fixes a ClassCastException in some avro
code.
### What changes were proposed in this pull request? Java.util.List has
all the necessary methods and is the base class of GenericData$Array.
### Why are the changes needed? To prevent the following exception in
more complex avro objects:
``` java.lang.ClassCastException: java.util.ArrayList cannot be cast to
org.apache.avro.generic.GenericData$Array
at
org.apache.spark.sql.avro.AvroDeserializer.$anonfun$newWriter$19(AvroDeserializer.scala:170)
at
org.apache.spark.sql.avro.AvroDeserializer.$anonfun$newWriter$19$adapted(AvroDeserializer.scala:169)
at
org.apache.spark.sql.avro.AvroDeserializer.$anonfun$getRecordWriter$1(AvroDeserializer.scala:314)
at
org.apache.spark.sql.avro.AvroDeserializer.$anonfun$getRecordWriter$1$adapted(AvroDeserializer.scala:310)
at
org.apache.spark.sql.avro.AvroDeserializer.$anonfun$getRecordWriter$2(AvroDeserializer.scala:332)
at
org.apache.spark.sql.avro.AvroDeserializer.$anonfun$getRecordWriter$2$adapted(AvroDeserializer.scala:329)
at
org.apache.spark.sql.avro.AvroDeserializer.$anonfun$converter$3(AvroDeserializer.scala:56)
at
org.apache.spark.sql.avro.AvroDeserializer.deserialize(AvroDeserializer.scala:70)
```
### Does this PR introduce any user-facing change? No
### How was this patch tested? The current tests already test this
behavior.  In essesence this patch just changes a type case to a more
basic type.  So I expect no functional impact.
Closes #26907 from steven-aerts/spark-30267.
Authored-by: Steven Aerts <steven.aerts@gmail.com> Signed-off-by:
Gengliang Wang <gengliang.wang@databricks.com>
The file was modifiedexternal/avro/src/test/scala/org/apache/spark/sql/avro/AvroCatalystDataConversionSuite.scala (diff)
The file was modifiedexternal/avro/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala (diff)
Commit be4faafee43d7b8810cf19deacd22e91b19ccfc6 by gatorsmile
Revert "[SPARK-23264][SQL] Make INTERVAL keyword optional when ANSI
enabled"
### What changes were proposed in this pull request?
Revert https://github.com/apache/spark/pull/20433 .
### Why are the changes needed?
According to the SQL standard, the INTERVAL prefix is required:
```
<interval literal> ::=
INTERVAL [ <sign> ] <interval string> <interval qualifier>
<interval string> ::=
<quote> <unquoted interval string> <quote>
```
### Does this PR introduce any user-facing change?
yes, but omitting the INTERVAL prefix is a new feature in 3.0
### How was this patch tested?
existing tests
Closes #27080 from cloud-fan/interval.
Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Xiao Li
<gatorsmile@gmail.com>
The file was modifieddocs/sql-keywords.md (diff)
The file was modifiedsql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 (diff)
The file was modifiedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/TableIdentifierParserSuite.scala (diff)
The file was modifiedsql/core/src/test/resources/sql-tests/results/interval.sql.out (diff)
The file was modifiedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala (diff)
The file was modifiedsql/core/src/test/resources/sql-tests/inputs/ansi/interval.sql (diff)
The file was modifiedsql/core/src/test/resources/sql-tests/results/ansi/interval.sql.out (diff)