You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/06/29 10:36:31 UTC

[GitHub] [incubator-seatunnel] Bingz2 opened a new pull request, #2085: Fix the data output exception when accessing Hive using Spark JDBC So…

Bingz2 opened a new pull request, #2085:
URL: https://github.com/apache/incubator-seatunnel/pull/2085

   https://github.com/apache/incubator-seatunnel/issues/2084
   
   从hive中读到的数据跟列名一样,而不是真实的数据
   ![image.png](https://cdn.nlark.com/yuque/0/2022/png/592247/1656409310131-76786602-2790-43b0-801e-f543fb8af8ac.png#clientId=u1523d9a7-d5bb-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=356&id=ubd4e8b29&margin=%5Bobject%20Object%5D&name=image.png&originHeight=356&originWidth=792&originalType=binary&ratio=1&rotation=0&showTitle=false&size=45331&status=done&style=none&taskId=u1f480b59-98c0-438d-929b-12bf12b821c&title=&width=792)
   如果查询的字段类型时数字的话,就会爆出以下异常
   ![image.png](https://cdn.nlark.com/yuque/0/2022/png/592247/1656409463786-9cee600b-c580-41a6-adb5-85dbd9838c93.png#clientId=u1523d9a7-d5bb-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=668&id=u483e49fa&margin=%5Bobject%20Object%5D&name=image.png&originHeight=668&originWidth=1270&originalType=binary&ratio=1&rotation=0&showTitle=false&size=93973&status=done&style=none&taskId=ue25b3b3a-099b-4ddd-85b4-731a8b47aff&title=&width=1270)
   通过查看Spark源码,发现在通过Jdbc读数据在拼接列名时使用的是双引号加加列名,所以才会导致一直没有返回正确的数据
   ![image.png](https://cdn.nlark.com/yuque/0/2022/png/592247/1656410297988-1f7f2295-801f-4d60-9915-2ce29466fadf.png#clientId=u1523d9a7-d5bb-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=239&id=u502879c9&margin=%5Bobject%20Object%5D&name=image.png&originHeight=239&originWidth=712&originalType=binary&ratio=1&rotation=0&showTitle=false&size=15237&status=done&style=none&taskId=u0d54ac71-1e38-4907-bd20-162032169d0&title=&width=712)
   ![image.png](https://cdn.nlark.com/yuque/0/2022/png/592247/1656410245992-2ad8fe58-03b1-4a97-9401-8261f2828659.png#clientId=u1523d9a7-d5bb-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=149&id=u65671cdc&margin=%5Bobject%20Object%5D&name=image.png&originHeight=149&originWidth=783&originalType=binary&ratio=1&rotation=0&showTitle=false&size=13791&status=done&style=none&taskId=u4c89979d-f229-457f-b056-0e11f84fa2e&title=&width=783)
   解决方法就是重新实现hive的dialect
   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [x] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] Hisoka-X merged pull request #2085: Fix the data output exception when accessing Hive using Spark JDBC So…

Posted by GitBox <gi...@apache.org>.
Hisoka-X merged PR #2085:
URL: https://github.com/apache/incubator-seatunnel/pull/2085


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org