Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cast negative zero to string inconsistent with Spark #1036

Open
andygrove opened this issue Oct 25, 2024 · 1 comment
Open

cast negative zero to string inconsistent with Spark #1036

andygrove opened this issue Oct 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@andygrove
Copy link
Member

Describe the bug

SQL

SELECT c8, length(c8) AS x FROM test0 ORDER BY c8;

Spark Plan

AdaptiveSparkPlan isFinalPlan=true
+- == Final Plan ==
   *(2) Sort [c8#8 ASC NULLS FIRST], true, 0
   +- AQEShuffleRead coalesced
      +- ShuffleQueryStage 0
         +- Exchange rangepartitioning(c8#8 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7298]
            +- *(1) Project [c8#8, length(cast(c8#8 as string)) AS x#9969]
               +- *(1) ColumnarToRow
                  +- FileScan parquet [c8#8] Batched: true, DataFilters: [], Format: Parquet, Location: InMemoryFileIndex(1 paths)[file:/home/andy/git/apache/datafusion-comet/fuzz-testing/test0.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c8:float>
+- == Initial Plan ==
   Sort [c8#8 ASC NULLS FIRST], true, 0
   +- Exchange rangepartitioning(c8#8 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7284]
      +- Project [c8#8, length(cast(c8#8 as string)) AS x#9969]
         +- FileScan parquet [c8#8] Batched: true, DataFilters: [], Format: Parquet, Location: InMemoryFileIndex(1 paths)[file:/home/andy/git/apache/datafusion-comet/fuzz-testing/test0.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c8:float>

Comet Plan

AdaptiveSparkPlan isFinalPlan=true
+- == Final Plan ==
   *(1) ColumnarToRow
   +- CometSort [c8#8, x#9975], [c8#8 ASC NULLS FIRST]
      +- AQEShuffleRead coalesced
         +- ShuffleQueryStage 0
            +- CometColumnarExchange rangepartitioning(c8#8 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=7361]
               +- CometProject [c8#8, x#9975], [c8#8, length(cast(c8#8 as string)) AS x#9975]
                  +- CometScan parquet [c8#8] Batched: true, DataFilters: [], Format: CometParquet, Location: InMemoryFileIndex(1 paths)[file:/home/andy/git/apache/datafusion-comet/fuzz-testing/test0.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c8:float>
+- == Initial Plan ==
   CometSort [c8#8, x#9975], [c8#8 ASC NULLS FIRST]
   +- CometColumnarExchange rangepartitioning(c8#8 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=7348]
      +- CometProject [c8#8, x#9975], [c8#8, length(cast(c8#8 as string)) AS x#9975]
         +- CometScan parquet [c8#8] Batched: true, DataFilters: [], Format: CometParquet, Location: InMemoryFileIndex(1 paths)[file:/home/andy/git/apache/datafusion-comet/fuzz-testing/test0.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c8:float>

First difference at row 33:
Spark: 0.0,3
Comet: -0.0,4

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

@andygrove andygrove added the bug Something isn't working label Oct 25, 2024
@andygrove
Copy link
Member Author

This seems like a low priority edge case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant