Skip to content

Commit

Permalink
Repackage as io.trino (step 4 of 5): import statements
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Jan 3, 2021
1 parent cea5842 commit 03d8e5a
Show file tree
Hide file tree
Showing 5,356 changed files with 53,498 additions and 53,500 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
*/
package io.trino.cli;

import io.prestosql.client.Warning;
import io.trino.client.Warning;
import org.jline.utils.AttributedStringBuilder;

import java.util.List;
import java.util.OptionalInt;

import static com.google.common.collect.ImmutableList.toImmutableList;
import static io.prestosql.cli.TerminalUtils.isRealTerminal;
import static io.trino.cli.TerminalUtils.isRealTerminal;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
import static org.jline.utils.AttributedStyle.DEFAULT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import io.prestosql.client.Column;
import io.prestosql.client.Row;
import io.trino.client.Column;
import io.trino.client.Row;

import java.io.IOException;
import java.io.Writer;
Expand All @@ -33,13 +33,13 @@
import static com.google.common.collect.Iterables.partition;
import static com.google.common.collect.Iterables.transform;
import static com.google.common.io.BaseEncoding.base16;
import static io.prestosql.client.ClientStandardTypes.BIGINT;
import static io.prestosql.client.ClientStandardTypes.DECIMAL;
import static io.prestosql.client.ClientStandardTypes.DOUBLE;
import static io.prestosql.client.ClientStandardTypes.INTEGER;
import static io.prestosql.client.ClientStandardTypes.REAL;
import static io.prestosql.client.ClientStandardTypes.SMALLINT;
import static io.prestosql.client.ClientStandardTypes.TINYINT;
import static io.trino.client.ClientStandardTypes.BIGINT;
import static io.trino.client.ClientStandardTypes.DECIMAL;
import static io.trino.client.ClientStandardTypes.DOUBLE;
import static io.trino.client.ClientStandardTypes.INTEGER;
import static io.trino.client.ClientStandardTypes.REAL;
import static io.trino.client.ClientStandardTypes.SMALLINT;
import static io.trino.client.ClientStandardTypes.TINYINT;
import static java.lang.Math.max;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.google.common.collect.ImmutableSet;
import com.google.common.net.HostAndPort;
import io.airlift.units.Duration;
import io.prestosql.client.ClientSession;
import io.trino.client.ClientSession;

import java.net.URI;
import java.net.URISyntaxException;
Expand All @@ -35,7 +35,7 @@

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Strings.nullToEmpty;
import static io.prestosql.client.KerberosUtil.defaultCredentialCachePath;
import static io.trino.client.KerberosUtil.defaultCredentialCachePath;
import static java.util.Collections.emptyMap;
import static java.util.Locale.ENGLISH;
import static java.util.Objects.requireNonNull;
Expand Down
30 changes: 15 additions & 15 deletions client/trino-cli/src/main/java/io/trino/cli/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import io.airlift.log.Logging;
import io.airlift.log.LoggingConfiguration;
import io.airlift.units.Duration;
import io.prestosql.cli.ClientOptions.OutputFormat;
import io.prestosql.cli.Presto.VersionProvider;
import io.prestosql.client.ClientSelectedRole;
import io.prestosql.client.ClientSession;
import io.prestosql.sql.parser.StatementSplitter;
import io.trino.cli.ClientOptions.OutputFormat;
import io.trino.cli.Presto.VersionProvider;
import io.trino.client.ClientSelectedRole;
import io.trino.client.ClientSession;
import io.trino.sql.parser.StatementSplitter;
import org.jline.reader.EndOfFileException;
import org.jline.reader.History;
import org.jline.reader.LineReader;
Expand Down Expand Up @@ -56,16 +56,16 @@
import static com.google.common.io.ByteStreams.nullOutputStream;
import static com.google.common.io.Files.asCharSource;
import static com.google.common.util.concurrent.Uninterruptibles.awaitUninterruptibly;
import static io.prestosql.cli.Completion.commandCompleter;
import static io.prestosql.cli.Help.getHelpText;
import static io.prestosql.cli.QueryPreprocessor.preprocessQuery;
import static io.prestosql.cli.TerminalUtils.closeTerminal;
import static io.prestosql.cli.TerminalUtils.getTerminal;
import static io.prestosql.cli.TerminalUtils.isRealTerminal;
import static io.prestosql.cli.TerminalUtils.terminalEncoding;
import static io.prestosql.client.ClientSession.stripTransactionId;
import static io.prestosql.sql.parser.StatementSplitter.Statement;
import static io.prestosql.sql.parser.StatementSplitter.isEmptyStatement;
import static io.trino.cli.Completion.commandCompleter;
import static io.trino.cli.Help.getHelpText;
import static io.trino.cli.QueryPreprocessor.preprocessQuery;
import static io.trino.cli.TerminalUtils.closeTerminal;
import static io.trino.cli.TerminalUtils.getTerminal;
import static io.trino.cli.TerminalUtils.isRealTerminal;
import static io.trino.cli.TerminalUtils.terminalEncoding;
import static io.trino.client.ClientSession.stripTransactionId;
import static io.trino.sql.parser.StatementSplitter.Statement;
import static io.trino.sql.parser.StatementSplitter.isEmptyStatement;
import static java.lang.String.format;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Locale.ENGLISH;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import java.io.PrintStream;

