Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Hive table fails to load if a custom schema is used. #398

Open
2 tasks done
yruslan opened this issue Apr 30, 2024 · 0 comments · Fixed by #523
Open
2 tasks done

A Hive table fails to load if a custom schema is used. #398

yruslan opened this issue Apr 30, 2024 · 0 comments · Fixed by #523
Labels
bug Something isn't working DS Pramen-Scala

Comments

@yruslan
Copy link
Collaborator

yruslan commented Apr 30, 2024

Describe the bug

Originally, this happened when decimal correction is used with Hive, and there are columns having decimal(38,18) types. Pramen tries to 'correct' the schema by applying a custom schema type.

24/04/29 18:53:02 INFO SparkUtils$: Correct 'tbl.number1' (prec=38, scale=18) to decimal(38, 18)
24/04/29 18:53:02 INFO SparkUtils$: Correct 'tbl.number2' (prec=38, scale=18) to decimal(38, 18)

JDBC connection error for jdbc:hive2://example.com:10000;AuthMech=1; No connection attempts                                                                                                                                 left.
org.apache.spark.sql.catalyst.parser.ParseException:
extraneous input '.' expecting {'SELECT', ...
== SQL ==
tbl.number1 decimal(38, 18), tbl.number2 decimal(38, 18)
---^^^
Collapse

Code and/or configuration snippet that caused the issue

correct.decimals.in.schema = true
correct.decimals.fix.precision = true

Expected behavior

  • Pramen shoule not 'correct' decimal(38,18) since precision and scale are within the range.
  • Investigate if custom schema support for Hive can be fixed since it is needed in case the data type does need correction.

Context

  • Pramen/pramen-py version: 1.8.5
  • Spark version: 2.4.4
  • Scala/Python version: 2.11
  • Operating system: Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DS Pramen-Scala
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant