Skip to content

branch-2.1: [Fix](Serde) Support hive compatible output format #49036 - #49831

Merged
yiguolei merged 1 commit into
branch-2.1from
auto-pick-49036-branch-2.1
Apr 11, 2025
Merged

branch-2.1: [Fix](Serde) Support hive compatible output format #49036#49831
yiguolei merged 1 commit into
branch-2.1from
auto-pick-49036-branch-2.1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #49036

Problem Summary:
The output format of complex data types are different between Hive and
Doris, such as array, map and struct.
When user migrate from Hive to Doris, they expect the same format so
that they don't need to modify their business code.
This PR mainly changes:
Add a new option to session variable `serde_dialect`: If set to hive,
the output format returned to MySQL client of some datatypes will be
changed:
Array
Doris: ["abc", "def", "", null, 1]
Hive: ["abc","def","",null,true]
Map
Doris: {"k1":null, "k2":"v3"}
Hive: {"k1":null,"k2":"v3"}
Struct
Doris: {"s_id":100, "s_name":"abc , "", "s_address":null}
Hive: {"s_id":100,"s_name":"abc ,"","s_address":null}
Related #37039
@github-actions
github-actionsBot requested a review from yiguolei as a code ownerApril 7, 2025 07:14
@Thearas

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@Thearas

Copy link
Copy Markdown
Contributor

run buildall

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 22.86% (8/35) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage38.18% (10061/26353)
Line Coverage29.20% (82919/283937)
Region Coverage27.87% (42620/152938)
Branch Coverage24.48% (21589/88206)

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Thearas@doris-robot@yiguolei@dataroaring@BePPPower