-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Allow case-insensitive fieldname matching for struct coercion in hive connector #13423
Conversation
9bb290a
to
21621f2
Compare
21621f2
to
abd25b6
Compare
@ebyhr can you help? thanks! |
w.r.t. #5575 (comment) this is the behavior on the current master head in case we change ordering of foo/FOO. On hdp3 3.1.0, it seems broken and ambiguous. cc @electrum @martint |
testing/trino-product-tests/src/main/java/io/trino/tests/product/hive/TestHiveCoercion.java
Outdated
Show resolved
Hide resolved
As evident from the tests in this PR, the behavior is different across versions/formats. Given that hive's documentation mentions about the case-insensitivity (and we already support this between table and files), IMO it'd be okay to move forward with the change in this PR. |
4bee8dc
to
617d54a
Compare
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: yluan.
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: yluan.
|
1 similar comment
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: yluan.
|
All test passed, I used config: tests | 2022-09-23 07:49:48 INFO: SUCCESS / io.trino.tests.product.hive.TestHiveCoercion.testHiveCoercionTextFile (Groups: hive_coercion, jdbc) took 6.2 seconds [yluan@yluan-ld1 trino]$ testing/bin/ptl test run --environment singlenode --config config-hdp3 --debug -- -t io.trino.tests.product.hive.TestHiveCoercion; |
@phd3 can you review and merge in this change? |
522635c
to
aa74b30
Compare
b144442
to
a1f4a0f
Compare
s | java.lang.AssertionError: row_to_row field is not equal expected: collections to be equal (ignoring order). |
This is what I saw locally: tests | 2022-09-23 06:59:29 INFO: FlakyTestRetryAnalyzer not enabled: CONTINUOUS_INTEGRATION environment is not detected or system property 'io.trino.testng.services.FlakyTestRetryAnalyzer.enabled' is not set to 'true' (actual: ) |
Most of the product test changes are testing hive's behavior, I can also remove those part. |
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: yluan.
|
aae706b
to
891b4bd
Compare
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: yluan.
|
ff499c5
to
c331ad2
Compare
looks good, can you please squash the commits? |
Confirmed with @martint on Slack that the change looks good to him. |
c331ad2
to
7ac9467
Compare
finished squashing. |
It's safe to do so since Hive is case insensitive - https://cwiki.apache.org/confluence/display/Hive/User+FAQ#UserFAQ-AreHiveSQLidentifiers(e.g.tablenames,columnnames,etc)casesensitive? - https://github.com/apache/hive/blob/master/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/StructTypeInfo.java#L106-L116
7ac9467
to
4fecf16
Compare
Merged, thanks! |
Description
Fix
Hive Connector
Related issues, pull requests, and links
#5575
#7350
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) Release notes entries required with the following suggested text: