Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove class member for collatrion enabled
  • Loading branch information
GideonPotok committed May 7, 2024
commit c89af544e0cac754f2acac082eb9e1c018e3028a
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
package org.apache.spark.sql.catalyst.expressions.aggregate

import scala.collection.mutable.TreeMap

import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.analysis.{ExpressionBuilder, UnresolvedWithinGroup}
import org.apache.spark.sql.catalyst.expressions.{Ascending, Descending, Expression, ExpressionDescription, ImplicitCastInputTypes, SortOrder}
import org.apache.spark.sql.catalyst.trees.UnaryLike
import org.apache.spark.sql.catalyst.types.PhysicalDataType
import org.apache.spark.sql.catalyst.util.{CollationFactory, GenericArrayData}
import org.apache.spark.sql.errors.QueryCompilationErrors
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.types.{AbstractDataType, AnyDataType, ArrayType, BooleanType, DataType, StringType}
import org.apache.spark.unsafe.types.UTF8String
import org.apache.spark.util.collection.OpenHashMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ abstract class CollationBenchmarkBase extends BenchmarkBase {
collationTypes.foreach { collationType => {
benchmark.addCase(s"$collationType") { _ =>
val modeDefaultCollation = Mode(child =
Literal.create("some_column_name", StringType(collationType)), collationEnabled = true)
Literal.create("some_column_name", StringType(collationType)))
val buffer = new OpenHashMap[AnyRef, Long](value.size)
value.zipWithIndex.sliding(20, 20).foreach(slide => {
slide.foreach { case (v: UTF8String, i: Int) =>
Expand All @@ -215,7 +215,7 @@ abstract class CollationBenchmarkBase extends BenchmarkBase {
}
benchmark.addCase(s"Collation Not Enabled") { _ =>
val modeNoCollation = Mode(child =
Literal("some_column_name"), collationEnabled = false)
Literal("some_column_name"))
val buffer = new OpenHashMap[AnyRef, Long](value.size)
value.zipWithIndex.sliding(20, 20).foreach(slide => {
slide.foreach { case (v: UTF8String, i: Int) =>
Expand Down