pretty print the query
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -226,13 +226,13 @@ func transformParquet(lu settings.LeakUtils, input, output Parquet, operations [
|
|||||||
COPY (
|
COPY (
|
||||||
SELECT %s
|
SELECT %s
|
||||||
FROM read_parquet('%s')
|
FROM read_parquet('%s')
|
||||||
WHERE (%s) < %d
|
WHERE (%s) < %d %s
|
||||||
%s
|
|
||||||
) TO '%s' (FORMAT PARQUET, ROW_GROUP_SIZE 200_000 %s)
|
) TO '%s' (FORMAT PARQUET, ROW_GROUP_SIZE 200_000 %s)
|
||||||
`, selectClause, input.Filepath, strings.Join(columnsLength, "+"), allowedRowSize, offset, output.Filepath, compression)
|
`, selectClause, input.Filepath, strings.Join(columnsLength, "+"), allowedRowSize, offset, output.Filepath, compression)
|
||||||
|
|
||||||
if printQuery {
|
if printQuery {
|
||||||
fmt.Println("Query:", query) // TODO: Remove tabs
|
fmt.Println(settings.Base.Render("\nQuery:"))
|
||||||
|
fmt.Println(settings.Accent.Render(strings.ReplaceAll(strings.TrimSpace(query), "\t", "")))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user