26#ifndef TABLES_TABLEPARSEPROJECT_H
27#define TABLES_TABLEPARSEPROJECT_H
30#include <casacore/casa/aips.h>
31#include <casacore/tables/TaQL/TableParseTableList.h>
32#include <casacore/tables/TaQL/ExprNode.h>
33#include <casacore/tables/Tables/Table.h>
34#include <casacore/tables/Tables/TableDesc.h>
35#include <casacore/casa/Arrays/ArrayFwd.h>
36#include <casacore/casa/BasicSL/String.h>
37#include <casacore/casa/Containers/Record.h>
42 class TableParseUpdate;
43 class TableExprGroupResult;
114 const String& newNameMask,
187 const Record& attributes);
194 const String& newColName)
const;
String: the storage and methods of handling collections of characters.
Block< uInt > projectExprSubset_p
uInt nColumnsPreCalc() const
Return the number of projected columns used in other clauses such as HAVING which need to be precalcu...
Block< String > columnNames_p
Block< String > columnNameMasks_p
const TableDesc & tableDesc() const
Get the table description.
Block< Bool > projectExprSelColumn_p
void setStoredColumns()
Set the names to the stored columns of the first table.
Table handleColumnFinish(Bool distinct, Bool hasResultSet, TableParseQuery &)
Finish the additions to the block of column names by removing the deleted empty names and creating Ex...
Table makeProjectExprTable(TableParseQuery &)
Make the (empty) table for the expression in the SELECT clause.
void setUpdateNames(std::vector< std::shared_ptr< TableParseUpdate > > &)
Put the column name and mask name into the update objects.
void setColumnNames(const std::vector< std::shared_ptr< TableParseUpdate > > &)
Set the column names to the ones to be updated.
void makeProjectExprSel()
Fill projectExprSelColumn_p telling the columns to be projected at the first stage.
TableExprNode handleKeyCol(const String &name, Bool tryProj, TableParseQuery &)
Find the keyword or column name and create a TableExprNode from it.
Record & dminfo()
Get access to the datamanager info.
std::shared_ptr< TableDesc > tableDesc_p
Bool hasExpressions() const
Are expressions used in the column projection?
void handleColSpec(const String &columnName, const String &likeColName, const String &dataType, const Record &spec, Bool isCOrder)
Keep the column specification in a create table command.
DataType makeDataType(DataType dtype, const String &dtstr, const String &colName)
Make a data type from the string.
void checkTableProjSizes() const
Check if the tables used in selection columns have the same size as the first table given in FROM.
void setDMInfo(const Record &dminfo)
Set the DataManager info for a new table.
void checkCountColumns() const
Check if the COUNT columns are given correctly.
std::pair< ColumnDesc, Record > findColumnInfo(const String &colName, const String &newColName) const
Find the ColumnDesc and data manager info of another column (a LIKE column).
void handleWildColumn(Int stringType, const String &name)
Handle the selection of a wildcarded column name.
Block< TableExprNode > columnExpr_p
const Block< String > & getColumnNames() const
Get the projected column names.
Block< String > columnDtypes_p
void initDescriptions(const TableDesc &desc, const Record &dminfo)
Initialize the table and data manager descriptions.
TableParseProject(const TableParseTableList &tableList)
Constructor fills a reference to the tableList objkect.
void addColumnDesc(TableDesc &td, DataType dtype, const String &colName, Int options, Int ndim, const IPosition &shape, const String &dmType, const String &dmGroup, const String &comment, const TableRecord &keywordSet, const Vector< String > &unitName, const Record &attributes)
Add the description of a column to the table description.
Block< TableRecord > columnKeywords_p
Block< String > columnOldNames_p
void makeUpdate(Bool useSel, TableParseQuery &tpq)
Create TableParseUpdate objects for the selected column expressions.
const Block< TableExprNode > & getColumnExpr() const
Get the projected column expressions.
void handleAddCol(const Record &dmInfo, Table &)
Add columns to the table of ALTER TABLE.
Table project(const Table &tab)
Make the table projection using the selected columns.
const TableParseTableList & tableList_p
void handleColumn(Int stringType, const String &name, const TableExprNode &expr, const String &newName, const String &newNameMask, const String &newDtype, TableParseQuery &)
Add a column to the list of column names.
void getAggrNodes(std::vector< TableExprNodeRep * > &aggr) const
Add possible aggregation functions used in projection to the vector.
Class containing two lists of TableParsePair objects.
this file contains all the compiler specific defines
LatticeExprNode ndim(const LatticeExprNode &expr)
1-argument function to get the dimensionality of a lattice.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
bool Bool
Define the standard types used by Casacore.