hive icon indicating copy to clipboard operation
hive copied to clipboard

HIVE-27741 handle Invalid timezone value in to_utc_timestamp() UDF

Open zratkai opened this issue 2 years ago • 3 comments

Change-Id: I68ee1783614b4b74093df0dddb613fa860ed202a

What changes were proposed in this pull request?

The to_utc_timestamp() UDF used UTC when the given timezone was invalid. It throws exception in this case to avoid data inconsistency.

Why are the changes needed?

To avoid data inconsistency in case of invalid timezone.

Does this PR introduce any user-facing change?

Yes. The to_utc_timestamp() UDF will throw exception in case of invalid timezone.

Is the change a dependency upgrade?

No.

How was this patch tested?

Unit test.

zratkai avatar Jan 18 '24 09:01 zratkai

@okumin @simhadri-g could you please review?

zratkai avatar Feb 05 '24 08:02 zratkai

@okumin @simhadri-g could you please review? Refactored to use ZoneId instead of TimeZone.

zratkai avatar Feb 07 '24 14:02 zratkai

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

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

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Mar 07 '24 16:03 sonarqubecloud[bot]

@okumin @simhadri-g could you please review this?

zratkai avatar Mar 12 '24 12:03 zratkai

Looks good to me. Note that you finally need approval from a committer

okumin avatar Mar 13 '24 12:03 okumin

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

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

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Apr 09 '24 09:04 sonarqubecloud[bot]