import static io.prestosql.cli.TerminalUtils.isRealTerminal;
import static io.trino.cli.TerminalUtils.isRealTerminal;
import static java.util.Objects.requireNonNull;

public class ConsolePrinter
Expand Down
10 changes: 5 additions & 5 deletions client/trino-cli/src/main/java/io/trino/cli/CsvPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@

import au.com.bytecode.opencsv.CSVWriter;
import com.google.common.collect.ImmutableList;
import io.prestosql.client.Row;
import io.trino.client.Row;

import java.io.IOException;
import java.io.Writer;
import java.util.List;
import java.util.Map;

import static io.prestosql.cli.AlignedTablePrinter.formatHexDump;
import static io.prestosql.cli.AlignedTablePrinter.formatList;
import static io.prestosql.cli.AlignedTablePrinter.formatMap;
import static io.prestosql.cli.AlignedTablePrinter.formatRow;
import static io.trino.cli.AlignedTablePrinter.formatHexDump;
import static io.trino.cli.AlignedTablePrinter.formatList;
import static io.trino.cli.AlignedTablePrinter.formatMap;
import static io.trino.cli.AlignedTablePrinter.formatRow;
import static java.util.Objects.requireNonNull;

public class CsvPrinter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/
package io.trino.cli;

import io.prestosql.sql.parser.SqlBaseLexer;
import io.prestosql.sql.parser.StatementSplitter;
import io.trino.sql.parser.SqlBaseLexer;
import io.trino.sql.parser.StatementSplitter;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenSource;
import org.jline.reader.Highlighter;
Expand All @@ -27,8 +27,8 @@
import java.util.regex.Pattern;

import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static io.prestosql.cli.Console.STATEMENT_DELIMITERS;
import static io.prestosql.sql.ReservedIdentifiers.sqlKeywords;
import static io.trino.cli.Console.STATEMENT_DELIMITERS;
import static io.trino.sql.ReservedIdentifiers.sqlKeywords;
import static java.util.Locale.ENGLISH;
import static org.jline.utils.AttributedStyle.BOLD;
import static org.jline.utils.AttributedStyle.BRIGHT;
Expand Down
4 changes: 2 additions & 2 deletions client/trino-cli/src/main/java/io/trino/cli/InputParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package io.trino.cli;

import com.google.common.collect.ImmutableSet;
import io.prestosql.sql.parser.StatementSplitter;
import io.trino.sql.parser.StatementSplitter;
import org.jline.reader.EOFError;
import org.jline.reader.ParsedLine;
import org.jline.reader.Parser;
Expand All @@ -24,7 +24,7 @@
import java.util.Set;

import static com.google.common.base.CharMatcher.whitespace;
import static io.prestosql.cli.Console.STATEMENT_DELIMITERS;
import static io.trino.cli.Console.STATEMENT_DELIMITERS;
import static java.util.Locale.ENGLISH;

public class InputParser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.io.Writer;
import java.util.List;

import static io.prestosql.cli.AlignedTablePrinter.formatHexDump;
import static io.trino.cli.AlignedTablePrinter.formatHexDump;
import static java.util.Objects.requireNonNull;

public class JsonPrinter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package io.trino.cli;

import io.airlift.units.Duration;
import io.prestosql.client.StatementClient;
import io.trino.client.StatementClient;

import java.io.Closeable;
import java.io.IOException;
Expand Down
6 changes: 3 additions & 3 deletions client/trino-cli/src/main/java/io/trino/cli/Presto.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

