Skip to content

HIVE-28311: Backward compatibility of java.sql.Date and java.sql.Timestamp in hive-serde#5287

Closed
wecharyu wants to merge 1 commit intoapache:masterfrom
wecharyu:HIVE-28311
Closed

HIVE-28311: Backward compatibility of java.sql.Date and java.sql.Timestamp in hive-serde#5287
wecharyu wants to merge 1 commit intoapache:masterfrom
wecharyu:HIVE-28311

Conversation

@wecharyu
Copy link
Contributor

@wecharyu wecharyu commented Jun 7, 2024

What changes were proposed in this pull request?

Support java.sql.Date and java.sql.Timestamp objects in JavaXXXObjectInspector.

Why are the changes needed?

The old clients before HIVE-20007 convert date value to java.sql.Date and timestamp value to java.sql.Timestamp, but the new HMS only accept internal Date and Timestamp while deserialize the expressions, which would cause ClassCastException.

Does this PR introduce any user-facing change?

No.

Is the change a dependency upgrade?

No.

How was this patch tested?

Add new unit test:

mvn test -Dtest.groups= -Dtest=org.apache.hadoop.hive.serde2.objectinspector.primitive.TestPrimitiveObjectInspectorUtils -pl :hive-serde

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@wecharyu
Copy link
Contributor Author

@zabetak @dengzhhu653 @zhangbutao could you pls review this PR?

@wecharyu wecharyu closed this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants