Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Zhou <[email protected]>
  • Loading branch information
zhouyuan committed Dec 1, 2021
1 parent af6a5d7 commit 7f8904b
Showing 1 changed file with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,24 @@ object ColumnarExpressionConverter extends Logging {
new ColumnarLiteral(lit)
case regexp: RegExpReplace =>
logInfo(s"${expr.getClass} ${expr} is supported, no_cal is $check_if_no_calculation.")
ColumnarRegExpReplaceOperator.create(regexp.subject, regexp.regexp, regexp.rep, regexp.pos, regexp)
ColumnarRegExpReplaceOperator.create(
replaceWithColumnarExpression(
regexp.subject,
attributeSeq,
convertBoundRefToAttrRef = convertBoundRefToAttrRef),
replaceWithColumnarExpression(
regexp.regexp,
attributeSeq,
convertBoundRefToAttrRef = convertBoundRefToAttrRef),
replaceWithColumnarExpression(
regexp.rep,
attributeSeq,
convertBoundRefToAttrRef = convertBoundRefToAttrRef),
replaceWithColumnarExpression(
regexp.pos,
attributeSeq,
convertBoundRefToAttrRef = convertBoundRefToAttrRef),
regexp)

case binArith: BinaryArithmetic =>
check_if_no_calculation = false
Expand Down Expand Up @@ -367,6 +384,8 @@ object ColumnarExpressionConverter extends Logging {
containsSubquery(b.left) || containsSubquery(b.right)
case s: String2TrimExpression =>
s.children.map(containsSubquery).exists(_ == true)
case regexp: RegExpReplace =>
containsSubquery(regexp.subject) || containsSubquery(regexp.regexp) || containsSubquery(regexp.rep) || containsSubquery(regexp.pos)
case expr =>
throw new UnsupportedOperationException(
s" --> ${expr.getClass} | ${expr} is not currently supported.")
Expand Down

0 comments on commit 7f8904b

Please sign in to comment.