-
Notifications
You must be signed in to change notification settings - Fork 4.7k
HIVE-28909: Modify McolumnDescriptor definition in package.jdo to sup… #5804
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: master
Are you sure you want to change the base?
Conversation
…port JDK17 + JDO6.0 For Hive to support JDK17 + JDO6.0, select/update/delete queries of the table are failing to fetch column information of the table. The DataNucleus6.0 is unable to map the Mcolumn Descriptor definition to the underlying table schema due to the presence of CLOB type field for the join condition in the package.jdo file. This patch addresses the issue by avoiding the CLOB column in the join condition.
bb52471
to
b968745
Compare
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.
+1 pending tests
standalone-metastore/metastore-server/src/main/resources/datanucleus-log4j.properties
Outdated
Show resolved
Hide resolved
...metastore-server/src/main/java/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
Outdated
Show resolved
Hide resolved
|
} | ||
|
||
public List<MFieldSchema> getCols() { | ||
return cols; | ||
List<MFieldSchema> schemas = new ArrayList<>(); | ||
if (getColumns() != null) { |
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.
Wonder why we need the double-conversion? Why not store the List<MFieldSchema> cols
passed through the constructor?
private List<MFieldSchema> cols;
private List<MColumn> fields;
public MColumnDescriptor(List<MFieldSchema> cols) { | ||
this.cols = cols; | ||
columns = new ArrayList<>(cols.size()); | ||
for (MFieldSchema schema : cols) { |
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.
minor: why not use stream API?
this.fields = cols.stream().map(schema ->
new MColumn(schema.getName(), schema.getType(), schema.getComment())
.collect(Collectors.toList())
} | ||
} | ||
|
||
public List<MColumn> getColumns() { |
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.
Could we come up with a better naming to distinguish 2: getColumns()
& getCols()
?
keep getCols()
, but rename getColumns()
to getFields
or similar
…port JDK17 + JDO6.0
For Hive to support JDK17 + JDO6.0, select/update/delete queries of the table are failing to fetch column information of the table. The DataNucleus6.0 is unable to map the Mcolumn Descriptor definition to the underlying table schema due to the presence of CLOB type field for the join condition in the package.jdo file. This patch addresses the issue by avoiding the CLOB column in the join condition.
What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?