lifulong commented on code in PR #12213:
URL: https://github.com/apache/gluten/pull/12213#discussion_r3355101613
##########
backends-velox/src/test/scala/org/apache/spark/sql/execution/VeloxParquetWriteSuite.scala:
##########
@@ -74,6 +76,37 @@ class VeloxParquetWriteSuite extends
VeloxWholeStageTransformerSuite with WriteU
}
}
+ test("test write parquet decimal with writeLegacyFormat") {
+ // writeLegacyFormat details see `VeloxWriterUtils.cc`
+ Seq(
+ false -> PrimitiveType.PrimitiveTypeName.INT32,
+ true -> PrimitiveType.PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY)
+ .foreach {
+ case (legacyFormat, expectedType) =>
+ withSQLConf(SQLConf.PARQUET_WRITE_LEGACY_FORMAT.key ->
legacyFormat.toString) {
+ withTempPath {
+ f =>
+ val df = spark.sql("SELECT CAST(123.456 AS DECIMAL(8, 3)) AS
value")
+ df.write.format("parquet").save(f.getCanonicalPath)
Review Comment:
@jackylee-ch Updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]