public class UnparseTranslator extends Object
| Constructor and Description |
|---|
UnparseTranslator(org.apache.hadoop.conf.Configuration configuration) |
UnparseTranslator(Quotation quotation) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCopyTranslation(ASTNode targetNode,
ASTNode sourceNode)
Register a "copy" translation in which a node will be translated into
whatever the translation turns out to be for another node (after
previously registered translations have already been performed).
|
void |
addDefaultValueTranslation(ASTNode exprNode,
String defaultValue) |
void |
addIdentifierTranslation(ASTNode identifier)
Register a translation for an identifier.
|
void |
addTableNameTranslation(ASTNode tableName,
String currentDatabaseName)
Register a translation for an tabName.
|
void |
applyTranslations(org.antlr.runtime.TokenRewriteStream tokenRewriteStream,
String programName) |
void |
clear() |
void |
enable()
Enable this translator.
|
public UnparseTranslator(org.apache.hadoop.conf.Configuration configuration)
public UnparseTranslator(Quotation quotation)
public void enable()
public void addTableNameTranslation(ASTNode tableName, String currentDatabaseName)
tableName - source node (which must be an tabName) to be replacedpublic void addIdentifierTranslation(ASTNode identifier)
identifier - source node (which must be an identifier) to be replacedpublic void addDefaultValueTranslation(ASTNode exprNode, String defaultValue)
public void addCopyTranslation(ASTNode targetNode, ASTNode sourceNode)
targetNode - node whose subtree is to be replacedsourceNode - the node providing the replacement textpublic void applyTranslations(org.antlr.runtime.TokenRewriteStream tokenRewriteStream,
String programName)
public void clear()
Copyright © 2024 The Apache Software Foundation. All rights reserved.