<commit_before>package edu.washington.escience.myria.api.encoding;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;

import edu.washington.escience.myria.Schema;
import edu.washington.escience.myria.Type;
import edu.washington.escience.myria.expression.Expression;
import edu.washington.escience.myria.expression.ExpressionOperator;

/**
 * Holds the AST and output name.
 */
public final class ExpressionEncoding extends MyriaApiEncoding implements Serializable {
  /***/
  private static final long serialVersionUID = 1L;

  @JsonProperty
  private final String outputName;

  @JsonProperty
  private final ExpressionOperator rootExpressionOperator;

  private static final ImmutableList<String> requiredFields = ImmutableList.of("outputName", "rootExpressionOperator");

  public ExpressionEncoding() {
    outputName = null;
    rootExpressionOperator = null;
  }

  public ExpressionEncoding(String outputName, ExpressionOperator rootExpressionOperator) {
    this.outputName = outputName;
    this.rootExpressionOperator = rootExpressionOperator;
  }

  @Override
  protected List<String> getRequiredFields() {
    return requiredFields;
  }

  /**
   * @param schema the input schema
   * @return the type of the output of the expression
   */
  public Type getOutputType(final Schema schema) {
    return rootExpressionOperator.getOutputType(schema);
  }

  public String getJavaString(final Schema schema) {
    return rootExpressionOperator.getJavaString(schema);
  }

  public Expression construct() {
    return new Expression(outputName, this);
  }
}<commit_msg>ExpressionEncoding: make the default constructor private<commit_after>package edu.washington.escience.myria.api.encoding;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;

import edu.washington.escience.myria.Schema;
import edu.washington.escience.myria.Type;
import edu.washington.escience.myria.expression.Expression;
import edu.washington.escience.myria.expression.ExpressionOperator;

/**
 * Holds the AST and output name.
 */
public final class ExpressionEncoding extends MyriaApiEncoding implements Serializable {
  /***/
  private static final long serialVersionUID = 1L;

  @JsonProperty
  private final String outputName;

  @JsonProperty
  private final ExpressionOperator rootExpressionOperator;

  private static final ImmutableList<String> requiredFields = ImmutableList.of("outputName", "rootExpressionOperator");

  /**
   * This is not really unused, it's used automagically by Jackson deserialization.
   */
  @SuppressWarnings("unused")
  private ExpressionEncoding() {
    outputName = null;
    rootExpressionOperator = null;
  }

  public ExpressionEncoding(final String outputName, final ExpressionOperator rootExpressionOperator) {
    this.outputName = outputName;
    this.rootExpressionOperator = rootExpressionOperator;
  }

  @Override
  protected List<String> getRequiredFields() {
    return requiredFields;
  }

  /**
   * @param schema the input schema
   * @return the type of the output of the expression
   */
  public Type getOutputType(final Schema schema) {
    return rootExpressionOperator.getOutputType(schema);
  }

  public String getJavaString(final Schema schema) {
    return rootExpressionOperator.getJavaString(schema);
  }

  public Expression construct() {
    return new Expression(outputName, this);
  }
}
{'fraction_non_alphanumeric': 0.0826283135927806, 'fraction_numerical': 0.0005640157924421884, 'mean_word_length': 4.892026578073089, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3141620', 'n_tokens_mistral': 972, 'n_tokens_neox': 936, 'n_words': 241}