import com.google.common.net.HostAndPort;
import io.airlift.units.Duration;
import io.prestosql.cli.ClientOptions.ClientExtraCredential;
import io.prestosql.cli.ClientOptions.ClientResourceEstimate;
import io.prestosql.cli.ClientOptions.ClientSessionProperty;
import io.trino.cli.ClientOptions.ClientExtraCredential;
import io.trino.cli.ClientOptions.ClientResourceEstimate;
import io.trino.cli.ClientOptions.ClientSessionProperty;
import picocli.CommandLine;
import picocli.CommandLine.IVersionProvider;

Expand Down
26 changes: 13 additions & 13 deletions client/trino-cli/src/main/java/io/trino/cli/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import io.airlift.log.Logger;
import io.prestosql.cli.ClientOptions.OutputFormat;
import io.prestosql.client.ClientSelectedRole;
import io.prestosql.client.Column;
import io.prestosql.client.ErrorLocation;
import io.prestosql.client.QueryError;
import io.prestosql.client.QueryStatusInfo;
import io.prestosql.client.StatementClient;
import io.prestosql.client.Warning;
import io.trino.cli.ClientOptions.OutputFormat;
import io.trino.client.ClientSelectedRole;
import io.trino.client.Column;
import io.trino.client.ErrorLocation;
import io.trino.client.QueryError;
import io.trino.client.QueryStatusInfo;
import io.trino.client.StatementClient;
import io.trino.client.Warning;
import org.jline.terminal.Terminal;
import org.jline.terminal.Terminal.Signal;
import org.jline.terminal.Terminal.SignalHandler;
Expand All @@ -48,11 +48,11 @@
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Verify.verify;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.NO_HEADER;
import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.NO_HEADER_AND_QUOTES;
import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.NO_QUOTES;
import static io.prestosql.cli.CsvPrinter.CsvOutputFormat.STANDARD;
import static io.prestosql.cli.TerminalUtils.isRealTerminal;
import static io.trino.cli.CsvPrinter.CsvOutputFormat.NO_HEADER;
import static io.trino.cli.CsvPrinter.CsvOutputFormat.NO_HEADER_AND_QUOTES;
import static io.trino.cli.CsvPrinter.CsvOutputFormat.NO_QUOTES;
import static io.trino.cli.CsvPrinter.CsvOutputFormat.STANDARD;
import static io.trino.cli.TerminalUtils.isRealTerminal;
import static java.lang.String.format;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Objects.requireNonNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import static com.google.common.base.Strings.nullToEmpty;
import static com.google.common.base.Throwables.propagateIfPossible;
import static io.airlift.concurrent.MoreFutures.tryGetFutureValue;
import static io.prestosql.cli.TerminalUtils.isRealTerminal;
import static io.trino.cli.TerminalUtils.isRealTerminal;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
Expand Down
28 changes: 14 additions & 14 deletions client/trino-cli/src/main/java/io/trino/cli/QueryRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

import com.google.common.net.HostAndPort;
import io.airlift.log.Logger;
import io.prestosql.client.ClientSession;
import io.prestosql.client.OkHttpUtil;
import io.prestosql.client.StatementClient;
import io.trino.client.ClientSession;
import io.trino.client.OkHttpUtil;
import io.trino.client.StatementClient;
import okhttp3.OkHttpClient;

import java.io.Closeable;
Expand All @@ -27,17 +27,17 @@
import java.util.function.Consumer;

import static com.google.common.base.Preconditions.checkArgument;
import static io.prestosql.client.ClientSession.stripTransactionId;
import static io.prestosql.client.OkHttpUtil.basicAuth;
import static io.prestosql.client.OkHttpUtil.setupChannelSocket;
import static io.prestosql.client.OkHttpUtil.setupCookieJar;
import static io.prestosql.client.OkHttpUtil.setupHttpProxy;
import static io.prestosql.client.OkHttpUtil.setupKerberos;
import static io.prestosql.client.OkHttpUtil.setupSocksProxy;
import static io.prestosql.client.OkHttpUtil.setupSsl;
import static io.prestosql.client.OkHttpUtil.setupTimeouts;
import static io.prestosql.client.OkHttpUtil.tokenAuth;
import static io.prestosql.client.StatementClientFactory.newStatementClient;
import static io.trino.client.ClientSession.stripTransactionId;
import static io.trino.client.OkHttpUtil.basicAuth;
import static io.trino.client.OkHttpUtil.setupChannelSocket;
import static io.trino.client.OkHttpUtil.setupCookieJar;
import static io.trino.client.OkHttpUtil.setupHttpProxy;
import static io.trino.client.OkHttpUtil.setupKerberos;
import static io.trino.client.OkHttpUtil.setupSocksProxy;
import static io.trino.client.OkHttpUtil.setupSsl;
import static io.trino.client.OkHttpUtil.setupTimeouts;
import static io.trino.client.OkHttpUtil.tokenAuth;
import static io.trino.client.StatementClientFactory.newStatementClient;
import static java.util.Objects.requireNonNull;
import static java.util.concurrent.TimeUnit.SECONDS;

