[ 
https://issues.apache.org/jira/browse/DRILL-3933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16688810#comment-16688810
 ] 

ASF GitHub Bot commented on DRILL-3933:
---------------------------------------

asfgit closed pull request #1538: DRILL-3933: Surround $QUERY variable in 
double-quotes to avoid asterisk expansion in sqlline script
URL: https://github.com/apache/drill/pull/1538
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/distribution/src/resources/sqlline 
b/distribution/src/resources/sqlline
index 1db00839ba9..03ca2d580de 100644
--- a/distribution/src/resources/sqlline
+++ b/distribution/src/resources/sqlline
@@ -91,7 +91,7 @@ if [ -n "$_DRILL_WRAPPER_" ]; then
 fi
 
 if [ -n "$QUERY" ] ; then
-  echo $QUERY | exec $CMD "${SLARGS[@]}"
+  echo "$QUERY" | exec $CMD "${SLARGS[@]}"
 elif [ -n "$FILE" ] ; then
   exec $CMD "${SLARGS[@]}" --run=$FILE
 else


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Error execute select command line sqlline -u -q
> -----------------------------------------------
>
>                 Key: DRILL-3933
>                 URL: https://issues.apache.org/jira/browse/DRILL-3933
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Jon
>            Assignee: Arina Ielchiieva
>            Priority: Major
>              Labels: ready-to-commit
>             Fix For: 1.15.0
>
>
> I'm newbie with Drill and Jira, so sorry if this is not the correct site.
> When I query : "sqlline -u 'jdbc:drill:drillbit=localhost' -q 'select * from 
> hive.database.table;' " return: 
> "select anaconda-ks.cfg build.out install.log install.log.syslog 
> ranger_tutorial sandbox.info start_ambari.sh start_hbase.sh start_solr.sh 
> stop_solr.sh from hive.database.table;"
> Error: PARSE ERROR: Encountered "." at line 1, column 29.
> Was expecting one of:
>     "FROM" ...
>     "," ...
> So, to fix this, i should type all columns to do this one work.
> But, if I used UI, in localhost:8047/query, the query works. Drill is 
> connected to Hive with plugin of course. Is this a bug or something? Bad 
> conf.?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to