-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Add clp_get_json_string
UDF
#82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-0.293-clp-connector
Are you sure you want to change the base?
feat: Add clp_get_json_string
UDF
#82
Conversation
WalkthroughAdds a new Changes
Sequence DiagramsequenceDiagram
participant Query as Presto Query
participant Rewriter as ClpUdfRewriter
participant Scan as TableScanNode
participant Proj as ProjectNode
Query->>Rewriter: rewriteClpUdfs(plan, inProjectNode=false)
alt In ProjectNode
Rewriter->>Proj: Extract project assignments
Note over Rewriter: inProjectNode = true
Rewriter->>Rewriter: Process CLP_GET_JSON_STRING()
Rewriter->>Rewriter: Generate placeholder variable
Rewriter->>Scan: Map synthetic ClpColumnHandle
Rewriter-->>Query: Updated plan with placeholder projection
else In FilterNode
Note over Rewriter: inProjectNode = false
Rewriter->>Rewriter: Standard CLP_GET_* handling
Rewriter-->>Query: Rewritten filter predicate
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
This PR introduces the
clp_get_json_string
UDF, which is rewritten into a special column named__json_string
during UDF rewriting. With Velox support, this UDF enables fetching a serialized JSON string representation of a row.Note:
clp_get_json_string
is currently supported only in projection fields.Checklist
breaking change.
Validation performed
Did an end-to-end testing with a sample dataset
Summary by CodeRabbit
Release Notes
New Features
Improvements
Tests