<commit_before>package io.eels

import com.sksamuel.scalax.io.IO
import io.eels.component.csv.CsvSource
import org.scalatest.{Matchers, WordSpec}

class SqlContextTest extends WordSpec with Matchers {

  "SqlContext" should {
    "accept simple queries" in {
      val frame = CsvSource(IO.pathFromResource("/us-500.csv"))
      val sqlContext = SqlContext()
      sqlContext.registerFrame("people", frame)
      val result = sqlContext.sql("select first_name, last_name from people ")
      result.schema shouldBe FrameSchema(List(
        Column("FIRST_NAME", SchemaType.String, true),
        Column("LAST_NAME", SchemaType.String, true)
      ))
      result.size shouldBe 500
    }
    "accept group by queries" in {
      val frame = CsvSource(IO.pathFromResource("/us-500.csv"))
      val sqlContext = SqlContext()
      sqlContext.registerFrame("people", frame)
      val result = sqlContext.sql("select state, count(*) from people group by state")
      result.schema shouldBe FrameSchema(List(
        Column("STATE", SchemaType.String, true),
        Column("COUNT(*)", SchemaType.BigInt, false, 19)
      ))
      result.size shouldBe 47
    }
  }
}<commit_msg>Fixed sql context tests for precision<commit_after>package io.eels

import com.sksamuel.scalax.io.IO
import io.eels.component.csv.CsvSource
import org.scalatest.{Matchers, WordSpec}

class SqlContextTest extends WordSpec with Matchers {

  "SqlContext" should {
    "accept simple queries" in {
      val frame = CsvSource(IO.pathFromResource("/us-500.csv"))
      val sqlContext = SqlContext()
      sqlContext.registerFrame("people", frame)
      val result = sqlContext.sql("select first_name, last_name from people ")
      result.schema shouldBe FrameSchema(List(
        Column("FIRST_NAME", SchemaType.String, true, precision = 255),
        Column("LAST_NAME", SchemaType.String, true, precision = 255)
      ))
      result.size shouldBe 500
    }
    "accept group by queries" in {
      val frame = CsvSource(IO.pathFromResource("/us-500.csv"))
      val sqlContext = SqlContext()
      sqlContext.registerFrame("people", frame)
      val result = sqlContext.sql("select state, count(*) from people group by state")
      result.schema shouldBe FrameSchema(List(
        Column("STATE", SchemaType.String, true, precision = 255),
        Column("COUNT(*)", SchemaType.BigInt, false, 19)
      ))
      result.size shouldBe 47
    }
  }
}
{'fraction_non_alphanumeric': 0.11317637339942173, 'fraction_numerical': 0.014456836018174308, 'mean_word_length': 3.363963963963964, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4222423', 'n_tokens_mistral': 737, 'n_tokens_neox': 702, 'n_words': 179}