JNSimba commented on code in PR #339:
URL:
https://github.com/apache/doris-spark-connector/pull/339#discussion_r2347740568
##########
spark-doris-connector/spark-doris-connector-spark-3.5/src/main/scala/org/apache/doris/spark/read/expression/V2ExpressionBuilder.scala:
##########
@@ -39,24 +53,24 @@ class V2ExpressionBuilder(inValueLengthLimit: Int) {
case expr: Expression =>
expr match {
case literal: Literal[_] => visitLiteral(literal)
- case namedRef: NamedReference => namedRef.toString
+ case namedRef: NamedReference => s"`${namedRef.toString}`"
case e: GeneralScalarExpression => e.name() match {
case "IN" =>
val expressions = e.children()
if (expressions.nonEmpty && expressions.length <=
inValueLengthLimit) {
- s"""`${build(expressions(0))}` IN (${expressions.slice(1,
expressions.length).map(build).mkString(",")})"""
Review Comment:
If I remove it here, there may be errors with keywords?
##########
spark-doris-connector/spark-doris-connector-spark-3.5/src/main/scala/org/apache/doris/spark/read/expression/V2ExpressionBuilder.scala:
##########
@@ -39,24 +53,24 @@ class V2ExpressionBuilder(inValueLengthLimit: Int) {
case expr: Expression =>
expr match {
case literal: Literal[_] => visitLiteral(literal)
- case namedRef: NamedReference => namedRef.toString
+ case namedRef: NamedReference => s"`${namedRef.toString}`"
case e: GeneralScalarExpression => e.name() match {
case "IN" =>
val expressions = e.children()
if (expressions.nonEmpty && expressions.length <=
inValueLengthLimit) {
- s"""`${build(expressions(0))}` IN (${expressions.slice(1,
expressions.length).map(build).mkString(",")})"""
Review Comment:
If remove it here, there may be errors with keywords?
--
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]