From 19c3ee85ea45c5b5c2a479af17b86ba65d52673b Mon Sep 17 00:00:00 2001 From: "M.Shulhan" Date: Sun, 5 Apr 2009 17:52:57 +0700 Subject: fix sort process. type/vos_TStmtJoin: - deleted, merge into vos_TStmtMeta.h op/vos_File: - file_open: fix memory leak on open fail. - file_raw_copy: new, function to copy file. - file_raw_get_dirname: new, function to get directory name from path. op/vos_Stmt: - stmt_find_by_name: re-structure the switch. - stmt_update_meta: new, update meta filename to the last output name. op/vos_StmtSort: - stmtsort_create: remove free sort->in. - stmtsort_init_output: split into stmtsort_init. - stmtsort_init: new. - stmtsort_destroy: remove unused temporary sort file. proc/vos_create: - vos_process_create: update meta object before processing. proc/vos_join: - change affect by split of stmtsort_init_output. proc/vos_parser: - use 'filename' as an alias if alias is not set in statement. proc/vos_sort: - vos_process_sort: fix bug in sort process. when input file is splitted into several thread and the first split is precisely end in a new-line character, this can cause losing of one row in the output file. - sort_write: use 'get_tmp_dir()' to get temporary directory. proc/vos_sort_merge: - vos_sort_merge: simplified the merge process if only one file to be merged. - single_merge: new. vos: - get_tmp_dir: new, function to get temporary directory. --- type/vos_TStmtJoin.h | 17 ----------------- type/vos_TStmtMeta.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 17 deletions(-) delete mode 100644 type/vos_TStmtJoin.h (limited to 'type') diff --git a/type/vos_TStmtJoin.h b/type/vos_TStmtJoin.h deleted file mode 100644 index aae8fc3..0000000 --- a/type/vos_TStmtJoin.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _VOS_TYPE_STMTJOIN_H -#define _VOS_TYPE_STMTJOIN_H 1 - -enum _stmt_join_flag { - JOIN_NORMAL = 0, - JOIN_OUTER = 1, - JOIN_ANTI = 2, - N_JOIN_FLAG -}; - -enum _stmt_join_sort_flag { - JOIN_UNSORTED = 4, - JOIN_SORTED = 8, - N_JOIN_SORT_FLAG -}; - -#endif diff --git a/type/vos_TStmtMeta.h b/type/vos_TStmtMeta.h index 5e37c3b..6377988 100644 --- a/type/vos_TStmtMeta.h +++ b/type/vos_TStmtMeta.h @@ -3,6 +3,19 @@ #include "type/vos_TField.h" +enum _stmtmeta_flag { + JOIN_NORMAL = 0, + JOIN_OUTER = 1, + JOIN_ANTI = 2, + N_JOIN_FLAG = 3, + + JOIN_UNSORTED = 4, + JOIN_SORTED = 8, + N_JOIN_SORT_FLAG = 9, + + SORT_TMP = 16 +}; + struct StmtMeta { int flag; char *filename; -- cgit v1.3