mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-25 10:19:24 -06:00
move status messages from parquet to stderr (#8842)
This commit is contained in:
@@ -176,7 +176,7 @@ func DeleteAndPrint(prevMsgLen int, msg string) int {
|
||||
}
|
||||
}
|
||||
|
||||
Print(string(backspacesAndMsg))
|
||||
PrintErr(string(backspacesAndMsg))
|
||||
return msgLen
|
||||
}
|
||||
|
||||
|
||||
@@ -1240,7 +1240,7 @@ func (f *fileReadProgress) printNewLineIfNeeded() {
|
||||
func updateFileReadProgressOutput() {
|
||||
if fileReadProg == nil {
|
||||
// this should not happen, but sanity check
|
||||
cli.Println("No file is being processed.")
|
||||
cli.PrintErrln("No file is being processed.")
|
||||
}
|
||||
// batch can be writing to the line, so print new line.
|
||||
batchEditStats.printNewLineIfNeeded()
|
||||
|
||||
@@ -1054,6 +1054,30 @@ SQL
|
||||
[ "${#lines[@]}" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "sql: parquet file output separates output and status messages" {
|
||||
dolt sql <<SQL
|
||||
CREATE TABLE test (
|
||||
a int primary key,
|
||||
b float,
|
||||
c varchar(80),
|
||||
d datetime
|
||||
);
|
||||
insert into test values (1, 1.5, "1", "2020-01-01");
|
||||
SQL
|
||||
|
||||
echo "select * from test;" > in.sql
|
||||
|
||||
dolt sql -r parquet -f in.sql > out.parquet 2> out.txt
|
||||
|
||||
run cat out.parquet
|
||||
[ $status -eq 0 ]
|
||||
[[ ! "$output" =~ "Processed" ]] || false
|
||||
|
||||
run cat out.txt
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "Processed" ]] || false
|
||||
}
|
||||
|
||||
@test "sql: output for escaped longtext exports properly" {
|
||||
dolt sql <<SQL
|
||||
CREATE TABLE test (
|
||||
|
||||
Reference in New Issue
Block a user