-
Notifications
You must be signed in to change notification settings - Fork 33
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
Support s3 using repackage #482
Support s3 using repackage #482
Conversation
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #482 +/- ##
============================================
+ Coverage 81.78% 82.31% +0.52%
- Complexity 193 355 +162
============================================
Files 11 17 +6
Lines 961 1685 +724
Branches 137 240 +103
============================================
+ Hits 786 1387 +601
- Misses 121 204 +83
- Partials 54 94 +40 ☔ View full report in Codecov by Sentry. |
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
@xinyual Can you update the PR description? |
@@ -27,6 +27,7 @@ | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.apache.commons.lang3.math.NumberUtils; | |||
import org.apache.commons.text.StringSubstitutor; | |||
import org.apache.spark.sql.types.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wildcard import is not prefered
build.gradle
Outdated
@@ -46,6 +46,7 @@ plugins { | |||
id 'com.diffplug.spotless' version '6.25.0' | |||
id "io.freefair.lombok" version "8.10.2" | |||
id "de.undercouch.download" version "5.6.0" | |||
//id 'com.github.johnrengelman.shadow' version '8.1.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat: remove the commented out line
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat: remove the new added blank lines
@@ -5,4 +5,5 @@ | |||
|
|||
grant { | |||
permission java.lang.RuntimePermission "accessDeclaredMembers"; | |||
permission java.lang.RuntimePermission "getClassLoader"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this permission used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use it in AccessController.doPrivileged((PrivilegedExceptionAction) () -> DataType.fromDDL(schema)) The dataType needs class loader.
private void extractS3FieldToType(String prefix, Map<String, Object> structMap, Map<String, String> fieldToType) { | ||
String type = (String) structMap.get("type"); | ||
|
||
if (StringUtils.equals(type, "array")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to handle the corner case? e.g. type != "array" and type != "struct"; or "fields" key not in structMap etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The input schema is generated by calling "describe <index_name>" in front end. So we expect the type only equals to "array", "struct" or leaf type (what we want). And the schema is from "describe <index_name>", it muse contain "fields"
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
@xinyual The PR looks good to me overall. As the codecov action fails (80.31% of diff hit (target 81.78%)), I'll approve it once have enough tests |
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
@zhichao-aws Hi Zhichao, I already add enough UT, please approve this PR. |
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/skills/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/skills/backport-2.x
# Create a new branch
git switch --create backport/backport-482-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 785404ddefaa835113d8a525bf7e50f4897b4ba5
# Push it to GitHub
git push --set-upstream origin backport/backport-482-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/skills/backport-2.x Then, create a pull request where the |
* fix conflict Signed-off-by: xinyual <[email protected]> * fix dependency error Signed-off-by: xinyual <[email protected]> --------- Signed-off-by: xinyual <[email protected]>
Description
This PR is to support t2ppl in spark PPL like s3/cloudwatch. We cannot use mapping API to get schema and samples. So frontend need to pass schema and samples. We need to re-parse the schema since the schema is the string. The request body is like
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.