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

[fix](load) fix error due to jsonpaths resolution results #34941

Closed
wants to merge 1 commit into from

Conversation

felixwluo
Copy link
Contributor

@felixwluo felixwluo commented May 15, 2024

Proposed changes

  1. problem
    When the key name in json is a.b, the value will be parsed incorrectly
  2. resolve
    Add a key like a.b and put it in parentheses for normal parsing
  3. sql
CREATE TABLE `test`.`q1` (
  `k1` varchar(1024) NULL,
  `k2` varchar(1024) NULL
) ENGINE=OLAP
DUPLICATE KEY(`k1`)
COMMENT 'OLAP'
DISTRIBUTED BY HASH(`k1`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
  1. json
{
        "tags": {
                "a.b": "test",
                "k2": "k2_value"
        }
}
  1. stream load
curl -v --location-trusted -u root:"" -H "format: json" -H "jsonpaths: [\"$.tags.(a.b)\",\"$.tags.k2\"]" -T test.json http://127.0.0.1:8030/api/test/q1/_stream_load

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...

@doris-robot
Copy link

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

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.70% (9002/25219)
Line Coverage: 27.37% (74483/272182)
Region Coverage: 26.61% (38519/144741)
Branch Coverage: 23.43% (19646/83866)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b141173895c9de0f03171745483c6011c789c299_b141173895c9de0f03171745483c6011c789c299/report/index.html

@felixwluo
Copy link
Contributor Author

run p0

@felixwluo
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.70% (9004/25219)
Line Coverage: 27.37% (74499/272175)
Region Coverage: 26.62% (38526/144740)
Branch Coverage: 23.43% (19650/83866)
Coverage Report: http://coverage.selectdb-in.cc/coverage/6c95e1842b5f6897903dd7a97f91b91b5f0e9188_6c95e1842b5f6897903dd7a97f91b91b5f0e9188/report/index.html

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@felixwluo
Copy link
Contributor Author

run p0

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.70% (9004/25219)
Line Coverage: 27.38% (74509/272175)
Region Coverage: 26.62% (38526/144740)
Branch Coverage: 23.44% (19661/83866)
Coverage Report: http://coverage.selectdb-in.cc/coverage/4869c136b42c65867aea25409a8e65d72dd41c5d_4869c136b42c65867aea25409a8e65d72dd41c5d/report/index.html

@felixwluo
Copy link
Contributor Author

run p0

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

2 similar comments
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.70% (9005/25226)
Line Coverage: 27.37% (74529/272266)
Region Coverage: 26.62% (38548/144804)
Branch Coverage: 23.44% (19668/83900)
Coverage Report: http://coverage.selectdb-in.cc/coverage/7d118c3284996db2f4b162e135779fdcaac87dd8_7d118c3284996db2f4b162e135779fdcaac87dd8/report/index.html

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.71% (9008/25226)
Line Coverage: 27.37% (74524/272266)
Region Coverage: 26.62% (38548/144816)
Branch Coverage: 23.44% (19674/83920)
Coverage Report: http://coverage.selectdb-in.cc/coverage/f962159c9f45337df7a82fdd3db3a51b700a94ab_f962159c9f45337df7a82fdd3db3a51b700a94ab/report/index.html

@felixwluo
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.71% (9008/25228)
Line Coverage: 27.37% (74515/272274)
Region Coverage: 26.62% (38546/144824)
Branch Coverage: 23.45% (19674/83912)
Coverage Report: http://coverage.selectdb-in.cc/coverage/49720653f40709d5a516d24f369d7a29f93cf14a_49720653f40709d5a516d24f369d7a29f93cf14a/report/index.html

@felixwluo
Copy link
Contributor Author

run p0

@felixwluo felixwluo closed this May 21, 2024
Sign up for free to 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.

None yet

2 participants