Fix the data output exception when accessing Hive using Spark JDBC So… #2085
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#2084
The data read from hive is the same as the column names, not the real data
![image.png](https://camo.githubusercontent.com/d64f8afe1efe9386daa3ba5f871499c62d82649d3f0429d67a0b53650279217b/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032322f706e672f3539323234372f313635363430393331303133312d37363738363630322d323739302d343362302d383031652d6635343366623861663861632e706e6723636c69656e7449643d7531353233643961372d643562622d342663726f703d302663726f703d302663726f703d312663726f703d312666726f6d3d7061737465266865696768743d3335362669643d756264346538623239266d617267696e3d2535426f626a6563742532304f626a656374253544266e616d653d696d6167652e706e67266f726967696e4865696768743d333536266f726967696e57696474683d373932266f726967696e616c547970653d62696e61727926726174696f3d3126726f746174696f6e3d302673686f775469746c653d66616c73652673697a653d3435333331267374617475733d646f6e65267374796c653d6e6f6e65267461736b49643d7531663438306235392d393863302d343338642d393239622d3132626631326238323163267469746c653d2677696474683d373932)
![image.png](https://camo.githubusercontent.com/dd3aac6b034153a0413935e98c860b95a979bc6b5fcadbba24244fd6c67641c0/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032322f706e672f3539323234372f313635363430393436333738362d39636565363030622d633538302d343161362d616462352d3835646264393833386339332e706e6723636c69656e7449643d7531353233643961372d643562622d342663726f703d302663726f703d302663726f703d312663726f703d312666726f6d3d7061737465266865696768743d3636382669643d753438336534396661266d617267696e3d2535426f626a6563742532304f626a656374253544266e616d653d696d6167652e706e67266f726967696e4865696768743d363638266f726967696e57696474683d31323730266f726967696e616c547970653d62696e61727926726174696f3d3126726f746174696f6e3d302673686f775469746c653d66616c73652673697a653d3933393733267374617475733d646f6e65267374796c653d6e6f6e65267461736b49643d7565323562336233612d303939622d346464642d383562342d3733316138623437616666267469746c653d2677696474683d31323730)
![image.png](https://camo.githubusercontent.com/848d82064a760ef8d1b291420deecf25d609ec89351061c9a07466b2f46d6012/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032322f706e672f3539323234372f313635363431303239373938382d31663766323239352d383031662d346436302d393931352d3263653239343636666164662e706e6723636c69656e7449643d7531353233643961372d643562622d342663726f703d302663726f703d302663726f703d312663726f703d312666726f6d3d7061737465266865696768743d3233392669643d753530323837396339266d617267696e3d2535426f626a6563742532304f626a656374253544266e616d653d696d6167652e706e67266f726967696e4865696768743d323339266f726967696e57696474683d373132266f726967696e616c547970653d62696e61727926726174696f3d3126726f746174696f6e3d302673686f775469746c653d66616c73652673697a653d3135323337267374617475733d646f6e65267374796c653d6e6f6e65267461736b49643d7530643534616337312d316533382d343930372d626432302d3136323033323136396430267469746c653d2677696474683d373132)
![image.png](https://camo.githubusercontent.com/1da84cf927fd38f5fffb2df70811b1b81bdc62cfd0917cd521e230cd21c5bcf5/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032322f706e672f3539323234372f313635363431303234353939322d32616438666535382d303362312d346139372d393430312d3832363166323832383635392e706e6723636c69656e7449643d7531353233643961372d643562622d342663726f703d302663726f703d302663726f703d312663726f703d312666726f6d3d7061737465266865696768743d3134392669643d753635363731636463266d617267696e3d2535426f626a6563742532304f626a656374253544266e616d653d696d6167652e706e67266f726967696e4865696768743d313439266f726967696e57696474683d373833266f726967696e616c547970653d62696e61727926726174696f3d3126726f746174696f6e3d302673686f775469746c653d66616c73652673697a653d3133373931267374617475733d646f6e65267374796c653d6e6f6e65267461736b49643d7534633839393739642d663232392d343537662d623035362d3065313166383466613265267469746c653d2677696474683d373833)
If the queryed field type is numeric, the following exception is reported
By looking at the Spark source code, it is found that double quotation marks and column names are used when reading data through Jdbc to stitch column names, so it will result in the correct data not being returned
The solution is to re-implement the Hive dialect
Purpose of this pull request
Check list
New License Guide