mkrasilnikova commented on pull request #31964:
URL: https://github.com/apache/spark/pull/31964#issuecomment-1011260250
Hello! It seems that there is a bug connected with this pull request.
We use two tables in postgresql with fields named in Russian. And when we
are trying to join them with query like
"select view1.`Имя1` , view1.`Имя2`, view2.`Имя3` from view1 left join
view2 on view1.`Имя2`=view2.`Имя4`"
we are getting an error
Caused by: org.postgresql.util.PSQLException: ОШИБКА: столбец "`Имя4`" не
существует
Hint: Возможно, предполагалась ссылка на столбец "tab2.Имя4".
Position: 49
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2657)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2347)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:337)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:484)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:404)
at
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:162)
at
org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114)
at
org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD.compute(JDBCRDD.scala:362)
It says that there is no field "`Имя4`" and offers "tab2.Имя4" instead.
There are no problems with english names.
As far as I can understand to get the data from the second table it
constructs query
SELECT "Имя3","Имя4" FROM "public"."tab2" WHERE ("`Имя4`" IS NOT NULL) ,
and these redundant quotes in WHERE clause are added in method quoteIfNeeded.
--
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]