sadikovi opened a new pull request, #36137:
URL: https://github.com/apache/spark/pull/36137

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: 
https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: 
https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., 
'[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a 
faster review.
     7. If you want to add a new configuration, please read the guideline first 
for naming configurations in
        
'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the 
guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   
   This is a follow-up for https://github.com/apache/spark/pull/36094.
   I added `Utils.isTesting` whenever we perform schema conversion or row 
conversion for TimestampNTZType.
   
   I verified that the tests, e.g. ParquetIOSuite, fail with unsupported data 
type when running in non-testing mode:
   ```
   [info]   Cause: org.apache.spark.SparkException: Job aborted due to stage 
failure: Task 1 in stage 40.0 failed 1 times, most recent failure: Lost task 
1.0 in stage 40.0 (TID 66) (ip-10-110-16-208.us-west-2.compute.internal 
executor driver): org.apache.spark.sql.AnalysisException: Unsupported data type 
timestamp_ntz
   [info]       at 
org.apache.spark.sql.errors.QueryCompilationErrors$.cannotConvertDataTypeToParquetTypeError(QueryCompilationErrors.scala:1304)
   [info]       at 
org.apache.spark.sql.execution.datasources.parquet.SparkToParquetSchemaConverter.convertField(ParquetSchemaConverter.scala:707)
   [info]       at 
org.apache.spark.sql.execution.datasources.parquet.SparkToParquetSchemaConverter.convertField(ParquetSchemaConverter.scala:479)
   [info]       at 
org.apache.spark.sql.execution.datasources.parquet.SparkToParquetSchemaConverter.$anonfun$convert$1(ParquetSchemaConverter.scala:471)
   ```
   
   
   ### Why are the changes needed?
   We have to disable TimestampNTZType as other parts of the codebase do not 
yet support this type.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as 
the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes 
- provide the console output, description and/or an example to show the 
behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to 
the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   No, the TimestampNTZ type is not released yet.
   
   ### How was this patch tested?
   
   I tested the changes manually by rerunning the test suites that verify 
TimestampNTZType in the non-testing mode.
   


-- 
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]

Reply via email to