我正在尝试运行最简单的查询。但是它不起作用。
-bash-4.2$ prestosql --execute "select 1;"
Exception in thread "main" io.airlift.airline.ParseArgumentsUnexpectedException: Found unexpected parameters: [1;]
at io.airlift.airline.SingleCommand.validate(SingleCommand.java:98)
at io.airlift.airline.SingleCommand.parse(SingleCommand.java:65)
at io.airlift.airline.SingleCommand.parse(SingleCommand.java:56)
at io.prestosql.cli.Presto.main(Presto.java:24)
但是 --file 选项工作正常
-bash-4.2$ cat a.sql
select 1;
-bash-4.2$ prestosql --file a.sql > result
-bash-4.2$ cat result
"1"
有任何想法吗?UPD:试图逃避';' 带反斜杠没有帮助(
-bash-4.2$ prestosql --execute "select 1"
Exception in thread "main" io.airlift.airline.ParseArgumentsUnexpectedException: Found unexpected parameters: [1]
at io.airlift.airline.SingleCommand.validate(SingleCommand.java:98)
at io.airlift.airline.SingleCommand.parse(SingleCommand.java:65)
at io.airlift.airline.SingleCommand.parse(SingleCommand.java:56)
at io.prestosql.cli.Presto.main(Presto.java:24)
-bash-4.2$ prestosql --execute "select 1\;"
Exception in thread "main" io.airlift.airline.ParseArgumentsUnexpectedException: Found unexpected parameters: [1\;]
at io.airlift.airline.SingleCommand.validate(SingleCommand.java:98)
at io.airlift.airline.SingleCommand.parse(SingleCommand.java:65)
at io.airlift.airline.SingleCommand.parse(SingleCommand.java:56)
at io.prestosql.cli.Presto.main(Presto.java:24)