You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -200,12 +187,16 @@ class CobolSchema(copybook: Copybook,
200
187
casedt: Integralif strictIntegralPrecision =>
201
188
DecimalType(precision = dt.precision, scale =0)
202
189
casedt: Integral=>
190
+
valisBinary= dt.compact.exists(c => c ==COMP4() || c ==COMP5() || c ==COMP9())
203
191
if (dt.precision >Constants.maxLongPrecision) {
204
192
DecimalType(precision = dt.precision, scale =0)
193
+
} elseif (dt.precision ==Constants.maxLongPrecision && isBinary && dt.signPosition.isEmpty) { // promoting unsigned int to long to be able to fit any value
} elseif (dt.precision ==Constants.maxIntegerPrecision && isBinary && dt.signPosition.isEmpty) { // promoting unsigned long to decimal(20) to be able to fit any value
198
+
LongType
199
+
} else {
209
200
IntegerType
210
201
}
211
202
case _ =>thrownewIllegalStateException("Unknown AST object")
@@ -290,53 +281,6 @@ class CobolSchema(copybook: Copybook,
0 commit comments