Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{ "k1": "1", "k2": "50", "v1": "1", "v2": "1", "v3": "3", "k4": "1"}
{ "k1": "-1", "k2": "50", "v1": "1", "v2": "1", "v3": "3", "k4": "1"}
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@
1 -50 1 2 1 \N
2 -50 1 44 1 \N

-- !sql_chunked_transfer --
-- !sql_chunked_transfer_csv --
1 -50 1 2 1 \N
2 -50 1 44 1 \N

-- !sql_chunked_transfer_json --
-1 50 1 1 3 \N
1 50 1 1 3 \N

Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,35 @@ suite("test_stream_load", "p0") {
json2pc = parseJson(out)
log.info("test chunked transfer result: ${out}".toString())

qt_sql_chunked_transfer "select * from ${tableName16} order by k1"
qt_sql_chunked_transfer_csv "select * from ${tableName16} order by k1"
} finally {
sql """ DROP TABLE IF EXISTS ${tableName16} FORCE"""
}

try {
sql """ DROP TABLE IF EXISTS ${tableName16} """
sql """
CREATE TABLE IF NOT EXISTS ${tableName16} (
`k1` bigint(20) NULL DEFAULT "1",
`k2` bigint(20) NULL ,
`v1` tinyint(4) NULL,
`v2` tinyint(4) NULL,
`v3` tinyint(4) NULL,
`v4` DATETIME NULL
) ENGINE=OLAP
DISTRIBUTED BY HASH(`k1`) BUCKETS 3
PROPERTIES ("replication_allocation" = "tag.location.default: 1");
"""

def command = "curl --location-trusted -u ${context.config.feHttpUser}:${context.config.feHttpPassword} -H Transfer-Encoding:chunked -H format:json -H read_json_by_line:true -T ${context.dataPath}/test_chunked_transfer.json http://${context.config.feHttpAddress}/api/${db}/${tableName16}/_stream_load"
log.info("test chunked transfer command: ${command}")
def process = command.execute()
code = process.waitFor()
out = process.text
json2pc = parseJson(out)
log.info("test chunked transfer result: ${out}".toString())

qt_sql_chunked_transfer_json "select * from ${tableName16} order by k1"
} finally {
sql """ DROP TABLE IF EXISTS ${tableName16} FORCE"""
}
Expand Down