Skip to content

Conversation

@yangzhg
Copy link
Member

@yangzhg yangzhg commented Dec 22, 2020

Proposed changes

Fix #5054
add a flag of fuzzy_parse, if the json file all object keys are the same and has same order, we only need to parse the first row, and then use index instead key to parse value

before

{
    "TxnId": 11030,
    "Label": "29ead6b1-6976-4e4e-8498-8150252091ca",
    "Status": "Success",
    "Message": "OK",
    "NumberTotalRows": 100000,
    "NumberLoadedRows": 100000,
    "NumberFilteredRows": 0,
    "NumberUnselectedRows": 0,
    "LoadBytes": 154100003,
    "LoadTimeMs": 31396,
    "BeginTxnTimeMs": 0,
    "StreamLoadPutTimeMs": 5,
    "ReadDataTimeMs": 277,
    "WriteDataTimeMs": 31366,
    "CommitAndPublishTimeMs": 21
}

after

{
    "TxnId": 11029,
    "Label": "9a74a352-6cb5-493c-9440-a4e3110ca305",
    "Status": "Success",
    "Message": "OK",
    "NumberTotalRows": 100000,
    "NumberLoadedRows": 100000,
    "NumberFilteredRows": 0,
    "NumberUnselectedRows": 0,
    "LoadBytes": 154100003,
    "LoadTimeMs": 12277,
    "BeginTxnTimeMs": 0,
    "StreamLoadPutTimeMs": 5,
    "ReadDataTimeMs": 276,
    "WriteDataTimeMs": 12246,
    "CommitAndPublishTimeMs": 21
}

about 3 times accelerate than before

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • [] Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation Update (if none of the other choices apply)
  • [] Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on (Fix improve performance of json load #5054), and have described the bug/feature there in detail
  • x[] Compiling and unit tests pass locally with my changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] If this change need a document change, I have updated the document
  • [] Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@EmmyMiao87 EmmyMiao87 added area/load Issues or PRs related to all kinds of load kind/improvement labels Dec 22, 2020
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Dec 24, 2020
@yangzhg yangzhg merged commit 279ae1c into apache:master Dec 25, 2020
acelyc111 pushed a commit to acelyc111/incubator-doris that referenced this pull request Dec 25, 2020
add a flag of fuzzy_parse, if the json file all object keys are the same and has same order, we only need to parse the first row, and then use index instead key to parse value
morningman pushed a commit to baidu-doris/incubator-doris that referenced this pull request Jan 5, 2021
add a flag of fuzzy_parse, if the json file all object keys are the same and has same order, we only need to parse the first row, and then use index instead key to parse value
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
@yangzhg yangzhg deleted the fuzzy_parse branch March 25, 2021 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/load Issues or PRs related to all kinds of load kind/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve performance of json load

3 participants