Skip to content

Conversation

@manuzhang
Copy link
Member

Which issue does this PR close?

Closes #2914.

Rationale for this change

What changes are included in this PR?

How are these changes tested?

Updated CometCastSuite.

@manuzhang manuzhang force-pushed the fix-format-decimal branch 2 times, most recently from 4678d30 to 7a47424 Compare December 16, 2025 14:55
@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.62%. Comparing base (f09f8af) to head (9064dfd).
⚠️ Report is 793 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2916      +/-   ##
============================================
+ Coverage     56.12%   59.62%   +3.49%     
- Complexity      976     1382     +406     
============================================
  Files           119      167      +48     
  Lines         11743    15492    +3749     
  Branches       2251     2568     +317     
============================================
+ Hits           6591     9237    +2646     
- Misses         4012     4955     +943     
- Partials       1140     1300     +160     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@manuzhang manuzhang force-pushed the fix-format-decimal branch 2 times, most recently from ee82678 to a4279f3 Compare December 17, 2025 10:16
@manuzhang
Copy link
Member Author

@rohitrastogi @andygrove Please help review when you find time. Thanks!

@andygrove andygrove self-requested a review December 17, 2025 22:45
test("cast between decimals with higher precision than source") {
// cast between Decimal(10, 2) to Decimal(10,4)
castTest(generateDecimalsPrecision10Scale2(), DataTypes.createDecimalType(10, 4))
castTest(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manuzhang I pulled these test changes locally using latest from main branch and they pass for me, so I'm not sure that these tests reproduce the problem that the fix is intended to address?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andygrove I've reworked my PR. Could you please check again?

@manuzhang manuzhang changed the title fix: format decimal to string when casting to integral type fix: format decimal to string when casting to short Dec 19, 2025
@manuzhang manuzhang closed this Dec 20, 2025
@manuzhang manuzhang reopened this Dec 20, 2025
@manuzhang
Copy link
Member Author

Failed test is not related to this PR.

- Comet native operator after ShuffleQueryStage + ReusedExchange (1 second, 108 milliseconds)
Error: Exception in thread "ScalaTest-dispatcher" java.lang.NoClassDefFoundError: $anonfun$doPreserve$1
	at org.scalatest.tools.PrettyPrinter.traverse(PrettyPrinter.scala:155)
	at org.scalatest.tools.PrettyPrinter.format(PrettyPrinter.scala:231)
	at org.scalatest.tools.PrettyPrinter.$anonfun$format$2(PrettyPrinter.scala:267)
	at org.scalatest.tools.PrettyPrinter.$anonfun$format$2$adapted(PrettyPrinter.scala:267)
	at org.scalatest.tools.XmlUtility$.sbToString(XmlUtility.scala:31)
	at org.scalatest.tools.PrettyPrinter.format(PrettyPrinter.scala:267)
	at org.scalatest.tools.JUnitXmlReporter.xmlify(JUnitXmlReporter.scala:385)
	at org.scalatest.tools.JUnitXmlReporter.writeSuiteFile(JUnitXmlReporter.scala:77)
	at org.scalatest.tools.JUnitXmlReporter.apply(JUnitXmlReporter.scala:59)
	at org.scalatest.DispatchReporter$Propagator.$anonfun$run$10(DispatchReporter.scala:249)
	at org.scalatest.DispatchReporter$Propagator.$anonfun$run$10$adapted(DispatchReporter.scala:248)
	at scala.collection.immutable.List.foreach(List.scala:334)
	at org.scalatest.DispatchReporter$Propagator.run(DispatchReporter.scala:248)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ClassNotFoundException: $anonfun$doPreserve$1
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 14 more
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (concurrentHashTable.inline.hpp:678), pid=78523, tid=28931
#  fatal error: aux_index does not match even or odd indices
#
# JRE version: OpenJDK Runtime Environment Zulu17.62+19-CRaC-CA (17.0.17+10) (build 17.0.17+10-LTS)
# Java VM: OpenJDK 64-Bit Server VM Zulu17.62+19-CRaC-CA (17.0.17+10-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/runner/work/datafusion-comet/datafusion-comet/spark/hs_err_pid78523.log
#
# If you would like to submit a bug report, please visit:
#   http://www.azul.com/support/
#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cast_decimal_to_int16_down formats decimal value incorrectly

4 participants