dongjoon-hyun commented on code in PR #49564:
URL: https://github.com/apache/spark/pull/49564#discussion_r1929915920


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/OracleDialect.scala:
##########
@@ -228,8 +228,8 @@ private case class OracleDialect() extends JdbcDialect with 
SQLConfHelper with N
     extends JdbcSQLQueryBuilder(dialect, options) {
 
     override def build(): String = {
-      val selectStmt = s"SELECT $columnList FROM ${options.tableOrQuery} 
$tableSampleClause" +
-        s" $whereClause $groupByClause $orderByClause"
+      val selectStmt = s"SELECT $hintClause$columnList FROM 
${options.tableOrQuery}" +

Review Comment:
   Maybe, we want to inject a space only if HINT exists as an alternative if we 
want to space, @beliefer . To be clear, I just want to avoid case (1) and not 
against (3).
   ```
   SELECT c1, c2 FROM t // original
   SELECT  c1, c2 FROM t // (1) a normal query with side-effect
   SELECT /*+ HINT */c1, c2 FROM t // (2) this PR
   SELECT /*+ HINT */ c1, c2 FROM t // (3) Jiaan's suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to