Cherry-picked from #43979 Co-authored-by: wuwenchi <wuwenchi@selectdb.com>
This commit is contained in:
committed by
GitHub
parent
269c2c844b
commit
48e33bfb2a
@ -103,6 +103,7 @@ Status LzopDecompressor::decompress(uint8_t* input, size_t input_len, size_t* in
|
||||
ptr = get_uint32(ptr, &uncompressed_size);
|
||||
left_input_len -= sizeof(uint32_t);
|
||||
if (uncompressed_size == 0) {
|
||||
*input_bytes_read += sizeof(uint32_t);
|
||||
*stream_end = true;
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -0,0 +1,41 @@
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
suite("test_user_empty_lzo","external,hive,tvf,external_docker") {
|
||||
String hdfs_port = context.config.otherConfigs.get("hive2HdfsPort")
|
||||
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
|
||||
|
||||
def hdfsUserName = "doris"
|
||||
def defaultFS = "hdfs://${externalEnvIp}:${hdfs_port}"
|
||||
def uri = ""
|
||||
|
||||
String enabled = context.config.otherConfigs.get("enableHiveTest")
|
||||
if (enabled != null && enabled.equalsIgnoreCase("true")) {
|
||||
try {
|
||||
// it's a empty data file
|
||||
uri = "${defaultFS}" + "/user/doris/preinstalled_data/user_empty_lzo/part-m-00000.lzo"
|
||||
test {
|
||||
sql """ select * from HDFS(
|
||||
"uri" = "${uri}",
|
||||
"hadoop.username" = "${hdfsUserName}",
|
||||
"format" = "csv"); """
|
||||
exception """The first line is empty, can not parse column numbers"""
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user