mdayakar commented on code in PR #6274:
URL: https://github.com/apache/hive/pull/6274#discussion_r2719739341


##########
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/write/DataWritableWriter.java:
##########
@@ -180,6 +183,23 @@ private DataWriter createWriter(ObjectInspector inspector, 
Type type) {
     }
   }
 
+  /**
+   * Return the decimal type information defined by the Parquet schema. This 
ensures the writer
+   * uses the declared precision/scale.
+   * @param type Type that contains information about the type schema.
+   * @param inspector The object inspector used to get the value type.
+   * @return DecimalTypeInfo The decimal type info object with proper 
precision and scale.
+   */
+  private DecimalTypeInfo getSchemaDecimalTypeInfo(Type type, 
HiveDecimalObjectInspector inspector) {
+    LogicalTypeAnnotation logicalType = type.getLogicalTypeAnnotation();
+    if (logicalType instanceof DecimalLogicalTypeAnnotation) {
+      LogicalTypeAnnotation.DecimalLogicalTypeAnnotation decimal = 
(DecimalLogicalTypeAnnotation) logicalType;

Review Comment:
   yes, SonarQube static code comments also given this comment. I fixed it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to