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

[NSE-1100] Fall back get_json_object when wildcard is contained in json path #1101

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ class ColumnarGetJsonObject(left: Expression, right: Expression, original: GetJs
with ColumnarExpression
with Logging {

buildCheck

// Only literal json path is supported and wildcard is not supported.
def buildCheck: Unit = {
right match {
case literal: ColumnarLiteral =>
val jsonPath = literal.value.toString
if (jsonPath.contains("*")) {
throw new UnsupportedOperationException("Wildcard is NOT supported" +
" in json path for get_json_object.")
}
case _ =>
throw new UnsupportedOperationException("Only literal json path is supported!")
}
}

// TODO: currently we have a codegen implementation, but needs to be optimized.
override def supportColumnarCodegen(args: java.lang.Object): Boolean = {
false
Expand Down