You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "shivjha30 (via GitHub)" <gi...@apache.org> on 2024/10/22 05:23:16 UTC

[PR] [wip][HIVE-28585]: Ensure SerDes is case insensitive for data type-'string… [hive]

shivjha30 opened a new pull request, #5515:
URL: https://github.com/apache/hive/pull/5515

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #5515:  [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL
URL: https://github.com/apache/hive/pull/5515


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [WIP][HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2430898672

   
   # @check-spelling-bot Report
   ### :red_circle: Please review
   See the [files](5515/files/) view or the [action log](https://github.com/apache/hive/actions/runs/11473286873) for details.
   
   #### Unrecognized words (1)
   
   Coulmn
   
   <details><summary>Previously acknowledged words that are now absent
   </summary>aarry bytecode HIVEFETCHOUTPUTSERDE timestamplocal yyyy </details>
   
   <details><summary>To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words),
   run the following commands</summary>
   
   ... in a clone of the [git@github.com:shivjha30/hive.git](https://github.com/shivjha30/hive.git) repository
   on the `string` branch:
   
   ```
   update_files() {
   perl -e '
   my @expect_files=qw('".github/actions/spelling/expect.txt"');
   @ARGV=@expect_files;
   my @stale=qw('"$patch_remove"');
   my $re=join "|", @stale;
   my $suffix=".".time();
   my $previous="";
   sub maybe_unlink { unlink($_[0]) if $_[0]; }
   while (<>) {
   if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
   next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
   }; maybe_unlink($previous);'
   perl -e '
   my $new_expect_file=".github/actions/spelling/expect.txt";
   use File::Path qw(make_path);
   use File::Basename qw(dirname);
   make_path (dirname($new_expect_file));
   open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
   my @add=qw('"$patch_add"');
   my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
   @words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
   open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
   close FILE;
   system("git", "add", $new_expect_file);
   '
   }
   
   comment_json=$(mktemp)
   curl -L -s -S \
   -H "Content-Type: application/json" \
   "https://api.github.com/repos/apache/hive/issues/comments/2430898672" > "$comment_json"
   comment_body=$(mktemp)
   jq -r ".body // empty" "$comment_json" > $comment_body
   rm $comment_json
   
   patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")
   
   patch_add=$(perl -e '$/=undef; $_=<>; if (m{Unrecognized words[^<]*</summary>\n*```\n*([^<]*)```\n*</details>$}m) { print "$1" } elsif (m{Unrecognized words[^<]*\n\n((?:\w.*\n)+)\n}m) { print "$1" };' < "$comment_body")
   
   update_files
   rm $comment_body
   git add -u
   ```
   </details>
   
   <!--
   {% comment %}
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to you under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
   
   http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   {% endcomment %}
   -->
   <!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
   <details><summary>If the flagged items do not appear to be text</summary>
   
   If items relate to a ...
   * well-formed pattern.
   
     If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
     try adding it to the `patterns.txt` file.
   
     Patterns are Perl 5 Regular Expressions - you can [test](
   https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
   
     Note that patterns can't match multiline strings.
   
   * binary file.
   
     Please add a file path to the `excludes.txt` file matching the containing file.
   
     File paths are Perl 5 Regular Expressions - you can [test](
   https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
   
     `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
   ../tree/HEAD/README.md) (on whichever branch you're using).
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2649749763

   @zhangbutao Can you help to review the PR and merge it? 
   It might stale if not reviewed/merged 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [WIP][HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2434597220

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on code in PR #5515:
URL: https://github.com/apache/hive/pull/5515#discussion_r1820115094


##########
serde/src/test/org/apache/hadoop/hive/serde2/TestOpenCSVSerde.java:
##########
@@ -39,6 +39,18 @@ public void setup() throws Exception {
     props.setProperty(serdeConstants.LIST_COLUMN_TYPES, "string,string,string");
   }
 
+
+  @Test
+  public void testColumnDeserializeCase() throws Exception {
+    props.setProperty(serdeConstants.LIST_COLUMN_TYPES, "STRING,STRING,STRING");

Review Comment:
   Thanks for the Review @Indhumathi27 
   
   Addressed the comment 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2443461817

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2567569906

   @zhangbutao Thanks for checking the PR, sorry for the delay 
   
   Here is the query from trino 
   `metaTableColumns: value_0,value_1,value_2
   CREATE TABLE your_table_name (
   value_0 STRING,
   value_1 String,
   value_2 string );
   insert into your_table_name values ("hello","yes , okay","1");`
   
   Failure:
   <img width="762" alt="image" src="https://github.com/user-attachments/assets/92527733-0b9c-4a0b-9456-a5fa3fa0620e" />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [WIP][HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2428976032

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [1 New issue](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on code in PR #5515:
URL: https://github.com/apache/hive/pull/5515#discussion_r1827236443


##########
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java:
##########
@@ -384,7 +384,7 @@ public static PrimitiveTypeEntry getTypeEntryFromPrimitiveWritableClass(
    * Get the TypeEntry for the given base type name (int, varchar, etc).
    */
   public static PrimitiveTypeEntry getTypeEntryFromTypeName(String typeName) {
-    return typeNameToTypeEntry.get(typeName);
+    return typeNameToTypeEntry.get(typeName.toLowerCase());

Review Comment:
   @difin Thanks for the review
   Yes, adding return typeNameToTypeEntry.get(typeName.toLowerCase()); is fine. This ensures that the type name is always treated in lowercase, which is consistent with how the types are registered in the typeNameToTypeEntry map.
   <img width="1049" alt="image" src="https://github.com/user-attachments/assets/a2f7fd28-b3b6-4e32-a7ba-80b1b223b642">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2472579396

   @ayushtkn Could you review the PR?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "zhangbutao (via GitHub)" <gi...@apache.org>.
zhangbutao commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2649993205

   > @zhangbutao Thanks for checking the PR, sorry for the delay
   > 
   > Here is the query from trino `metaTableColumns: value_0,value_1,value_2 CREATE TABLE your_table_name ( value_0 STRING, value_1 String, value_2 string ); insert into your_table_name values ("hello","yes , okay","1");`
   > 
   > Failure: <img alt="image" width="762" src="https://private-user-images.githubusercontent.com/149884343/399677670-92527733-0b9c-4a0b-9456-a5fa3fa0620e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNDkwMTIsIm5iZiI6MTczOTI0ODcxMiwicGF0aCI6Ii8xNDk4ODQzNDMvMzk5Njc3NjcwLTkyNTI3NzMzLTBiOWMtNGEwYi05NDU2LWE1ZmEzZmEwNjIwZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwNDM4MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00Nzc5MzE1ZmFiZWE1ODk4MjQxNmY2NDQ3MWQ0ZTE5YTU4Y2Q5ZGQ3MDRlMjljOGI0ZTFlZjg2NjYzNWFkOTAyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.48rRe1jsbM2t-stG2SNmaC3BHogJgMW3VmmZ5n6fGa8">
   
   @shivjha30 I don't understand the example you provided. Trino also doesn't support string type. I think the example is unrelated to this PR.  Could you please provide a specific example about this PR?
   
   BTW, Can we fix the issue from the Trino side? I am concerned that fixing on the hive side will affect more downstream project.
   Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #5515:
URL: https://github.com/apache/hive/pull/5515#discussion_r1821286583


##########
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java:
##########
@@ -384,7 +384,7 @@ public static PrimitiveTypeEntry getTypeEntryFromPrimitiveWritableClass(
    * Get the TypeEntry for the given base type name (int, varchar, etc).
    */
   public static PrimitiveTypeEntry getTypeEntryFromTypeName(String typeName) {
-    return typeNameToTypeEntry.get(typeName);
+    return typeNameToTypeEntry.get(typeName.toLowerCase());

Review Comment:
   > The changes proposed in this pull request aim to make the SerDe API case-insensitive for the data type "string".
   
   This change seems to affect all primitive type and not only "string" type.
   Can this cause any problems?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2462031320

   @zhangbutao Could you please review?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #5515:
URL: https://github.com/apache/hive/pull/5515#discussion_r1821286583


##########
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java:
##########
@@ -384,7 +384,7 @@ public static PrimitiveTypeEntry getTypeEntryFromPrimitiveWritableClass(
    * Get the TypeEntry for the given base type name (int, varchar, etc).
    */
   public static PrimitiveTypeEntry getTypeEntryFromTypeName(String typeName) {
-    return typeNameToTypeEntry.get(typeName);
+    return typeNameToTypeEntry.get(typeName.toLowerCase());

Review Comment:
   > The changes proposed in this pull request aim to make the SerDe API case-insensitive for the data type "string".
   This change seems to affect all primitive type and not only "string" type.
   Can this cause any problems?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2567570352

   @zhangbutao Could you further review the PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2601665247

   @zhangbutao Can you further review the PR and merge it as well


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2953298753

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
   Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [WIP][HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2430959867

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [1 New issue](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "zhangbutao (via GitHub)" <gi...@apache.org>.
zhangbutao commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2577825382

   which trino version did you use for the test?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "zhangbutao (via GitHub)" <gi...@apache.org>.
zhangbutao commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2649766831

   @shivjha30 Sorry for the late reply. will check it later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2785752148

   @zhangbutao 
   The modifications are essential to rectify inconsistencies between Hive and other connectors such as Trino/Presto when utilizing the SerDe API. Hive interprets the data type "STRING" in a case-insensitive manner, whereas the current SerDe implementation does not, resulting in discrepancies. These inconsistencies can lead to divergent behaviors between SQL and HQL queries, potentially causing data processing and integration issues. By implementing case insensitivity in the SerDe API, we can ensure uniform behavior across various APIs and connectors that interface with Hive.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "zhangbutao (via GitHub)" <gi...@apache.org>.
zhangbutao commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2479022812

   > By ensuring case insensitivity in the SerDe API, we can maintain consistent behavior across different APIs and connectors interfacing with Hive.
   
   @shivjha30 Could you please give a sql query example about the SerDes inconsistent consistent between HQL and other SQL(Trino).
   
   Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [WIP][HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2428369743

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [1 New issue](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "Indhumathi27 (via GitHub)" <gi...@apache.org>.
Indhumathi27 commented on code in PR #5515:
URL: https://github.com/apache/hive/pull/5515#discussion_r1818602714


##########
serde/src/test/org/apache/hadoop/hive/serde2/TestOpenCSVSerde.java:
##########
@@ -39,6 +39,18 @@ public void setup() throws Exception {
     props.setProperty(serdeConstants.LIST_COLUMN_TYPES, "string,string,string");
   }
 
+
+  @Test
+  public void testColumnDeserializeCase() throws Exception {
+    props.setProperty(serdeConstants.LIST_COLUMN_TYPES, "STRING,STRING,STRING");

Review Comment:
   Can you modify the column type with different cases for the datatype



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2443965124

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5515&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5515&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5515&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5515)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] [HIVE-28585]: Ensure SerDes is case insensitive for data type-'string' to align with HQL and SQL [hive]

Posted by "shivjha30 (via GitHub)" <gi...@apache.org>.
shivjha30 commented on PR #5515:
URL: https://github.com/apache/hive/pull/5515#issuecomment-2592970280

   @zhangbutao  It is on trino-446 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org