Expand Down
28 changes: 14 additions & 14 deletions client/trino-cli/src/main/java/io/trino/cli/StatusPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import io.airlift.log.Logger;
import io.airlift.units.DataSize;
import io.airlift.units.Duration;
import io.prestosql.client.QueryStatusInfo;
import io.prestosql.client.StageStats;
import io.prestosql.client.StatementClient;
import io.prestosql.client.StatementStats;
import io.trino.client.QueryStatusInfo;
import io.trino.client.StageStats;
import io.trino.client.StatementClient;
import io.trino.client.StatementStats;
import org.jline.terminal.Attributes;
import org.jline.terminal.Terminal;

Expand All @@ -34,16 +34,16 @@
import static com.google.common.base.Verify.verify;
import static io.airlift.units.Duration.nanosSince;
import static io.airlift.units.Duration.succinctDuration;
import static io.prestosql.cli.FormatUtils.formatCount;
import static io.prestosql.cli.FormatUtils.formatCountRate;
import static io.prestosql.cli.FormatUtils.formatDataRate;
import static io.prestosql.cli.FormatUtils.formatDataSize;
import static io.prestosql.cli.FormatUtils.formatFinalTime;
import static io.prestosql.cli.FormatUtils.formatProgressBar;
import static io.prestosql.cli.FormatUtils.formatTime;
import static io.prestosql.cli.FormatUtils.pluralize;
import static io.prestosql.cli.TerminalUtils.isRealTerminal;
import static io.prestosql.cli.TerminalUtils.terminalWidth;
import static io.trino.cli.FormatUtils.formatCount;
import static io.trino.cli.FormatUtils.formatCountRate;
import static io.trino.cli.FormatUtils.formatDataRate;
import static io.trino.cli.FormatUtils.formatDataSize;
import static io.trino.cli.FormatUtils.formatFinalTime;
import static io.trino.cli.FormatUtils.formatProgressBar;
import static io.trino.cli.FormatUtils.formatTime;
import static io.trino.cli.FormatUtils.pluralize;
import static io.trino.cli.TerminalUtils.isRealTerminal;
import static io.trino.cli.TerminalUtils.terminalWidth;
import static java.lang.Character.toUpperCase;
import static java.lang.Math.max;
import static java.lang.Math.min;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.collect.ImmutableList;
import io.prestosql.client.QueryData;
import io.prestosql.client.StatementClient;
import io.trino.client.QueryData;
import io.trino.client.StatementClient;
import org.jline.reader.Candidate;
import org.jline.reader.Completer;
import org.jline.reader.LineReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.Iterator;
import java.util.List;

import static io.prestosql.cli.CsvPrinter.formatValue;
import static io.trino.cli.CsvPrinter.formatValue;
import static java.util.Objects.requireNonNull;

public class TsvPrinter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import java.util.List;

import static com.google.common.base.Strings.repeat;
import static io.prestosql.cli.AlignedTablePrinter.consoleWidth;
import static io.prestosql.cli.AlignedTablePrinter.formatValue;
import static io.prestosql.cli.AlignedTablePrinter.maxLineLength;
import static io.trino.cli.AlignedTablePrinter.consoleWidth;
import static io.trino.cli.AlignedTablePrinter.formatValue;
import static io.trino.cli.AlignedTablePrinter.maxLineLength;
import static java.lang.Math.max;
import static java.util.Objects.requireNonNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package io.trino.cli;

import io.prestosql.client.Warning;
import io.trino.client.Warning;

import java.util.List;

Expand Down
Loading

0 comments on commit 03d8e5a

Please sign in to comment.