Skip to content

bug: log10 returns different results than Spark in some cases #484

Description

@andygrove

Describe the bug

I discovered this bug using Comet Fuzz.

SELECT Log10(c6) FROM test1

[ERROR] Spark and Comet produced different results.

Spark Plan

*(1) Project [LOG10(cast(c6#26 as double)) AS LOG10(c6)#9078]
+- *(1) ColumnarToRow
   +- FileScan parquet [c6#26] Batched: true, DataFilters: [], Format: Parquet, Location: InMemoryFileIndex(1 paths)[file:/Users/andy/git/apple/comet-fuzz/test1.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c6:tinyint>

Comet Plan

*(1) ColumnarToRow
+- CometProject [LOG10(c6)#9082], [LOG10(cast(c6#26 as double)) AS LOG10(c6)#9082]
   +- CometScan parquet [c6#26] Batched: true, DataFilters: [], Format: CometParquet, Location: InMemoryFileIndex(1 paths)[file:/Users/andy/git/apple/comet-fuzz/test1.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c6:tinyint>

Results

Spark produced 200 rows and Comet produced 200 rows.
First difference at row 0:
Spark: [0.0]
Comet: [-Infinity]

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions