Skip to content

Commit

Permalink
Fix failing build
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-jf committed Mar 14, 2024
1 parent a3db093 commit f6ac9a5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public BigDecimal toBigDecimal(int index) throws SFException {
ErrorCode.INVALID_VALUE_CONVERT, logicalTypeStr, SnowflakeUtil.BIG_DECIMAL_STR, "");
}

public boolean shouldTreatDecimalAsInt() {
public boolean shouldTreatDecimalAsInt(DataConversionContext context) {
if (!context.getSession().isJdbcArrowTreatDecimalAsInt()
&& !context.getSession().isJdbcTreatDecimalAsInt()) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public BigDecimal toBigDecimal(int index) {
public Object toObject(int index) throws SFException {
if (bigIntVector.isNull(index)) {
return null;
} else if (!shouldTreatDecimalAsInt()) {
} else if (!shouldTreatDecimalAsInt(context)) {
return BigDecimal.valueOf(getLong(index), sfScale);
}
return getLong(index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public BigDecimal toBigDecimal(int index) throws SFException {
public Object toObject(int index) throws SFException {
if (isNull(index)) {
return null;
} else if (!shouldTreatDecimalAsInt()) {
} else if (!shouldTreatDecimalAsInt(context)) {
return BigDecimal.valueOf((long) getInt(index), sfScale);
}
return (long) getInt(index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public double toDouble(int index) throws SFException {
public Object toObject(int index) throws SFException {
if (isNull(index)) {
return null;
} else if (!shouldTreatDecimalAsInt()) {
} else if (!shouldTreatDecimalAsInt(context)) {
return BigDecimal.valueOf((long) getShort(index), sfScale);
}
return (long) getShort(index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public BigDecimal toBigDecimal(int index) throws SFException {
public Object toObject(int index) throws SFException {
if (isNull(index)) {
return null;
} else if (!shouldTreatDecimalAsInt()) {
} else if (!shouldTreatDecimalAsInt(context)) {
return BigDecimal.valueOf((long) getByte(index), sfScale);
}
return (long) toByte(index);
Expand Down

0 comments on commit f6ac9a5

Please sign in to comment.