<commit_before>package com.microsoft.spark1

import org.apache.log4j.Logger
import org.apache.spark.sql.functions._
import org.apache.spark.sql.types._
import org.apache.spark.sql.{DataFrame, Row, SQLContext}
import org.apache.spark.{SparkConf, SparkContext}

object Main {
  val settings = new Settings()
  val logger = Logger.getLogger(getClass.getName)
  val conf = new SparkConf().setAppName("SparkSQLTest")
  val sc = new SparkContext(conf)
  val sqlContext = new SQLContext(sc)

  def main(args: Array[String]) = {
    logger.info("Starting with:  " + settings.inputDataSpec)

    // https://docs.oracle.com/javase/7/docs/api/java/sql/Timestamp.html
    val customSchema = StructType(Array(
      StructField("timestamp", TimestampType, nullable = false),
      StructField("hostname", StringType, nullable = false),
      StructField("portname", StringType, nullable = false),
      StructField("portspeed", LongType, nullable = false),
      StructField("totalrxbytes", LongType, nullable = false),
      StructField("totaltxbytes", LongType, nullable = false)
    ))

    // https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
    val rawDf = sqlContext.read<commit_msg>:lipstick:<commit_after>package com.microsoft.spark1

import org.apache.log4j.Logger
import org.apache.spark.sql.functions._
import org.apache.spark.sql.types._
import org.apache.spark.sql.{DataFrame, Row, SQLContext}
import org.apache.spark.{SparkConf, SparkContext}

object Main {
  val settings = new Settings()
  val logger = Logger.getLogger(getClass.getName)
  val conf = new SparkConf().setAppName("SparkSQLTest")
  val sc = new SparkContext(conf)
  val sqlContext = new SQLContext(sc)

  def main(args: Array[String]) = {
    logger.info("Starting with:  " + settings.inputDataSpec)

    // https://docs.oracle.com/javase/7/docs/api/java/sql/Timestamp.html
    val customSchema = StructType(
      Array(
        StructField("timestamp", TimestampType, nullable = false),
        StructField("hostname", StringType, nullable = false),
        StructField("portname", StringType, nullable = false),
        StructField("portspeed", LongType, nullable = false),
        StructField("totalrxbytes", LongType, nullable = false),
        StructField("totaltxbytes", LongType, nullable = false)
      )
    )

    // https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
    val rawDf = sqlContext.read
{'fraction_non_alphanumeric': 0.12783505154639174, 'fraction_numerical': 0.0032989690721649486, 'mean_word_length': 4.022774327122153, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3305618', 'n_tokens_mistral': 767, 'n_tokens_neox': 737, 'n_words': 148}